From 2281a3da368d9366e7d97e85719fe0f4a0492f9b Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期一, 18 三月 2024 01:05:37 +0800 Subject: [PATCH] 功能调整 --- src/components/view/b2-standard.vue | 2 src/components/do/b1-ins-order/add.vue | 363 ++++++++++++---- src/components/tool/value-table.vue | 6 src/components/view/b1-inspect-order-plan.vue | 653 ++++++++++++++++-------------- src/components/view/b1-inspection-order.vue | 197 +++++---- src/view/index.vue | 5 src/assets/api/controller.js | 7 7 files changed, 722 insertions(+), 511 deletions(-) diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js index fa1b765..2f3da4f 100644 --- a/src/assets/api/controller.js +++ b/src/assets/api/controller.js @@ -115,7 +115,9 @@ const insOrder = { selectInsOrderParameter: "/insOrder/selectInsOrderParameter", //鏌ヨ妫�楠屼笅鍗� - getDeviceManager: "/user/getDeviceManager", //鑾峰彇鎸囨淳浜哄憳 + addInsOrder: "/insOrder/addInsOrder", //娣诲姞妫�楠屼笅鍗曟暟鎹� + selectOrderManDay: "/insOrder/selectOrderManDay", //鏌ヨ璁㈠崟鎬诲叡棰勮鏃堕棿 + upInsOrder: "/insOrder/upInsOrder", //妫�楠屼笅鍙� } const sampleOrder = { @@ -126,8 +128,6 @@ selectInsOrderPlanList: "/insOrderPlan/selectInsOrderPlanList", //鏌ヨ妫�楠屼换鍔� claimInsOrderPlan: "/insOrderPlan/claimInsOrderPlan",//璁ら妫�楠屼换鍔� } - - const systemLog = { selectSystemLogList: "/systemLog/selectSystemLogList", //鑾峰彇鏃ュ織 @@ -143,6 +143,7 @@ delStandardProductByIds: "/standardTree/delStandardProductByIds", //鍒犻櫎鏍囧噯鏍戜笅鐨勬楠岄」鐩� addStandardProduct: "/standardTree/addStandardProduct", //鏂板鏍囧噯鏍戜笅鐨勬楠岄」鐩� delStandardTree: "/standardTree/delStandardTree", //鍒犻櫎鏍囧噯鏍戠殑灞傜骇 + selectStandardProductList: "/standardTree/selectStandardProductList", //閫氳繃鏍囧噯鏍戞煡璇㈠搴旂殑妫�楠岄」鐩� } const standardMethod = { diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 9a50c89..cbcbb42 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -2,6 +2,11 @@ .ins_order_add { width: 100%; height: 100%; + overflow-y: auto; + } + + .ins_order_add::-webkit-scrollbar { + width: 0; } .title { @@ -12,7 +17,7 @@ .search { width: calc(100% - 40px); background-color: #fff; - padding: 10px 40px 10px 0; + padding: 5px 40px 5px 0; } .search_thing { @@ -35,6 +40,7 @@ color: orange; font-size: 18px; } + </style> <style> .ins_order_add .el-input-group__append, @@ -64,6 +70,10 @@ .ins_order_add .el-table__row .cell { font-size: 12px; } + + .ins_order_add .el-table .warning-row .cell{ + color: #bababa; + } </style> <template> @@ -78,7 +88,7 @@ <el-button size="medium" @click=""> <span style="color: #3A7BFA;">淇濆瓨妯℃澘</span> </el-button> - <el-button size="medium" type="primary" @click="save">鎻愪氦</el-button> + <el-button size="medium" type="primary" @click="save" :loading="saveLoad">鎻愪氦</el-button> <el-button size="medium" @click="$parent.playOrder(0)"> <span style="color: #3A7BFA;">杩斿洖</span> </el-button> @@ -91,12 +101,6 @@ <div class="search_label">濮旀墭缂栧彿锛�</div> <div class="search_input"> <el-input v-model="addObj.entrustCode" size="small" placeholder="绯荤粺鐢熸垚" disabled></el-input> - </div> - </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label"><span class="required-span">* </span>鏍峰搧缂栧彿锛�</div> - <div class="search_input"> - <el-input v-model="addObj.sampleCode" size="small" placeholder="璇疯緭鍏�" clearable></el-input> </div> </el-col> <el-col class="search_thing" :span="6"> @@ -115,37 +119,10 @@ </div> </el-col> <el-col class="search_thing" :span="6"> - <div class="search_label"><span class="required-span">* </span>鏍峰搧鍚嶇О锛�</div> - <div class="search_input"> - <el-input readonly size="small" v-model="addObj.sample"> - <template slot="append"><el-button slot="append" icon="el-icon-search" - @click="selectStandardTree = true"></el-button></template> - </el-input> - </div> - </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label"><span class="required-span">* </span>瀹為獙瀹ゅ悕绉帮細</div> - <div class="search_input"> - <el-input size="small" clearable disabled v-model="addObj.laboratory"></el-input> - </div> - </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label"><span class="required-span">* </span>鏍峰搧绫诲瀷锛�</div> - <div class="search_input"> - <el-input size="small" clearable disabled v-model="addObj.sampleType"></el-input> - </div> - </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label"><span class="required-span">* </span>瑙勬牸鍨嬪彿锛�</div> - <div class="search_input"> - <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.model"></el-input> - </div> - </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label">绾﹀畾鏃堕棿锛�</div> + <div class="search_label">闇�姹傛椂闂达細</div> <div class="search_input"> <el-date-picker type="date" placeholder="閫夋嫨鏃ユ湡" size="small" value-format="yyyy-MM-dd" style="width: 100%;" - v-model="addObj.appointedTime"></el-date-picker> + v-model="addObj.appointed"></el-date-picker> </div> </el-col> <el-col class="search_thing" :span="6"> @@ -157,32 +134,18 @@ </div> </el-col> <el-col class="search_thing" :span="6"> - <div class="search_label"><span class="required-span">* </span>鏍峰搧鏁伴噺锛�</div> - <div class="search_input"> - <el-input-number size="small" v-model="addObj.sampleNum" :controls="false" :min="0" :max="1000" - :precision="0" style="width: 50%;" @change="onSample"></el-input-number> - </div> - </el-col> - <el-col class="search_thing" :span="6"> <div class="search_label">OTC璁㈠崟鍙凤細</div> <div class="search_input"> <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.otcCode"></el-input> </div> </el-col> <el-col class="search_thing" :span="6"> - <div class="search_label">鏍峰搧鐣欐牱锛�</div> - <div class="search_input"> - <el-radio-group v-model="addObj.isLeave" @change="addObj.leaveNum = null"> - <el-radio :label="1">鐣欐牱</el-radio> - <el-radio :label="0">涓嶇暀鏍�</el-radio> + <div class="search_label" style="width: 175px;">鏄惁娑夊強閰嶅鏍峰搧锛�</div> + <div class="search_input" style="width: calc(100% - 175px);"> + <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()"> + <el-radio :label="1">鏄�</el-radio> + <el-radio :label="0">鍚�</el-radio> </el-radio-group> - </div> - </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label">鐣欐牱鏁伴噺锛�</div> - <div class="search_input"> - <el-input-number size="small" v-model="addObj.leaveNum" :controls="false" :min="0" - :disabled="addObj.isLeave == 0" style="width: 50%;"></el-input-number> </div> </el-col> <el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;"> @@ -192,24 +155,39 @@ v-model="addObj.remark"></el-input> </div> </el-col> - <el-col class="search_thing" :span="6"> - <div class="search_label" style="width: 160px;">鏄惁娑夊強閰嶅鏍峰搧锛�</div> - <div class="search_input" style="width: calc(100% - 160px);"> - <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()"> - <el-radio :label="1">鏄�</el-radio> - <el-radio :label="0">鍚�</el-radio> - </el-radio-group> - </div> - </el-col> </el-row> </div> - <div style="display: flex;"> - <el-table class="el-table" ref="sampleTable" :data="sampleList" height="300px" tooltip-effect="dark" border - @selection-change="selectSample"> + <div> + <div style="text-align: right;line-height: 45px;"> + <el-button type="primary" size="small" @click="addSampleDia = true">娣诲姞鏍峰搧</el-button> + <el-button size="small" @click="delSample"> + <span style="color: #3A7BFA;">鍒犻櫎鏍峰搧</span> + </el-button> + </div> + <el-table class="el-table" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark" border + @selection-change="selectSample" highlight-current-row @row-click="rowClick"> <el-table-column type="selection" width="60"></el-table-column> <el-table-column type="index" label="搴忓彿" width="65" align="center"></el-table-column> <el-table-column prop="sample" label="鏍峰搧鍚嶇О" align="center" show-overflow-tooltip min-width="100"></el-table-column> + <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" width="140" align="center"> + <template slot-scope="scope"> + <el-input size="small" v-model="scope.row.sampleCode" clearable></el-input> + </template> + </el-table-column> + <el-table-column prop="factory" label="宸ュ巶" align="center" show-overflow-tooltip min-width="100"> + </el-table-column> + <el-table-column prop="laboratory" label="瀹為獙瀹�" align="center" show-overflow-tooltip min-width="100"> + </el-table-column> + <el-table-column prop="sampleType" label="鏍峰搧绫诲瀷" align="center" show-overflow-tooltip min-width="100"> + </el-table-column> + <el-table-column prop="model" label="鏍峰搧鍨嬪彿" align="center" show-overflow-tooltip min-width="100"> + </el-table-column> + <el-table-column prop="isLeave" label="鏄惁鐣欐牱" align="center" show-overflow-tooltip min-width="100"> + <template slot-scope="scope"> + <span>{{scope.row.isLeave==1?'鏄�':'鍚�'}}</span> + </template> + </el-table-column> <el-table-column prop="joinName" label="閰嶅鏍峰搧鍚嶇О" width="140" align="center" v-if="addObj.mating==1"> <template slot-scope="scope"> <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1}" @@ -222,9 +200,38 @@ v-model="scope.row.joinModel"></el-input> </template> </el-table-column> + <el-table-column prop="joinNum" label="閰嶅鏍峰搧鏁伴噺" width="140" align="center" v-if="addObj.mating==1"> + <template slot-scope="scope"> + <el-input-number size="small" v-model="scope.row.joinNum" :min="1" :max="100" :precision="0" + :controls="false" style="width: 80%;"></el-input-number> + </template> + </el-table-column> <el-table-column label="鎿嶄綔" width="65" align="center"> <template slot-scope="scope"> - <el-button type="text" size="small" @click="">鍒犻櫎</el-button> + {{scope.index}} + <el-button type="text" size="small" @click="sampleList.splice(scope.$index, 1)">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border + @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" + :row-class-name="tableRowClassName"> + <el-table-column type="selection" width="65"></el-table-column> + <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column> + <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140" + show-overflow-tooltip></el-table-column> + <el-table-column prop="sonLaboratory" label="瀛愬疄楠屽" width="130" show-overflow-tooltip></el-table-column> + <el-table-column prop="method" label="妫�楠屾爣鍑�" min-width="120" show-overflow-tooltip></el-table-column> + <el-table-column prop="unit" label="璁¢噺鍗曚綅" width="100" show-overflow-tooltip></el-table-column> + <el-table-column prop="price" label="鍗曚环" width="100" show-overflow-tooltip></el-table-column> + <el-table-column prop="manDay" label="棰勮鏃堕棿(澶�)" width="120" show-overflow-tooltip></el-table-column> + <el-table-column prop="manHourGroup" label="宸ユ椂鍒嗙粍" width="100" show-overflow-tooltip></el-table-column> + <!-- <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> --> + <el-table-column prop="section" label="鍖洪棿" width="120" show-overflow-tooltip></el-table-column> + <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px"> + <template slot-scope="scope"> + <el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea" + :autosize="{ minRows: 1, maxRows: 3}"></el-input> </template> </el-table-column> </el-table> @@ -266,6 +273,71 @@ <el-button type="primary" @click="activeStandardTree">纭� 瀹�</el-button> </span> </el-dialog> + <el-dialog title="娣诲姞鏍峰搧" :visible.sync="addSampleDia" width="400px"> + <div class="body" style="max-height: 60vh;"> + <el-row> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>鏍峰搧鍚嶇О锛�</div> + <div class="search_input"> + <el-input readonly size="small" v-model="sample.sample"> + <template slot="append"><el-button slot="append" icon="el-icon-search" + @click="selectStandardTree = true"></el-button></template> + </el-input> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>宸ュ巶鍚嶇О锛�</div> + <div class="search_input"> + <el-input size="small" clearable disabled v-model="sample.factory"></el-input> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>瀹為獙瀹ゅ悕绉帮細</div> + <div class="search_input"> + <el-input size="small" clearable disabled v-model="sample.laboratory"></el-input> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>鏍峰搧绫诲瀷锛�</div> + <div class="search_input"> + <el-input size="small" clearable disabled v-model="sample.sampleType"></el-input> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>瑙勬牸鍨嬪彿锛�</div> + <div class="search_input"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="sample.model"></el-input> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label">鏍峰搧缂栧彿锛�</div> + <div class="search_input"> + <el-input v-model="sample.sampleCode" size="small" placeholder="璇疯緭鍏�" clearable></el-input> + </div> + </el-col> + <el-col class="search_thing" :span="24"> + <div class="search_label">鏍峰搧鏁伴噺锛�</div> + <div class="search_input"> + <el-input-number size="small" v-model="sample.sampleNum" :min="1" :max="100" :precision="0" + style="width: 50%;"></el-input-number> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label">鏍峰搧鐣欐牱锛�</div> + <div class="search_input"> + <el-radio-group v-model="sample.isLeave"> + <el-radio :label="1">鐣欐牱</el-radio> + <el-radio :label="0">涓嶇暀鏍�</el-radio> + </el-radio-group> + </div> + </el-col> + </el-row> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="addSampleDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="onSample()" :loading="getProductLoad">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -281,24 +353,25 @@ templates: [], addObj: { entrustCode: null, - sampleCode: null, custom: null, company: null, userId: null, type: '0', code: null, - laboratory: null, - appointedTime: null, - factory: null, - sample: null, - sampleType: null, - sampleNum: null, - model: null, - isLeave: 0, - leaveNum: null, + appointed: null, remark: null, otcCode: null, mating: 0 + }, + sample: { + sampleCode: null, + laboratory: null, + factory: null, + sampleType: null, + sample: null, + model: null, + sampleNum: 1, + isLeave: 0, }, type: [], selectUserDia: false, @@ -335,7 +408,13 @@ expandedKeys: [], sampleList: [], sampleIds: [], - methodList: [] + methodList: [], + addSampleDia: false, + count: 1, + productList: [], + productIds: [], + getProductLoad: false, + saveLoad: false } }, mounted() { @@ -367,7 +446,20 @@ this.selectUserDia = false }, save() { - console.log(this.addObj); + this.saveLoad = true + this.$axios.post(this.$api.insOrder.addInsOrder,{ + insOrder: this.addObj, + list: this.sampleList + },{ + headers: { + 'Content-Type': 'application/json' + } + }).then(res=>{ + this.saveLoad = false + if(res.code==201)return + this.$message.success('宸叉彁浜�') + this.$parent.playOrder(0) + }) }, getUserNow() { this.$axios.get(this.$api.user.getUserNow).then(res => { @@ -425,31 +517,108 @@ this.$message.error('鏈�夋嫨鏍峰搧') return } - this.addObj.factory = trees[0] - this.addObj.laboratory = trees[1] - this.addObj.sampleType = trees[2] - this.addObj.sample = trees[3] - this.addObj.model = trees[4] + this.sample.factory = trees[0] + this.sample.laboratory = trees[1] + this.sample.sampleType = trees[2] + this.sample.sample = trees[3] + this.sample.model = trees[4] this.selectStandardTree = false - this.onSample() }, selectSample(val) { + this.sampleIds = [] val.forEach(a => { - this.sampleIds = a.id + this.sampleIds.push(a.id) }) }, onSample() { - this.sampleList = [] - if (this.addObj.sampleNum == 0 || this.addObj.sample == null || this.addObj.sample == '') return - for (var i = 0; i < this.addObj.sampleNum; i++) { - this.sampleList.push({ - sample: this.addObj.sample, - joinName: null, - joinModel: null - }) + if (this.sample.sample == null || this.sample.sample == '') { + this.$message.error('璇烽�夋嫨鏍峰搧') + return } + if (this.sample.model == null || this.sample.model == '') { + this.$message.error('璇疯緭鍏ユ牱鍝佸瀷鍙�') + return + } + this.getProductLoad = true + this.$axios.post(this.$api.standardTree.selectStandardProductList, { + factory: this.sample.factory, + laboratory: this.sample.laboratory, + sampleType: this.sample.sampleType, + sample: this.sample.sample, + model: this.sample.model + }, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + res.data.forEach(a => { + a.state = 1 + }) + for (var i = 0; i < this.sample.sampleNum; i++) { + this.sample.joinName = null + this.sample.joinModel = null + this.sample.joinNum = 1 + this.sample.insProduct = res.data + this.sample.id = this.count + this.sampleList.push(this.HaveJson(this.sample)) + this.count++ + } + this.$refs.sampleTable.doLayout() + this.getProductLoad = false + this.addSampleDia = false + this.sample = { + sampleCode: null, + laboratory: null, + factory: null, + sampleType: null, + sample: null, + model: null, + sampleNum: 1, + isLeave: 0, + } + }) + }, + delSample() { + this.sampleIds.forEach(a => { + for (var i = 0; i < this.sampleList.length; i++) { + if (this.sampleList[i].id == a) { + this.sampleList.splice(i, 1) + i -= 1 + break + } + } + }) this.$refs.sampleTable.doLayout() + }, + selectProduct(val) { + this.productIds = [] + val.forEach(a => { + this.productIds.push(a.id) + }) + }, + rowClick(row, column, event) { + this.productList = row.insProduct + setTimeout(() => { + this.productList.forEach(a => { + if (a.state == 1) this.toggleSelection(a) + }) + }, 300) + }, + toggleSelection(row) { + this.$refs.productTable.toggleRowSelection(row, true); + }, + upProductSelect(selection, row) { + row.state = row.state == 1 ? 0 : 1 + }, + tableRowClassName({ + row, + rowIndex + }) { + if (row.state === 0) { + return 'warning-row'; + } + return ''; } } } -</script> +</script> \ No newline at end of file diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue index bdf39e9..bd3a83f 100644 --- a/src/components/tool/value-table.vue +++ b/src/components/tool/value-table.vue @@ -71,7 +71,7 @@ <el-table ref="eltable" :data="tableData" style="width: 100%;" height="100%" tooltip-effect="dark" border @selection-change="selectChange" @select="select" v-loading="loading" @sort-change="sortChange" @row-click="rowClick" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" - :summary-method="getSummaries" :key="Math.random()" :row-class-name="tableRowClassName"> + :summary-method="getSummaries" :row-class-name="tableRowClassName"> <el-table-column type="selection" width="65" v-if="data.showSelect" :key="Math.random()"> </el-table-column> <el-table-column type="index" align="center" label="搴忓彿" width="70" v-if="data.isIndex" :key="Math.random()"> @@ -505,7 +505,7 @@ return } for (var i = 0; i < this.data.requiredUp.length; i++) { - if (this.upData[this.data.requiredUp[i]] == null || this.upData[this.data.requiredUp[i]] == '') { + if (this.upData[this.data.requiredUp[i]] === null || this.upData[this.data.requiredUp[i]] === '') { var list = this.upHead.filter(a => { if (a.label == this.data.requiredUp[i]) return a }) @@ -733,7 +733,7 @@ if(val.method=='doDiy'){ this.main(row,val) }else{ - this.$emit(val.method,row) + this.$parent[val.method](row) } }, getWidth(){ diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue index d7e56f9..2c3f8b1 100644 --- a/src/components/view/b1-inspect-order-plan.vue +++ b/src/components/view/b1-inspect-order-plan.vue @@ -1,158 +1,174 @@ <style scoped> -ins-order-plan-main .title{ - font-size:20px; - color:#3A7BFA -} -.ins-order-plan-main .search{ - width: 100%; - margin-bottom: 10px; - height: 10vh; - background-color: #fff; - border-radius: 3px; -} -.search .form-inline{ - height: 5vh; - padding-top:2.5vh; - padding-left: 1%; -} -.ins-order-plan-main .center{ - width: 100%; - height: 70vh; - background-color: #fff; - border-radius: 3px; -} -.ins-order-plan-main .center .value-table{ - width:98%; - height: 80%; - margin-left:1%; -} -.tab { - list-style-type: none; - display: flex; - padding: 10px 0px; -} -.tab li { - line-height: 24px; - padding: 6px 14px; - font-size: 14px; - color: #333333; - border: 1px solid #EEEEEE; - cursor: pointer; -} + ins-order-plan-main .title { + font-size: 20px; + color: #3A7BFA + } -.tab li:nth-child(1) { - border-radius: 8px 0 0 8px; -} + .ins-order-plan-main .search { + width: 100%; + margin-bottom: 10px; + height: 80px; + background-color: #fff; + border-radius: 3px; + } -.tab li:nth-child(3) { - border-radius: 0 8px 8px 0; -} + .search .form-inline { + height: 50px; + padding-top: 20px; + padding-left: 50px; + } -.tab li.active { - border-color: #3A7BFA; - color: #3A7BFA; -} -.center .center-options:nth-child(1){ - padding-left: 1%; -} -.center .center-options .center-title { - width:85%; - padding-top: 20px; - text-align: left; -} -.center .center-options .center-title span:last-child{ - color: #3A7BFA; - font-size: 23px; - font-weight: 400; -} -.view-self-checkbox{ -margin-left: 20px; -} + .ins-order-plan-main .center { + width: calc(100% - 40px); + height: calc(100% - 60px - 80px - 40px); + background-color: #fff; + border-radius: 3px; + padding: 20px; + } + + .ins-order-plan-main .center .value-table { + width: 100%; + height: calc(100% - 68px); + } + + .tab { + list-style-type: none; + display: flex; + } + + .tab li { + line-height: 24px; + padding: 6px 14px; + font-size: 14px; + color: #333333; + border: 1px solid #EEEEEE; + cursor: pointer; + } + + .tab li:nth-child(1) { + border-radius: 8px 0 0 8px; + } + + .tab li:nth-child(3) { + border-radius: 0 8px 8px 0; + } + + .tab li.active { + border-color: #3A7BFA; + color: #3A7BFA; + } + + .center .center-options .center-title { + width: 100%; + text-align: right; + display: flex; + align-items: center; + } + + .center .center-options .center-title span:last-child { + color: #3A7BFA; + font-size: 23px; + font-weight: 400; + } + + .view-self-checkbox { + margin-left: 50px; + } +</style> +<style> + .ins-order-plan-main .el-form-item__label{ + color: #000; + } </style> <template> - <div class="ins-order-plan-main"> - <p style="font-size: 16px;padding:19.5px 0px">妫�楠屼换鍔�</p> - <div class="search"> - <el-form :inline="true" :model="searchForm" class="form-inline"> - <el-form-item label="鏍峰搧鍚嶇О:"> - <el-input clearable v-model="searchForm.sampleName" size="small" placeholder="璇疯緭鍏�"></el-input> - </el-form-item> - <el-form-item label="鐘舵��:"> - <el-select clearable size="small" v-model="searchForm.state" placeholder="璇烽�夋嫨"> - <el-option v-for="(item,index) in insStateList" :key="index" - :label="item.label" :value="item.value"></el-option> - </el-select> - </el-form-item> - <el-form-item> - <el-button size="small" @click="onReset">閲嶇疆</el-button> - <el-button size="small" type="primary" @click="onSubmit">鏌ヨ</el-button> - </el-form-item> - </el-form> - </div> - <div class="center"> - <div class="center-options"> - <el-row> - <el-col :span="21"> - <div style="display: flex;align-items: center;"> - <ul class="tab"> - <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> - </ul> - <el-checkbox @change="changeCheckBox" class="view-self-checkbox" v-model="viewSelf"/><span> 鎴戠殑浠诲姟</span> - </div> - </el-col> - <el-col :span="3"> - <div class="center-title"> - <span>鎬昏浠诲姟鏁伴噺:</span> - <span v-if="$refs.insOrderPlan != undefined">{{$refs.insOrderPlan.total}}</span> - </div> - </el-col> - </el-row> - </div> - <ValueTable :tableRowClassName="changeRowClass" class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData" :key="upIndex" @upUser="upUser"/> - </div> - <el-dialog - title="鎻愮ず" - :visible.sync="claimVisible" - width="40%"> - 鏄惁璁ら濮旀墭缂栧彿<span style="color:#33C130">{{sampleUserForm.entrustCode}}</span>鐨勪换鍔� - <span slot="footer" class="dialog-footer"> - <el-button @click="claimVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button> - </span> - </el-dialog> - </div> + <div class="ins-order-plan-main"> + <p style="font-size: 16px;padding:19.5px 0px">妫�楠屼换鍔�</p> + <div class="search"> + <el-form :inline="true" :model="searchForm" class="form-inline"> + <el-form-item label="鏍峰搧鍚嶇О:"> + <el-input clearable v-model="searchForm.sampleName" size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item label="鐘舵��:"> + <el-select clearable size="small" v-model="searchForm.state" placeholder="璇烽�夋嫨"> + <el-option v-for="(item,index) in insStateList" :key="index" :label="item.label" + :value="item.value"></el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-button size="small" @click="onReset">閲嶇疆</el-button> + <el-button size="small" type="primary" @click="onSubmit">鏌ヨ</el-button> + </el-form-item> + </el-form> + </div> + <div class="center"> + <div class="center-options"> + <el-row> + <el-col :span="21"> + <div style="display: flex;align-items: center;margin-bottom: 10px;"> + <ul class="tab"> + <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}} + </li> + </ul> + <div> + <el-checkbox @change="changeCheckBox" class="view-self-checkbox" + v-model="viewSelf"><span>鎴戠殑浠诲姟</span></el-checkbox> + </div> + </div> + </el-col> + <el-col :span="3"> + <div class="center-title"> + <span>鎬昏浠诲姟鏁伴噺:</span> + <span v-if="$refs.insOrderPlan != undefined">{{$refs.insOrderPlan.total}}</span> + </div> + </el-col> + </el-row> + </div> + <ValueTable :tableRowClassName="changeRowClass" class="value-table" ref="insOrderPlan" + :url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData" + :key="upIndex" @upUser="upUser" /> + </div> + <el-dialog title="鎻愮ず" :visible.sync="claimVisible" width="40%"> + 鏄惁璁ら濮旀墭缂栧彿<span style="color:#33C130">{{sampleUserForm.entrustCode}}</span>鐨勪换鍔� + <span slot="footer" class="dialog-footer"> + <el-button @click="claimVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </template> <script> -import ValueTable from '../tool/value-table.vue' -import { getYearAndMonthAndDays } from '../../util/date' -export default { - components:{ - ValueTable - }, - data(){ - return { - viewSelf: false, - sampleUserForm:{ - entrustCode: null, - insSampleId: null, - userId: null - }, - claimVisible: false, - searchForm:{ - sampleName: null, - state: null - }, - tabList: [], - active: 1, - tabIndex: 0, - componentData: { + import ValueTable from '../tool/value-table.vue' + import { + getYearAndMonthAndDays + } from '../../util/date' + export default { + components: { + ValueTable + }, + data() { + return { + viewSelf: false, + sampleUserForm: { + entrustCode: null, + insSampleId: null, + userId: null + }, + claimVisible: false, + searchForm: { + sampleName: null, + state: null + }, + tabList: [], + active: 1, + tabIndex: 0, + componentData: { entity: { - viewSelf: false, - state: 1, - childrenLaboratory: null, - insState: null, - sampleName: null, + viewSelf: false, + state: 1, + childrenLaboratory: null, + insState: null, + sampleName: null, orderBy: { field: 'type', order: 'desc' @@ -162,179 +178,190 @@ showSelect: false, select: false, do: [{ - id: '', - font: '妫�楠�', - type: 'text', - method: '', - field:[] - },{ - id: '', - font: '浜ゆ帴', - type: 'text', - method: '' - }, - { - id: '', - font: '澶嶆牳', - type: 'text', - method: '' - },{ - id: '', - font: '璁ら', - type: 'text', - method: 'claimFun', - disabFun: (row,index)=>{return row.sampleUserId!=null} - }], + id: '', + font: '妫�楠�', + type: 'text', + method: '', + field: [] + }, { + id: '', + font: '浜ゆ帴', + type: 'text', + method: '' + }, + { + id: '', + font: '澶嶆牳', + type: 'text', + method: '' + }, { + id: '', + font: '璁ら', + type: 'text', + method: 'claimFun', + disabFun: (row, index) => { + return row.sampleUserId != null + } + } + ], tagField: { - type:{ - select:[] - }, - insState:{ - select:[] - } - }, + type: { + select: [] + }, + insState: { + select: [] + } + }, selectField: {}, - requiredAdd:[], - requiredUp:[] + requiredAdd: [], + requiredUp: [] }, - upIndex: 0, - planTotal: 0, - insStateList: [] - } - }, - created(){ - this.getTypeDicts() - this.getInsStateDicts() - this.getLaboratoryDicts() - this.$nextTick(()=>{ - this.refreshTable() - }) - }, - watch:{ - tabList(newVal){ - if(newVal && newVal.length>0){ - this.componentData.entity.childrenLaboratory = newVal[0].value - this.$nextTick(()=>{ - this.refreshTable() - }) - } - } - }, - methods:{ - upUser(){ + upIndex: 0, + planTotal: 0, + insStateList: [] + } + }, + created() { + this.getTypeDicts() + this.getInsStateDicts() + this.getLaboratoryDicts() + this.$nextTick(() => { + this.refreshTable() + }) + }, + watch: { + tabList(newVal) { + if (newVal && newVal.length > 0) { + this.componentData.entity.childrenLaboratory = newVal[0].value + this.$nextTick(() => { + this.refreshTable() + }) + } + } + }, + methods: { + upUser() { - }, - changeCheckBox(val){ - this.componentData.entity.viewSelf = val - this.$nextTick(()=>{ - this.refreshTable() - }) - }, - claimFun(row){ - console.log(row) - if(row){ - this.sampleUserForm = { - entrustCode : row.entrustCode, - insSampleId: row.id - } - this.claimVisible = true - } + }, + changeCheckBox(val) { + this.componentData.entity.viewSelf = val + this.$nextTick(() => { + this.refreshTable() + }) + }, + claimFun(row) { + console.log(row) + if (row) { + this.sampleUserForm = { + entrustCode: row.entrustCode, + insSampleId: row.id + } + this.claimVisible = true + } - }, - confirmClaim(){ - this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm,{ + }, + confirmClaim() { + this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm, { headers: { 'Content-Type': 'application/json' } - }).then(res=>{ - if(res.code===200 && res.data){ - this.$message.success("璁ら鎴愬姛") - this.claimVisible = false - this.refreshTable() - } - }).catch(error=>{ - console.error(error) - }) - }, - refreshTable() { - this.$refs.insOrderPlan.selectList() - }, - changeRowClass({row,rowIndex}){ - let currentTime = getYearAndMonthAndDays() - if(row.sendTime && currentTime===row.sendTime){ - return 'highlight-warning-row-border' - }else if(row.sendTime && currentTime>row.sendTime){ - return 'highlight-danger-row-border' - } - return '' - }, - onReset(){ - this.searchForm = { - sampleName: null, - state: null, - } - this.componentData.entity.insState = null - this.componentData.entity.sampleName = null - this.refreshTable() - }, - onSubmit(){ - this.componentData.entity.insState = this.searchForm.state - this.componentData.entity.sampleName = this.searchForm.sampleName - this.$nextTick(()=>{ - this.refreshTable() - }) - }, - handleTab(m, i) { - this.tabIndex = i; - this.componentData.entity.childrenLaboratory = m.value - this.refreshTable() - }, - getTypeDicts() { - this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "绱ф�ョ▼搴�" - }).then(res => { - let data = res.data - data.forEach(ele=>{ - if(ele.value==='0'){ - ele.type='success' - }else if(ele.value==='1'){ - ele.type='warning' - }else if(ele.value==='2'){ - ele.type='danger' - } - }) - this.componentData.tagField.type.select = data - }) - }, - getInsStateDicts() { - this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "妫�楠屼换鍔$姸鎬�" - }).then(res => { - let data = res.data - this.insStateList = data - data.forEach(ele=>{ - //0:寰呮楠� 1:妫�楠屼腑 2:宸叉楠� 3:寰呭鏍� 4:澶嶆牳鏈�氳繃 5:澶嶆牳閫氳繃 - if(['2','5'].includes(ele.value)){ - ele.type='success' - }else if(['1','3'].includes(ele.value)){ - ele.type='warning' - }else if(['0','4'].includes(ele.value)){ - ele.type='danger' - } - }) - this.componentData.tagField.insState.select = data - }) - }, - getLaboratoryDicts(){ - this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "瀛愬疄楠屽" - }).then(res => { - this.tabList = res.data.map(ele=>{return {label:ele.label,value:ele.value}}) - this.$nextTick(()=>{ - this.componentData.entity.childrenLaboratory = this.tabList[0].value - }) - }) - } - } -} -</script> + }).then(res => { + if (res.code === 200 && res.data) { + this.$message.success("璁ら鎴愬姛") + this.claimVisible = false + this.refreshTable() + } + }).catch(error => { + console.error(error) + }) + }, + refreshTable() { + this.$refs.insOrderPlan.selectList() + }, + changeRowClass({ + row, + rowIndex + }) { + let currentTime = getYearAndMonthAndDays() + if (row.sendTime && currentTime === row.sendTime) { + return 'highlight-warning-row-border' + } else if (row.sendTime && currentTime > row.sendTime) { + return 'highlight-danger-row-border' + } + return '' + }, + onReset() { + this.searchForm = { + sampleName: null, + state: null, + } + this.componentData.entity.insState = null + this.componentData.entity.sampleName = null + this.refreshTable() + }, + onSubmit() { + this.componentData.entity.insState = this.searchForm.state + this.componentData.entity.sampleName = this.searchForm.sampleName + this.$nextTick(() => { + this.refreshTable() + }) + }, + handleTab(m, i) { + this.tabIndex = i; + this.componentData.entity.childrenLaboratory = m.value + this.refreshTable() + }, + getTypeDicts() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "绱ф�ョ▼搴�" + }).then(res => { + let data = res.data + data.forEach(ele => { + if (ele.value === '0') { + ele.type = 'success' + } else if (ele.value === '1') { + ele.type = 'warning' + } else if (ele.value === '2') { + ele.type = 'danger' + } + }) + this.componentData.tagField.type.select = data + }) + }, + getInsStateDicts() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "妫�楠屼换鍔$姸鎬�" + }).then(res => { + let data = res.data + this.insStateList = data + data.forEach(ele => { + //0:寰呮楠� 1:妫�楠屼腑 2:宸叉楠� 3:寰呭鏍� 4:澶嶆牳鏈�氳繃 5:澶嶆牳閫氳繃 + if (['2', '5'].includes(ele.value)) { + ele.type = 'success' + } else if (['1', '3'].includes(ele.value)) { + ele.type = 'warning' + } else if (['0', '4'].includes(ele.value)) { + ele.type = 'danger' + } + }) + this.componentData.tagField.insState.select = data + }) + }, + getLaboratoryDicts() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "瀛愬疄楠屽" + }).then(res => { + this.tabList = res.data.map(ele => { + return { + label: ele.label, + value: ele.value + } + }) + this.$nextTick(() => { + this.componentData.entity.childrenLaboratory = this.tabList[0].value + }) + }) + } + } + } +</script> \ No newline at end of file diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index b180ebf..4e3f189 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -12,19 +12,19 @@ } .search_thing { - width: 350px; display: flex; align-items: center; + height: 50px; } - + .search_label { - width: 110px; + width: 120px; font-size: 14px; text-align: right; } - + .search_input { - width: calc(100% - 110px); + width: calc(100% - 120px); } .table { @@ -75,7 +75,7 @@ <el-row class="title"> <el-col :span="12" style="padding-left: 20px;">妫�楠屼笅鍗�</el-col> <el-col :span="12" style="text-align: right;"> - <el-button size="medium" type="primary" @click="playOrder(1)">涓嬪崟</el-button> + <el-button size="medium" type="primary" @click="playOrder(1)" v-if="addPower">涓嬪崟</el-button> </el-col> </el-row> </div> @@ -83,12 +83,12 @@ <div class="search_thing"> <div class="search_label">濮旀墭缂栧彿锛�</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.deviceName" @keyup.enter.native="refreshTable()"></el-input></div> + v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing"> <div class="search_label">鏍峰搧鍚嶇О锛�</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.specificationModel" @keyup.enter.native="refreshTable()"></el-input></div> + v-model="componentData.entity.sample" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing" style="padding-left: 30px;"> <el-button size="small" @click="refresh()">閲� 缃�</el-button> @@ -99,11 +99,8 @@ <ul class="tab"> <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> </ul> - <!-- 璇硶 瀛愮粍浠堕�氳繃 this.$emit +浼犲叆鏂规硶鍚� 璋冪敤鐖剁粍浠舵柟娉� 渚嬪 this.$emit锛坰electAllByOne锛� 灏遍渶鍦ㄧ埗缁勪欢澹版槑骞朵紶鍏� @selectAllByOne="selectAllByOne"--> <ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData" - :key="upIndex" style="height: calc(100% - 44px)" @selectAllByOne="selectAllByOne" - @handleDataLook="handleDataLook" @download="download" @handleVerify="handleVerify" @handlEquash="handlEquash" - @handleIssued="handleIssued" /> + :key="upIndex" style="height: calc(100% - 44px)" /> </div> <!-- 瀹℃牳 --> <el-dialog title="涓嬪崟瀹℃牳" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose"> @@ -146,22 +143,28 @@ </span> </el-dialog> <!-- 涓嬪彂 --> - <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose"> - <el-form :label-position="labelPosition" :model="formData2" label-width="150px" ref="ruleForm"> - <el-form-item label="绾﹀畾鏃堕棿锛�"> - <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData2.appointed2" - type="date" size="small" placeholder="閫夋嫨鏃堕棿"> - </el-date-picker> - </el-form-item> - <el-form-item > - </el-form-item> - <el-form-item label="鎸囨淳浜哄憳锛�"> - <el-select v-model="formData2.id" placeholder="璇烽�夋嫨" size="small" style="width:100%"> - <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> - </el-option> - </el-select> - </el-form-item> - </el-form> + <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="400px" :before-close="handleClose"> + <div class="body" style="max-height: 60vh;"> + <el-row> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div> + <div class="search_input"> + <el-date-picker size="small" v-model="distributeData.appointed" type="date" placeholder="閫夋嫨鏃ユ湡" + value-format="yyyy-MM-dd" style="width: 100%;" format="yyyy-MM-dd"> + </el-date-picker> + </div> + </el-col> + <el-col class="search_thing" :span="22"> + <div class="search_label"><span class="required-span">* </span>鎸囨淳浜哄憳锛�</div> + <div class="search_input"> + <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> + <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </div> + </el-col> + </el-row> + </div> <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="handleClose2">鍙� 娑�</el-button> @@ -177,7 +180,7 @@ </el-dialog> </div> <div style="width: 100%;height: 100%;" v-if="active == 1"> - <Add/> + <Add /> </div> </div> </template> @@ -199,21 +202,22 @@ verifyDialogVisible: false, quashDialogVisible: false, issuedDialogVisible: false, - issuedDialogVisible2: false, dataDialogVisible: false, formData: {}, - formData0:{}, - formData1:{}, - formData2:{ - id:'', - orderName:'', - data:'', + formData0: {}, + formData1: {}, + distributeData: { + orderId: '', + sampleId: '', + appointed: '', + userId: '' }, // 浜哄憳鍒楄〃 personList: [], - labelPosition: 'right', componentData: { entity: { + entrustCode: null, + sample: null, state: 1, orderBy: { field: 'id', @@ -227,28 +231,44 @@ id: 'dataLook', font: '鏁版嵁鏌ョ湅', type: 'text', - method: 'handleDataLook' + method: 'handleDataLook', + disabFun: (row, index) => { + return row.state != 1 + } }, { id: 'download', font: '鎶ュ憡涓嬭浇', type: 'text', - method: 'download' + method: 'download', + disabFun: (row, index) => { + return row.state != 1 + } }, { id: 'verify', font: '瀹℃牳', type: 'text', - method: 'handleVerify' + method: 'handleVerify', + disabFun: (row, index) => { + return row.state != 0 + } }, { id: 'quash', font: '鎾ら攢', type: 'text', method: 'handlEquash' }, { - id: 'issued', font: '涓嬪彂', type: 'text', - method: 'handleIssued' + method: 'handleIssued', + disabFun: (row, index) => { + return row.state != 1 || row.sendTime != null + } }], + linkEvent:{ + entrustCode:{ + method:'selectAllByOne' + } + }, tagField: { type: { select: [{ @@ -265,16 +285,13 @@ label: '绱ф��' }] }, - }, - linkEvent:{ - deviceName:{ - id: 'details', - method:'selectAllByOne', - } + createUser: { + select: [] + } }, selectField: {}, - requiredAdd: ['largeCategory', 'subclass', 'deviceName', 'internalCode', 'specificationModel', 'manufacturer'], - requiredUp: ['largeCategory', 'subclass', 'deviceName', 'internalCode', 'specificationModel', 'manufacturer'] + requiredAdd: [], + requiredUp: [] }, componentDataDataLook: { entity: { @@ -336,13 +353,14 @@ mounted() { this.entityCopy = this.HaveJson(this.componentData.entity) this.getPower() + this.getUserMenu() this.getAuthorizedPerson() }, methods: { - getAuthorizedPerson(){ - this.$axios.post(this.$api.deviceScope.selectDevicePrincipal).then(res => { + getAuthorizedPerson() { + this.$axios.get(this.$api.user.getUserMenu).then(res => { let data = [] - res.data.forEach(a=>{ + res.data.forEach(a => { data.push({ label: a.name, value: a.id @@ -350,7 +368,7 @@ }) this.personList = data }) - }, + }, refreshTable() { this.$refs['ValueTable'].selectList() }, @@ -365,21 +383,15 @@ let del = false let add = false for (var i = 0; i < power.length; i++) { - if (power[i].menuMethod == 'upDeviceParameter') { + if (power[i].menuMethod == 'upInsOrder') { up = true } - if (power[i].menuMethod == 'delDeviceParameter') { - del = true - } - if (power[i].menuMethod == 'addDeviceParameter') { + if (power[i].menuMethod == 'addInsOrder') { add = true } } - if (!del) { - this.componentData.do.splice(1, 1) - } if (!up) { - this.componentData.do.splice(0, 1) + this.componentData.do.splice(4, 1) } this.addPower = add }, @@ -399,6 +411,7 @@ }, // 璇︽儏 selectAllByOne(row) { + console.log(row); //鎵撳紑寮规 this.dialogVisible = true; //row = 鐐瑰嚮瀵瑰簲琛屽�� @@ -411,7 +424,6 @@ }, // 涓嬭浇鎶ュ憡 download(row) { - }, // 瀹℃牳 handleVerify(row) { @@ -424,13 +436,25 @@ // 涓嬪彂 handleIssued(row) { this.issuedDialogVisible = true; + this.$axios.post(this.$api.insOrder.selectOrderManDay,{ + id: row.sampleId + }).then(res=>{ + this.distributeData.orderId = row.id + this.distributeData.sampleId = row.sampleId + this.distributeData.appointed = res.data + }) }, - submitForm2(){ + submitForm2() { + if(this.distributeData.appointed==null||this.distributeData.appointed==''){ + this.$message.error('绾﹀畾鏃堕棿鏈~鍐�') + return + } this.upLoad = true; - this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData2, { - headers: { - 'Content-Type': 'application/json' - } + this.$axios.post(this.$api.insOrder.upInsOrder, { + orderId: this.distributeData.orderId, + sampleId: this.distributeData.sampleId, + appointed: this.distributeData.appointed, + userId: this.distributeData.userId }).then(res => { if (res.code === 201) { this.upLoad = false @@ -438,11 +462,10 @@ } this.$message.success('淇敼鎴愬姛') this.upLoad = false + this.issuedDialogVisible = false this.refreshTable() - this.dialogVisible = false }).catch(e => { this.$message.error('淇敼澶辫触') - this.dialogVisible = false this.upLoad = false }) }, @@ -454,24 +477,6 @@ delete this.formData.createUser delete this.formData.updateUser this.formData.authorizedPerson = authorizedPerson - this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { - if (res.code === 201) { - this.upLoad = false - return - } - this.$message.success('淇敼鎴愬姛') - this.upLoad = false - this.refreshTable() - this.dialogVisible = false - }).catch(e => { - this.$message.error('淇敼澶辫触') - this.dialogVisible = false - this.upLoad = false - }) }, // 涓嬪崟 playOrder(num) { @@ -481,7 +486,19 @@ this.tabIndex = i; this.componentData.entity.state = m.value this.refreshTable() + }, + getUserMenu() { + this.$axios.get(this.$api.user.getUserMenu).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id + }) + }) + this.componentData.tagField.createUser.select = data + }) } } } -</script> +</script> \ No newline at end of file diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 4b39e82..463a9d3 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -161,7 +161,7 @@ <el-table-column prop="manHourGroup" label="宸ユ椂鍒嗙粍" width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="section" label="鍖洪棿" width="120" show-overflow-tooltip></el-table-column> - <el-table-column prop="ask" label="瑕佹眰鍊�" width="220px"> + <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px"> <template slot-scope="scope"> <el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable @change="(value)=>upStandardProductList(value,scope.row.id)" v-if="upStandardProduct" type="textarea" :autosize="{ minRows: 1, maxRows: 3}"></el-input> diff --git a/src/view/index.vue b/src/view/index.vue index 200863a..c8ddf1c 100644 --- a/src/view/index.vue +++ b/src/view/index.vue @@ -426,10 +426,7 @@ removeTab(index) { this.tabs.splice(index, 1); let data = this.tabs[this.tabs.length - 1] - this.activeP = data.k; - this.tabActive = data.k; - this.activeBox = data.k - this.saveClick() + this.upTabActive(data.k) }, allDel() { this.activeBox = 0 -- Gitblit v1.9.3