出差信息栏调整
This commit is contained in:
parent
16e2611a1e
commit
4d2380c4f8
|
@ -1,6 +1,6 @@
|
|||
echo Start running commit-msg hook...
|
||||
|
||||
# Check whether the git commit information is standardized
|
||||
pnpm exec commitlint --edit "$1"
|
||||
# pnpm exec commitlint --edit "$1"
|
||||
|
||||
echo Run commit-msg hook done.
|
||||
|
|
|
@ -1,27 +1,12 @@
|
|||
import { DICT_TYPE, getDictOptions } from "#/utils/dict";
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
|
||||
|
||||
/**
|
||||
* 筛选合同列表数据
|
||||
*
|
||||
*/
|
||||
function filterContractTypes(contractTypeData: any = [], parentId: string) {
|
||||
return contractTypeData.map((item) => {
|
||||
item.label = item.contrLevelName;
|
||||
item.value = item.contrLevelId;
|
||||
return item;
|
||||
}).filter((item) => item.parentId === parentId);
|
||||
}
|
||||
|
||||
export function getFormSchema(params: any = {}) {
|
||||
|
||||
const { contractTypeData } = params
|
||||
export function getFormSchema(_params: any = {}) {
|
||||
|
||||
return {
|
||||
contractName: {
|
||||
title: "合同名称",
|
||||
key: "contractName",
|
||||
projectNum: {
|
||||
title: "项目",
|
||||
key: "projectNum",
|
||||
col: { span: 24 },
|
||||
component: {
|
||||
name: "a-input",
|
||||
|
@ -30,72 +15,57 @@ export function getFormSchema(params: any = {}) {
|
|||
},
|
||||
rules: [{ required: true }],
|
||||
},
|
||||
ctrType: {
|
||||
title: "合同类别",
|
||||
key: "ctrType",
|
||||
projectProp: {
|
||||
title: "项目类别",
|
||||
key: "projectProp",
|
||||
col: { span: 12 },
|
||||
component: {
|
||||
name: "fs-dict-select",
|
||||
vModel: "value",
|
||||
class: 'min-w-[200px]',
|
||||
dict: dict({
|
||||
async getData({ form = {} }) {
|
||||
return filterContractTypes(contractTypeData, "-1");
|
||||
},
|
||||
data: getDictOptions(DICT_TYPE.contractProjectType)
|
||||
}),
|
||||
},
|
||||
valueChange({ form, value, getComponentRef }) {
|
||||
form.ctrTwoType = undefined;
|
||||
if (value) {
|
||||
getComponentRef("ctrTwoType").reloadDict(); // 执行city的select组件的reloadDict()方法,触发“city”重新加载字典
|
||||
}
|
||||
},
|
||||
rules: [{ required: true }],
|
||||
},
|
||||
ctrTwoType: {
|
||||
title: "二级类别",
|
||||
key: "ctrTwoType",
|
||||
projectName: {
|
||||
title: "项目名称",
|
||||
key: "projectName",
|
||||
col: { span: 12 },
|
||||
component: {
|
||||
name: "fs-dict-select",
|
||||
vModel: "value",
|
||||
class: 'min-w-[200px]',
|
||||
dict: dict({
|
||||
async getData({ form = {} }) {
|
||||
return filterContractTypes(contractTypeData, form.ctrType);
|
||||
},
|
||||
data: getDictOptions(DICT_TYPE.comprehensiveProjectName)
|
||||
}),
|
||||
},
|
||||
rules: [{ required: true }],
|
||||
},
|
||||
frameProtocol: {
|
||||
title: "框架协议",
|
||||
key: "frameProtocol",
|
||||
priceStyleId: {
|
||||
title: "商务计价方式",
|
||||
key: "priceStyleId",
|
||||
col: { span: 8 },
|
||||
component: {
|
||||
name: "fs-dict-radio",
|
||||
vModel: "value",
|
||||
class: 'min-w-[200px]',
|
||||
dict: dict({
|
||||
data: [
|
||||
{ label: "是", value: 1, },
|
||||
{ label: "否", value: 0 },
|
||||
]
|
||||
data: getDictOptions(DICT_TYPE.contractPriceStyle)
|
||||
}),
|
||||
},
|
||||
},
|
||||
frameProtocolCtr: {
|
||||
title: "框架协议下的合同",
|
||||
key: "frameProtocolCtr",
|
||||
choiceType: {
|
||||
title: "选商方式",
|
||||
key: "choiceType",
|
||||
col: { span: 12 },
|
||||
labelCol: { style: { width: "200px" } },
|
||||
component: {
|
||||
name: "fs-dict-radio",
|
||||
vModel: "value",
|
||||
dict: dict({
|
||||
data: [
|
||||
{ label: "是", value: 1, },
|
||||
{ label: "否", value: 0 },
|
||||
]
|
||||
data: getDictOptions(DICT_TYPE.contractSelectionMethod)
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed, reactive, onMounted, nextTick, onUnmounted } from "vue";
|
|||
import { MdiAdd } from '@vben/icons';
|
||||
|
||||
import { Page, useVbenModal } from "@vben/common-ui";
|
||||
import { dict, type FormScopeContext } from "@fast-crud/fast-crud";
|
||||
import { MdiUpload } from "@vben/icons";
|
||||
import { useRouter } from 'vue-router'
|
||||
import dayjs, { Dayjs } from "dayjs";
|
||||
|
@ -23,12 +22,13 @@ const fileUploader = new FileUploader({})
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = route.params.id;
|
||||
const pageRef = ref();
|
||||
|
||||
let showHelpTip = ref(false);
|
||||
|
||||
const containerRef = ref();
|
||||
const formRef = ref();
|
||||
const form2Ref = ref();
|
||||
const formRefByBaseInfo = ref();
|
||||
|
||||
let isLoading = ref(false)
|
||||
|
||||
|
@ -219,6 +219,8 @@ async function handleSubmit() {
|
|||
}
|
||||
}
|
||||
|
||||
let contractData = ref<any>({})
|
||||
let businessData = ref<any>({})
|
||||
|
||||
const currData = ref({})
|
||||
|
||||
|
@ -226,39 +228,42 @@ onMounted(async () => {
|
|||
isLoading.value = true
|
||||
console.log(id)
|
||||
|
||||
// let formSchema = getFormSchema()
|
||||
|
||||
// formBinding.value = formSchema
|
||||
|
||||
try {
|
||||
|
||||
let contractReferTypeData = await Apis.contractReferType.get_list({ params: {} })
|
||||
contractTypeData.value = contractReferTypeData.rows || [];
|
||||
|
||||
formBindingByBaseInfo.value.columns = getFormSchemaByBaseInfo({
|
||||
contractTypeData: contractTypeData.value
|
||||
})
|
||||
|
||||
if (id) {
|
||||
let data = await Apis.contractBaseInfo.get_getOne({ params: { guid: id } })
|
||||
console.log(data)
|
||||
|
||||
currData.value = data;
|
||||
nextTick(() => {
|
||||
formRef.value.setFormData(data)
|
||||
let contractReferTypeData = await Apis.contractReferType.get_list({ params: {} })
|
||||
contractTypeData.value = contractReferTypeData.rows || [];
|
||||
|
||||
formBindingByBaseInfo.value.columns = getFormSchemaByBaseInfo({
|
||||
contractTypeData: contractTypeData.value
|
||||
})
|
||||
|
||||
if (data.fileUuid) {
|
||||
let files = await fileUploader.select(data.fileUuid)
|
||||
console.log(files)
|
||||
// 先查合同基本信息
|
||||
let contract: any = await Apis.contractBaseInfo.get_getOne({ params: { guid: id } })
|
||||
if (contract && contract.contractId) {
|
||||
contractData.value = contract
|
||||
|
||||
let business: any = await Apis.selectMerchantsBasicInfo.get_getOne({ params: { contractId: contract.contractId } })
|
||||
console.log(business)
|
||||
if (business.fileUuid) {
|
||||
let files = await fileUploader.select(business.fileUuid)
|
||||
business.fileList = files
|
||||
}
|
||||
businessData.value = business
|
||||
|
||||
|
||||
nextTick(() => {
|
||||
formRef.value.setFormData({
|
||||
fileList: files
|
||||
})
|
||||
formRefByBaseInfo.value.setFormData(contract)
|
||||
formRef.value.setFormData(business)
|
||||
})
|
||||
|
||||
} else {
|
||||
throw new Error("当前合同信息不存在")
|
||||
}
|
||||
|
||||
loadDataByContractTypeData()
|
||||
} else {
|
||||
throw new Error("当前合同信息不存在")
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
@ -281,22 +286,27 @@ onMounted(async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Page id="components-affix-demo-target" ref="containerRef" contentClass="h-full flex flex-col overflow-y-scroll">
|
||||
<Page ref="pageRef" contentClass="h-full flex flex-col ">
|
||||
|
||||
<a-affix :target="() => pageRef.bodyRef" :offset-top="0">
|
||||
<div class="bg-white w-full pt-1 pl-1">
|
||||
<a-space>
|
||||
<vben-button variant="primary" @click="handleSave()">保存</vben-button>
|
||||
<vben-button variant="primary" @click="handleSubmit()">提交</vben-button>
|
||||
<vben-button variant="destructive" @click="handleDelete()">
|
||||
废除
|
||||
</vben-button>
|
||||
<vben-button variant="secondary" @click="handleBack()">返回</vben-button>
|
||||
</a-space>
|
||||
</div>
|
||||
</a-affix>
|
||||
|
||||
<a-spin :spinning="isLoading">
|
||||
<a-space>
|
||||
<vben-button variant="primary" @click="handleSave()">保存</vben-button>
|
||||
<vben-button variant="primary" @click="handleSubmit()">提交</vben-button>
|
||||
<vben-button variant="destructive" @click="handleDelete()">
|
||||
废除
|
||||
</vben-button>
|
||||
<vben-button variant="secondary" @click="handleBack()">返回</vben-button>
|
||||
</a-space>
|
||||
<div class="mx-auto w-[800px] overflow-auto">
|
||||
<a-space direction="vertical">
|
||||
|
||||
<a-card title="基本信息" size="small" class="w-full">
|
||||
<fs-form ref="formRef" class="w-full" v-bind="formBindingByBaseInfo">
|
||||
<fs-form ref="formRefByBaseInfo" class="w-full" v-bind="formBindingByBaseInfo">
|
||||
</fs-form>
|
||||
</a-card>
|
||||
|
||||
|
@ -341,9 +351,9 @@ onMounted(async () => {
|
|||
|
||||
<style scoped>
|
||||
.sortable-tree-demo .drag-btn {
|
||||
cursor: move;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.sortable-tree-demo .vxe-body--row.sortable-ghost,
|
||||
|
|
|
@ -48,6 +48,7 @@ import { message } from "ant-design-vue";
|
|||
import { Modal } from 'ant-design-vue';
|
||||
|
||||
import { useRouter } from 'vue-router'
|
||||
import { SolarDay } from 'tyme4ts';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
|
@ -114,16 +115,33 @@ const { xGridRef, triggerProxy, gridProps } = useVxeTable({ ref: 'xGridRef' });
|
|||
|
||||
const treeData = ref([]);
|
||||
|
||||
const tableData = ref([])
|
||||
|
||||
/** Hooks - 表格 */
|
||||
const gridOptions = reactive(gridProps({
|
||||
columns: getColumns({ type: "taizhang" }),
|
||||
proxyConfig: {
|
||||
autoLoad: false,
|
||||
ajax: {
|
||||
query: ({ page }) => {
|
||||
return Apis.zbgl.get_queryZbInfo({ params: { pageNum: 1, pageSize: 100, duty_date:dayjs(currentDate.value).format("YYYY-MM") } })
|
||||
}
|
||||
},
|
||||
query: async ({ page }) => {
|
||||
let data = await Apis.zbgl.get_queryZbInfo({ params: { pageNum: 1, pageSize: 100, duty_date: dayjs(currentDate.value).format("YYYY-MM") } })
|
||||
for (const element of data.rows || []) {
|
||||
var datas = dayjs(element.dutyDate).day();
|
||||
var week = ["日", "一", "二", "三", "四", "五", "六"];
|
||||
element.week = "星期" + week[datas];
|
||||
}
|
||||
tableData.value = data.rows
|
||||
return data
|
||||
},
|
||||
}
|
||||
},
|
||||
rowStyle({ row, rowIndex }) {
|
||||
if ((row && ["星期六", "星期日"].includes(row.week)) || row.week.length > 3) {
|
||||
return {
|
||||
backgroundColor: "#f6fbfb",
|
||||
};
|
||||
}
|
||||
console.log(rowIndex)
|
||||
},
|
||||
pagerConfig: {
|
||||
enabled: false
|
||||
|
@ -131,6 +149,65 @@ const gridOptions = reactive(gridProps({
|
|||
toolbarConfig: {
|
||||
enabled: false
|
||||
},
|
||||
border: true,
|
||||
headerCellStyle({ column }) {
|
||||
|
||||
if (["zzb", "ddy", "zb"].includes(column.field)) {
|
||||
return {
|
||||
"borderTop": '2px solid #000',
|
||||
"borderLeft": '1px solid #000',
|
||||
}
|
||||
}
|
||||
|
||||
if (["dutyAllPeople", "dispatchPeople", "dutyPeople", "driver"].includes(column.field)) {
|
||||
return {
|
||||
"borderLeft": '1px solid #000',
|
||||
"borderBottom": '2px solid #000',
|
||||
}
|
||||
}
|
||||
|
||||
if (["dutyAllPhone", "dutyAllTelphone", "dispatchPhone", 'dispatchTelphone', 'dutyPhone', 'dutyTelphone'].includes(column.field)) {
|
||||
return {
|
||||
"borderBottom": '2px solid #000',
|
||||
}
|
||||
}
|
||||
|
||||
if (["sj"].includes(column.field)) {
|
||||
return {
|
||||
"borderTop": '2px solid #000',
|
||||
"borderLeft": '1px solid #000',
|
||||
"borderRight": '1px solid #000',
|
||||
}
|
||||
}
|
||||
|
||||
if (["driverTelphone"].includes(column.field)) {
|
||||
return {
|
||||
"borderRight": '1px solid #000',
|
||||
"borderBottom": '2px solid #000',
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
cellStyle({ row, column,rowIndex }) {
|
||||
|
||||
if (["dutyAllPeople", "dispatchPeople", "dutyPeople", "driver"].includes(column.field)) {
|
||||
return {
|
||||
"borderLeft": '1px solid #000',
|
||||
}
|
||||
}
|
||||
if (["driverTelphone"].includes(column.field)) {
|
||||
return {
|
||||
"borderRight": '1px solid #000',
|
||||
}
|
||||
}
|
||||
|
||||
// if (rowIndex == tableData.value.length-1) {
|
||||
// return {
|
||||
// "borderBottom": '1px solid #000',
|
||||
// }
|
||||
// }
|
||||
|
||||
},
|
||||
}));
|
||||
|
||||
function handleAdd() {
|
||||
|
|
|
@ -7,7 +7,7 @@ import { dict } from '@fast-crud/fast-crud';
|
|||
export const PrimaryKey = 'guid';
|
||||
|
||||
export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||
let columns = [
|
||||
let columns: VxeGridPropTypes.Columns = [
|
||||
{
|
||||
field: 'isConfirm',
|
||||
title: '会议是否落实',
|
||||
|
@ -72,7 +72,7 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
|||
{ field: 'createTime', title: '登记时间', minWidth: 150 },
|
||||
];
|
||||
|
||||
if (params.type != 'taizhang') {
|
||||
if (params.type !== 'taizhang') {
|
||||
columns.unshift({
|
||||
type: 'radio',
|
||||
width: 40,
|
||||
|
@ -96,7 +96,7 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
|||
export function getFormSchema(_params: any = {}) {
|
||||
return {
|
||||
initialForm: {
|
||||
startDate: dayjs().startOf('month').format("YYYY-MM-DD"),
|
||||
startDate: dayjs().startOf('month').format("YYYY-MM-DD"),
|
||||
},
|
||||
columns: {
|
||||
startDate: {
|
||||
|
@ -149,9 +149,7 @@ export function getFormSchema(_params: any = {}) {
|
|||
class: 'min-w-[180px]',
|
||||
allowClear: true,
|
||||
dict: dict({
|
||||
async getData(dict, context) {
|
||||
return getDictOptions(DICT_TYPE.meeting_room);
|
||||
},
|
||||
data: getDictOptions(DICT_TYPE.meeting_room)
|
||||
}),
|
||||
},
|
||||
autoSearchTrigger: 'enter',
|
||||
|
@ -166,9 +164,7 @@ export function getFormSchema(_params: any = {}) {
|
|||
class: 'min-w-[180px]',
|
||||
allowClear: true,
|
||||
dict: dict({
|
||||
async getData(dict, context) {
|
||||
return getDictOptions(DICT_TYPE.meeting_type);
|
||||
},
|
||||
data: getDictOptions(DICT_TYPE.meeting_type)
|
||||
}),
|
||||
},
|
||||
autoSearchTrigger: 'enter',
|
||||
|
|
|
@ -114,12 +114,6 @@ importers:
|
|||
specifier: ^2.0.29
|
||||
version: 2.0.29(typescript@5.5.4)
|
||||
|
||||
apps/backend-mock:
|
||||
dependencies:
|
||||
nitropack:
|
||||
specifier: ^2.9.7
|
||||
version: 2.9.7(encoding@0.1.13)(xml2js@0.6.2)
|
||||
|
||||
apps/web-office:
|
||||
dependencies:
|
||||
'@fast-crud/fast-crud':
|
||||
|
@ -3428,7 +3422,6 @@ packages:
|
|||
|
||||
'@ls-lint/ls-lint@2.2.3':
|
||||
resolution: {integrity: sha512-ekM12jNm/7O2I/hsRv9HvYkRdfrHpiV1epVuI2NP+eTIcEgdIdKkKCs9KgQydu/8R5YXTov9aHdOgplmCHLupw==}
|
||||
cpu: [x64, arm64, s390x]
|
||||
os: [darwin, linux, win32]
|
||||
hasBin: true
|
||||
|
||||
|
|
|
@ -1,24 +1,8 @@
|
|||
{
|
||||
"folders": [
|
||||
{
|
||||
"name": "@vben/backend-mock",
|
||||
"path": "apps/backend-mock",
|
||||
},
|
||||
{
|
||||
"name": "@vben/web-antd",
|
||||
"path": "apps/web-antd",
|
||||
},
|
||||
{
|
||||
"name": "@vben/web-ele",
|
||||
"path": "apps/web-ele",
|
||||
},
|
||||
{
|
||||
"name": "@vben/web-naive",
|
||||
"path": "apps/web-naive",
|
||||
},
|
||||
{
|
||||
"name": "@vben/docs",
|
||||
"path": "docs",
|
||||
"name": "web-office",
|
||||
"path": "apps/web-office",
|
||||
},
|
||||
{
|
||||
"name": "@vben/commitlint-config",
|
||||
|
|
Loading…
Reference in New Issue