diff --git a/src/views/distribution/inventory/delivery/distributionStockArticle.vue b/src/views/distribution/inventory/delivery/distributionStockArticle.vue index 6b333985..6bd4459c 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticle.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticle.vue @@ -199,9 +199,10 @@ + - - + + - + - + + - - + + - + - + 取消 - 确定 + + 确定 + @@ -519,6 +523,16 @@ export default { }, }, ], + rules: { + address: [{ required: true, message: '请输入收货人地址', trigger: ['blur', 'change'] }], + phone: [{ required: true, message: '请输入收货人电话', trigger: ['blur', 'change'] }], + name: [{ required: true, message: '请输入收货人名称', trigger: ['blur', 'change'] }], + }, + loginRules: { + typeService: [{ required: true, message: '请选择服务类型', trigger: ['blur', 'change'] }], + cost: [{ required: true, message: '请输入费用', trigger: ['blur', 'change'] }], + cause: [{ required: true, message: '请输入原因', trigger: ['blur', 'change'] }], + }, /** loading */ loadingObj: { /** 页面loading */ @@ -898,39 +912,47 @@ export default { }); break; case '2': - this.formService.stockArticleId = this.ids; - // console.log("服务类型",this.formService); + this.$refs.formServiceRef.validate(valid => { + if (!valid) { + return; + } - addService(this.formService).then(() => { - this.$message({ - type: 'success', - message: '操作成功!', + this.formService.stockArticleId = this.ids; + // console.log("服务类型",this.formService); + addService(this.formService).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormService = false; + this.formService = {}; + this.onLoad(this.page); }); - this.dialogFormService = false; - this.formService = {}; - this.onLoad(this.page); }); + break; case '3': - console.log('客户信息!!!', this.formCustomer); - for (const key in this.formCustomer) { - const value = this.formCustomer[key]; - if (!value) return this.$message.warning('请完善客户信息再提交'); - } + this.$refs.formCustomerRef.validate(valid => { + if (!valid) { + return; + } - if (!this.dialogFormCustomerOwn) { - this.formCustomer.stockArticleId = this.ids; - } - addClient(this.formCustomer).then(() => { - this.$message({ - type: 'success', - message: '操作成功!', + console.log('客户信息!!!', this.formCustomer); + if (!this.dialogFormCustomerOwn) { + this.formCustomer.stockArticleId = this.ids; + } + addClient(this.formCustomer).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormCustomer = false; + this.dialogFormCustomerOwn = false; + this.formCustomer = {}; + this.onLoad(this.page); }); - this.dialogFormCustomer = false; - this.dialogFormCustomerOwn = false; - this.formCustomer = {}; - this.onLoad(this.page); }); + break; } }, diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue index 47dfecb3..d889ce2e 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue @@ -157,8 +157,8 @@ - - + + - - + + - + - - + + - + - + { - this.$message({ - type: 'success', - message: '操作成功!', + this.$refs.formServiceRef.validate(valid => { + if (!valid) { + return; + } + + this.formService.stockArticleId = this.ids; + console.log('服务类型', this.formService); + addService(this.formService).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormService = false; + this.formService = {}; + this.onLoad(this.page); }); - this.dialogFormService = false; - this.formService = {}; - this.onLoad(this.page); }); break; case '3': - console.log('客户信息!!!', this.formCustomer); - if (!this.dialogFormCustomerOwn) { - this.formCustomer.stockArticleId = this.ids; - } - addClient(this.formCustomer).then(() => { - this.$message({ - type: 'success', - message: '操作成功!', + this.$refs.formCustomerRef.validate(valid => { + if (!valid) { + return; + } + + console.log('客户信息!!!', this.formCustomer); + if (!this.dialogFormCustomerOwn) { + this.formCustomer.stockArticleId = this.ids; + } + addClient(this.formCustomer).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormCustomer = false; + this.dialogFormCustomerOwn = false; + this.formCustomer = {}; + this.onLoad(this.page); }); - this.dialogFormCustomer = false; - this.dialogFormCustomerOwn = false; - this.formCustomer = {}; - this.onLoad(this.page); }); + break; } }, diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue b/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue index 5cc30070..07e21b7d 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue @@ -188,8 +188,8 @@ - - + + - - + + - + - - + + - + - + { + if (!valid) { + return; + } - addService(this.formService).then(() => { - this.$message({ - type: 'success', - message: '操作成功!', + this.formService.stockArticleId = this.ids; + // console.log("服务类型",this.formService); + addService(this.formService).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormService = false; + this.formService = {}; + this.onLoad(this.page); }); - this.dialogFormService = false; - this.formService = {}; - this.onLoad(this.page); }); + break; case '3': - console.log('客户信息!!!', this.formCustomer); - if (!this.dialogFormCustomerOwn) { - this.formCustomer.stockArticleId = this.ids; - } - addClient(this.formCustomer).then(() => { - this.$message({ - type: 'success', - message: '操作成功!', + this.$refs.formCustomerRef.validate(valid => { + if (!valid) { + return; + } + + console.log('客户信息!!!', this.formCustomer); + if (!this.dialogFormCustomerOwn) { + this.formCustomer.stockArticleId = this.ids; + } + addClient(this.formCustomer).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormCustomer = false; + this.dialogFormCustomerOwn = false; + this.formCustomer = {}; + this.onLoad(this.page); }); - this.dialogFormCustomer = false; - this.dialogFormCustomerOwn = false; - this.formCustomer = {}; - this.onLoad(this.page); }); + break; } }, diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue index 99659e45..90b0e2d4 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue @@ -217,8 +217,8 @@ - - + + - - + + - + - - + + - + - + - - - - - - - - - - - - - - + { - this.$message({ - type: 'success', - message: '操作成功!', + this.$refs.formServiceRef.validate(valid => { + if (!valid) { + return; + } + + this.formService.stockArticleId = this.ids; + // console.log("服务类型",this.formService); + addService(this.formService).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormService = false; + this.formService = {}; + this.onLoad(this.page); }); - this.dialogFormService = false; - this.formService = {}; - this.onLoad(this.page); }); + break; case '3': - // console.log("客户信息!!!",this.formCustomer); - if (!this.dialogFormCustomerOwn) { - this.formCustomer.stockArticleId = this.ids; - } - addClient(this.formCustomer).then(() => { - this.$message({ - type: 'success', - message: '操作成功!', + this.$refs.formCustomerRef.validate(valid => { + if (!valid) { + return; + } + + console.log('客户信息!!!', this.formCustomer); + if (!this.dialogFormCustomerOwn) { + this.formCustomer.stockArticleId = this.ids; + } + addClient(this.formCustomer).then(() => { + this.$message({ + type: 'success', + message: '操作成功!', + }); + this.dialogFormCustomer = false; + this.dialogFormCustomerOwn = false; + this.formCustomer = {}; + this.onLoad(this.page); }); - this.dialogFormCustomer = false; - this.dialogFormCustomerOwn = false; - this.formCustomer = {}; - this.onLoad(this.page); }); + break; } }, diff --git a/src/views/distribution/inventory/distributionStockArticleDetails.vue b/src/views/distribution/inventory/distributionStockArticleDetails.vue index 5119c3ca..bb64f71d 100644 --- a/src/views/distribution/inventory/distributionStockArticleDetails.vue +++ b/src/views/distribution/inventory/distributionStockArticleDetails.vue @@ -400,7 +400,7 @@ export default { consigneeAddress: [{ required: true, message: '请输入收货人地址', trigger: 'blur' }], consigneeMobile: [ { required: true, message: '请输入收货人电话', trigger: 'blur' }, - { min: 11, max: 11, message: '请输入11位电话号码', trigger: 'blur' }, + // { min: 11, max: 11, message: '请输入11位电话号码', trigger: 'blur' }, ], consigneePerson: [{ required: true, message: '请输入收货人名称', trigger: 'blur' }], }, @@ -1046,6 +1046,9 @@ export default { }); break; case '3': + for (const key in this.formCustomer) { + if (!this.formCustomer[key]) return this.$message.warning('请完善客户信息!!'); + } // console.log("客户信息!!!",this.formCustomer); this.formCustomer.stockArticleId = this.$route.query.id; console.log('客户信息!!!', this.formCustomer); diff --git a/src/views/distribution/inventory/distrilbutionBillLadingList.vue b/src/views/distribution/inventory/distrilbutionBillLadingList.vue index 11416255..e1933f53 100644 --- a/src/views/distribution/inventory/distrilbutionBillLadingList.vue +++ b/src/views/distribution/inventory/distrilbutionBillLadingList.vue @@ -543,7 +543,7 @@ export default { label: '操作', type: 6, values: '', - width: '200', + width: '250', checkarr: [], fixed: 'right', hide: true, diff --git a/src/views/distribution/inventory/distrilbutionBillLadingView.vue b/src/views/distribution/inventory/distrilbutionBillLadingView.vue index 682b5c8b..33123892 100644 --- a/src/views/distribution/inventory/distrilbutionBillLadingView.vue +++ b/src/views/distribution/inventory/distrilbutionBillLadingView.vue @@ -192,6 +192,7 @@ import { getOrderDetail, $_checkBillLadingIsRelease, } from '@/api/distribution/distrilbutionBillLading'; +import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle'; import { ElMessage, ElMessageBox } from 'element-plus'; import { getLodop } from '@/utils/LodopFuncs.js'; @@ -1508,7 +1509,7 @@ export default { } this.html = ''; - getPrintTemplate({ + showOrderPackgeCode({ ids: qr, }).then(res => { // this.orderPackageCode = res.data