合同查询、日志
This commit is contained in:
@ -454,8 +454,18 @@
|
||||
}
|
||||
const dateChange = (val, k) => {
|
||||
if (!val) {
|
||||
k=='dateFrom' && (formState.dateFrom = null)
|
||||
k=='dateTo' && (formState.dateTo = null)
|
||||
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) => {
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<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="请选择区域"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@ -334,9 +334,9 @@
|
||||
|
||||
const formState = reactive({
|
||||
approCode: 'WTJ',
|
||||
typeCode: 'SP',
|
||||
typeCode: 'PI',
|
||||
onlineSign: 'N',
|
||||
cpTableName: 'lng_customer',
|
||||
cpTableName: 'lng_supplier',
|
||||
lngContractPurIntList: [{}]
|
||||
});
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
@ -532,8 +532,18 @@
|
||||
}
|
||||
const dateChange = (val, k) => {
|
||||
if (!val) {
|
||||
k=='dateFrom' && (formState.dateFrom = null)
|
||||
k=='dateTo' && (formState.dateTo = null)
|
||||
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) => {
|
||||
|
||||
@ -6,7 +6,16 @@ export const formConfig = {
|
||||
};
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '有效期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'kName',
|
||||
label: '合同号/名称',
|
||||
@ -17,29 +26,29 @@ export const searchFormSchema: FormSchema[] = [
|
||||
label: '供应商',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'comId',
|
||||
label: '合同主体',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'pointUpName',
|
||||
label: '上载点',
|
||||
component: 'Input',
|
||||
// componentProps: {
|
||||
// showSearch: true,
|
||||
// optionFilterProp: 'label',
|
||||
// filterOption: (input: string, option: any) => {
|
||||
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
// },
|
||||
// options: [
|
||||
// // { label: '全部', value: '' },
|
||||
// ],
|
||||
// placeholder: '请选择',
|
||||
// allowClear: true,
|
||||
},
|
||||
{
|
||||
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,
|
||||
// },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'approCode',
|
||||
|
||||
@ -25,12 +25,12 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
@ -243,7 +243,7 @@
|
||||
onlineSign: 'N',
|
||||
cpTableName: 'lng_supplier',
|
||||
curCode: 'CNY',
|
||||
lngContractPurPngList: [{}]
|
||||
lngContractPurPngList: [{}],
|
||||
});
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
const [registerDept, { openModal:openModalDept}] = useModal();
|
||||
@ -390,6 +390,22 @@
|
||||
const getApproContractFactList = (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 endValue = formState?.dateTo;
|
||||
if (!startValue || !endValue) {
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
@ -76,7 +77,7 @@
|
||||
|
||||
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 buttonConfigs = computed(()=>{
|
||||
@ -91,7 +92,7 @@
|
||||
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 router = useRouter();
|
||||
@ -124,7 +125,7 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
@ -322,8 +323,18 @@
|
||||
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) {
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
bus.on(CREATE_FLOW, handleRefresh);
|
||||
@ -350,7 +361,7 @@
|
||||
let approveBtn: ActionItem[] = [];
|
||||
let hasFlowRecord = false;
|
||||
actionButtonConfig.value?.map((button) => {
|
||||
if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) {
|
||||
if (['view', 'copyData', 'enable', 'disable','datalog'].includes(button.code)) {
|
||||
actionsList.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
@ -504,4 +515,22 @@
|
||||
.hide{
|
||||
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>
|
||||
@ -6,6 +6,16 @@ export const formConfig = {
|
||||
};
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '有效期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'kName',
|
||||
label: '合同号/名称',
|
||||
@ -16,16 +26,30 @@ export const searchFormSchema: FormSchema[] = [
|
||||
label: '客户',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'comId',
|
||||
label: '合同主体',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'pointUpName',
|
||||
label: '交割点',
|
||||
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: '审批状态',
|
||||
|
||||
@ -25,12 +25,12 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
@ -419,9 +419,24 @@
|
||||
dataListAppro.value = val
|
||||
}
|
||||
const getApproContractFactList = (val) => {
|
||||
console.log(val, 'dataListContractFact')
|
||||
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 endValue = formState?.dateTo;
|
||||
if (!startValue || !endValue) {
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
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 buttonConfigs = computed(()=>{
|
||||
@ -91,7 +91,7 @@
|
||||
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 router = useRouter();
|
||||
@ -124,7 +124,7 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
@ -321,8 +321,18 @@
|
||||
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) {
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
bus.on(CREATE_FLOW, handleRefresh);
|
||||
@ -349,7 +359,7 @@
|
||||
let approveBtn: ActionItem[] = [];
|
||||
let hasFlowRecord = false;
|
||||
actionButtonConfig.value?.map((button) => {
|
||||
if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) {
|
||||
if (['view', 'copyData', 'enable', 'disable', 'datalog'].includes(button.code)) {
|
||||
actionsList.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
@ -502,4 +512,21 @@
|
||||
.hide{
|
||||
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>
|
||||
@ -6,7 +6,16 @@ export const formConfig = {
|
||||
};
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '有效期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'kName',
|
||||
label: '合同号/名称',
|
||||
@ -17,6 +26,38 @@ export const searchFormSchema: FormSchema[] = [
|
||||
label: '客户',
|
||||
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[] = [
|
||||
|
||||
@ -30,12 +30,12 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
@ -366,9 +366,24 @@
|
||||
dataListAppro.value = val
|
||||
}
|
||||
const getApproContractFactList = (val) => {
|
||||
console.log(val, 'dataListContractFact')
|
||||
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 endValue = formState?.dateTo;
|
||||
if (!startValue || !endValue) {
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
@ -77,7 +78,7 @@
|
||||
|
||||
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 buttonConfigs = computed(()=>{
|
||||
@ -92,7 +93,7 @@
|
||||
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 router = useRouter();
|
||||
@ -124,7 +125,7 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
@ -323,8 +324,18 @@
|
||||
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) {
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
bus.on(CREATE_FLOW, handleRefresh);
|
||||
@ -351,7 +362,7 @@
|
||||
let approveBtn: ActionItem[] = [];
|
||||
let hasFlowRecord = false;
|
||||
actionButtonConfig.value?.map((button) => {
|
||||
if (['view', 'copyData'].includes(button.code)) {
|
||||
if (['view', 'copyData','datalog'].includes(button.code)) {
|
||||
actionsList.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
@ -503,4 +514,22 @@
|
||||
.hide{
|
||||
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>
|
||||
Reference in New Issue
Block a user