From 2fee2b7b1b98aac9864a77baa791a7d6c1d669c6 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期一, 24 二月 2025 18:41:20 +0800 Subject: [PATCH] 报告编制联调 --- src/views/business/materialOrder/customsInspection.vue | 496 +++++++++++++++++------------------------------------- 1 files changed, 159 insertions(+), 337 deletions(-) diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue index b51607c..d303dc9 100644 --- a/src/views/business/materialOrder/customsInspection.vue +++ b/src/views/business/materialOrder/customsInspection.vue @@ -1,35 +1,35 @@ <template> - <div class="ins_order_add"> + <div class="app-container"> <div> - <el-row class="title"> - <el-col :span="active > 1 && isShowTab ? 5 : 6" style="padding-left: 20px;text-align: left;">閲囪喘璁㈠崟淇℃伅</el-col> - <el-col v-if="active > 1 && isShowTab" :span="4" style="text-align: left;margin-top: 12px"> - <ul class="tab"> + <div class="header"> + <div> + <span>閲囪喘璁㈠崟淇℃伅</span> + <ul class="tab" v-if="active > 1 && isShowTab"> <li v-for="(m,i) in dataTitle" :key="i" :class="{active:i===dataIndex}" @click="handleDataTab(m,i)">{{m.label}}</li> </ul> - </el-col> - <el-col :span="active > 1 && isShowTab ? 15 : 18" style="text-align: right;"> - <el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="medium" style="margin-right: 10px;" - @change="selectInsOrderTemplateById"> + </div> + <div> + <el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="small" style="margin-right: 10px;" + @change="selectInsOrderTemplateByIdList"> <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id"> <span style="float: left">{{ a.name }}</span> <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px" @click.stop="handleDelete(a)"></i> </el-option> </el-select> - <el-button v-show="active==1" size="medium" @click="templateDia=true"> + <el-button v-show="active==1" size="small" @click="templateDia=true"> <span style="color: #3A7BFA;">淇濆瓨妯℃澘</span> </el-button> - <el-button v-show="active==1 && addObj.orderType === '杩涘巶妫�楠�'" :loading="noNeedCheckLoad" size="medium" type="primary" @click="noNeedCheck">鍏嶆</el-button> - <el-button v-show="active==1" :loading="saveLoad" size="medium" type="primary" @click="save">鎻愪氦</el-button> - <el-button size="medium" @click="$parent.playOrder(0)"> + <el-button v-show="active==1 && addObj.orderType === '杩涘巶妫�楠�'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">鍏嶆</el-button> + <el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button> + <el-button size="small" @click="goBack"> <span style="color: #3A7BFA;">杩斿洖</span> </el-button> - </el-col> - </el-row> + </div> + </div> </div> <div class="search"> - <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="120px"> + <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px"> <el-row> <el-col :span="6"> <el-form-item class="addObj-form-item" label="閲囪喘璁㈠崟鍙�:"> @@ -85,7 +85,7 @@ <el-row> <el-col :span="6"> <el-form-item class="addObj-form-item" label="鍗曚綅:" prop="buyUnitMeas"> - <el-input v-model="addObj.buyUnitMeas" class="addObj-info" disabled size="small"></el-input> + <el-input v-model="addObj.buyUnitMeas" class="addObj-info" clearable disabled size="small"></el-input> </el-form-item> </el-col> <el-col :span="6"> @@ -97,15 +97,15 @@ </el-col> <el-col :span="6"> <el-form-item class="addObj-form-item" label="妫�楠岀被鍒�:" prop="orderType"> - <el-select v-model="addObj.orderType" :disabled="active>1 || orderType===1" clearable size="small" style="width: 100%"> - <el-option v-for="(a, ai) in checkType" :key="ai" :label="a.label" :value="a.value"></el-option> + <el-select v-model="addObj.orderType" :disabled="active>1 || orderType==1" clearable size="small" style="width: 100%"> + <el-option v-for="a in dict.type.check_type" :key="a.value" :label="a.label" :value="a.value"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item class="addObj-form-item" label="瑙勬牸鍨嬪彿:" placeholder="璇峰~鍐�" prop="partDetail"> <el-tooltip :content="addObj.partDetail" :disabled="!addObj.partDetail"> - <el-input v-model="addObj.partDetail" :disabled="active > 1" class="addObj-info" size="small"></el-input> + <el-input v-model="addObj.partDetail" :disabled="active > 1" clearable class="addObj-info" size="small"></el-input> </el-tooltip> </el-form-item> </el-col> @@ -114,7 +114,7 @@ <el-col :span="6"> <el-form-item class="addObj-form-item" label="绱ф�ョ▼搴�:" placeholder="璇烽�夋嫨" prop="type"> <el-select v-model="addObj.type" :disabled="active>1" class="addObj-info" clearable size="small" style="width: 100%"> - <el-option v-for="(a, ai) in types" :key="ai" :label="a.label" :value="a.value"></el-option> + <el-option v-for="a in dict.type.urgency_level" :key="a.value" :label="a.label" :value="a.value"></el-option> </el-select> </el-form-item> </el-col> @@ -142,11 +142,10 @@ </el-form> </div> <div> - <div style="display: flex;flex-direction: row;justify-content: space-between;padding: 5px 0;"> - <div v-if="active==1" style="display: flex;background: transparent;"> - <div class="search_thing"> - <div class="search_label">鏍峰搧鍨嬪彿锛�</div> - <div class="search_input"> + <div style="display: flex;justify-content: space-between;"> + <div v-if="active==1"> + <el-form :inline="true" :model="addObj1" label-width="90px"> + <el-form-item label="鏍峰搧鍨嬪彿:" style="margin-bottom: 6px"> <el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'" allow-create clearable default-first-option filterable size="small" @@ -154,29 +153,26 @@ <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> - </div> - </div> - <div class="search_thing"> - <div class="search_label">妫�楠屾爣鍑嗭細</div> - <div class="search_input"> + </el-form-item> + <el-form-item label="妫�楠屾爣鍑�:"> <el-select v-model="standardMethodListId" :loading="methodLoad" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small" @change="changeStandardMethodListId" @focus="methodFocus"> <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> </el-option> </el-select> - </div> - </div> + </el-form-item> + </el-form> </div> - <div class="search_thing"> - <el-button v-show="active==1" :disabled="sampleList.length === 2" size="medium" type="primary" @click="handleSplitCountNum">鎷嗗垎</el-button> + <div style="margin-top: 3px"> + <el-button v-show="active==1" :disabled="sampleList.length === 2" size="small" type="primary" @click="handleSplitCountNum">鎷嗗垎</el-button> </div> </div> <el-table ref="sampleTable" :data="sampleList" - border class="el-table sampleTable" + class="el-table sampleTable" highlight-current-row - max-height="400px" style="margin-top: 10px;" + max-height="400px" tooltip-effect="dark" @selection-change="selectSample" @row-click="rowClick"> <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="65"></el-table-column> @@ -247,7 +243,7 @@ </el-table-column> </el-table> <el-table ref="productTable" v-loading="getProductLoad" :data="productList" - :row-class-name="tableRowClassName" border + :row-class-name="tableRowClassName" class="el-table" max-height="400px" style="margin-bottom: 10px;" @@ -392,7 +388,7 @@ width="32%"> <span>{{ dialogMessage }}</span> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="$parent.playOrder(0)">纭� 瀹�</el-button> + <el-button type="primary" @click="goBack()">纭� 瀹�</el-button> </span> </el-dialog> <el-dialog @@ -435,37 +431,34 @@ </template> <script> -import ValueTable from "@/components/Table/value-table.vue"; +import { + addExemptionOrder, + addInsOrder, + addRawMaterOrderTemplate, + delRawMaterOrderTemplate, + getInsOrder, + getUserNow, + notificationRawOrder, selectRawMaterOrderTemplate, + selectRawMaterOrderTemplateById, + selectsStandardMethodByFLSSM, + selectStandardMethodEnum, + selectStandardProductList, + selectStandardTreeListByPartNo +} from "@/api/business/rawMaterialOrder"; export default { name: "CustomsInspection", - components: { - ValueTable, - }, + dicts: ['check_type', 'urgency_level'], + components: {}, props: { - active: { - type: Number, - default: () => 0 - }, - customsInspection: { - type: Object, - default: () => {} - }, - currentId: { - type: Number, - default: () => 0 - }, - orderType: { - type: Number, - default: () => 0 - }, - isReport: { - type: Number, - default: () => null - } }, data() { return { + customsInspection: {}, + orderType: '', + active: 0, + currentId: 0, + isReport: '', editTable:[], // 鍖洪棿鐗规畩鍊煎~鍐� template: null, saveLoad: false, // 淇濆瓨鎸夐挳loading @@ -513,7 +506,7 @@ { required: true, message: '璇峰~鍐欐娊妫�鏁伴噺', trigger: 'blur' } ], partDetail: [ - { required: true, message: '璇峰~鍐欓浂浠舵弿杩�', trigger: 'blur' } + { required: true, message: '璇峰~鍐欒鏍煎瀷鍙�', trigger: 'blur' } ], orderType: [ { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' } @@ -556,6 +549,7 @@ sampleId: null, // total: 0, totalArr: [], + addObj1: {}, model: null, standardMethodListId: null, inspectionItem:null, @@ -612,7 +606,6 @@ watch: { sampleList() { this.addObj.method = null - // this.productList = [] }, productList: { deep: true, @@ -641,10 +634,13 @@ } }, mounted() { - this.getUserNow() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 - this.selectCheckType() // 鏌ヨ妫�楠岀被鍨� + this.active = this.$route.query.active + this.orderType = this.$route.query.orderType + this.currentId = this.$route.query.currentId + this.isReport = this.$route.query.isReport + this.customsInspection = this.$route.query.customsInspection + this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 this.selectStandardMethods() // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁 - this.selectEnumByCategoryForType() // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋 this.getInfo() // 鑾峰彇鏁版嵁 }, methods: { @@ -687,7 +683,7 @@ }, // 鑾峰彇鏁版嵁 getInfo () { - if (this.active === 2) { + if (this.active == 2) { let orderId = '' if (!this.customsInspection.enterOrderId && this.customsInspection.quarterOrderId) { this.isShowTab = false @@ -700,11 +696,11 @@ orderId = this.dataIndex === 0 ? this.customsInspection.enterOrderId : this.customsInspection.quarterOrderId } else if (!this.customsInspection.enterOrderId && !this.customsInspection.quarterOrderId) { this.isShowTab = false - orderId = this.isReport === 1 ? this.customsInspection.insOrderId : this.customsInspection.id + orderId = this.isReport == 1 ? this.customsInspection.insOrderId : this.customsInspection.id } // 鏌ョ湅 // 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹� - this.$axios.post(this.$api.insOrder.getInsOrder, { + getInsOrder({ orderId: orderId }).then(res => { if (res.code === 200) { @@ -734,7 +730,7 @@ } }) } else { - this.$axios.get(this.$api.rawMaterialOrder.notificationRawOrder+'?ifsInventoryId='+this.customsInspection.id).then(res => { + notificationRawOrder({ifsInventoryId:this.customsInspection.id}).then(res => { if (res.code === 200) { if (res.data === 1) { this.dialogVisible2 = true @@ -746,40 +742,35 @@ } }) // 鎶ユ娴佺▼ - this.$axios.get(this.$api.materialInspection.selectStandardTreeListByPartNo+'?partNo='+this.customsInspection.partNo).then(res => { - if (res.code === 200) { - this.addObj.sample = res.data.label - this.codeLevel = res.data.code - this.addObj.qtyArrived = this.customsInspection.qtyArrived - this.addObj.partNo = this.customsInspection.partNo - this.addObj.partDetail = this.customsInspection.partDesc - this.addObj.receiverDate = this.customsInspection.receiverDate - this.addObj.orderNo = this.customsInspection.orderNo - this.addObj.declareUser = this.customsInspection.declareUser - this.addObj.testQuantity = this.customsInspection.testQuantity - this.addObj.buyUnitMeas = this.customsInspection.buyUnitMeas - this.addObj.updateBatchNo = this.customsInspection.updateBatchNo - if (this.orderType === 1) { - this.addObj.orderType = 'Quarterly inspection' - } - const str = res.data.treeName.split('-') - this.selectTreeTem = str.join(' - ') - this.selectTree = str.join(' - ') - this.addListInfo(this.codeLevel, res.data) // 鍘熸潗鏂欐牱鍝佹槸鍥哄畾鐨勶紝灏遍粯璁よ祴鍊间竴鏉℃暟鎹紝鍙媶鍒� - this.selectInsOrderTemplate() // 鍘熸潗鏂欐ā鏉垮垪琛ㄦ煡璇� - } else { - this.dialogVisible = true - this.dialogMessage = res.message + selectStandardTreeListByPartNo({partNo:this.customsInspection.partNo}).then(res => { + this.addObj.sample = res.data.label + this.codeLevel = res.data.code + this.$set(this.addObj, 'qtyArrived', this.customsInspection.qtyArrived) + this.$set(this.addObj, 'partNo', this.customsInspection.partNo) + this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate) + this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo) + this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser) + this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity) + this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas) + this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo) + this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc) + if (this.orderType == 1) { + this.$set(this.addObj, 'orderType', 'Quarterly inspection') } + const str = res.data.treeName.split('-') + this.selectTreeTem = str.join(' - ') + this.selectTree = str.join(' - ') + this.addListInfo(this.codeLevel, res.data) // 鍘熸潗鏂欐牱鍝佹槸鍥哄畾鐨勶紝灏遍粯璁よ祴鍊间竴鏉℃暟鎹紝鍙媶鍒� + this.selectInsOrderTemplate() // 鍘熸潗鏂欐ā鏉垮垪琛ㄦ煡璇� }).catch(err => { - console.log('err---', err) + this.dialogVisible = true + this.dialogMessage = err.message }) } }, // 鏌ヨ妯℃澘-鍙嶆樉妯℃澘 - selectInsOrderTemplateById(e) { - this.$axios.get(this.$api.materialInspection.selectRawMaterOrderTemplateById + '?id=' + e).then(res => { - if (res.code == 201) return + selectInsOrderTemplateByIdList(e) { + selectRawMaterOrderTemplateById({id: e}).then(res => { let obj = JSON.parse(res.data) this.sampleList = obj.sampleList; this.productList = obj.sampleList[0].insProduct @@ -795,7 +786,7 @@ item.insProduct = this.productList }) this.templateLoading = true; - this.$axios.post(this.$api.materialInspection.addRawMaterOrderTemplate, { + addRawMaterOrderTemplate({ partNo: this.addObj.partNo, name: this.templateName, thing: JSON.stringify({ @@ -803,12 +794,7 @@ sampleList: sampleList, selectTree:this.selectTree }) - }, { - headers: { - 'Content-Type': 'application/json' - } }).then(res => { - if (res.code == 201) return this.templateLoading = false; this.templateDia = false; this.$message.success('淇濆瓨鎴愬姛') @@ -826,12 +812,7 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - this.$axios.post(this.$api.materialInspection.delRawMaterOrderTemplate, { - id: row.id - }).then(res => { - if (res.code === 201) { - return - } + delRawMaterOrderTemplate({id: row.id}).then(res => { this.$message.success('鍒犻櫎鎴愬姛') this.selectInsOrderTemplate() }).catch(e => { @@ -841,8 +822,7 @@ }, // 鏌ヨ妯℃澘鍒楄〃 selectInsOrderTemplate() { - this.$axios.get(this.$api.materialInspection.selectRawMaterOrderTemplate+'?partNo='+this.addObj.partNo).then(res => { - if (res.code == 201) return + selectRawMaterOrderTemplate({partNo:this.addObj.partNo}).then(res => { this.templates = res.data }) }, @@ -996,7 +976,6 @@ item.insProduct = this.productList }) this.getTotal(sampleList) - const pairing = [] let trees = this.selectTree.split(" - ") if (trees.length < 3) { this.$message.error('鏈�夋嫨瀵硅薄') @@ -1013,41 +992,37 @@ this.addObj.model = (trees[4] == undefined ? null : trees[4]) this.addObj.ifsInventoryId = this.customsInspection.id this.noNeedCheckLoad = true - this.$axios.post(this.$api.rawMaterialOrder.addExemptionOrder, { - str: JSON.stringify({ - insOrder: this.addObj, - list: JSON.stringify(sampleList.map(a => { - if (a.modelNum) { - // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� - // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML - const index = a.modelNum.indexOf('脳') - if (index === 0) { - a.model = a.model + a.modelNum - } else if (index === -1) { - a.model = a.model + '-' + a.modelNum - } else { - a.model = a.modelNum + a.model - } + addExemptionOrder({ + insOrder: this.addObj, + sampleList: sampleList.map(a => { + if (a.modelNum) { + // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� + // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML + const index = a.modelNum.indexOf('脳') + if (index === 0) { + a.model = a.model + a.modelNum + } else if (index === -1) { + a.model = a.model + '-' + a.modelNum } else { - a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + a.model = a.modelNum + a.model } - a.insProduct = a.insProduct.filter(b=>b.state === 1) - return a - })), - pairing: JSON.stringify(pairing) - }) + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } + a.insProduct = a.insProduct.filter(b=>b.state === 1) + return a + }), }).then(res => { this.noNeedCheckLoad = false if (res.code == 201) return this.noNeedCheckDia = false this.$message.success('宸叉彁浜�') - this.$parent.playOrder(0) + this.goBack() }).catch(e=>{ this.noNeedCheckLoad = false }) }, saveMethod(sampleList){ - const pairing = [] let trees = this.selectTree.split(" - ") if (trees.length < 3) { this.$message.error('鏈�夋嫨瀵硅薄') @@ -1064,35 +1039,37 @@ this.addObj.model = (trees[4] == undefined ? null : trees[4]) this.addObj.ifsInventoryId = this.customsInspection.id this.saveLoad = true - this.$axios.post(this.$api.insOrder.addInsOrder, { - str: JSON.stringify({ - insOrder: this.addObj, - list: JSON.stringify(sampleList.map(a => { - if (a.modelNum) { - // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� - // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML - const index = a.modelNum.indexOf('脳') - if (index === 0) { - a.model = a.model + a.modelNum - } else if (index === -1) { - a.model = a.model + '-' + a.modelNum - } else { - a.model = a.modelNum + a.model - } + addInsOrder({ + insOrder: this.addObj, + sampleList: sampleList.map(a => { + if (a.insProduct.length > 0) { + a.insProduct.forEach(c => { + delete c.id + }) + } + if (a.modelNum) { + // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� + // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML + const index = a.modelNum.indexOf('脳') + if (index === 0) { + a.model = a.model + a.modelNum + } else if (index === -1) { + a.model = a.model + '-' + a.modelNum } else { - a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + a.model = a.modelNum + a.model } - a.insProduct = a.insProduct.filter(b=>b.state === 1) - return a - })), - pairing: JSON.stringify(pairing) - }) + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } + a.insProduct = a.insProduct.filter(b=>b.state === 1) + return a + }), }).then(res => { this.saveLoad = false if (res.code == 201) return this.$message.success('宸叉彁浜�') this.bsm3Dia = false; - this.$parent.playOrder(0) + this.goBack() }).catch(e=>{ this.saveLoad = false }) @@ -1427,16 +1404,9 @@ } }) }, - selectCheckType() { - this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "妫�楠岀被鍨�" - }).then(res => { - this.checkType = res.data - }) - }, // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 - getUserNow() { - this.$axios.get(this.$api.user.getUserNow).then(res => { + getUserNowList() { + getUserNow().then(res => { let selects = res.data if (selects == null) return this.addObj.userId = selects.id @@ -1447,7 +1417,7 @@ }, // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁 selectStandardMethods() { - this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => { + selectStandardMethodEnum().then(res => { this.methods = res.data }) }, @@ -1460,7 +1430,7 @@ }, selectsStandardMethodByFLSSM() { this.methodLoad = true - this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { + selectsStandardMethodByFLSSM({ tree: this.selectTree }).then(res => { this.methodLoad = false @@ -1469,7 +1439,7 @@ let arr = this.selectTree.split('-') let arr0 = arr.slice(0, arr.length - 1) let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1) - this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { + selectsStandardMethodByFLSSM({ tree: selectTree }).then(ress => { this.methods = ress.data.standardMethodList @@ -1609,32 +1579,26 @@ this.getProductLoad = true let selectTreeList = this.selectTree.split(" - ") this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model) - this.$axios.post(this.$api.standardTree.selectStandardProductList, { + selectStandardProductList({ model: this.addObj.model?this.addObj.model:row.model, modelNum: row.modelNum, standardMethodListId: val, factory: selectTreeList.join(" - "), partNo: this.addObj.partNo, ifsInventoryId: this.customsInspection.id - }, { - headers: { - 'Content-Type': 'application/json' - } }).then(res => { this.getProductLoad = false - if (res.code === 200) { - res.data.forEach(a => { - a.state = 0 + res.data.forEach(a => { + a.state = 0 + }) + this.productList = this.HaveJson(res.data) + this.productList0 = JSON.parse(JSON.stringify(this.productList)) + this.$refs.sampleTable.setCurrentRow(row) + setTimeout(() => { + this.productList.forEach(a => { + if (a.state == 1) this.toggleSelection(a) }) - this.productList = this.HaveJson(res.data) - this.productList0 = JSON.parse(JSON.stringify(this.productList)) - this.$refs.sampleTable.setCurrentRow(row) - setTimeout(() => { - this.productList.forEach(a => { - if (a.state == 1) this.toggleSelection(a) - }) - }, 200) - } + }, 200) }).catch(err => { console.log('err-',err) }) @@ -1674,13 +1638,6 @@ let arr0 = arr.slice(0, arr.length - 1) this.selectTree = arr0.join(' - ') + '- ' + e } - }, - selectEnumByCategoryForType() { - this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "绱ф�ョ▼搴�" - }).then(res => { - this.types = res.data - }) }, // 瑕佹眰鍊煎彉鍖栨椂 requestChange(e, row) { @@ -1722,8 +1679,6 @@ p.section = sections[a] p.ask = asks[a] p.tell = tells[a] - // p.manHour = manHours[a] - // p.price = prices[a] } }) break @@ -1751,12 +1706,6 @@ if (row.tell.includes('[')) { this.$set(row, 'tellCopy', row.tell) } - // if (row.manHour.includes('[')) { - // this.$set(row, 'manHourCopy', row.manHour) - // } - // if (row.price.includes('[')) { - // this.$set(row, 'priceCopy', row.price) - // } let arr = this.productList.filter(m=>m.state==1&&row.sectionCopy&&row.sectionCopy.includes(m.sectionCopy)&&m.ask&&m.sectionCopy.indexOf('[')==-1) if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.sectionCopy !== undefined && row.state === 1&&arr.length==0) { if (row.sectionCopy.indexOf('[') > -1) { @@ -1773,14 +1722,10 @@ let section = arr[0].section let arr0 = JSON.parse(row.section) let arr1 = JSON.parse(row.ask) - // let arr2 = JSON.parse(row.manHour) - // let arr3 = JSON.parse(row.price) let arr4 = JSON.parse(row.tell) let index = arr0.indexOf(section) row.section = section row.ask = arr1[index] - // row.manHour = arr2[index] - // row.price = arr3[index] row.tell = arr4[index] } catch(e) {} } @@ -1827,12 +1772,6 @@ if (p.tell.includes('[')) { this.$set(p, 'tellCopy', p.tell) } - // if (p.manHour.includes('[')) { - // this.$set(p, 'manHourCopy', p.manHour) - // } - // if (p.price.includes('[')) { - // this.$set(p, 'priceCopy', p.price) - // } if (p.bsm === '1' && p.sectionCopy !== '' && p.sectionCopy !== null && p.sectionCopy !== undefined && p.state === 1) { if (p.sectionCopy.indexOf('[') > -1) { p.bsmRow = this.HaveJson(p) @@ -1892,136 +1831,19 @@ const property = column['property']; return row[property] === value; }, + goBack () { + const obj = { path: "/business/materialOrder" }; + this.$tab.closeOpenPage(obj); + } } } </script> <style scoped> -.addObj-form-item { - width: 100%; -} -.ins_order_add { - width: 100%; - height: 100%; - overflow-y: auto; - overflow-x: hidden; -} - -.ins_order_add::-webkit-scrollbar { - width: 0; -} - -.title { - height: 60px; - line-height: 60px; -} - -.search { - width: calc(100% - 40px); - background-color: #fff; - padding: 5px 40px 5px 0; -} - -.search_thing { +.header { display: flex; - align-items: center; - height: 50px; -} - -.search_label { - width: 120px; - font-size: 14px; - text-align: right; -} - -.search_input { - width: calc(100% - 120px); -} - -.node_i { - color: orange; - font-size: 18px; -} - -.el-select-dropdown__item { - display: flex; - align-items: center; justify-content: space-between; -} - -.pairing { - text-align: center; - line-height: 36px; - margin: 3px 0; - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 4px; -} - -.askRts { - width: 100px; - font-size: 12px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 2px solid rgba(0, 0, 0, 0.3); - text-align: center; - background-color: rgba(0, 0, 0, 0.1); - outline: none; - border-radius: 2px; - line-height: 24px; - margin-top: 5px; -} -.circulateTable { - display: flex; - flex-direction: row; - justify-content: space-between; -} -.opticalProject { - width: 38%; -} -.temperatureList { - width: 60%; -} -.temperatureListTitle { - display: flex; - flex-direction: row; - justify-content: space-between; - line-height: 30px; -} ->>> .el-form-item__content { - text-align: left; - width: 65%; -} -.ins_order_add .el-input-group__append, -.el-input-group__prepend { - padding: 0 10px; -} - -.ins_order_add .el-tree-node__content { - height: 32px; - font-size: 14px; - border-radius: 2px; -} - -.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { - color: #3A7BFA; -} - -.ins_order_add .has-gutter .el-table__cell .cell { - line-height: 30px; - background-color: #fafafa; -} - -.ins_order_add .has-gutter .el-table__cell { - background-color: #fafafa !important; -} - -.ins_order_add .el-table__row .cell { - font-size: 12px; -} - -.ins_order_add .el-table .warning-row .cell { - color: #3A7BFA; + margin-bottom: 10px; } .tab { list-style-type: none; -- Gitblit v1.9.3