From e3d6cc8c9ee3a771b92a8706e3cf83dededfaa43 Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期日, 24 九月 2023 16:26:52 +0800 Subject: [PATCH] modified: src/assets/api/controller.js modified: src/components/view/Technicalindex.vue modified: src/components/view/finishedProductInspectionUp.vue modified: src/components/view/processInspectionUpdate.vue modified: src/components/view/rawInsDetail.vue modified: src/components/view/sale.vue --- src/components/view/rawInsDetail.vue | 52 +++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/components/view/rawInsDetail.vue b/src/components/view/rawInsDetail.vue index 5cfeb6c..fe4b199 100644 --- a/src/components/view/rawInsDetail.vue +++ b/src/components/view/rawInsDetail.vue @@ -102,7 +102,8 @@ <template slot-scope="scope"> <!-- <el-input v-if="detailId == null" v-model="scope.row.name" placeholder="璇疯緭鍏ラ」鐩悕绉�"></el-input> --> <el-autocomplete v-if="detailId == null" class="inline-input" v-model="scope.row.name" - :fetch-suggestions="querySearch" placeholder="璇疯緭鍏ラ」鐩悕绉�" @select="handleSelect(scope.row)" @blur="handleSelect(scope.row)"></el-autocomplete> + :fetch-suggestions="querySearch" placeholder="璇疯緭鍏ラ」鐩悕绉�" @select="handleSelect(scope.row)" + @blur="handleSelect(scope.row)"></el-autocomplete> <el-input v-else v-model="scope.row.rpName" disabled></el-input> </template> </el-table-column> @@ -181,7 +182,7 @@ </el-table-column> <el-table-column v-if="detailId !== null" label="鎿嶄綔" width="120"> <template> - <el-button type="text" size="small" @click.once="submitSave">涓婃姤</el-button> + <el-button type="text" size="small" @click="submitSave">涓婃姤</el-button> </template> </el-table-column> </el-table> @@ -301,10 +302,10 @@ this.detailInfo.number = this.ifsInfo.number this.detailInfo.specifications = this.ifsInfo.specifications this.restaurants = JSON.parse(JSON.stringify(this.ifsInfo.rawInsProducts)) - this.restaurants.forEach(item=>{ - this.$set(item,"value",item.name) + this.restaurants.forEach(item => { + this.$set(item, "value", item.name) }) - console.log("restaurants",this.restaurants); + console.log("restaurants", this.restaurants); }) }, querySearch(queryString, cb) { @@ -319,13 +320,13 @@ }; }, handleSelect(row) { - let select=this.restaurants.filter(item=>{ - return item.name===row.name + let select = this.restaurants.filter(item => { + return item.name === row.name })[0] - if(select!=undefined){ - this.$set(row,"internal",select.internal) - this.$set(row,"required",select.required) - this.$set(row,"unit",select.unit) + if (select != undefined) { + this.$set(row, "internal", select.internal) + this.$set(row, "required", select.required) + this.$set(row, "unit", select.unit) //妫�楠屽�� } }, @@ -438,14 +439,39 @@ this.getDetailInfo(); //閲嶆柊鍒锋柊淇℃伅鏁版嵁 } }, - async submitSave() { - const res = await this.$axios.post( + submitSave() { + let pro = this.projectTable.filter(item => { + return item.testState === 0; + }) + if (pro.length > 0) { + this.$prompt('璇疯緭鍏ヤ笉鍚堟牸鏁伴噺', '涓嶅悎鏍兼暟閲�', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + inputPattern: /^\d+$/, + inputErrorMessage: '璇疯緭鍏ユ纭暟瀛楁牸寮�' + }).then(({ value }) => { + this.$axios.post( + this.$api.url.updateRawInspectsById+`${this.detailId}`, {"number": value } + ).then(res => { + this.$message.success("鎻愪氦鎴愬姛"); + this.getDetailInfo(); + this.goBack() + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '鍙栨秷杈撳叆' + }); + }); + }else{ + this.$axios.post( this.$api.url.updateRawInspectsById + `${this.detailId}` ).then(res => { this.$message.success("鎻愪氦鎴愬姛"); this.getDetailInfo(); this.goBack() }); + } }, // 鑾峰彇璁惧鏍戝唴瀹� getOptions() { -- Gitblit v1.9.3