From d01b492142fc8ee6ae564d3213c4ebd71d93dc0f Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期日, 04 八月 2024 18:03:47 +0800 Subject: [PATCH] 数采回显设备 --- src/components/do/b1-ins-order/add.vue | 90 ++++++++++++++++++++++++++++---------------- 1 files changed, 57 insertions(+), 33 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index e5e9754..96d8980 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -461,6 +461,16 @@ </div> </template> </el-table-column> + <el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px"> + <template slot-scope="scope"> + <el-input size="small" placeholder="瑕佹眰鎻忚堪" v-model="scope.row.tell" clearable type="textarea" + :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'tell')" + v-if="active==1&&isAskOnlyRead"></el-input> + <span v-else> + <template >{{ scope.row.tell }}</template> + </span> + </template> + </el-table-column> <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px" v-if="isAskOnlyRead"> <template slot-scope="scope"> <el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea" @@ -477,16 +487,6 @@ </template> <template v-else>{{ scope.row.ask }}</template> --> <template >{{ scope.row.ask }}</template> - </span> - </template> - </el-table-column> - <el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px"> - <template slot-scope="scope"> - <el-input size="small" placeholder="瑕佹眰鎻忚堪" v-model="scope.row.tell" clearable type="textarea" - :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'tell')" - v-if="active==1&&isAskOnlyRead"></el-input> - <span v-else> - <template >{{ scope.row.tell }}</template> </span> </template> </el-table-column> @@ -961,7 +961,7 @@ entity: { orderBy: { field: 'id', - order: 'asc' + order: 'desc' } }, isIndex: true, @@ -1219,6 +1219,9 @@ } }) this.circulateShow = false + this.changeProductList0() + this.currentMethod.insProduct = this.productList0 + this.getProNum() }, spliceTemperatureTest () { if (this.temperatureTest.length === 0) { @@ -1370,6 +1373,14 @@ let obj = this.productList.find(m => m.id == a.id) if(obj){ a.state = obj.state + a.section = obj.section + a.ask = obj.ask + a.manHour = obj.manHour + a.price = obj.price + a.tell = obj.tell + } + if(a.state == 0&&a.bsmRow){ + a = this.HaveJson(a.bsmRow) } }) }, @@ -1773,6 +1784,7 @@ }, saveMethod(sampleList){ this.saveLoad = true + console.log(333333,sampleList) this.$axios.post(this.$api.insOrder.addInsOrder, { str: JSON.stringify({ insOrder: this.addObj, @@ -2076,9 +2088,14 @@ this.sampleIds.push(row.id) } this.productList = row.insProduct + this.productList0 = JSON.parse(JSON.stringify(this.productList)) setTimeout(() => { this.productList.forEach(a => { - if (a.state == 1) this.toggleSelection(a) + if (a.state == 1) { + this.toggleSelection(a) + }else{ + this.$refs.productTable.toggleRowSelection(a, false); + } }) }, 200) }, @@ -2103,7 +2120,6 @@ row.bsm1 = false }else if(arr.length>0){ try{ - row.bsmRow = this.HaveJson(row) let section = arr[0].section let arr0 = JSON.parse(row.section) let arr1 = JSON.parse(row.ask) @@ -2252,7 +2268,8 @@ name: this.templateName, thing: JSON.stringify({ addObj: this.addObj, - sampleList: this.sampleList + sampleList: this.sampleList, + selectTree:this.selectTree }) }, { headers: { @@ -2277,6 +2294,7 @@ let obj = JSON.parse(res.data) this.addObj = obj.addObj; this.sampleList = obj.sampleList; + this.selectTree = obj.selectTree }) }, delSampleAndProduct() { @@ -2321,9 +2339,9 @@ } this.getProductLoad = true let selectTreeList = this.selectTree.split(" - ") - selectTreeList[selectTreeList.length - 1] = this.addObj.model + this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model) this.$axios.post(this.$api.standardTree.selectStandardProductList, { - model: this.addObj.model + '-' + row.modelNum, + model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum, standardMethodListId: val, factory: selectTreeList.join(" - "), }, { @@ -2663,25 +2681,31 @@ } }, upBsmAll (item) { - let sections = JSON.parse(item.bsmRow.section); - let asks = JSON.parse(item.bsmRow.ask); - let tells = JSON.parse(item.bsmRow.tell); - let manHours = JSON.parse(item.bsmRow.manHour); - let prices = JSON.parse(item.bsmRow.price); - for (var a in sections) { - if (item.bsm1Val === sections[a]) { - this.productList.forEach(p => { - if (p.id === item.bsmRow.id) { - p.section = sections[a] - p.ask = asks[a] - p.tell = tells[a] - p.manHour = manHours[a] - p.price = prices[a] - } - }) - break + // console.log(1111,item,this.bsm1DiaList) + for (let i =0;i<this.bsm1DiaList.length;i++){ + this.bsm1DiaList[i].bsm1Val = item.bsm1Val + let sections = JSON.parse(this.bsm1DiaList[i].bsmRow.section); + let asks = JSON.parse(this.bsm1DiaList[i].bsmRow.ask); + let tells = JSON.parse(this.bsm1DiaList[i].bsmRow.tell); + let manHours = JSON.parse(this.bsm1DiaList[i].bsmRow.manHour); + let prices = JSON.parse(this.bsm1DiaList[i].bsmRow.price); + for (var a in sections) { + if (this.bsm1DiaList[i].bsm1Val === sections[a]) { + this.productList.forEach(p => { + if (p.id === this.bsm1DiaList[i].bsmRow.id) { + p.section = sections[a] + p.ask = asks[a] + p.tell = tells[a] + p.manHour = manHours[a] + p.price = prices[a] + } + }) + break + } } } + this.changeProductList0() + this.currentMethod.insProduct = this.productList0 }, beforeClose(done) { // if (this.bsm1) { -- Gitblit v1.9.3