管输 加工
This commit is contained in:
539
src/views/contract/ContractProc/components/createForm.vue
Normal file
539
src/views/contract/ContractProc/components/createForm.vue
Normal file
@ -0,0 +1,539 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="加载中...">
|
||||
<div class="page-bg-wrap formViewStyle">
|
||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||
<Card title="合同档案" :bordered="false" >
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同号" name="kNo">
|
||||
<a-input v-model:value="formState.kNo" :disabled="isDisable" style="width: 65%" /><a-button v-if="!isDisable" type="primary" @click="onContract">关联合同</a-button>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同名称" name="kName">
|
||||
<a-input v-model:value="formState.kName" placeholder="请输入合同名称" :disabled="isDisable"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同主体" name="comName">
|
||||
<a-input v-model:value="formState.comName" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同期限" name="kPeriod">
|
||||
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" @change="kPeriodChange" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.kPeriodList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="有效期开始" name="dateFrom">
|
||||
<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%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="供应商" name="cpName">
|
||||
<a-input-search v-model:value="formState.cpName" :disabled="isDisable" placeholder="请选择供应商" readonly @search="onSearchSupplier"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务人员" name="empName">
|
||||
<a-input-search v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择业务联系人" readonly @search="onSearchUser"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="币种" name="curCode">
|
||||
<a-select v-model:value="formState.curCode" :disabled="isDisable" placeholder="请选择币种" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.curCodeList" :key="item.code" :value="item.code">
|
||||
{{ item.fullName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="状态" name="approCode">
|
||||
<a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.approCodeList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.note" :disabled="isDisable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</Card>
|
||||
<Card title="业务信息" :bordered="false" >
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="接收站" name="staName">
|
||||
<a-input-search v-model:value="formState.lngContractProcList[0].staName" :disabled="isDisable" placeholder="请选择接收站" readonly @search="onSearchDownLoad('up', index)"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="超期存储费说明" name="periodDesc" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.lngContractProcList[0].periodDesc" :disabled="isDisable" placeholder="请输入超期存储费说明" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="损耗说明" name="wasteDesc" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.lngContractProcList[0].wasteDesc" :disabled="isDisable" placeholder="请输入损耗说明" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.lngContractProcList[0].note" :disabled="isDisable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</Card>
|
||||
<Card title="加工费率" :bordered="false" >
|
||||
<div style="width: 100%">
|
||||
<a-button type="primary" style="margin-bottom: 10px" @click="handleAdd" v-if="!isDisable">新增行</a-button>
|
||||
<a-table style="width: 100%" :columns="columnsPrice" :data-source="dataListPrice" :pagination="false">
|
||||
<template #headerCell="{ column }">
|
||||
<template v-if="column.dataIndex == 'qtyGj'">
|
||||
<span><span class="redStyle">*</span>阶梯内气量(吉焦)</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex == 'pricePngGj'">
|
||||
<span><span class="redStyle">*</span>气态加工费率(元/吉焦)</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex == 'priceLngGj'">
|
||||
<span><span class="redStyle">*</span>液态加工费率(元/吉焦)</span>
|
||||
</template>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === 'sortDesc'">
|
||||
<a-input v-model:value="record.sortDesc" :disabled="isDisable" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'rateTonGj'">
|
||||
<a-input-number v-model:value="record.rateTonGj" :disabled="isDisable" :min="0" :precision="3" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'qtyGj'">
|
||||
<a-input-number v-model:value="record.qtyGj" :disabled="isDisable" :min="0" :precision="3" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'pricePngGj'">
|
||||
<a-input-number v-model:value="record.pricePngGj" :disabled="isDisable" :min="0" :precision="3" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'priceLngGj'">
|
||||
<a-input-number v-model:value="record.priceLngGj" :disabled="isDisable" :min="0" :precision="3" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'note'">
|
||||
<a-input v-model:value="record.note" :disabled="isDisable" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a v-if="!isDisable" @click="handleDelete(index)">删除</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</Card>
|
||||
<Card title="附件信息" :bordered="false" >
|
||||
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
|
||||
</Card>
|
||||
<Card title="关联合同信息" :bordered="false" >
|
||||
<correlationContractFactList :list="dataListContractFact" :disabled="isDisable" @change="getApproContractFactList"></correlationContractFactList>
|
||||
</Card>
|
||||
<Card title="签报列表" :bordered="false" >
|
||||
<correlationApproList :list="dataListAppro" :disabled="isDisable" @change="getApproList"></correlationApproList>
|
||||
</Card>
|
||||
</a-form>
|
||||
</div>
|
||||
<deptUserModal @register="register" @success="handleSuccess"/>
|
||||
<deptListModal @register="registerDept" @success="handleSuccessDept" />
|
||||
<contractFactListModal @register="registerContractFact" @success="handleSuccessContractFact" />
|
||||
<downloadPointModal @register="registerDownLoad" @success="handleSuccessDownLoad"/>
|
||||
<supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" />
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Card } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
|
||||
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import { getDictionary } from '/@/api/sales/Customer';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { addLngContract,updateLngContract, getLngContract } from '/@/api/contract/ContractPurPng';
|
||||
import { getLngAppro,getCompDept } from '/@/api/approve/Appro';
|
||||
import dayjs from 'dayjs';
|
||||
import { h } from 'vue';
|
||||
import { SearchOutlined } from '@ant-design/icons-vue';
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
import { message } from 'ant-design-vue';
|
||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||
import deptUserModal from '/@/components/common/deptUserModal.vue';
|
||||
import deptListModal from '/@/components/common/deptListModal.vue';
|
||||
import correlationApproList from '/@/components/common/correlationApproList.vue';
|
||||
import correlationContractFactList from '/@/components/common/correlationContractFactList.vue';
|
||||
import contractFactListModal from '/@/components/common/contractFactListModal.vue';
|
||||
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
|
||||
import supplierListModal from '/@/components/common/supplierListModal.vue';
|
||||
import { getAllCurrency } from '/@/api/contract/ContractFact';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const tableName = 'ContractTransPng';
|
||||
const columnName = 'ContractTransPng'
|
||||
|
||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
||||
const formRef = ref();
|
||||
const props = defineProps({
|
||||
disabled: false,
|
||||
id: ''
|
||||
|
||||
});
|
||||
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
||||
|
||||
const router = useRouter();
|
||||
const { currentRoute } = router;
|
||||
const isDisable = ref(false);
|
||||
const { formPath } = currentRoute.value.query;
|
||||
const pathArr = [];
|
||||
|
||||
const tabStore = useMultipleTabStore();
|
||||
const formProps = ref(null);
|
||||
const formId = ref(currentRoute.value?.params?.id);
|
||||
const pageType = ref(currentRoute.value.query?.type);
|
||||
const pageId = ref(currentRoute.value.query?.id)
|
||||
const spinning = ref(false);
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n();
|
||||
const formState = reactive({
|
||||
approCode: 'WTJ',
|
||||
typeCode: 'P',
|
||||
onlineSign: 'N',
|
||||
cpTableName: 'lng_supplier',
|
||||
curCode: 'CNY',
|
||||
lngContractProcList: [{}],
|
||||
});
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
const [registerDept, { openModal:openModalDept}] = useModal();
|
||||
const [registerContractFact, { openModal:openModalContractFact}] = useModal();
|
||||
const [registerDownLoad, { openModal:openModalDownLoad}] = useModal();
|
||||
const [registerSupplier, { openModal:openModalSupplier}] = useModal();
|
||||
const rules= reactive({
|
||||
kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
uomCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
});
|
||||
const layout = {
|
||||
labelCol: { span: 8 },
|
||||
wrapperCol: { span: 16 },
|
||||
}
|
||||
const dataFile = ref([]);
|
||||
const dataListAppro = ref([])
|
||||
const dataListContractFact = ref([])
|
||||
let optionSelect= reactive({
|
||||
approCodeList: [],
|
||||
kPeriodList: [],
|
||||
curCodeList: [],
|
||||
});
|
||||
const dataListPrice = ref([])
|
||||
const columnsPrice= ref([
|
||||
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
|
||||
{ title: t('约定'), dataIndex: 'sortDesc'},
|
||||
{ title: t('吨/吉焦'), dataIndex: 'rateTonGj', width: 150},
|
||||
{ title: t('阶梯内气量(吉焦)'), dataIndex: 'qtyGj', width: 200},
|
||||
{ title: t('气态加工费率(元/吉焦)'), dataIndex: 'pricePngGj', width: 200},
|
||||
{ title: t('液态加工费率(元/吉焦)'), dataIndex: 'priceLngGj', width: 200},
|
||||
{ title: t('备注'), dataIndex: 'note'},
|
||||
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
|
||||
]);
|
||||
watch(
|
||||
() => props.id,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getInfo(val)
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.disabled,
|
||||
(val) => {
|
||||
isDisable.value = val
|
||||
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getInfo(pageId.value)
|
||||
} else {
|
||||
formState.empName = userInfo.name
|
||||
formState.empId = userInfo.id
|
||||
formState.tel = userInfo.mobile
|
||||
}
|
||||
|
||||
});
|
||||
const kPeriodChange = (val) => {
|
||||
if (val !== 'Y') {
|
||||
formState.dateFrom = dayjs('2000-01-01')
|
||||
formState.dateTo = dayjs('2999-12-31')
|
||||
}
|
||||
}
|
||||
const uploadListChange = (val) => {
|
||||
dataFile.value = val
|
||||
}
|
||||
async function getInfo(id) {
|
||||
spinning.value = true
|
||||
try {
|
||||
let data = await getLngContract(id)
|
||||
spinning.value = false
|
||||
Object.assign(formState, {...data})
|
||||
Object.assign(dataFile.value, formState.lngFileUploadList || [])
|
||||
Object.assign(dataListContractFact.value, formState.lngContractFactRelList || [])
|
||||
Object.assign(dataListAppro.value, formState.lngContractApproRelList || [])
|
||||
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
|
||||
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
|
||||
|
||||
dataListAppro.value.forEach(v => {
|
||||
// v.approId = v.id
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
spinning.value = false
|
||||
}
|
||||
}
|
||||
async function getOption() {
|
||||
optionSelect.kPeriodList = await getDictionary('LNG_K_PER')
|
||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||
optionSelect.curCodeList = await getAllCurrency()
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const getApproList = (val) => {
|
||||
dataListAppro.value = val
|
||||
}
|
||||
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) {
|
||||
return false
|
||||
}
|
||||
return startValue.valueOf() >= endValue.valueOf();
|
||||
}
|
||||
const disabledDateEnd = (endValue) => {
|
||||
const startValue = formState?.dateFrom;
|
||||
if (!endValue || !startValue) {
|
||||
return false
|
||||
}
|
||||
return endValue.valueOf() <= startValue.valueOf();
|
||||
}
|
||||
|
||||
const onSearch = (val)=> {
|
||||
openModalDept(true,{isUpdate: false})
|
||||
}
|
||||
const onSearchSupplier = () => {
|
||||
openModalSupplier(true,{isUpdate: false})
|
||||
}
|
||||
const onSearchUser = (val)=> {
|
||||
openModal(true,{isUpdate: false})
|
||||
}
|
||||
const onContract = (val)=> {
|
||||
openModalContractFact(true,{isUpdate: false})
|
||||
}
|
||||
const onSearchDownLoad = (val, index)=> {
|
||||
openModalDownLoad(true,{isUpdate: false, type: val})
|
||||
}
|
||||
|
||||
const handleAdd = ()=> {
|
||||
dataListPrice.value.push({sortDesc: '',rateTonGj:'',qtyGj:'',pricePngGj:'',priceLngGj:''})
|
||||
}
|
||||
const handleDelete= (index) => {
|
||||
dataListPrice.value.splice(index, 1)
|
||||
}
|
||||
|
||||
const handleSuccess = (val) => {
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
formState.bDeptId = val[0].id
|
||||
|
||||
formState.comName = info.name
|
||||
formState.comId = info.id
|
||||
}
|
||||
const handleSuccessSupplier = (val) => {
|
||||
formState.cpCode = val[0].suCode
|
||||
formState.cpName = val[0].suName
|
||||
}
|
||||
const handleSuccessContractFact = (val) => {
|
||||
val.forEach(v => {
|
||||
v.id = null
|
||||
})
|
||||
if (!dataListContractFact.value.length) {
|
||||
dataListContractFact.value = val
|
||||
return
|
||||
}
|
||||
let arr = []
|
||||
val.forEach(v => {
|
||||
dataListContractFact.value.forEach(i => {
|
||||
if (v.kNo == i.kNo){
|
||||
message.warning(v.kNo + '已重复, 合同不需要重复选择')
|
||||
} else {
|
||||
arr.push(v)
|
||||
}
|
||||
})
|
||||
})
|
||||
dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo')
|
||||
}
|
||||
const handleSuccessDownLoad = (val) => {
|
||||
formState.lngContractProcList[0].staCode = val[0].code
|
||||
formState.lngContractProcList[0].staName = val[0].fullName
|
||||
}
|
||||
|
||||
function unique(arr, u_key) {
|
||||
const map = new Map()
|
||||
arr.forEach((item, index) => {
|
||||
if (!map.has(item[u_key])) {
|
||||
map.set(item[u_key], item)
|
||||
}
|
||||
})
|
||||
return [...map.values()]
|
||||
}
|
||||
function close() {
|
||||
tabStore.closeTab(currentRoute.value, router);
|
||||
}
|
||||
async function getFormValue() {
|
||||
return formState
|
||||
}
|
||||
async function handleSubmit(type) {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
let arr = dataListPrice.value
|
||||
for(let i=0; i<arr.length; i++) {
|
||||
let isFlag = arr[i].qtyGj == null || arr[i].qtyGj === ''|| arr[i].pricePngGj == null || arr[i].pricePngGj === '' || arr[i].priceLngGj == null || arr[i].priceLngGj === ''
|
||||
if (isFlag) {
|
||||
message.warn('请完善加工费率必选项')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let obj = {
|
||||
...formState,
|
||||
lngFileUploadList: dataFile.value,
|
||||
lngContractFactRelList: dataListContractFact.value,
|
||||
lngContractApproRelList: dataListAppro.value,
|
||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
||||
|
||||
}
|
||||
spinning.value = true;
|
||||
let request = !formState.id ? addLngContract :updateLngContract
|
||||
|
||||
try {
|
||||
const data = await request(obj);
|
||||
// 新增保存
|
||||
if (data?.id) {
|
||||
getInfo(data?.id)
|
||||
}
|
||||
// 同意保存不提示
|
||||
if (!type) {
|
||||
notification.success({
|
||||
message: '提示',
|
||||
description: data?.id ? t('新增成功!') : t('修改成功!')
|
||||
}); //提示消息
|
||||
}
|
||||
return data?.id ? data : obj
|
||||
|
||||
} finally {
|
||||
spinning.value = false;
|
||||
}
|
||||
|
||||
} catch (errorInfo) {
|
||||
spinning.value = false;
|
||||
errorInfo?.errorFields?.length && notification.warning({
|
||||
message: '提示',
|
||||
description: '请完善信息'
|
||||
});
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleSubmit,
|
||||
getFormValue
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-form-item .ant-form-item-label) {
|
||||
width: 135px !important;
|
||||
max-width: 135px !important;
|
||||
}
|
||||
.page-bg-wrap {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.top-toolbar {
|
||||
min-height: 44px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.redStyle {
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -29,9 +29,7 @@
|
||||
const logId = ref('')
|
||||
const logPath = ref('/contract/contractProc/datalog');
|
||||
import { DataLog } from '/@/components/pcitc';
|
||||
import { ref, computed, onMounted, onUnmounted, createVNode,
|
||||
|
||||
} from 'vue';
|
||||
import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue';
|
||||
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
@ -59,6 +57,9 @@
|
||||
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
|
||||
|
||||
@ -110,7 +111,7 @@
|
||||
const taskIdRef = ref('');
|
||||
const visibleFlowRecordModal = ref(false);
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const formName='加工合同';
|
||||
const formName=currentRoute.value.meta?.title;
|
||||
const [registerTable, { reload, }] = useTable({
|
||||
title: '' || (formName + '列表'),
|
||||
api: getLngContractPage,
|
||||
@ -121,8 +122,8 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
showResetButton: false,
|
||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
||||
@ -159,7 +160,9 @@
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
readonly: 1,
|
||||
}
|
||||
});
|
||||
} else if (schemaId && !taskIds && processId) {
|
||||
@ -169,18 +172,32 @@
|
||||
readonly: 1,
|
||||
taskId: '',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/ContractProc/' + record.id + '/viewForm',
|
||||
query: {
|
||||
formPath: 'contract/ContractProc',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractProc',
|
||||
formName: "查看"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id,
|
||||
disabled: 1,
|
||||
}
|
||||
});
|
||||
}
|
||||
// router.push({
|
||||
// path: '/form/ContractProc/' + record.id + '/viewForm',
|
||||
// query: {
|
||||
// formPath: 'contract/ContractProc',
|
||||
// formName: formName,
|
||||
// formId:currentRoute.value.meta.formId
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,7 +213,11 @@
|
||||
function handleAdd() {
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow'
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractProc',
|
||||
formName: "新建"+formName,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
@ -211,21 +232,57 @@
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
|
||||
router.push({
|
||||
path: '/form/ContractProc/' + record.id + '/updateForm',
|
||||
query: {
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractProc',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
formName: "编辑"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/ContractProc/' + record.id + '/updateForm',
|
||||
query: {
|
||||
formPath: 'contract/ContractProc',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleUpdate(record: Recordable) {
|
||||
|
||||
const { processId, taskIds, schemaId } = record.workflowData || {};
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractProc',
|
||||
formName: "变更"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'update',
|
||||
id: record.id,
|
||||
processId: processId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleApprove(record: Recordable) {
|
||||
|
||||
const { processId, taskIds, schemaId } = record.workflowData || {};
|
||||
if (taskIds && taskIds.length) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: "审批"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function handleDelete(record: Recordable) {
|
||||
@ -287,9 +344,11 @@
|
||||
|
||||
let actionsList: ActionItem[] = [];
|
||||
let editAndDelBtn: ActionItem[] = [];
|
||||
let hasFlowRecord = false;
|
||||
let updateBtn: ActionItem[] = [];
|
||||
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,
|
||||
@ -304,21 +363,52 @@
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (['update'].includes(button.code)) {
|
||||
updateBtn.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (['approve'].includes(button.code)) {
|
||||
approveBtn.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (button.code === 'flowRecord') hasFlowRecord = true;
|
||||
});
|
||||
if (record.workflowData?.enabled) {
|
||||
//与工作流有关联的表单
|
||||
if (record.workflowData.status) {
|
||||
actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
||||
} else {
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
}
|
||||
} else {
|
||||
if (!record.workflowData?.processId) {
|
||||
//与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
// 未提交或已驳回
|
||||
if (record.approCode == 'WTJ' || record.approCode == 'YBH' ) {
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
|
||||
if (record.createUserId !== userInfo.id) {
|
||||
let idx = actionsList.findIndex(v =>v.tooltip == '删除')
|
||||
idx > -1 && actionsList.splice(idx, 1)
|
||||
}
|
||||
}
|
||||
// 审批中SPZ
|
||||
if (record.workflowData?.editable) {
|
||||
actionsList = actionsList.concat(approveBtn);
|
||||
}
|
||||
// 已审批
|
||||
if (record.approCode == 'YSP') {
|
||||
actionsList = actionsList.concat(updateBtn);
|
||||
}
|
||||
// if (record.workflowData?.enabled) {
|
||||
// //与工作流有关联的表单
|
||||
// if (record.workflowData.status) {
|
||||
// actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
||||
// } else {
|
||||
// actionsList = actionsList.concat(editAndDelBtn);
|
||||
// }
|
||||
// } else {
|
||||
// if (!record.workflowData?.processId) {
|
||||
// //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
||||
// actionsList = actionsList.concat(editAndDelBtn);
|
||||
// }
|
||||
// }
|
||||
return actionsList;
|
||||
}
|
||||
function handleStartwork(record: Recordable) {
|
||||
|
||||
576
src/views/contract/ContractTransPng/components/createForm.vue
Normal file
576
src/views/contract/ContractTransPng/components/createForm.vue
Normal file
@ -0,0 +1,576 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="加载中...">
|
||||
<div class="page-bg-wrap formViewStyle">
|
||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||
<Card title="合同档案" :bordered="false" >
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同号" name="kNo">
|
||||
<a-input v-model:value="formState.kNo" :disabled="isDisable" style="width: 65%" /><a-button v-if="!isDisable" type="primary" @click="onContract">关联合同</a-button>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="16">
|
||||
<a-form-item label="合同名称" name="kName" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
|
||||
<a-input v-model:value="formState.kName" placeholder="请输入合同名称" :disabled="isDisable"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同期限" name="kPeriod">
|
||||
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" @change="kPeriodChange" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.kPeriodList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="有效期开始" name="dateFrom">
|
||||
<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%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同签订日期" name="dateSign">
|
||||
<a-date-picker v-model:value="formState.dateSign" style="width: 100%" :disabled="isDisable" placeholder="请选择合同签订日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="币种" name="curCode">
|
||||
<a-select v-model:value="formState.curCode" :disabled="isDisable" placeholder="请选择币种" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.curCodeList" :key="item.code" :value="item.code">
|
||||
{{ item.fullName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="状态" name="approCode">
|
||||
<a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.approCodeList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="供应商" name="cpName">
|
||||
<a-input-search v-model:value="formState.cpName" :disabled="isDisable" placeholder="请选择供应商" readonly @search="onSearchSupplier"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务人员" name="empName">
|
||||
<a-input-search v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择业务联系人" readonly @search="onSearchUser"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同主体" name="comName">
|
||||
<a-input v-model:value="formState.comName" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.note" :disabled="isDisable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</Card>
|
||||
<Card title="业务信息" :bordered="false" >
|
||||
<div style="width: 100%">
|
||||
<a-button type="primary" style="margin-bottom: 10px" @click="handleAdd('point')" v-if="!isDisable">新增行</a-button>
|
||||
<a-table style="width: 100%" :columns="columnsPoint" :data-source="dataListPoint" :pagination="false" :scroll="{x: 1000}">
|
||||
<template #headerCell="{ column }">
|
||||
<template v-if="column.dataIndex == 'pointUpName'">
|
||||
<span><span class="redStyle">*</span>上载点</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex == 'pointDelyName'">
|
||||
<span><span class="redStyle">*</span>下载点</span>
|
||||
</template>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === 'pointUpName'">
|
||||
<a-input-search v-model:value="record.pointUpName" :disabled="isDisable" placeholder="请选择上载点" readonly @search="onSearchDownLoad('up', index)"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'pointDelyName'">
|
||||
<a-input-search v-model:value="record.pointDelyName" :disabled="isDisable" placeholder="请选择下载点" readonly @search="onSearchDownLoad('dely', index)"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'note'">
|
||||
<a-input v-model:value="record.note" :disabled="isDisable" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a v-if="!isDisable" @click="handleDelete('point', index)">删除</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</Card>
|
||||
<Card title="管输价格" :bordered="false" >
|
||||
<div style="width: 100%">
|
||||
<a-button type="primary" style="margin-bottom: 10px" @click="handleAdd('price')" v-if="!isDisable">新增行</a-button>
|
||||
<a-table style="width: 100%" :columns="columnsPrice" :data-source="dataListPrice" :pagination="false">
|
||||
<template #headerCell="{ column }">
|
||||
<template v-if="column.dataIndex == 'sortDesc'">
|
||||
<span><span class="redStyle">*</span>约定</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex == 'priceTransM3'">
|
||||
<span><span class="redStyle">*</span>管输单价(元/方)</span>
|
||||
</template>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === 'sortDesc'">
|
||||
<a-input v-model:value="record.sortDesc" :disabled="isDisable" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'qtyM3'">
|
||||
<a-input-number v-model:value="record.qtyM3" :disabled="isDisable" :min="0" :precision="3" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'priceTransM3'">
|
||||
<a-input-number v-model:value="record.priceTransM3" :disabled="isDisable" :min="0" :precision="4" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'note'">
|
||||
<a-input v-model:value="record.note" :disabled="isDisable" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a v-if="!isDisable" @click="handleDelete('price', index)">删除</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</Card>
|
||||
<Card title="附件信息" :bordered="false" >
|
||||
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
|
||||
</Card>
|
||||
<Card title="关联合同信息" :bordered="false" >
|
||||
<correlationContractFactList :list="dataListContractFact" :disabled="isDisable" @change="getApproContractFactList"></correlationContractFactList>
|
||||
</Card>
|
||||
<Card title="签报列表" :bordered="false" >
|
||||
<correlationApproList :list="dataListAppro" :disabled="isDisable" @change="getApproList"></correlationApproList>
|
||||
</Card>
|
||||
</a-form>
|
||||
</div>
|
||||
<deptUserModal @register="register" @success="handleSuccess"/>
|
||||
<deptListModal @register="registerDept" @success="handleSuccessDept" />
|
||||
<contractFactListModal @register="registerContractFact" @success="handleSuccessContractFact" />
|
||||
<downloadPointModal @register="registerDownLoad" @success="handleSuccessDownLoad"/>
|
||||
<supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" />
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Card } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
|
||||
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import { getDictionary } from '/@/api/sales/Customer';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { addLngContract,updateLngContract, getLngContract } from '/@/api/contract/ContractPurPng';
|
||||
import { getLngAppro,getCompDept } from '/@/api/approve/Appro';
|
||||
import dayjs from 'dayjs';
|
||||
import { h } from 'vue';
|
||||
import { SearchOutlined } from '@ant-design/icons-vue';
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
import { message } from 'ant-design-vue';
|
||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||
import deptUserModal from '/@/components/common/deptUserModal.vue';
|
||||
import deptListModal from '/@/components/common/deptListModal.vue';
|
||||
import correlationApproList from '/@/components/common/correlationApproList.vue';
|
||||
import correlationContractFactList from '/@/components/common/correlationContractFactList.vue';
|
||||
import contractFactListModal from '/@/components/common/contractFactListModal.vue';
|
||||
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
|
||||
import supplierListModal from '/@/components/common/supplierListModal.vue';
|
||||
import { getAllCurrency } from '/@/api/contract/ContractFact';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const tableName = 'ContractTransPng';
|
||||
const columnName = 'ContractTransPng'
|
||||
|
||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
||||
const formRef = ref();
|
||||
const props = defineProps({
|
||||
disabled: false,
|
||||
id: ''
|
||||
|
||||
});
|
||||
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
||||
|
||||
const router = useRouter();
|
||||
const { currentRoute } = router;
|
||||
const isDisable = ref(false);
|
||||
const { formPath } = currentRoute.value.query;
|
||||
const pathArr = [];
|
||||
|
||||
const tabStore = useMultipleTabStore();
|
||||
const formProps = ref(null);
|
||||
const formId = ref(currentRoute.value?.params?.id);
|
||||
const pageType = ref(currentRoute.value.query?.type);
|
||||
const pageId = ref(currentRoute.value.query?.id)
|
||||
const spinning = ref(false);
|
||||
const curIdx = ref(null)
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n();
|
||||
const formState = reactive({
|
||||
approCode: 'WTJ',
|
||||
typeCode: 'PP',
|
||||
onlineSign: 'N',
|
||||
cpTableName: 'lng_supplier',
|
||||
curCode: 'CNY',
|
||||
lngContractPurPngList: [{}],
|
||||
});
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
const [registerDept, { openModal:openModalDept}] = useModal();
|
||||
const [registerContractFact, { openModal:openModalContractFact}] = useModal();
|
||||
const [registerDownLoad, { openModal:openModalDownLoad}] = useModal();
|
||||
const [registerSupplier, { openModal:openModalSupplier}] = useModal();
|
||||
const rules= reactive({
|
||||
kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
uomCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
});
|
||||
const layout = {
|
||||
labelCol: { span: 8 },
|
||||
wrapperCol: { span: 16 },
|
||||
}
|
||||
const dataFile = ref([]);
|
||||
const dataListAppro = ref([])
|
||||
const dataListContractFact = ref([])
|
||||
let optionSelect= reactive({
|
||||
approCodeList: [],
|
||||
kPeriodList: [],
|
||||
curCodeList: [],
|
||||
});
|
||||
const columnsPoint= ref([
|
||||
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
|
||||
{ title: t('上载点'), dataIndex: 'pointUpName', },
|
||||
{ title: t('下载点'), dataIndex: 'pointDelyName',},
|
||||
{ title: t('备注'), dataIndex: 'note'},
|
||||
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
|
||||
]);
|
||||
const dataListPoint = ref([])
|
||||
const dataListPrice = ref([])
|
||||
const columnsPrice= ref([
|
||||
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
|
||||
{ title: t('约定'), dataIndex: 'sortDesc'},
|
||||
{ title: t('阶梯内气量(方)'), dataIndex: 'qtyM3', width: 150},
|
||||
{ title: t('管输单价(元/方)'), dataIndex: 'priceTransM3', width: 150},
|
||||
{ title: t('备注'), dataIndex: 'note'},
|
||||
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
|
||||
]);
|
||||
watch(
|
||||
() => props.id,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getInfo(val)
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.disabled,
|
||||
(val) => {
|
||||
isDisable.value = val
|
||||
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getInfo(pageId.value)
|
||||
} else {
|
||||
formState.empName = userInfo.name
|
||||
formState.empId = userInfo.id
|
||||
formState.tel = userInfo.mobile
|
||||
}
|
||||
|
||||
});
|
||||
const kPeriodChange = (val) => {
|
||||
if (val !== 'Y') {
|
||||
formState.dateFrom = dayjs('2000-01-01')
|
||||
formState.dateTo = dayjs('2999-12-31')
|
||||
}
|
||||
}
|
||||
const uploadListChange = (val) => {
|
||||
dataFile.value = val
|
||||
}
|
||||
async function getInfo(id) {
|
||||
spinning.value = true
|
||||
try {
|
||||
let data = await getLngContract(id)
|
||||
spinning.value = false
|
||||
Object.assign(formState, {...data})
|
||||
Object.assign(dataFile.value, formState.lngFileUploadList || [])
|
||||
Object.assign(dataListContractFact.value, formState.lngContractFactRelList || [])
|
||||
Object.assign(dataListAppro.value, formState.lngContractApproRelList || [])
|
||||
formState.dateCfmFrom = formState.dateCfmFrom ? dayjs(formState.dateCfmFrom) : null
|
||||
formState.dateCfmTo = formState.dateCfmTo ? dayjs(formState.dateCfmTo) : null
|
||||
formState.dateSign = formState.dateSign ? dayjs(formState.dateSign) : null
|
||||
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
|
||||
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
|
||||
formState.periodTypeCode = (formState?.lngContractPurPngList[0] || {}).periodTypeCode
|
||||
formState.uomCode = (formState?.lngContractPurPngList[0] || {}).uomCode
|
||||
|
||||
dataListAppro.value.forEach(v => {
|
||||
// v.approId = v.id
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
spinning.value = false
|
||||
}
|
||||
}
|
||||
async function getOption() {
|
||||
optionSelect.kPeriodList = await getDictionary('LNG_K_PER')
|
||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||
optionSelect.curCodeList = await getAllCurrency()
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const getApproList = (val) => {
|
||||
dataListAppro.value = val
|
||||
}
|
||||
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) {
|
||||
return false
|
||||
}
|
||||
return startValue.valueOf() >= endValue.valueOf();
|
||||
}
|
||||
const disabledDateEnd = (endValue) => {
|
||||
const startValue = formState?.dateFrom;
|
||||
if (!endValue || !startValue) {
|
||||
return false
|
||||
}
|
||||
return endValue.valueOf() <= startValue.valueOf();
|
||||
}
|
||||
|
||||
const onSearch = (val)=> {
|
||||
openModalDept(true,{isUpdate: false})
|
||||
}
|
||||
const onSearchSupplier = () => {
|
||||
openModalSupplier(true,{isUpdate: false})
|
||||
}
|
||||
const onSearchUser = (val)=> {
|
||||
openModal(true,{isUpdate: false})
|
||||
}
|
||||
const onContract = (val)=> {
|
||||
openModalContractFact(true,{isUpdate: false})
|
||||
}
|
||||
const onSearchDownLoad = (val, index)=> {
|
||||
curIdx.value = index
|
||||
nextTick(() => {
|
||||
openModalDownLoad(true,{isUpdate: false, type: val})
|
||||
});
|
||||
}
|
||||
|
||||
const handleAdd = (type)=> {
|
||||
if (type =='point') {
|
||||
dataListPoint.value.push({pointUpCode: '',pointDelyCode: ''})
|
||||
} else {
|
||||
dataListPrice.value.push({sortDesc:'',qtyM3:'',priceTransM3:''})
|
||||
}
|
||||
}
|
||||
const handleDelete= (type,index) => {
|
||||
if (type == 'point') {
|
||||
dataListPoint.value.splice(index, 1)
|
||||
} else {
|
||||
dataListPrice.value.splice(index, 1)
|
||||
}
|
||||
}
|
||||
|
||||
const handleSuccess = (val) => {
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
formState.bDeptId = val[0].id
|
||||
|
||||
formState.comName = info.name
|
||||
formState.comId = info.id
|
||||
}
|
||||
const handleSuccessSupplier = (val) => {
|
||||
formState.cpCode = val[0].suCode
|
||||
formState.cpName = val[0].suName
|
||||
}
|
||||
const handleSuccessContractFact = (val) => {
|
||||
val.forEach(v => {
|
||||
v.id = null
|
||||
})
|
||||
if (!dataListContractFact.value.length) {
|
||||
dataListContractFact.value = val
|
||||
return
|
||||
}
|
||||
let arr = []
|
||||
val.forEach(v => {
|
||||
dataListContractFact.value.forEach(i => {
|
||||
if (v.kNo == i.kNo){
|
||||
message.warning(v.kNo + '已重复, 合同不需要重复选择')
|
||||
} else {
|
||||
arr.push(v)
|
||||
}
|
||||
})
|
||||
})
|
||||
dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo')
|
||||
}
|
||||
const handleSuccessDownLoad = (val, type) => {
|
||||
if (type == 'up') {
|
||||
dataListPoint.value[curIdx.value].pointUpCode = val[0].code
|
||||
dataListPoint.value[curIdx.value].pointUpName = val[0].fullName
|
||||
} else {
|
||||
dataListPoint.value[curIdx.value].pointDelyName = val[0].fullName
|
||||
dataListPoint.value[curIdx.value].pointDelyCode = val[0].code
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function unique(arr, u_key) {
|
||||
const map = new Map()
|
||||
arr.forEach((item, index) => {
|
||||
if (!map.has(item[u_key])) {
|
||||
map.set(item[u_key], item)
|
||||
}
|
||||
})
|
||||
return [...map.values()]
|
||||
}
|
||||
function close() {
|
||||
tabStore.closeTab(currentRoute.value, router);
|
||||
}
|
||||
async function getFormValue() {
|
||||
return formState
|
||||
}
|
||||
async function handleSubmit(type) {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
for(let i=0; i<dataListPoint.value.length; i++) {
|
||||
let isFlag = !dataListPoint.value[i].pointUpCode || !dataListPoint.value[i].pointDelyCode
|
||||
if (isFlag) {
|
||||
message.warn('请完善业务信息必选项')
|
||||
return
|
||||
}
|
||||
}
|
||||
for(let i=0; i<dataListPrice.value.length; i++) {
|
||||
let isFlag = dataListPrice.value[i].sortDesc == null || dataListPrice.value[i].sortDesc === ''|| dataListPrice.value[i].priceTransM3 == null || dataListPrice.value[i].priceTransM3 === ''
|
||||
if (isFlag) {
|
||||
message.warn('请完善管输价格必选项')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let obj = {
|
||||
...formState,
|
||||
lngContractPurPngPointList: dataListPoint.value,
|
||||
lngFileUploadList: dataFile.value,
|
||||
lngContractFactRelList: dataListContractFact.value,
|
||||
lngContractApproRelList: dataListAppro.value,
|
||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
||||
|
||||
}
|
||||
spinning.value = true;
|
||||
let request = !formState.id ? addLngContract :updateLngContract
|
||||
|
||||
try {
|
||||
const data = await request(obj);
|
||||
// 新增保存
|
||||
if (data?.id) {
|
||||
getInfo(data?.id)
|
||||
}
|
||||
// 同意保存不提示
|
||||
if (!type) {
|
||||
notification.success({
|
||||
message: '提示',
|
||||
description: data?.id ? t('新增成功!') : t('修改成功!')
|
||||
}); //提示消息
|
||||
}
|
||||
return data?.id ? data : obj
|
||||
|
||||
} finally {
|
||||
spinning.value = false;
|
||||
}
|
||||
|
||||
} catch (errorInfo) {
|
||||
spinning.value = false;
|
||||
errorInfo?.errorFields?.length && notification.warning({
|
||||
message: '提示',
|
||||
description: '请完善信息'
|
||||
});
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleSubmit,
|
||||
getFormValue
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-form-item .ant-form-item-label) {
|
||||
width: 135px !important;
|
||||
max-width: 135px !important;
|
||||
}
|
||||
.page-bg-wrap {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.top-toolbar {
|
||||
min-height: 44px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.redStyle {
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -29,9 +29,7 @@
|
||||
const logId = ref('')
|
||||
const logPath = ref('/contract/contractTransPng/datalog');
|
||||
import { DataLog } from '/@/components/pcitc';
|
||||
import { ref, computed, onMounted, onUnmounted, createVNode,
|
||||
|
||||
} from 'vue';
|
||||
import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue';
|
||||
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
@ -59,6 +57,9 @@
|
||||
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
|
||||
|
||||
@ -110,7 +111,7 @@
|
||||
const taskIdRef = ref('');
|
||||
const visibleFlowRecordModal = ref(false);
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const formName='管输合同';
|
||||
const formName=currentRoute.value.meta?.title;
|
||||
const [registerTable, { reload, }] = useTable({
|
||||
title: '' || (formName + '列表'),
|
||||
api: getLngContractPage,
|
||||
@ -121,8 +122,8 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
showResetButton: false,
|
||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
||||
@ -159,7 +160,9 @@
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
readonly: 1,
|
||||
}
|
||||
});
|
||||
} else if (schemaId && !taskIds && processId) {
|
||||
@ -169,18 +172,32 @@
|
||||
readonly: 1,
|
||||
taskId: '',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/ContractTransPng/' + record.id + '/viewForm',
|
||||
query: {
|
||||
formPath: 'contract/ContractTransPng',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractTransPng',
|
||||
formName: "查看"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id,
|
||||
disabled: 1,
|
||||
}
|
||||
});
|
||||
}
|
||||
// router.push({
|
||||
// path: '/form/ContractTransPng/' + record.id + '/viewForm',
|
||||
// query: {
|
||||
// formPath: 'contract/ContractTransPng',
|
||||
// formName: formName,
|
||||
// formId:currentRoute.value.meta.formId
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,7 +213,11 @@
|
||||
function handleAdd() {
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow'
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractSalesLng',
|
||||
formName: "新建"+formName,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
@ -211,21 +232,57 @@
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
|
||||
router.push({
|
||||
path: '/form/ContractTransPng/' + record.id + '/updateForm',
|
||||
query: {
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractTransPng',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
formName: "编辑"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/ContractTransPng/' + record.id + '/updateForm',
|
||||
query: {
|
||||
formPath: 'contract/ContractTransPng',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleUpdate(record: Recordable) {
|
||||
|
||||
const { processId, taskIds, schemaId } = record.workflowData || {};
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'contract/ContractTransPng',
|
||||
formName: "变更"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'update',
|
||||
id: record.id,
|
||||
processId: processId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleApprove(record: Recordable) {
|
||||
|
||||
const { processId, taskIds, schemaId } = record.workflowData || {};
|
||||
if (taskIds && taskIds.length) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: "审批"+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleDelete(record: Recordable) {
|
||||
deleteList([record.id]);
|
||||
@ -286,9 +343,11 @@
|
||||
|
||||
let actionsList: ActionItem[] = [];
|
||||
let editAndDelBtn: ActionItem[] = [];
|
||||
let hasFlowRecord = false;
|
||||
let updateBtn: ActionItem[] = [];
|
||||
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,
|
||||
@ -303,21 +362,52 @@
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (['update'].includes(button.code)) {
|
||||
updateBtn.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (['approve'].includes(button.code)) {
|
||||
approveBtn.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (button.code === 'flowRecord') hasFlowRecord = true;
|
||||
});
|
||||
if (record.workflowData?.enabled) {
|
||||
//与工作流有关联的表单
|
||||
if (record.workflowData.status) {
|
||||
actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
||||
} else {
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
}
|
||||
} else {
|
||||
if (!record.workflowData?.processId) {
|
||||
//与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
// 未提交或已驳回
|
||||
if (record.approCode == 'WTJ' || record.approCode == 'YBH' ) {
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
|
||||
if (record.createUserId !== userInfo.id) {
|
||||
let idx = actionsList.findIndex(v =>v.tooltip == '删除')
|
||||
idx > -1 && actionsList.splice(idx, 1)
|
||||
}
|
||||
}
|
||||
// 审批中SPZ
|
||||
if (record.workflowData?.editable) {
|
||||
actionsList = actionsList.concat(approveBtn);
|
||||
}
|
||||
// 已审批
|
||||
if (record.approCode == 'YSP') {
|
||||
actionsList = actionsList.concat(updateBtn);
|
||||
}
|
||||
// if (record.workflowData?.enabled) {
|
||||
// //与工作流有关联的表单
|
||||
// if (record.workflowData.status) {
|
||||
// actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
||||
// } else {
|
||||
// actionsList = actionsList.concat(editAndDelBtn);
|
||||
// }
|
||||
// } else {
|
||||
// if (!record.workflowData?.processId) {
|
||||
// //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
||||
// actionsList = actionsList.concat(editAndDelBtn);
|
||||
// }
|
||||
// }
|
||||
return actionsList;
|
||||
}
|
||||
function handleStartwork(record: Recordable) {
|
||||
|
||||
Reference in New Issue
Block a user