From c3eb6c900630ba847c5bd55ff0b8657b8d1ed1ea Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 24 五月 2023 17:24:01 +0800
Subject: [PATCH] 1.新增补打生产条码功能(还没全实现)2.生产开报工页面末道工序打印入库条码
---
src/views/produceManager/produceStartOrder.vue | 86 +++++++++++++++++++++++++++++++++++--------
1 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/src/views/produceManager/produceStartOrder.vue b/src/views/produceManager/produceStartOrder.vue
index 00e9c72..deb0418 100644
--- a/src/views/produceManager/produceStartOrder.vue
+++ b/src/views/produceManager/produceStartOrder.vue
@@ -1051,8 +1051,8 @@
<div
style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
>
- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</div>
+ <div style="width:60px;margin-left: 5px;">{{ qrForm.nextstepname?'涓嬮亾宸ュ簭':'浜у搧瑙勬牸' }}:</div>
+ <div>{{ qrForm.nextstepname?qrForm.nextstepname:qrForm.partspec?qrForm.partspec:'/' }}</div>
</div>
<div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
<div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>
@@ -1270,6 +1270,7 @@
import { handleDatetime2 } from '@/utils/global'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
+import { LabelBarCode } from '@/api/systemSettings'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -1307,8 +1308,8 @@
WXradioSelected: '', // 宸ュ簭閫変腑
form: {
orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
- prop: 'wo_code', // 鎺掑簭瀛楁
- order: 'asc', // 鎺掑簭瀛楁
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
page: 1, // 绗嚑椤�
rows: 20 // 姣忛〉澶氬皯鏉�
},
@@ -1316,8 +1317,8 @@
tableData: [],
WXform: { // 澶栧崗琛ㄥ崟
orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
- prop: 'wo_code', // 鎺掑簭瀛楁z
- order: 'asc', // 鎺掑簭瀛楁
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
page: 1, // 绗嚑椤�
rows: 20 // 姣忛〉澶氬皯鏉�
},
@@ -1340,6 +1341,7 @@
stepcode: '', // 宸ュ簭缂栫爜
stepname: '', // 褰撳墠宸ュ簭鍚�
nextstepname: '', // 涓嬩竴閬撳伐搴忓悕
+ nextstepcode: '', // 涓嬩竴閬撳伐搴忕紪鐮�
stepdesc: '', // 宸ュ簭鎻忚堪
planqty: '', // 浠诲姟鏁伴噺
reportqty: '', // 宸叉姤鏁伴噺
@@ -1368,7 +1370,9 @@
reckway: 'group', // 璁′欢鏂瑰紡
operation: getCookie('navTabId'), // 鎶ュ伐浜猴紙鏀舵枡浜猴級
- remarks: ''// 澶囨敞
+ remarks: '', // 澶囨敞
+
+ inbarcode: ''// 鏈亾宸ュ簭鏃� 鎵撳嵃鐨勫叆搴撶爜
},
ZZuserArr: [], // 鑷埗鐢ㄦ埛鎵�鏈�
@@ -1445,14 +1449,15 @@
wo_code: '',
partcode: '',
partname: '',
+ partspec: '',
nextstepname: '',
operator: '', // 鎿嶄綔浜�
operatorTime: ''// 鎿嶄綔鏃堕棿
},
badForm: {
orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜
- prop: 'wo_code',
- order: 'asc',
+ prop: 'lm_date',
+ order: 'desc',
page: 1,
rows: 20
},
@@ -1812,7 +1817,7 @@
this.dialogForm.startqty = obj.noreportqty
this.dialogForm.nextstepname = obj.nextstepname
- this.dialogForm.nextstepcode = obj.nextstepcode ? obj.nextstepcode : obj.stepcode
+ this.dialogForm.nextstepcode = obj.nextstepcode
this.dialogForm.startqtySum = obj.noreportqty
@@ -1875,7 +1880,7 @@
this.dialogForm.stepcode = obj.stepcode
this.dialogForm.nextstepname = obj.nextstepname
- this.dialogForm.nextstepcode = obj.nextstepcode ? obj.nextstepcode : obj.stepcode
+ this.dialogForm.nextstepcode = obj.nextstepcode
this.dialogForm.noputqty = obj.noputqty
this.dialogForm.stepseq = obj.seq
@@ -2104,6 +2109,8 @@
this.dialogForm.nextstepcode = '' // 涓嬮亾宸ュ簭缂栫爜
+ // this.dialogForm.inbarcode = '' // 鍏ュ簱鐮�
+
this.dialogForm.reckway = 'group'
this.dialogForm.remarks = '' // 澶囨敞
@@ -2119,7 +2126,7 @@
},
// 瀵硅瘽妗嗙‘璁�
dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
+ this.$refs.dialogForm.validate(async valid => {
if (valid) {
if (this.dialogTitle === '澶栧崗鍙戞枡') {
if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
@@ -2159,6 +2166,21 @@
}
}
+ this.dialogForm.inbarcode = ''
+ // 褰撲负鏈亾鐨勬椂鍊�
+ if (this.dialogForm.nextstepcode === '') {
+ const D = {
+ rightcode: '2064',
+ partcode: this.dialogForm.partcode,
+ qty: this.dialogForm.sqty,
+ onelabqty: this.dialogForm.sqty
+ }
+ const r = await LabelBarCode(D)
+ this.dialogForm.inbarcode = r.data[0].labcode
+
+ this.qrForm.partspec = this.dialogForm.partspec
+ }
+
const data = {
mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
@@ -2169,6 +2191,7 @@
taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
sqty: this.dialogForm.sqty, // 鏀舵枡鏁伴噺
remarks: this.dialogForm.remarks, // 澶囨敞
+ inbarcode: this.dialogForm.inbarcode, // 鐢熶骇鍏ュ簱鏉$爜
ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
}
@@ -2245,7 +2268,23 @@
// console.log(this.userTableData, 1)
// const reportuser = this.userTableData.map(item => item.usercode).join(';')// 涓昏鏀圭殑鏄繖閲岀殑鏍煎紡
- console.log(this.dialogForm.operation, 'dialogForm.operation')
+ // console.log(this.dialogForm.operation, 'dialogForm.operation')
+
+ this.dialogForm.inbarcode = ''
+ // 褰撲负鏈亾鐨勬椂鍊�
+ if (this.dialogForm.nextstepcode === '') {
+ const D = {
+ rightcode: '2064',
+ partcode: this.dialogForm.partcode,
+ qty: this.dialogForm.startqty,
+ onelabqty: this.dialogForm.startqty
+ }
+ const r = await LabelBarCode(D)
+ this.dialogForm.inbarcode = r.data[0].labcode
+
+ this.qrForm.partspec = this.dialogForm.partspec
+ }
+
const data = {
mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
@@ -2265,6 +2304,9 @@
reportqty: this.dialogForm.startqty, // 鎶ュ伐鏁伴噺
remarks: this.dialogForm.remarks, // 澶囨敞
reckway: this.dialogForm.reckway, // 璁′欢鏂瑰紡
+
+ inbarcode: this.dialogForm.inbarcode, // 鐢熶骇鍏ュ簱鏉$爜
+
ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
}
@@ -2272,11 +2314,13 @@
// console.log(JSON.stringify(data), 'data')
console.log(data, 'data')
this.$store.state.app.buttonIsDisabled = true
+
SavaMesOrderStepReport(data).then(res => {
if (res.code === '200') {
this.dialogVisible = false
this.$message.success('鎶ュ伐鎴愬姛锛�')
- // if (this.dialogForm.nextstepcode === '') {
+ // this.dialogForm.nextstepcode==='' //褰撲负绌虹殑鏃跺�� 浠h〃鏄湯閬撳伐搴�
+ // if (this.dialogForm.nextstepcode !== '') {
this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
this.dialogVisible2 = true
// }
@@ -2304,7 +2348,12 @@
})
},
ZZprint2(username) {
- this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+ if (this.dialogForm.nextstepcode !== '') {
+ this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+ } else {
+ this.qrForm.qrvalue = this.dialogForm.inbarcode
+ }
+
this.qrForm.startqty = this.dialogForm.startqty
this.qrForm.wo_code = this.dialogForm.wo_code
this.qrForm.partcode = this.dialogForm.partcode
@@ -2317,7 +2366,11 @@
})
},
WXprint2(username) {
- this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+ if (this.dialogForm.nextstepcode !== '') {
+ this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+ } else {
+ this.qrForm.qrvalue = this.dialogForm.inbarcode
+ }
this.qrForm.startqty = this.dialogForm.sqty
this.qrForm.wo_code = this.dialogForm.wo_code
this.qrForm.partcode = this.dialogForm.partcode
@@ -2335,6 +2388,7 @@
this.qrForm.wo_code = ''
this.qrForm.partcode = ''
this.qrForm.partname = ''
+ this.qrForm.partspec = ''
this.qrForm.nextstepname = ''
this.qrForm.operator = ''
this.qrForm.operatorTime = ''
--
Gitblit v1.9.3