This commit is contained in:
2026-10-08 18:14:56 +08:00
parent dec4ebc773
commit 9cc1ff546c
1081 changed files with 238349 additions and 52163 deletions
+63 -33
View File
@@ -15,6 +15,7 @@
</view>
<view class="page-main">
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="process" :id="sheetId"/>
<vk-data-form
ref="form1"
v-model="form1.data"
@@ -24,9 +25,16 @@
:form-type="form1.props.formType"
:loading.sync="form1.props.loading"
:auto-close="true"
label-width="140px"
label-width="180px"
:show-cancel="false"
@success="onFormSuccess"
></vk-data-form>
:need-alert="false"
@fail="onFormFail"
>
<template v-slot:totalPrice>
<el-input v-model="form1.data.totalPrice" placeholder="请输入货款总价" @change="formatNumber"></el-input>
</template>
</vk-data-form>
</view>
<common-footer></common-footer>
@@ -37,13 +45,17 @@
export default {
data() {
return {
reloaded: false,
sheet: null,
sheetId: null,
// 表单相关开始-----------------------------------------------------------
form1: {
// 表单请求数据,此处可以设置默认值
data: {
// radio: 1,
// checkbox : [1,2]
sheetId: null
sheetId: null,
totalPrice: null,
},
// 表单属性
props: {
@@ -51,14 +63,15 @@ export default {
action: "client/process/quote/kh/addQuote",
// 表单字段显示规则
columns: [
{key: "totalPrice", title: "货款总价", type: "number"},
{key: "totalPriceStr", title: "人民币大写", type: "text"},
{key: "remark", title: "报价单详情", type: "editor"},
{key: "totalPrice", title: "加工总价(人民币:元)", type: "html"},
{key: "files", title: "附件", type: "file", accept: '.pdf', tips: '仅限PDF格式附件或合同,非协议合同将读取为合同附件,请仔细核查'},
{key: "remark", title: "报价单详情", type: "textarea"},
{key: "supplierExt", title: "合同补充条款", type: "textarea"},
],
// 表单验证规则
rules: {
text: [
{required: true, message: "text不能为空", trigger: "change"},
totalPrice: [
{required: true, message: "货款总价不能为空", trigger: "change,blur"},
]
},
// add 代表添加 update 代表修改
@@ -84,7 +97,7 @@ export default {
this.sheetId = sheetId
this.form1.data.sheetId = sheetId
// this.getEnquiryDetail()
this.getDetail()
},
computed: {
@@ -97,7 +110,26 @@ export default {
},
methods: {
onFormSuccess() {
vk.navigateBack()
vk.redirectTo({url: `/pages/process/detail?id=${this.sheetId}`})
},
onFormFail(data) {
if (data.data.code === 12) {
this.$confirm(data.data.msg, '提示', {
confirmButtonText: '确定',
showCancelButton: false,
type: 'warning'
}).then(() => {
vk.redirectTo({url: `/pages/user/user?menu=grade`})
})
}else {
this.$confirm(data.data.msg, '提示', {
confirmButtonText: '确定',
showCancelButton: false,
type: 'warning'
}).then(() => {
vk.navigateBack()
})
}
},
// 提交报价单
async submit() {
@@ -127,29 +159,27 @@ export default {
/**
* 获取询价单详情
*/
// getEnquiryDetail() {
// vk.callFunction({
// url: 'client/progress/sheet/pub/getDetail',
// title: '请求中...',
// data: {
// _id: this.sheetId
// },
// success: (res) => {
//
// res.data.productList.forEach(item => {
// item.unitPrice = 0
// const keys = Object.keys(item.extraAttributes)
// keys.forEach(citem => {
// item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
// citem])
// })
// })
//
//
// this.sheet = res.data
// }
// });
// }
getDetail() {
vk.callFunction({
url: 'client/process/sheet/pub/getInfo',
title: '请求中...',
data: {
id: this.sheetId
},
success: (res) => {
this.sheet = res
}
});
},
formatNumber(e){
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
}
},
onShow() {
this.reloaded = false
setTimeout(() => {
this.reloaded = true
}, 500)
}
}
</script>