From c0bc2331e9abb2ae003c8dc0ab4524d6101493a1 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期一, 25 九月 2023 09:12:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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