From 6e4293b29e6bd439ac36945ce8d0e012126103eb Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期一, 06 十一月 2023 17:23:13 +0800 Subject: [PATCH] new file: node_modules.7z modified: src/api/quality/rawMaterial.js modified: src/api/quality/unqualifiedprocess.js modified: src/views/common/rawMaterial-part.vue modified: src/views/common/ztt-table.vue modified: src/views/quality/processconfiguration/index.vue deleted: src/views/quality/rawMaterial/ExportMaterial.vue modified: src/views/quality/rawMaterial/index.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue --- src/views/quality/rawMaterial/rawMaterial-form.vue | 88 ++++++++++++++++++-------------------------- 1 files changed, 36 insertions(+), 52 deletions(-) diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue index b5923d0..0bd79dc 100644 --- a/src/views/quality/rawMaterial/rawMaterial-form.vue +++ b/src/views/quality/rawMaterial/rawMaterial-form.vue @@ -75,23 +75,24 @@ </el-form-item> </el-col> <el-col :span="6"> + <el-form-item prop="projectName" label="椤圭洰鍚嶇О"> + <el-tooltip :disabled="dataForm.projectName==null" :content="dataForm.projectName"> + <el-input v-model="dataForm.projectName" disabled ></el-input> + </el-tooltip> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="6"> <el-form-item label="鎶ユ鏃ユ湡" prop="createTime" v-if="dataForm.id!=null"> <el-input v-model="dataForm.createTime" disabled /> </el-form-item> - </el-col> - </el-row> - <el-row> + </el-col> <el-col :span="6"> <el-form-item label="鎶ユ浜�" prop="createUser" v-if="dataForm.id!=null"> <el-input v-model="dataForm.createUser" disabled /> </el-form-item> </el-col> - <el-col :span="6"> - <el-form-item prop="projectName" label="椤圭洰鍚嶇О"> - <el-input v-model="dataForm.projectName" disabled > - </el-input> - </el-form-item> - </el-col> </el-row> </el-form> </div> @@ -120,7 +121,7 @@ filterable allow-create placeholder="璇疯緭鍏ユ垨閫夋嫨椤圭洰鍚嶇О" style="width:100%" @change="changeName(scope.$index,scope.row)"> <el-option v-for="(item,index) in projectList" :key="index" :label="item.name" :value="item.name"/> </el-select> - <el-input v-else :disabled="dataForm.id != null" class="inline-input" v-model="list.name" + <el-input v-else :disabled="dataForm.id != null" class="inline-input" v-model="scope.row.name" placeholder="璇疯緭鍏ラ」鐩悕绉�"></el-input> </template> </el-table-column> @@ -140,18 +141,19 @@ <el-table-column prop="testValue" label="妫�娴嬪��" min-width="260" v-for="(item, index) in empiricalValueAdd" :key="index"> <template slot-scope="scope"> - <el-tooltip :disabled="scope.row.equipmentId != null" class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" + <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" placement="top-start"> <!-- <el-input :disabled="scope.row.equipmentId == null || (dataForm.id!=null&&resultVal!=null)" v-model="scope.row.testValueList[index]" @blur="updateTestValue(scope.row,index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input> --> <el-autocomplete - :disabled="scope.row.equipmentId == null || (dataForm.id!=null&&resultVal!=null)" + style="width:100%" + :disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)" class="inline-input" v-model="scope.row.testValueList[index]" :fetch-suggestions="querySearch" - placeholder="璇疯緭鍏ュ唴瀹�" + placeholder="璇疯緭鍏ユ娴嬪��" @select="handleSelect" ></el-autocomplete> @@ -162,9 +164,9 @@ <el-table-column prop="deviceName" label="璇曢獙璁惧" min-width="260"> <template slot-scope="scope"> <el-select :disabled="resultVal!=null && dataForm.id!=null" style="width:100%" - v-model="scope.row.equipmentId" filterable @change="updateDevice(scope.row,scope.$index)"> + v-model="scope.row.deviceId" filterable @change="updateDevice(scope.row,scope.$index)"> <el-option v-for="(item,index) in deviceList" - :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option> + :key="index" :value="item.id" :label="item.code +'-'+ item.name"></el-option> </el-select> </template> </el-table-column> @@ -223,17 +225,12 @@ <span>涓嶅悎鏍兼暟閲�:</span> <el-input type="number" v-model="unqualifiedNum" placeholder="璇疯緭鍏ヤ笉鍚堟牸鏁伴噺"/> </el-col> - <el-col> - <span>瀹炴鏁伴噺:</span> - <el-input type="number" placeholder="璇疯緭鍏ュ疄妫�鏁伴噺" v-model="fiedNum"/> - </el-col> </el-row> <span slot="footer" class="dialog-footer"> <el-button @click="dialogVisible = false">鍙� 娑�</el-button> <el-button type="primary" @click="submitSave()">纭� 瀹�</el-button> </span> </el-dialog> - <!-- <rawMaterialPartDialog :currentRow ="currentRow" @costPlannedAmountChange="costPlannedAmountChange"/> --> </div> </template> @@ -246,7 +243,6 @@ updateRawInspectsById, updateDeviceById, } from '@/api/quality/rawMaterial' import rawMaterialPartDialog from '@/views/common/rawMaterial-part' -import { log } from 'util' export default { // props:['currentRow'], computed:{}, @@ -255,9 +251,8 @@ }, data(){ return{ - currentRow:[], - userlist:[], - fiedNum: null, + currentRow:[], + userlist:[], unqualifiedNum: null, dialogVisible:false, resultVal: null, @@ -282,7 +277,7 @@ number: '', supplier: '', rawInsProducts: [{ - equipmentId: 0, + deviceId: 0, name: '', required: '', testValue: '', @@ -320,30 +315,16 @@ this.init() this.getDeviceList() this.restaurants = this.loadAll(); - // this.costPlannedAmountChange() }, watch:{ dialogVisible(newVal){ if(newVal){ this.unqualifiedNum = null - this.fiedNum = null } }, }, methods:{ - //椤圭洰 - // xxxx(){ - // console.log(currentRow); - // }, - // 浜嬩欢澶勭悊鍑芥暟 - // costPlannedAmountChange(value) { - // console.log("==>"); - // console.log(value.rawInsProducts); - // this.userlist = value.rawInsProducts - // this.list = this.userlist - // console.log(this.list); - // }, querySearch(queryString, cb) { var restaurants = this.restaurants; var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants; @@ -373,7 +354,6 @@ }, // 纭鍥炶皟 selectPart(param, nodePart, index) { - console.log("鎴愬姛--",param); if (typeof param !== 'undefined') { this.dataForm.code = param.code this.dataForm.name = param.name @@ -385,21 +365,20 @@ this.dataForm.message = param.message this.dataForm.projectName = param.projectName this.projectList = param.rawInsProducts == null ? [] : param.rawInsProducts - // param.rawInsProducts.forEach(item=>{ - // this.list.push(item) - // }) + param.rawInsProducts.forEach(o=>{ + this.clickAddLine(o) + }) } }, queryCode(){ this.paramObj = { code: this.dataForm.code } - console.log(this.paramObj); this.showPart = true }, updateDevice(row,index){ if(this.dataForm.id != null){ - updateDeviceById({equiomentId:row.equipmentId,rpId:row.rpId}).then(res=>{ + updateDeviceById({deviceId:row.deviceId,rpId:row.rpId}).then(res=>{ this.list[index].testValue = '' this.list[index].testState = null this.list[index].testValueList = [] @@ -436,24 +415,24 @@ let data = { id: this.dataForm.id, number: this.unqualifiedNum, - toLocationNo: this.fiedNum + // toLocationNo: this.fiedNum } updateRawInspectsById(data).then(res => { if(res.data.code == 0){ sessionStorage.setItem("raw-resultVal-"+this.dataForm.id,res.data.data) this.$message.success("涓婃姤鎴愬姛"); this.dialogVisible = false + this.checkTestState() } }); - this.checkTestState() }, addTeatValueColumn(){ this.empiricalValueAdd = this.empiricalValueAdd + 1; }, // 娣诲姞琛� - clickAddLine() { + clickAddLine(row) { let obj = { - equipmentId: null, + deviceId: null, name: "", required: "", testValue: "", @@ -461,6 +440,11 @@ testState: null, testValueList: [], }; + if(row!=undefined){ + obj.name = row.name + obj.unit = row.unit + obj.required = row.required + } this.list.push(obj); }, // 鍒犻櫎琛� @@ -482,7 +466,7 @@ return } let obj = { - equiomentId: row.equipmentId, + deviceId: row.deviceId, rpId: row.rpId, testValue: row.testValueList.join(",") } @@ -508,9 +492,9 @@ this.dataForm.unit = data.runit this.dataForm.supplier = data.supplier this.dataForm.number = data.number + this.dataForm.projectName = data.projectName this.dataForm.createTime = data.creatTime this.dataForm.createUser = data.createUser - // this.dataForm.judgeState = data.judgeState let userNameList = [] this.list = [] data.children.forEach(item=>{ @@ -523,7 +507,7 @@ } } this.list.push({ - equipmentId: item.equiomentId, + deviceId: item.deviceId, deviceName: item.deviceName, name: item.rpName, required: item.required, -- Gitblit v1.9.3