From 1094076235c6765ee0b527272d476df227d690ff Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 01 十一月 2023 14:13:25 +0800 Subject: [PATCH] modified: src/api/quality/finishedProduct.js deleted: src/const/crud/quality/rawMaterial.js modified: src/views/quality/finishedProductInspection/finishedProductInspectionAdd.vue deleted: src/views/quality/finishedProductInspection/finishedProductInspectionLook.vue deleted: src/views/quality/finishedProductInspection/finishedProductInspectionUp.vue modified: src/views/quality/finishedProductInspection/index.vue new file: src/views/quality/package/index.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue --- src/views/quality/rawMaterial/rawMaterial-form.vue | 196 +++++++++++++++++++++++++++++++----------------- 1 files changed, 126 insertions(+), 70 deletions(-) diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue index d877ccd..0966edf 100644 --- a/src/views/quality/rawMaterial/rawMaterial-form.vue +++ b/src/views/quality/rawMaterial/rawMaterial-form.vue @@ -11,14 +11,6 @@ </div> <div class="page-main"> <div class="rawMaterial-basic"> - <el-row style="width:100%;height:20px;margin-bottom:20px;" v-show="dataForm.id==null"> - <el-col :span="20"> - <span style="color:red;font-size:18px;padding: 0;margin: 0;">璇锋壂鎻忎簩缁寸爜鑾峰彇鏁版嵁</span> - </el-col> - <el-col :span="4" style="text-align: right;"> - <el-button>鎵弿浜岀淮鐮�</el-button> - </el-col> - </el-row> <el-form :model="dataForm" :rules="dataRule" @@ -27,15 +19,14 @@ class="l-mes" label-width="110px"> <el-row> - <el-col :span="6"> - <el-form-item prop="formTime" label="鏉ユ枡鏃ユ湡"> - <el-date-picker - v-model="dataForm.formTime" - type="datetime" - value-format="yyyy-MM-dd HH:mm:ss" - disabled> - - </el-date-picker> + <el-col :span="6"> + <el-form-item label="闆朵欢鍙�" prop="code"> + <el-input v-model="dataForm.code"> + <el-button + slot="append" + icon="el-icon-search" + @click="queryCode()"></el-button> + </el-input> </el-form-item> </el-col> <el-col :span="6"> @@ -45,8 +36,15 @@ </el-form-item> </el-col> <el-col :span="6"> - <el-form-item label="鍘熸潗鏂欑紪鐮�" prop="code"> - <el-input v-model="dataForm.code" disabled></el-input> + <el-form-item prop="formTime" label="鏉ユ枡鏃ユ湡"> + <el-date-picker + style="width:100%" + v-model="dataForm.formTime" + type="datetime" + value-format="yyyy-MM-dd HH:mm:ss" + disabled> + + </el-date-picker> </el-form-item> </el-col> <el-col :span="6"> @@ -95,19 +93,25 @@ <el-col :span="5"> <div style="width:100%;text-align: right;"> <el-button v-show="dataForm.id==null" size="small" @click="clickAddLine">娣诲姞妫�楠岃</el-button> - <el-button size="small" @click="addTeatValueColumn()">娣诲姞妫�楠屽�煎垪</el-button> - <el-button size="small" @click="delTeatValueColumn()">鍒犻櫎妫�楠屽�煎垪</el-button> + <el-button size="small" @click="addTeatValueColumn()">娣诲姞妫�娴嬪�煎垪</el-button> + <el-button size="small" @click="delTeatValueColumn()">鍒犻櫎妫�娴嬪�煎垪</el-button> </div> </el-col> </el-row> <el-row style="width:100%;"> <el-col :span="24"> - <el-table :data="list" border style="width: 100%;" height="320"> + <el-table :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" + :cell-style="{textAlign:'center'}" ref="table" + :data="list" border style="width: 100%;" height="400"> <el-table-column type="index" label="搴忓彿" width="60"> </el-table-column> <el-table-column prop="name" label="椤圭洰" width="260"> <template slot-scope="scope"> - <el-input :disabled="dataForm.id != null" class="inline-input" v-model="scope.row.name" + <el-select v-if="projectList.length > 0" :disabled="dataForm.id != null" class="inline-input" v-model="scope.row.name" + 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="scope.row.name" placeholder="璇疯緭鍏ラ」鐩悕绉�"></el-input> </template> </el-table-column> @@ -156,44 +160,60 @@ </el-col> </el-row> </div> - <div class="rawMaterial-detail"> + <div class="rawMaterial-result"> <el-row> <el-col :span="24">妫�楠岀粨璁�</el-col> </el-row> <el-row style="width:100%"> <el-col :span="24"> - <avue-crud - ref="conclusion" - :option="option" - :data="conclusionTable" - v-model="conclusion"> - <template slot="judgeState" slot-scope="scope"> - <el-tag type="success" v-if="scope.row.judgeState == 1">鍚堟牸</el-tag> - <el-tag type="danger" v-else-if="scope.row.judgeState == 0">涓嶅悎鏍�</el-tag> - </template> - <template #menu> - <el-button type="text" @click="submitSave()" size="small">涓婃姤</el-button> - </template> - </avue-crud> + <el-table border height="90" :data="conclusionTable" ref="conclusion" v-model="conclusion" + :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" + :cell-style="{textAlign:'center'}"> + <el-table-column prop="code" label="鐗╂枡缂栧彿"></el-table-column> + <el-table-column prop="name" label="鐗╂枡鍚嶇О"></el-table-column> + <el-table-column prop="userName" label="妫�楠屽憳"></el-table-column> + <el-table-column prop="judgeState" label="妫�楠岀粨璁�"> + <template slot-scope="scope"> + <el-tag type="success" v-if="scope.row.judgeState == 1">鍚堟牸</el-tag> + <el-tag type="danger" v-else-if="scope.row.judgeState == 0">涓嶅悎鏍�</el-tag> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔"> + <template> + <el-button type="text" @click="submitSave()" size="small">涓婃姤</el-button> + </template> + </el-table-column> + </el-table> </el-col> </el-row> </div> </div> + <rawMaterialPartDialog :paramObj="paramObj" :currshowlist.sync="showPart" @listenToPartEvent="selectPart" /> </div> </template> <script> -import { object,conclusion } from '@/const/crud/quality/rawMaterial' import { selectDevice, addRawInspects, getObj, updateRawInsProduct, updateRawInspectsById, + chooseIFS, + selectHisByCode, updateDeviceById, } from '@/api/quality/rawMaterial' + import rawMaterialPartDialog from '@/views/common/rawMaterial-part' export default { + computed:{}, + components:{ + rawMaterialPartDialog + }, data(){ return{ + projectList: [], + paramObj: {}, + IFSData: [], + showPart: false, // 娣诲姞鍒� empiricalValueAdd: 1, // 缂栬緫鏃跺瓨鍌ㄦ渶闀跨殑鍒楁暟瀛楋紝鍋氬垹闄ゅ垽鏂� @@ -202,14 +222,14 @@ dataForm:{ id: null, judgeState: null, - formTime: '2023-10-28 00:00:00', - message: '-2050314,1,1,*,1002', - name: 'name', - code: 'code4', - specs: 'specs', - unit: 'mm', - number: '111', - supplier: 'supplier', + formTime: '', + message: '', + name: '', + code: '88.118.1/A0487643', + specs: '', + unit: '', + number: '', + supplier: '', rawInsProducts: [{ equipmentId: 0, name: '', @@ -228,25 +248,52 @@ userName: '', testState: '' }], - tableOption: object, - option: conclusion, dataRule: {}, deviceList: [], } }, + beforeUpdate(){ + this.$nextTick(()=>{ + this.$refs.table.doLayout(); + }) + }, mounted(){ this.dataForm.id = this.$route.query.id this.init() - let isShow = this.dataForm.id == null ? true : false - this.tableOption.menu = isShow - let len = this.tableOption.column.length - this.tableOption.column[len-1].hide = isShow this.getDeviceList() }, watch:{ }, methods:{ + changeName(index,row){ + this.projectList.forEach(item=>{ + if(row.name == item.name){ + this.list[index].unit = item.unit + this.list[index].required = item.required + } + }) + }, + // 纭鍥炶皟 + selectPart(param, nodePart, index) { + if (typeof param !== 'undefined') { + this.dataForm.code = param.code + this.dataForm.name = param.name + this.dataForm.formTime = param.formTime + this.dataForm.unit = param.unit + this.dataForm.specs = param.specs + this.dataForm.supplier = param.supplier + this.dataForm.number = param.number + this.dataForm.message = param.message + this.projectList = param.rawInsProducts + } + }, + queryCode(){ + this.paramObj = { + code: this.dataForm.code + } + this.showPart = true + }, updateDevice(row){ if(this.dataForm.id != null){ updateDeviceById({equiomentId:row.equipmentId,rpId:row.rpId}).then(res=>{ @@ -283,6 +330,19 @@ }, addTeatValueColumn(){ this.empiricalValueAdd = this.empiricalValueAdd + 1; + }, + // 娣诲姞琛� + clickAddLine() { + let obj = { + equipmentId: null, + name: "", + required: "", + testValue: "", + unit: "", + testState: null, + testValueList: [], + }; + this.list.push(obj); }, // 鍒犻櫎琛� clickDeleteline(scope) { @@ -365,7 +425,6 @@ }) }else{ this.conclusionTable = [] - this.tableOption.column = object.column } }, save(){ @@ -381,34 +440,31 @@ this.$message.error(error) }) }, - // 娣诲姞琛� - clickAddLine() { - let obj = { - equipmentId: null, - name: "", - required: "", - testValue: "", - unit: "", - testState: null, - testValueList: [], - }; - this.list.push(obj); - }, getDeviceList(){ selectDevice(null).then(res=>{ this.deviceList = res.data.data }) }, }, - computed:{}, - components:{} } </script> <style> .rawMaterial-detail { width: 100%; - height: 400px; + height: 470px; + padding: 10px 20px; + display: flex; + border: 1px solid #ddd; + background-color: #fff; + margin-top: 10px; + box-sizing: border-box; + flex-wrap: wrap; +} + +.rawMaterial-result { + width: 100%; + height: 150px; padding: 10px 20px; display: flex; border: 1px solid #ddd; @@ -420,7 +476,7 @@ .rawMaterial-basic { background-color: #fff; - height: 150px; + height: 155px; display: flex; flex-wrap: wrap; padding: 10px 20px; -- Gitblit v1.9.3