From 4e317abe0f8dcca17a7c48e373f969798a3e4222 Mon Sep 17 00:00:00 2001 From: gaoaoy <1042166043@qq.com> Date: 星期四, 14 三月 2024 17:43:29 +0800 Subject: [PATCH] 检验下单 功能调整 --- src/components/view/b1-inspection-order.vue | 72 ++++++++++++++++++++++++++++++------ 1 files changed, 60 insertions(+), 12 deletions(-) diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 5034b53..a062c6a 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -147,14 +147,16 @@ </el-dialog> <!-- 涓嬪彂 --> <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose"> - <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm"> + <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="formData.downTime" + <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="formData.equipmentManager" placeholder="璇烽�夋嫨" size="small" style="width:100%"> + <el-select v-model="formData2.getUserMenu" 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> @@ -162,12 +164,12 @@ </el-form> <span slot="footer" class="dialog-footer"> <el-row> - <el-button @click="handleClose">鍙� 娑�</el-button> - <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> + <el-button @click="handleClose2">鍙� 娑�</el-button> + <el-button type="primary" @click="submitForm2" :loading="upLoad">纭� 瀹�</el-button> </el-row> </span> </el-dialog> - <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose"> + <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose2"> <div style="height: 70vh;overflow-y: auto;"> <ValueTable ref="ValueTableDataLook" :url="$api.deviceScope.selectDeviceParameter" :componentData="componentDataDataLook" :key="upIndex" /> @@ -197,8 +199,12 @@ verifyDialogVisible: false, quashDialogVisible: false, issuedDialogVisible: false, + issuedDialogVisible2: false, dataDialogVisible: false, formData: {}, + formData0:{}, + formData1:{}, + formData2:{}, // 浜哄憳鍒楄〃 personList: [], labelPosition: 'right', @@ -240,21 +246,21 @@ method: 'handleIssued' }], tagField: { - deviceStatus: { + type: { select: [{ value: 0, type: 'success', - label: '姝e父' + label: '鏅��' }, { value: 1, type: 'warning', - label: '鎶ュ簾' + label: '浼樺厛' }, { value: 2, type: 'danger', - label: '淇濅慨' + label: '绱ф��' }] - } + }, }, linkEvent:{ deviceName:{ @@ -326,8 +332,21 @@ mounted() { this.entityCopy = this.HaveJson(this.componentData.entity) this.getPower() + this.getAuthorizedPerson() }, methods: { + getAuthorizedPerson(){ + this.$axios.get(this.$api.deviceScope.selectDevicePrincipal).then(res => { + let data = [] + res.data.forEach(a=>{ + data.push({ + label: a.name, + value: a.id + }) + }) + this.personList = data + }) + }, refreshTable() { this.$refs['ValueTable'].selectList() }, @@ -367,6 +386,13 @@ this.dataDialogVisible = false; this.upLoad = false; }, + handleClose2() { + this.verifyDialogVisible = false; + this.quashDialogVisible = false; + this.issuedDialogVisible = false; + this.dataDialogVisible = false; + this.upLoad = false; + }, // 璇︽儏 selectAllByOne(row) { //鎵撳紑寮规 @@ -394,6 +420,28 @@ // 涓嬪彂 handleIssued(row) { this.issuedDialogVisible = true; + this.issuedDialogVisible2 = true; + }, + submitForm2(){ + this.upLoad = true; + this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData2, { + 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 + }) }, submitForm() { this.upLoad = true; @@ -403,7 +451,7 @@ delete this.formData.createUser delete this.formData.updateUser this.formData.authorizedPerson = authorizedPerson - this.$axios.post(this.$api.deviceScope.upDeviceParameter, this.formData, { + this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData, { headers: { 'Content-Type': 'application/json' } -- Gitblit v1.9.3