销算结算校验
This commit is contained in:
@ -294,6 +294,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
|
||||
title: (route) => route.query.formName
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/contract/ContractSales/viewForm',
|
||||
name: 'ContractSalesviewForm',
|
||||
component: () => import('/@/views/contract/ContractSales/components/createForm.vue'),
|
||||
meta: {
|
||||
title: (route) => ('管道气销售合同详情')
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="加载中...">
|
||||
<div class="page-bg-wrap formViewStyle">
|
||||
<div class="page-bg-wrap formViewStyle" :class="isViewForm ? 'viewPage':''">
|
||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||
<Card title="合同档案" :bordered="false" >
|
||||
<a-row>
|
||||
@ -230,7 +230,7 @@
|
||||
const formId = ref(currentRoute.value?.params?.id);
|
||||
const pageType = ref(currentRoute.value.query?.type);
|
||||
const pageId = ref(currentRoute.value.query?.id)
|
||||
|
||||
const isViewForm = currentRoute.value.path.includes('viewForm')
|
||||
const contractQty = ref()
|
||||
const spinning = ref(false);
|
||||
const curIdx = ref(null)
|
||||
@ -332,6 +332,9 @@
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getInfo(pageId.value)
|
||||
if (currentRoute.value.query?.disabled) {
|
||||
isDisable.value = true
|
||||
}
|
||||
} else {
|
||||
formState.empName = userInfo.name
|
||||
formState.empId = userInfo.id
|
||||
@ -688,5 +691,7 @@
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.viewPage {
|
||||
padding: 6px 12px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -91,6 +91,9 @@
|
||||
<template v-if="column.dataIndex === 'priceDesc'">
|
||||
<a @click="btnCheck(record, index, 'price')">{{record.priceDesc}}</a>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'ksName'">
|
||||
<a @click="btnCheck(record, index, 'ksName')">{{record.ksName}}</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</Card>
|
||||
@ -247,20 +250,20 @@
|
||||
try {
|
||||
let data = await getLngPngSettleHdr(id)
|
||||
spinning.value = false
|
||||
let a = DataFormat.format({...data}, [
|
||||
FormatOption.createQty('qtySettleGj'),
|
||||
FormatOption.createQty('qtySettleM3'),
|
||||
FormatOption.createAmt('amount'),
|
||||
]);
|
||||
Object.assign(formState, a)
|
||||
Object.assign(formState, {...data})
|
||||
Object.assign(dataFile.value, formState.lngFileUploadList || [])
|
||||
Object.assign(dataFileAccount.value, formState.billList || [])
|
||||
Object.assign(dataList.value, formState.lngPngSettleSalesList || [])
|
||||
formState.settleMonth = formState.settleMonth ? dayjs(formState.settleMonth) : null
|
||||
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
|
||||
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
|
||||
|
||||
|
||||
numFormat()
|
||||
} catch (error) {
|
||||
console.log(error, 'error')
|
||||
spinning.value = false
|
||||
}
|
||||
}
|
||||
const numFormat = () => {
|
||||
dataList.value = DataFormat.format(dataList.value, [
|
||||
FormatOption.createQty('qtySettleGj'),
|
||||
FormatOption.createQty('qtySettleM3'),
|
||||
@ -270,11 +273,19 @@
|
||||
FormatOption.createQty('priceGj',4),
|
||||
FormatOption.createQty('priceM3',4),
|
||||
]);
|
||||
|
||||
} catch (error) {
|
||||
console.log(error, 'error')
|
||||
spinning.value = false
|
||||
let obj = {
|
||||
qtySettleGj: formState.qtySettleGj,
|
||||
qtySettleM3: formState.qtySettleM3,
|
||||
amount: formState.amount
|
||||
}
|
||||
let a = DataFormat.format({...obj}, [
|
||||
FormatOption.createQty('qtySettleGj'),
|
||||
FormatOption.createQty('qtySettleM3'),
|
||||
FormatOption.createAmt('amount'),
|
||||
]);
|
||||
formState.qtySettleGj = a.qtySettleGj
|
||||
formState.qtySettleM3 = a.qtySettleM3
|
||||
formState.amount = a.amount
|
||||
}
|
||||
const comIdChange = (val) => {
|
||||
if (!val)return
|
||||
@ -335,7 +346,15 @@
|
||||
});
|
||||
setTimeout(() => {
|
||||
selectedKeys.value = []
|
||||
}, 8000);
|
||||
numClear()
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
const numClear = () => {
|
||||
if (!dataList.value.length) {
|
||||
formState.qtySettleGj = ''
|
||||
formState.qtySettleM3 = ''
|
||||
formState.amount = ''
|
||||
}
|
||||
}
|
||||
const handleSuccessMeasure = (val) => {
|
||||
@ -344,19 +363,29 @@
|
||||
return
|
||||
}
|
||||
val.forEach(v=> {
|
||||
dataList.value.forEach(k=> {
|
||||
if (v.salesId!==k.salesId) {
|
||||
dataList.value.push(v)
|
||||
}
|
||||
})
|
||||
let idx = dataList.value.findIndex(k=>k.salesId==v.salesId)
|
||||
console.log(idx, 5324, val, dataList.value)
|
||||
idx<0&&dataList.value.push(v)
|
||||
})
|
||||
}
|
||||
const btnCheck = (record, index, type) => {
|
||||
if (type == 'delete') {
|
||||
dataList.value.splice(index, 1)
|
||||
} else {
|
||||
numClear()
|
||||
}
|
||||
if (type == 'price'){
|
||||
openModalPrice(true,{isUpdate: false, record,isDisable: isDisable.value})
|
||||
}
|
||||
if (type == 'ksName'){
|
||||
router.push({
|
||||
path: '/contract/ContractSales/viewForm',
|
||||
query: {
|
||||
formPath: 'dayPlan/PngSettleHdr',
|
||||
id: record.ksId,
|
||||
disabled: true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
const handleSuccessPrice = (arr, curRecord) => {
|
||||
let qtySettleGj = 0
|
||||
@ -400,6 +429,7 @@
|
||||
formState.qtySettleGj = qtySettleGj.toFixed(3)
|
||||
formState.qtySettleM3 = qtySettleM3.toFixed(3)
|
||||
formState.amount = amount.toFixed(2)
|
||||
numFormat()
|
||||
}
|
||||
const onSearchCustomer = () => {
|
||||
openModalCustomer(true,{isUpdate: false})
|
||||
@ -481,5 +511,4 @@
|
||||
margin-bottom: 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user