合同查询、日志
This commit is contained in:
@ -454,8 +454,18 @@
|
|||||||
}
|
}
|
||||||
const dateChange = (val, k) => {
|
const dateChange = (val, k) => {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
k=='dateFrom' && (formState.dateFrom = null)
|
if (k=='dateFrom') {
|
||||||
k=='dateTo' && (formState.dateTo = null)
|
formState.dateFrom = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateFrom = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
if (k=='dateTo') {
|
||||||
|
formState.dateTo = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateTo = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const disabledDateStart = (startValue) => {
|
const disabledDateStart = (startValue) => {
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="销售区域" name="salesAreaCode">
|
<a-form-item label="销售区域" name="salesAreaCode">
|
||||||
<a-cascader v-model:value="formState.salesAreaCode" :options="options" :load-data="loadData" @change="onChange" change-on-select
|
<a-cascader v-model:value="formState.salesAreaCode" :options="options" :load-data="loadData" :disabled="isDisable" @change="onChange" change-on-select
|
||||||
:field-names="{label: 'fullName', value: 'code', children: 'children'}" placeholder="请选择区域"/>
|
:field-names="{label: 'fullName', value: 'code', children: 'children'}" placeholder="请选择区域"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -334,9 +334,9 @@
|
|||||||
|
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
approCode: 'WTJ',
|
approCode: 'WTJ',
|
||||||
typeCode: 'SP',
|
typeCode: 'PI',
|
||||||
onlineSign: 'N',
|
onlineSign: 'N',
|
||||||
cpTableName: 'lng_customer',
|
cpTableName: 'lng_supplier',
|
||||||
lngContractPurIntList: [{}]
|
lngContractPurIntList: [{}]
|
||||||
});
|
});
|
||||||
const [register, { openModal:openModal}] = useModal();
|
const [register, { openModal:openModal}] = useModal();
|
||||||
@ -532,8 +532,18 @@
|
|||||||
}
|
}
|
||||||
const dateChange = (val, k) => {
|
const dateChange = (val, k) => {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
k=='dateFrom' && (formState.dateFrom = null)
|
if (k=='dateFrom') {
|
||||||
k=='dateTo' && (formState.dateTo = null)
|
formState.dateFrom = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateFrom = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
if (k=='dateTo') {
|
||||||
|
formState.dateTo = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateTo = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const disabledDateStart = (startValue) => {
|
const disabledDateStart = (startValue) => {
|
||||||
|
|||||||
@ -6,7 +6,16 @@ export const formConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
field: 'dateFrom',
|
||||||
|
label: '有效期',
|
||||||
|
component: 'RangePicker',
|
||||||
|
componentProps: {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
style: { width: '100%' },
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'kName',
|
field: 'kName',
|
||||||
label: '合同号/名称',
|
label: '合同号/名称',
|
||||||
@ -17,29 +26,29 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
label: '供应商',
|
label: '供应商',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'comId',
|
|
||||||
label: '合同主体',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'pointUpName',
|
field: 'pointUpName',
|
||||||
label: '上载点',
|
label: '上载点',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
// componentProps: {
|
},
|
||||||
// showSearch: true,
|
{
|
||||||
// optionFilterProp: 'label',
|
field: 'comId',
|
||||||
// filterOption: (input: string, option: any) => {
|
label: '合同主体',
|
||||||
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
component: 'Select',
|
||||||
// },
|
componentProps: {
|
||||||
// options: [
|
showSearch: true,
|
||||||
// // { label: '全部', value: '' },
|
optionFilterProp: 'label',
|
||||||
// ],
|
filterOption: (input: string, option: any) => {
|
||||||
// placeholder: '请选择',
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
// allowClear: true,
|
},
|
||||||
|
options: [
|
||||||
|
// { label: '全部', value: '' },
|
||||||
|
],
|
||||||
|
placeholder: '请选择',
|
||||||
|
allowClear: true,
|
||||||
|
|
||||||
// getPopupContainer: () => document.body,
|
getPopupContainer: () => document.body,
|
||||||
// },
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'approCode',
|
field: 'approCode',
|
||||||
|
|||||||
@ -25,12 +25,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="有效期开始" name="dateFrom">
|
<a-form-item label="有效期开始" name="dateFrom">
|
||||||
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" @change="dateChange(formState.dateFrom, 'dateFrom')" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="有效期结束" name="dateTo">
|
<a-form-item label="有效期结束" name="dateTo">
|
||||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -243,7 +243,7 @@
|
|||||||
onlineSign: 'N',
|
onlineSign: 'N',
|
||||||
cpTableName: 'lng_supplier',
|
cpTableName: 'lng_supplier',
|
||||||
curCode: 'CNY',
|
curCode: 'CNY',
|
||||||
lngContractPurPngList: [{}]
|
lngContractPurPngList: [{}],
|
||||||
});
|
});
|
||||||
const [register, { openModal:openModal}] = useModal();
|
const [register, { openModal:openModal}] = useModal();
|
||||||
const [registerDept, { openModal:openModalDept}] = useModal();
|
const [registerDept, { openModal:openModalDept}] = useModal();
|
||||||
@ -390,6 +390,22 @@
|
|||||||
const getApproContractFactList = (val) => {
|
const getApproContractFactList = (val) => {
|
||||||
dataListContractFact.value = val
|
dataListContractFact.value = val
|
||||||
}
|
}
|
||||||
|
const dateChange = (val, k) => {
|
||||||
|
if (!val) {
|
||||||
|
if (k=='dateFrom') {
|
||||||
|
formState.dateFrom = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateFrom = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
if (k=='dateTo') {
|
||||||
|
formState.dateTo = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateTo = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const disabledDateStart = (startValue) => {
|
const disabledDateStart = (startValue) => {
|
||||||
const endValue = formState?.dateTo;
|
const endValue = formState?.dateTo;
|
||||||
if (!startValue || !endValue) {
|
if (!startValue || !endValue) {
|
||||||
|
|||||||
@ -58,6 +58,7 @@
|
|||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
@ -76,7 +77,7 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
//所有按钮
|
//所有按钮
|
||||||
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
|
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'approve', 'update']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'approve', 'update']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
@ -91,7 +92,7 @@
|
|||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove}
|
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove, datalog : handleDatalog}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -124,7 +125,7 @@
|
|||||||
gutter: 16,
|
gutter: 16,
|
||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: true,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
@ -322,8 +323,18 @@
|
|||||||
dbClickRow(record);
|
dbClickRow(record);
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
let res = await getAllCom() || []
|
||||||
|
customSearchFormSchema.value.forEach(v => {
|
||||||
|
if (v.field == 'comId') {
|
||||||
|
v.componentProps.options = res.map(v=> {
|
||||||
|
return {
|
||||||
|
label: v.name,
|
||||||
|
value: v.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
if (schemaIdComputedRef.value) {
|
if (schemaIdComputedRef.value) {
|
||||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||||
bus.on(CREATE_FLOW, handleRefresh);
|
bus.on(CREATE_FLOW, handleRefresh);
|
||||||
@ -350,7 +361,7 @@
|
|||||||
let approveBtn: ActionItem[] = [];
|
let approveBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) {
|
if (['view', 'copyData', 'enable', 'disable','datalog'].includes(button.code)) {
|
||||||
actionsList.push({
|
actionsList.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
@ -504,4 +515,22 @@
|
|||||||
.hide{
|
.hide{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep( .ant-col-8:nth-child(1)) {
|
||||||
|
width: 320px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||||
|
width: 80px !important;
|
||||||
|
}
|
||||||
|
:deep( .ant-col-8:nth-child(4)) {
|
||||||
|
width: 320px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
||||||
|
width: 80px !important;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(5) .ant-select-selector) {
|
||||||
|
width: 172px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -6,6 +6,16 @@ export const formConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
field: 'dateFrom',
|
||||||
|
label: '有效期',
|
||||||
|
component: 'RangePicker',
|
||||||
|
componentProps: {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
style: { width: '100%' },
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'kName',
|
field: 'kName',
|
||||||
label: '合同号/名称',
|
label: '合同号/名称',
|
||||||
@ -16,16 +26,30 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
label: '客户',
|
label: '客户',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'comId',
|
|
||||||
label: '合同主体',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'pointUpName',
|
field: 'pointUpName',
|
||||||
label: '交割点',
|
label: '交割点',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'comId',
|
||||||
|
label: '合同主体',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
showSearch: true,
|
||||||
|
optionFilterProp: 'label',
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
// { label: '全部', value: '' },
|
||||||
|
],
|
||||||
|
placeholder: '请选择',
|
||||||
|
allowClear: true,
|
||||||
|
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'approCode',
|
field: 'approCode',
|
||||||
label: '审批状态',
|
label: '审批状态',
|
||||||
|
|||||||
@ -25,12 +25,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="有效期开始" name="dateFrom">
|
<a-form-item label="有效期开始" name="dateFrom">
|
||||||
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" @change="dateChange(formState.dateFrom, 'dateFrom')" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="有效期结束" name="dateTo">
|
<a-form-item label="有效期结束" name="dateTo">
|
||||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -419,9 +419,24 @@
|
|||||||
dataListAppro.value = val
|
dataListAppro.value = val
|
||||||
}
|
}
|
||||||
const getApproContractFactList = (val) => {
|
const getApproContractFactList = (val) => {
|
||||||
console.log(val, 'dataListContractFact')
|
|
||||||
dataListContractFact.value = val
|
dataListContractFact.value = val
|
||||||
}
|
}
|
||||||
|
const dateChange = (val, k) => {
|
||||||
|
if (!val) {
|
||||||
|
if (k=='dateFrom') {
|
||||||
|
formState.dateFrom = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateFrom = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
if (k=='dateTo') {
|
||||||
|
formState.dateTo = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateTo = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const disabledDateStart = (startValue) => {
|
const disabledDateStart = (startValue) => {
|
||||||
const endValue = formState?.dateTo;
|
const endValue = formState?.dateTo;
|
||||||
if (!startValue || !endValue) {
|
if (!startValue || !endValue) {
|
||||||
|
|||||||
@ -58,7 +58,7 @@
|
|||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
//所有按钮
|
//所有按钮
|
||||||
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false},{"isUse":true,"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
|
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false},{"isUse":true,"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'update', 'approve']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'update', 'approve']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
@ -91,7 +91,7 @@
|
|||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove}
|
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove,datalog : handleDatalog}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -124,7 +124,7 @@
|
|||||||
gutter: 16,
|
gutter: 16,
|
||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: true,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
@ -321,8 +321,18 @@
|
|||||||
dbClickRow(record);
|
dbClickRow(record);
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
let res = await getAllCom() || []
|
||||||
|
customSearchFormSchema.value.forEach(v => {
|
||||||
|
if (v.field == 'comId') {
|
||||||
|
v.componentProps.options = res.map(v=> {
|
||||||
|
return {
|
||||||
|
label: v.name,
|
||||||
|
value: v.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
if (schemaIdComputedRef.value) {
|
if (schemaIdComputedRef.value) {
|
||||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||||
bus.on(CREATE_FLOW, handleRefresh);
|
bus.on(CREATE_FLOW, handleRefresh);
|
||||||
@ -349,7 +359,7 @@
|
|||||||
let approveBtn: ActionItem[] = [];
|
let approveBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) {
|
if (['view', 'copyData', 'enable', 'disable', 'datalog'].includes(button.code)) {
|
||||||
actionsList.push({
|
actionsList.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
@ -502,4 +512,21 @@
|
|||||||
.hide{
|
.hide{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
:deep( .ant-col-8:nth-child(1)) {
|
||||||
|
width: 320px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||||
|
width: 80px !important;
|
||||||
|
}
|
||||||
|
:deep( .ant-col-8:nth-child(4)) {
|
||||||
|
width: 320px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
||||||
|
width: 80px !important;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(5) .ant-select-selector) {
|
||||||
|
width: 172px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -6,7 +6,16 @@ export const formConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
field: 'dateFrom',
|
||||||
|
label: '有效期',
|
||||||
|
component: 'RangePicker',
|
||||||
|
componentProps: {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
style: { width: '100%' },
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'kName',
|
field: 'kName',
|
||||||
label: '合同号/名称',
|
label: '合同号/名称',
|
||||||
@ -17,6 +26,38 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
label: '客户',
|
label: '客户',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'comId',
|
||||||
|
label: '合同主体',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
showSearch: true,
|
||||||
|
optionFilterProp: 'label',
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
// { label: '全部', value: '' },
|
||||||
|
],
|
||||||
|
placeholder: '请选择',
|
||||||
|
allowClear: true,
|
||||||
|
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'approCode',
|
||||||
|
label: '审批状态',
|
||||||
|
component: 'XjrSelect',
|
||||||
|
componentProps: {
|
||||||
|
datasourceType: 'dic',
|
||||||
|
params: { itemId: '1990669393069129729' },
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'value',
|
||||||
|
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
|
|||||||
@ -30,12 +30,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="有效期开始" name="dateFrom">
|
<a-form-item label="有效期开始" name="dateFrom">
|
||||||
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" @change="dateChange(formState.dateFrom, 'dateFrom')" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="有效期结束" name="dateTo">
|
<a-form-item label="有效期结束" name="dateTo">
|
||||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -366,9 +366,24 @@
|
|||||||
dataListAppro.value = val
|
dataListAppro.value = val
|
||||||
}
|
}
|
||||||
const getApproContractFactList = (val) => {
|
const getApproContractFactList = (val) => {
|
||||||
console.log(val, 'dataListContractFact')
|
|
||||||
dataListContractFact.value = val
|
dataListContractFact.value = val
|
||||||
}
|
}
|
||||||
|
const dateChange = (val, k) => {
|
||||||
|
if (!val) {
|
||||||
|
if (k=='dateFrom') {
|
||||||
|
formState.dateFrom = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateFrom = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
if (k=='dateTo') {
|
||||||
|
formState.dateTo = dayjs(new Date())
|
||||||
|
setTimeout(() => {
|
||||||
|
formState.dateTo = null
|
||||||
|
}, );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const disabledDateStart = (startValue) => {
|
const disabledDateStart = (startValue) => {
|
||||||
const endValue = formState?.dateTo;
|
const endValue = formState?.dateTo;
|
||||||
if (!startValue || !endValue) {
|
if (!startValue || !endValue) {
|
||||||
|
|||||||
@ -59,6 +59,7 @@
|
|||||||
|
|
||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
@ -77,7 +78,7 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
//所有按钮
|
//所有按钮
|
||||||
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"提交","code":"submit","icon":"ant-design:send-outlined","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
|
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"提交","code":"submit","icon":"ant-design:send-outlined","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','update', 'approve','submit']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','update', 'approve','submit']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
@ -92,7 +93,7 @@
|
|||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,update : handleUpdate,approve : handleApprove,delete : handleDelete,}
|
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,update : handleUpdate,approve : handleApprove,delete : handleDelete,datalog : handleDatalog}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -124,7 +125,7 @@
|
|||||||
gutter: 16,
|
gutter: 16,
|
||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: true,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
@ -323,8 +324,18 @@
|
|||||||
dbClickRow(record);
|
dbClickRow(record);
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
let res = await getAllCom() || []
|
||||||
|
customSearchFormSchema.value.forEach(v => {
|
||||||
|
if (v.field == 'comId') {
|
||||||
|
v.componentProps.options = res.map(v=> {
|
||||||
|
return {
|
||||||
|
label: v.name,
|
||||||
|
value: v.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
if (schemaIdComputedRef.value) {
|
if (schemaIdComputedRef.value) {
|
||||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||||
bus.on(CREATE_FLOW, handleRefresh);
|
bus.on(CREATE_FLOW, handleRefresh);
|
||||||
@ -351,7 +362,7 @@
|
|||||||
let approveBtn: ActionItem[] = [];
|
let approveBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData'].includes(button.code)) {
|
if (['view', 'copyData','datalog'].includes(button.code)) {
|
||||||
actionsList.push({
|
actionsList.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
@ -503,4 +514,22 @@
|
|||||||
.hide{
|
.hide{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep( .ant-col-8:nth-child(1)) {
|
||||||
|
width: 320px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||||
|
width: 80px !important;
|
||||||
|
}
|
||||||
|
:deep( .ant-col-8:nth-child(4)) {
|
||||||
|
width: 320px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
||||||
|
width: 80px !important;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(4) .ant-select-selector) {
|
||||||
|
width: 232px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user