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