From 63fce2b793451ee340b7a0f6e0d6ce6c2d470dd0 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 21 七月 2022 17:10:22 +0800
Subject: [PATCH] 1.优化代码,2.完成工序缺陷页面3.模板下载功能
---
src/views/scgl/sckbg.vue | 149 +++++++++++--------------------------------------
1 files changed, 35 insertions(+), 114 deletions(-)
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 252e3c9..5984778 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -1,15 +1,15 @@
<template>
<div>
<div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}">
-
<el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="鐢熶骇鍒楄〃">
<div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
<div style="display: flex;align-items: center">
<div style="width: 90px">鎵弿鏉$爜锛�</div>
+ <!-- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
+
<el-input
v-model="form.orderstepqrcode"
- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
name="produceCode"
style="width: 300px"
@keyup.enter.native="val=>enterNative(val,'produceCode')"
@@ -56,6 +56,7 @@
prop="RowNum"
width="50"
label="搴忓彿"
+ fixed
/>
<el-table-column
prop="status"
@@ -73,32 +74,37 @@
<el-table-column
prop="wo_code"
label="宸ュ崟鍙�"
+ min-width="160"
sortable="custom"
/>
<el-table-column
prop="partcode"
label="浜у搧缂栫爜"
+ min-width="110"
sortable="custom"
/>
<el-table-column
prop="partname"
+ min-width="110"
label="浜у搧鍚嶇О"
sortable="custom"
/>
<el-table-column
prop="stepname"
label="宸ュ簭"
+ min-width="80"
sortable="custom"
/>
<el-table-column
prop="descr"
label="宸ュ簭鎻忚堪"
- width="150"
+ min-width="150"
sortable="custom"
/>
<el-table-column
prop="plan_qty"
label="浠诲姟鏁伴噺"
+ width="110"
sortable="custom"
/>
<el-table-column
@@ -166,7 +172,6 @@
<div style="width: 90px;margin-left: 20px">鎵弿鏉$爜锛�</div>
<el-input
v-model="WXform.orderstepqrcode"
- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
name="WXproduceCode"
style="width: 300px"
@keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
@@ -213,6 +218,7 @@
prop="RowNum"
width="50"
label="搴忓彿"
+ fixed
/>
<el-table-column
prop="status"
@@ -230,32 +236,37 @@
<el-table-column
prop="wo_code"
label="宸ュ崟鍙�"
+ min-width="160"
sortable="custom"
/>
<el-table-column
prop="partcode"
label="浜у搧缂栫爜"
+ min-width="110"
sortable="custom"
/>
<el-table-column
prop="partname"
label="浜у搧鍚嶇О"
+ min-width="110"
sortable="custom"
/>
<el-table-column
prop="stepname"
label="宸ュ簭"
+ min-width="80"
sortable="custom"
/>
<el-table-column
prop="descr"
label="宸ュ簭鎻忚堪"
- width="150"
+ min-width="150"
sortable="custom"
/>
<el-table-column
prop="plan_qty"
label="浠诲姟鏁伴噺"
+ width="110"
sortable="custom"
/>
<el-table-column
@@ -268,7 +279,6 @@
prop="ng_qty"
label="涓嶈壇鏁伴噺"
width="150"
-
sortable="custom"
/>
<el-table-column
@@ -302,88 +312,6 @@
popper-class="select_bottom"
@pagination="getMesOrderStepSearch"
/>
- </el-tab-pane>
- <el-tab-pane v-if="false" label="宸ュ簭妫�楠�">
- <div style="margin-left: 10px;margin-top:10px;display: flex;flex-direction: column">
- <div style="margin-bottom: 10px;font-size: 14px">
- <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />鎵爜淇℃伅
- </div>
- <div style="display: flex;align-items: center">
- <div style="width: 90px">鎵弿鏉$爜锛�</div>
- <el-input
- v-model="GXform.orderstepqrcode"
- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
- name="GXproduceCode"
- style="width: 300px"
- @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
- />
- </div>
- <div style="line-height: 40px; display: flex;margin-top: 20px">
- <div style="display: flex;margin-right: 50px">
- <div style="width: 90px">宸ュ崟缂栫爜锛�</div>
- <div>PX00120012312</div>
- </div>
- <div style="display: flex;">
- <div style="width: 90px">浜у搧缂栫爜锛�</div>
- <div>123-446-789</div>
- </div>
- </div>
- <div style="line-height: 40px; display: flex;">
- <div style="display: flex;margin-right: 50px">
- <div style="width: 90px">浜у搧鍚嶇О锛�</div>
- <div>PX00120012312</div>
- </div>
- <div style="display: flex;">
- <div style="width: 90px">浜у搧瑙勬牸锛�</div>
- <div>123-446-789</div>
- </div>
- </div>
- <div style="line-height: 40px; display: flex;">
- <div style="display: flex;margin-right: 50px">
- <div style="width: 90px">宸ュ簭缂栫爜锛�</div>
- <div>PX00120012312</div>
- </div>
- <div style="display: flex;">
- <div style="width: 90px">宸ュ簭鍚嶇О锛�</div>
- <div>123-446-789</div>
- </div>
- </div>
-
- <div style="margin: 20px 0;font-size: 14px">
- <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />妫�楠屾爣鍑嗕俊鎭�
- </div>
- <div style="display: flex;align-items: center">
- <div style="width: 90px">妫�楠屾爣鍑嗭細</div>
- <el-select
- v-model="dialogForm.aaa"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in ARR"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- <div style="width: 90px;margin-left: 50px;">妫�楠屾爣鍑嗭細</div>
- <el-select
- v-model="dialogForm.aaa"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in ARR"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <div style="margin: 20px 0;font-size: 14px">
- <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />妫�楠岄」淇℃伅
- </div>
- </div>
</el-tab-pane>
</el-tabs>
@@ -447,6 +375,7 @@
<!--鑷埗寮�濮�-->
<el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="寮�宸ユ暟閲忥細">
<div style="width: 200px">{{ dialogForm.startqty }}</div>
+ <!-- <div style="width: 200px">{{ dialogForm.noreportqty }}</div>-->
</el-form-item>
<el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" prop="eqpcode" label="鐢熶骇璁惧锛�">
<el-select
@@ -497,6 +426,7 @@
</el-form-item>
<el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐鏁伴噺锛�" prop="startqty">
<el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+ <!-- <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />-->
</el-form-item>
<el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鏁伴噺锛�">
<el-input v-model="dialogForm.noputqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
@@ -746,7 +676,7 @@
SavaMesOrderStepStart,
SavaMesOrderStepReport
} from '@/api/scgl'
-import { urlAddRandomNo, webapp_urlprotocol_startup, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -883,15 +813,7 @@
{ required: true, message: '璇疯緭鍏ユ姤宸ユ暟閲�', trigger: ['blur', 'change'] }
]
},
- activeName: '',
- GXform: { // 宸ュ簭
- orderstepqrcode: '' // 鎵弿鐨勪簩缁寸爜淇℃伅
- // prop: 'wo_code', // 鎺掑簭瀛楁z
- // order: 'asc', // 鎺掑簭瀛楁
- // page: 1, // 绗嚑椤�
- // rows: 20 // 姣忛〉澶氬皯鏉�
- }
-
+ activeName: ''
}
},
created() {
@@ -963,19 +885,14 @@
this.$nextTick(() => {
this.getMesOrderStepSearch()
$("input[name='produceCode']")[0].focus()
- // this.WXform.orderstepqrcode = ''
+ this.WXform.orderstepqrcode = ''
})
}
if (this.$refs.elTabs.currentName === '1') {
this.$nextTick(() => {
this.getMesOrderWxStepSearch()
$("input[name='WXproduceCode']")[0].focus()
- // this.form.orderstepqrcode = ''
- })
- }
- if (this.$refs.elTabs.currentName === '2') {
- this.$nextTick(() => {
- $("input[name='GXproduceCode']")[0].focus()
+ this.form.orderstepqrcode = ''
})
}
},
@@ -1017,10 +934,6 @@
await this.WXback(res.data)
}
}
-
- if (belong === 'GXproduceCode') {
- console.log('GXproduceCode')
- }
},
// 鏌ヨ
search() {
@@ -1046,7 +959,8 @@
this.dialogForm.planqty = obj.planqty
this.dialogForm.reportqty = obj.reportqty
this.dialogForm.noreportqty = obj.noreportqty
- this.dialogForm.startqty = obj.startqty
+ // this.dialogForm.startqty = obj.startqty
+ this.dialogForm.startqty = obj.noreportqty
})
await this.getMesOrderStepStartSelectEqp()
@@ -1072,15 +986,18 @@
this.dialogForm.reportqty = obj.reportqty
this.dialogForm.noputqty = obj.noputqty
this.dialogForm.noreportqty = obj.noreportqty
- this.dialogForm.startqty = obj.startqty
+ // this.dialogForm.startqty = obj.startqty
+ this.dialogForm.startqty = obj.noreportqty
if (obj.nextstepname === null || obj.nextstepcode === '') {
this.dialogForm.nextstepname = obj.stepname
+ this.dialogForm.nextstepcode = obj.stepcode
} else {
this.dialogForm.nextstepname = obj.nextstepname
+ this.dialogForm.nextstepcode = obj.nextstepcode
}
- this.dialogForm.startqtySum = obj.startqty
+ this.dialogForm.startqtySum = obj.noreportqty
})
await this.getMesOrderStepStartSelectEqp()
@@ -1139,8 +1056,10 @@
this.dialogForm.stepcode = obj.stepcode
if (obj.nextstepname === null || obj.nextstepcode === '') {
this.dialogForm.nextstepname = obj.stepname
+ this.dialogForm.nextstepcode = obj.stepcode
} else {
this.dialogForm.nextstepname = obj.nextstepname
+ this.dialogForm.nextstepcode = obj.nextstepcode
}
this.dialogForm.noputqty = obj.noputqty
this.dialogForm.stepseq = obj.seq
@@ -1431,7 +1350,8 @@
partname: this.dialogForm.partname, // 浜у搧鍚嶇О
next_stepname: this.dialogForm.nextstepname, // 涓嬮亾宸ュ簭
qty: this.dialogForm.startqty, // 鏁伴噺
- qrcode: this.form.orderstepqrcode// 浜岀淮鐮�
+ // qrcode: this.form.orderstepqrcode// 浜岀淮鐮�
+ qrcode: this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode // 浜岀淮鐮�
}
]
}
@@ -1454,7 +1374,8 @@
partname: this.dialogForm.partname, // 浜у搧鍚嶇О
next_stepname: this.dialogForm.nextstepname, // 涓嬮亾宸ュ簭
qty: this.dialogForm.sqty, // 鏁伴噺
- qrcode: this.WXform.orderstepqrcode// 浜岀淮鐮�
+ // qrcode: this.WXform.orderstepqrcode// 浜岀淮鐮�
+ qrcode: this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode// 浜岀淮鐮�
}
]
}
--
Gitblit v1.9.3