From 282e032b5771da13d224214d3b0b71f3efde9a42 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 25 八月 2023 18:45:42 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes --- web_standard/src/components/ext/OperaWInboundExtWindow.vue | 161 +++++++++++++++++++++-------------------------------- 1 files changed, 63 insertions(+), 98 deletions(-) diff --git a/web_standard/src/components/ext/OperaWInboundExtWindow.vue b/web_standard/src/components/ext/OperaWInboundExtWindow.vue index 8c51fc6..cd18790 100644 --- a/web_standard/src/components/ext/OperaWInboundExtWindow.vue +++ b/web_standard/src/components/ext/OperaWInboundExtWindow.vue @@ -1,11 +1,5 @@ <template> - <GlobalWindow - :title="title" - width="80%" - :visible.sync="visible" - :confirm-working="isWorking" - @confirm="confirm" - > + <GlobalWindow :title="title" width="80%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> <div style="margin-bottom: 10px"> <span class="title-add-style" style="vertical-align:middle">鍏ュ簱淇℃伅</span> <!-- <el-button type="primary" style="margin-left: 10px;vertical-align:middle">閫夋嫨鏉ユ簮鍗曟嵁</el-button> --> @@ -19,36 +13,24 @@ <el-input v-model="form.originCode" disabled placeholder="閫夋嫨鏉ユ簮鍗曟嵁鍚庨粯璁ゅ甫鍑�" v-trim/> </el-form-item> --> <el-form-item label="璁″垝鍏ュ簱鏃ユ湡" prop="planDate"> - <el-date-picker - v-model="form.planDate" - value-format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - :picker-options="pickerOptions" - ></el-date-picker> + <el-date-picker v-model="form.planDate" value-format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + :picker-options="pickerOptions"></el-date-picker> </el-form-item> <el-form-item label="鍏ュ簱绫诲瀷" prop="type"> <el-select v-model="form.type" :disabled="disabled" placeholder="璇烽�夋嫨鍏ュ簱绫诲瀷"> - <el-option - v-for="(item, index) in type" - :key="index" - :label="item.name" - :value="item.id"> + <el-option v-for="(item, index) in type" :key="index" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="鍏ュ簱浠撳簱" prop="warehouseId"> <el-select v-model="form.warehouseId" filterable clearable placeholder="璇烽�夋嫨鍏ュ簱浠撳簱" @change="selectWare"> - <el-option - v-for="(item, index) in tempWarehouses" - :key="index" - :label="item.name" - :value="item.id"> + <el-option v-for="(item, index) in tempWarehouses" :key="index" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <div class="mark"> <el-form-item label="鍗曟嵁鎽樿" prop="abstracts"> - <el-input v-model="form.abstracts" placeholder="璇疯緭鍏ュ崟鎹憳瑕�" v-trim/> + <el-input v-model="form.abstracts" placeholder="璇疯緭鍏ュ崟鎹憳瑕�" v-trim /> </el-form-item> </div> </el-form> @@ -61,11 +43,7 @@ <li><el-button type="primary" @click="addMaterial">閫夋嫨鐗╂枡</el-button></li> </ul> - <el-table - :data="form.woutboundInBodyBeanList" - border - stripe - > + <el-table :data="form.woutboundInBodyBeanList" border stripe> <el-table-column align="center" label="搴忓彿" type="index" /> <el-table-column prop="code" label="鐗╂枡缂栫爜" show-overflow-tooltip min-width="160px"> <template slot-scope="{row}"> @@ -80,65 +58,46 @@ <el-table-column v-if="whLocation.length" label="璐т綅" min-width="100px"> <template slot-scope="{row}"> <el-select v-model="row.locationId" filterable placeholder="璇烽�夋嫨" @select="selectLocation"> - <el-option - v-for="(item, index) in whLocation" - :key="index" - :label="item.unionName" - :value="item.id"> + <el-option v-for="(item, index) in whLocation" :key="index" :label="item.unionName" :value="item.id"> </el-option> </el-select> </template> </el-table-column> <el-table-column label="璐ㄩ噺灞炴��" min-width="100px"> <template slot-scope="scope"> - <el-select v-model="scope.row.qualityType" :disabled='canSelect(scope.$index)' filterable clearable placeholder="璇烽�夋嫨"> - <el-option - v-for="(item, index) in properties" - :key="index" - :label="item.name" - :value="item.id"> + <el-select v-model="scope.row.qualityType" :disabled='canSelect(scope.$index)' filterable clearable + placeholder="璇烽�夋嫨"> + <el-option v-for="(item, index) in properties" :key="index" :label="item.name" :value="item.id"> </el-option> </el-select> </template> </el-table-column> - <el-table-column v-if="winType==2" label="宸ュ簭" min-width="100px"> - <template slot-scope="{row}"> - <el-select v-model="row.procedureId" filterable placeholder="璇烽�夋嫨" @select="selectProcedure"> - <el-option - v-for="(item, index) in row.procedureList" - :key="index" - :label="item.name" - :value="item.id"> - </el-option> - </el-select> - </template> - </el-table-column> + <el-table-column v-if="winType == 2" label="宸ュ簭" min-width="100px"> + <template slot-scope="{row}"> + <el-select v-model="row.procedureId" :disabled="!row.procedureList" filterable placeholder="璇烽�夋嫨"> + <el-option v-for="(item, index) in row.procedureList" :key="index" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </template> + </el-table-column> <el-table-column label="鎵规鍙�" min-width="100px"> <template slot-scope="{row}"> - <el-input v-model="row.batch" placeholder="璇疯緭鍏ユ壒娆″彿" v-trim/> + <el-input v-model="row.batch" placeholder="璇疯緭鍏ユ壒娆″彿" v-trim /> </template> </el-table-column> <el-table-column prop="umodelName" label="鍗曚綅" min-width="60px"></el-table-column> <el-table-column label="鍏ュ簱鏁伴噺" min-width="100px"> <template slot-scope="{row}"> - <el-input v-model="row.num" type="number" placeholder="鍏ュ簱鏁伴噺" v-trim/> + <el-input v-model="row.num" type="number" placeholder="鍏ュ簱鏁伴噺" v-trim /> </template> </el-table-column> - <el-table-column - label="鎿嶄綔" - min-width="60px" - align="center" - fixed="right" - > + <el-table-column label="鎿嶄綔" min-width="60px" align="center" fixed="right"> <template slot-scope="{row}"> <span class="delete-button-style" @click="deleteMaterail(row)">鍒犻櫎</span> </template> </el-table-column> </el-table> - <SelectMaterail - ref="selectMaterail" - @selectData="selectData" - ></SelectMaterail> + <SelectMaterail ref="selectMaterail" @selectData="selectData"></SelectMaterail> </GlobalWindow> </template> @@ -155,7 +114,7 @@ GlobalWindow, SelectMaterail: () => import('@/components/ext/SelectMaterail') }, - data () { + data() { return { // 琛ㄥ崟鏁版嵁 form: { @@ -166,7 +125,7 @@ origin: 0, woutboundInBodyBeanList: [] }, - winType:0, + winType: 0, disabled: false, pickerOptions: {}, tempWarehouses: [], @@ -179,29 +138,29 @@ activeName: 'first', whLocation: [], type: [ - {name:'閲囪喘鍏ュ簱', id: 25} + { name: '閲囪喘鍏ュ簱', id: 25 } ], tempMaterials: [ ], selectedMaterails: [], properties: [ // 0 1涓嶈壇 2鎶ュ簾 - {name:'鍚堟牸', id: 0}, - {name:'涓嶈壇', id: 1}, - {name:'鎶ュ簾', id: 2}, + { name: '鍚堟牸', id: 0 }, + { name: '涓嶈壇', id: 1 }, + { name: '鎶ュ簾', id: 2 }, ] } }, inject: ['warehouses'], - created () { + created() { this.config({ api: '/ext/wOutboundExt', 'field.id': 'id' }) this.pickerOptions.disabledDate = (time) => { - // 涓�澶� - let tempTime = 3600 * 1000 * 24 - return time.getTime() < new Date()-tempTime + // 涓�澶� + let tempTime = 3600 * 1000 * 24 + return time.getTime() < new Date() - tempTime } // queryListByCode('?dicCode=SYSTEM_APPLIANCE_TYPE') // .then(res => { @@ -230,10 +189,10 @@ } this.__confirmEdit() }, - open (title, type = 0) { + open(title, type = 0) { this.title = title this.visible = true - this.winType=type + this.winType = type // 鏂板缓 this.$nextTick(() => { this.$refs.form.resetFields() @@ -242,16 +201,17 @@ if (title === '鍏跺畠鍏ュ簱') { this.form.planDate = new Date() this.form.type = null + // this.form.woutboundInBodyBeanList = [] this.disabled = false this.type = [ - { name:'瀹㈤��妫�楠屽叆搴�', id: 26 }, - { name:'瀹㈣繑妫�楠屽叆搴�', id: 27 }, - { name:'搴撳瓨璋冩暣', id: 28 } + { name: '瀹㈤��妫�楠屽叆搴�', id: 26 }, + { name: '瀹㈣繑妫�楠屽叆搴�', id: 27 }, + { name: '搴撳瓨璋冩暣', id: 28 } ] } else { this.disabled = true this.type = [ - { name:'閲囪喘鍏ュ簱', id: 25 } + { name: '閲囪喘鍏ュ簱', id: 25 } ] } @@ -271,15 +231,15 @@ this.tempWarehouses = this.warehouses() } }) - + }, - selectWare (v) { + selectWare(v) { // console.log(v) getListByWarehouseId(v) .then(res => { console.log(res) this.whLocation = res - if (this.whLocation.length === 0 ) { + if (this.whLocation.length === 0) { let temQualityType = 0 for (const item of this.tempWarehouses) { if (item.id === v) { @@ -313,9 +273,9 @@ .catch(err => { console.log(err) }) - + }, - setQuality (type) { + setQuality(type) { for (const item of this.form.woutboundInBodyBeanList) { item.qualityType = type } @@ -351,7 +311,7 @@ } return !cans }, - selectLocation (v) { + selectLocation(v) { // console.log(index, row); // for (const item of this.whLocation) { // if (item.id === v) { @@ -380,16 +340,16 @@ // } // } }, - addMaterial () { + addMaterial() { // console.log('澧炲姞鐗╂枡') // const ids = this.form.woutboundInBodyBeanList.map(e => { return e.materialId }).join(',') - this.$refs.selectMaterail.open('閫夋嫨鐗╂枡', { ids: '', multiple: true, isPurchase:false,queryType:1 }) + this.$refs.selectMaterail.open('閫夋嫨鐗╂枡', { ids: '', multiple: true, isPurchase: false, queryType: 1 }) }, - deleteMaterail (row) { + deleteMaterail(row) { // console.log('鍒犻櫎鐗╂枡') this.form.woutboundInBodyBeanList.splice(this.form.woutboundInBodyBeanList.indexOf(row), 1) }, - selectData (data) { + selectData(data) { // 閫夋嫨鐗╂枡鍥炶皟 console.log(data) for (const item of data.selectedMaterails) { @@ -397,8 +357,8 @@ code: item.mmodelCode, name: item.mmodelUnionName, umodelName: item.umodelName, - procedureList:item.procedureList, - procedureId:null, + procedureList: item.procedureList, + procedureId: item.procedureList ? item.procedureList[0].id : null, locationId: this.whLocation.length ? this.whLocation[0].id : null, qualityType: this.whLocation.length ? 0 : this.houseProperty, materialId: item.id, @@ -408,14 +368,14 @@ }) } }, - __confirmCreate () { + __confirmCreate() { this.$refs.form.validate((valid) => { if (!this.form.woutboundInBodyBeanList.length) { this.$tip.error('鑷冲皯閫夋嫨涓�鏉$墿鏂�') return } for (const item of this.form.woutboundInBodyBeanList) { - if (item.num<=0) { + if (item.num <= 0) { this.$tip.error('鍏ュ簱鐗╂枡鏁伴噺蹇呴』澶т簬0锛�') return } @@ -449,28 +409,33 @@ .toolbar { border-bottom: 1px solid #eee; padding-bottom: 10px; + li { display: inline-block; margin-right: 6px; } } + .form-data { - ::v-deep .el-form-item{ + ::v-deep .el-form-item { width: 40%; margin-right: 1%; } + .mark { .el-form-item { width: 81%; // margin-right: 1%; } } + ::v-deep .el-form-item__content { width: calc(100% - 134px); } } + .delete-button-style { - color: red; - cursor: pointer; - } + color: red; + cursor: pointer; +} </style> -- Gitblit v1.9.3