From b5acca92bd0794c24310d15c6fba8433d08119c9 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期三, 11 十月 2023 15:27:09 +0800 Subject: [PATCH] feat: 销售机会报价单销售总单销售子单 编辑弹窗调整表单编号位置, 更换适配新的编码组件 --- src/views/other/payment/saleInvoice/addSaleInvoice.vue | 81 +++++++++++++++++++++++++--------------- 1 files changed, 50 insertions(+), 31 deletions(-) diff --git a/src/views/other/payment/saleInvoice/addSaleInvoice.vue b/src/views/other/payment/saleInvoice/addSaleInvoice.vue index db82aa3..e844dd5 100644 --- a/src/views/other/payment/saleInvoice/addSaleInvoice.vue +++ b/src/views/other/payment/saleInvoice/addSaleInvoice.vue @@ -13,7 +13,7 @@ :model="editConfig.infomation" :rules="rules" label-position="right" - label-width="308px" + label-width="168px" size="mini" style="height: 60vh; overflow-x: hidden" > @@ -25,12 +25,12 @@ <el-row> <el-col :span="12"> <el-form-item label="涓婚" prop="subject"> - <el-input v-model="editConfig.infomation.subject"></el-input> + <el-input v-model="editConfig.infomation.subject" style="width: 100%"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="鍙戠エ缂栧彿" prop="number"> - <el-input v-model="editConfig.infomation.number"></el-input> + <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> </el-form-item> </el-col> <el-col :span="12"> @@ -45,6 +45,7 @@ " value-key="name" @select="handleSelectClient('client', $event)" + style="width: 100%" ></el-autocomplete> <div class="common-select-btn" @click="selClientClick('client')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> @@ -54,7 +55,7 @@ class="common-select-btn" @click="clearupClient('client')" > - <i class="el-icon-edit-outline" title="娓呴櫎"></i> + <i class="el-icon-remove-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> @@ -67,6 +68,7 @@ placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" + style="width: 100%" > <el-option v-for="item in invoiceTypeOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> @@ -83,6 +85,7 @@ placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" + style="width: 100%" > <el-option v-for="item in invoiceStatusOptions" @@ -102,7 +105,7 @@ v-model="editConfig.infomation.principalId" placeholder="璇烽�夋嫨" size="mini" - style="width: 63%" + style="width: 100%" > <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> </el-option> @@ -121,6 +124,7 @@ " value-key="number" @select="handleSelectClient('serviceContract', $event)" + style="width: 100%" ></el-autocomplete> <div class="common-select-btn" @click="selClientClick('serviceContract')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> @@ -133,7 +137,7 @@ class="common-select-btn" @click="clearupClient('serviceContract')" > - <i class="el-icon-edit-outline" title="娓呴櫎"></i> + <i class="el-icon-remove-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> @@ -150,6 +154,7 @@ " value-key="number" @select="handleSelectClient('contract', $event)" + style="width: 100%" ></el-autocomplete> <div class="common-select-btn" @click="selClientClick('contract')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> @@ -159,14 +164,14 @@ class="common-select-btn" @click="clearupClient('contract')" > - <i class="el-icon-edit-outline" title="娓呴櫎"></i> + <i class="el-icon-remove-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="绾崇◣璇嗗埆鍙�" prop="taxpayerIdNumber"> - <el-input v-model="editConfig.infomation.taxpayerIdNumber"></el-input> + <el-input v-model="editConfig.infomation.taxpayerIdNumber" style="width: 100%"></el-input> </el-form-item> </el-col> </el-row> @@ -183,6 +188,7 @@ placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" + style="width: 100%" > <el-option v-for="item in courierCompanyOptions" @@ -198,7 +204,7 @@ </el-col> <el-col :span="12"> <el-form-item label="鐗╂祦鍗曞彿" prop="courierNumber"> - <el-input v-model="editConfig.infomation.courierNumber"></el-input> + <el-input v-model="editConfig.infomation.courierNumber" style="width: 100%"></el-input> </el-form-item> </el-col> <el-col :span="12"> @@ -208,13 +214,14 @@ value-format="yyyy-MM-dd" type="date" placeholder="閫夋嫨鏃ユ湡" + style="width: 100%" > </el-date-picker> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="鍙戠エ鍙风爜" prop="invoiceNumber"> - <el-input v-model="editConfig.infomation.invoiceNumber"></el-input> + <el-input v-model="editConfig.infomation.invoiceNumber" style="width: 100%"></el-input> </el-form-item> </el-col> </el-row> @@ -384,7 +391,7 @@ }, data() { return { - dialogWidth: "80%", + dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { subject: [{ required: true, message: "璇疯緭鍏ヤ富棰�", trigger: "blur" }], @@ -403,7 +410,7 @@ show: true, total: true, sumProp: ["Amount", "Unit", "total"], - mergeNumber: 3 + mergeNumber: 2 }, editSelectClientConfig: { editVisible: false, @@ -481,26 +488,38 @@ this.$refs[formName].validate((valid) => { if (valid) { console.log(this.editConfig.infomation) - const params = this.saveParams() - console.log(params) - if (this.editConfig.title === "鏂板缓") { - addInvoice(params).then((res) => { - console.log(res) - this.editConfig.visible = false - if (res.code === 200) { - this.$message.success("娣诲姞鎴愬姛") - this.$parent.getData() - } - }) + for (let i = 0; i < this.tableData.length; i++) { + if (this.tableData[i].name.length === 0) { + this.isNoProduct = true + break + } else { + this.isNoProduct = false + } + } + if (this.isNoProduct) { + this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖") } else { - // getUpdateServiceContract(params).then((res) => { - // console.log(res) - // this.editConfig.visible = false - // if (res.code === 200) { - // this.$message.success("缂栬緫鎴愬姛") - // this.$parent.getData() - // } - // }) + const params = this.saveParams() + console.log(params) + if (this.editConfig.title === "鏂板缓") { + addInvoice(params).then((res) => { + console.log(res) + this.editConfig.visible = false + if (res.code === 200) { + this.$message.success("娣诲姞鎴愬姛") + this.$parent.getData() + } + }) + } else { + // getUpdateServiceContract(params).then((res) => { + // console.log(res) + // this.editConfig.visible = false + // if (res.code === 200) { + // this.$message.success("缂栬緫鎴愬姛") + // this.$parent.getData() + // } + // }) + } } } else { console.log("error submit") -- Gitblit v1.8.0