Commit 51770141 authored by 沈翠玲's avatar 沈翠玲

解决A类问题

parent 24e447c0
...@@ -101,6 +101,12 @@ const install = (Vue, vm) => { ...@@ -101,6 +101,12 @@ const install = (Vue, vm) => {
config.adminPath + '/mobile/pro/protask/feedBackPackage', config.adminPath + '/mobile/pro/protask/feedBackPackage',
params params
), ),
//装箱打印
blPackagePrintInfo: (params = {}) =>
vm.$u.post(
config.adminPath + '/pro/packagePrintRecord/blPackagePrintInfo',
params
),
//生产报工补打印 //生产报工补打印
rePackageInfoPrint: (params = {}) => rePackageInfoPrint: (params = {}) =>
vm.$u.postJson( vm.$u.postJson(
......
...@@ -134,9 +134,10 @@ ...@@ -134,9 +134,10 @@
{{ feedback.reportQualify }} {{ feedback.reportQualify }}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col :span="4" >
<u-form-item label="报工人:" prop="nickName"> <u-form-item label="报工人:" prop="nickName">
{{ feedback.nickName }} <u-input v-model="feedback.nickName"></u-input>
<u-button @tap="getCode(feedback)" type="success" size="mini">报工人员</u-button>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
...@@ -233,10 +234,19 @@ ...@@ -233,10 +234,19 @@
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-input v-model="scope.row.netWeight" type="number"></u-input> <u-input v-model="scope.row.netWeight" type="number"></u-input>
</template> </template>
<template slot="grossWeight" slot-scope="scope">
<!-- {{ scope.row }} -->
<u-input v-model="scope.row.grossWeight" type="number"></u-input>
</template>
<template slot="packageStandard" slot-scope="scope">
<!-- {{ scope.row }} -->
<uni-easyinput type="text" suffixIcon="scan" v-model="scope.row.packageStandard" style="width: 100%"
@iconClick="() => iconPackageStandard(scope.row)" placeholder="请输入装箱规格" />
</template>
<template slot="peration" slot-scope="scope"> <template slot="peration" slot-scope="scope">
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-button v-if="scope.row.isEncase" @tap="handleBlPackagePrintInfo(feedback, scope.row, i)" class="successBtn" style="margin-left: 20rpx">打印</u-button>
<u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0" <u-button v-else-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0"
@tap="rePackageInfoPrint(feedback, scope.row, i)" class="successBtn" @tap="rePackageInfoPrint(feedback, scope.row, i)" class="successBtn"
style="margin-left: 20rpx"> style="margin-left: 20rpx">
补打印 补打印
...@@ -262,9 +272,19 @@ ...@@ -262,9 +272,19 @@
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-input v-model="scope.row.netWeight" type="number"></u-input> <u-input v-model="scope.row.netWeight" type="number"></u-input>
</template> </template>
<template slot="grossWeight" slot-scope="scope">
<!-- {{ scope.row }} -->
<u-input v-model="scope.row.grossWeight" type="number"></u-input>
</template>
<template slot="packageStandard" slot-scope="scope">
<!-- {{ scope.row }} -->
<uni-easyinput type="text" suffixIcon="scan" v-model="scope.row.packageStandard" style="width: 100%"
@iconClick="() => iconPackageStandard(scope.row)" placeholder="请输入装箱规格" />
</template>
<template slot="peration" slot-scope="scope"> <template slot="peration" slot-scope="scope">
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0" <u-button v-if="scope.row.isEncase" @tap="handleBlPackagePrintInfo(feedback, scope.row, i)" class="successBtn" style="margin-left: 20rpx">打印</u-button>
<u-button v-else-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0"
@tap="rePackageInfoPrint(feedback, scope.row, i)" @tap="rePackageInfoPrint(feedback, scope.row, i)"
style="margin-left: 20rpx" class="successBtn"> style="margin-left: 20rpx" class="successBtn">
补打印 补打印
...@@ -287,9 +307,19 @@ ...@@ -287,9 +307,19 @@
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-input v-model="scope.row.netWeight" type="number"></u-input> <u-input v-model="scope.row.netWeight" type="number"></u-input>
</template> </template>
<template slot="grossWeight" slot-scope="scope">
<!-- {{ scope.row }} -->
<u-input v-model="scope.row.grossWeight" type="number"></u-input>
</template>
<template slot="packageStandard" slot-scope="scope">
<!-- {{ scope.row }} -->
<uni-easyinput type="text" suffixIcon="scan" v-model="scope.row.packageStandard" style="width: 100%"
@iconClick="() => iconPackageStandard(scope.row)" placeholder="请输入装箱规格" />
</template>
<template slot="peration" slot-scope="scope"> <template slot="peration" slot-scope="scope">
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0" <u-button v-if="scope.row.isEncase" @tap="handleBlPackagePrintInfo(feedback, scope.row, i)" class="successBtn" style="margin-left: 20rpx">打印</u-button>
<u-button v-else-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0"
@tap="rePackageInfoPrint(feedback, scope.row, i)" @tap="rePackageInfoPrint(feedback, scope.row, i)"
style="margin-left: 20rpx" class="successBtn"> style="margin-left: 20rpx" class="successBtn">
补打印 补打印
...@@ -997,12 +1027,12 @@ export default { ...@@ -997,12 +1027,12 @@ export default {
{ {
name: 'feedbackQuantity', name: 'feedbackQuantity',
label: '已包装数量', label: '已包装数量',
width: 170 width: 150
}, },
{ {
name: 'reportQuantity', name: 'reportQuantity',
label: '本次报工', label: '本次报工',
width: 120, width: 100,
type: 'slot', type: 'slot',
slot: 'reportQuantity' slot: 'reportQuantity'
}, },
...@@ -1013,6 +1043,20 @@ export default { ...@@ -1013,6 +1043,20 @@ export default {
type: 'slot', type: 'slot',
slot: 'netWeight' slot: 'netWeight'
}, },
{
name: 'grossWeight',
label: '毛重',
width: 100,
type: 'slot',
slot: 'grossWeight'
},
{
name: 'packageStandard',
label: '装箱规格',
width: 120,
type: 'slot',
slot: 'packageStandard'
},
{ {
name: 'peration', name: 'peration',
label: '操作', label: '操作',
...@@ -1050,17 +1094,31 @@ export default { ...@@ -1050,17 +1094,31 @@ export default {
{ {
name: 'reportQuantity', name: 'reportQuantity',
label: '本次报工', label: '本次报工',
width: 120, width: 100,
type: 'slot', type: 'slot',
slot: 'reportQuantity' slot: 'reportQuantity'
}, },
{ {
name: 'netWeight', name: 'netWeight',
label: '净重', label: '净重',
width: 130, width: 100,
type: 'slot', type: 'slot',
slot: 'netWeight' slot: 'netWeight'
}, },
{
name: 'grossWeight',
label: '毛重',
width: 100,
type: 'slot',
slot: 'grossWeight'
},
{
name: 'packageStandard',
label: '装箱规格',
width: 130,
type: 'slot',
slot: 'packageStandard'
},
{ {
name: 'peration', name: 'peration',
label: '操作', label: '操作',
...@@ -1665,6 +1723,23 @@ export default { ...@@ -1665,6 +1723,23 @@ export default {
// e.stopPropagation() // e.stopPropagation()
// } // }
// }, // },
iconPackageStandard(row) {
uni.scanCode({
success: (res) => {
// console.log(res, 'res');
if (res.result.indexOf('-') > -1){
const [packageStandard, boxWeight] = res.result.split('-')
row.packageStandard = packageStandard
row.boxWeight = boxWeight
} else {
this.$u.toast('扫码失败,请重新扫描');
}
},
fail: () => {
this.$u.toast('扫码失败,请重新扫描');
}
});
},
iconClickArrangeCode() { iconClickArrangeCode() {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
...@@ -2449,7 +2524,7 @@ export default { ...@@ -2449,7 +2524,7 @@ export default {
{ {
name: 'reportQuantity', name: 'reportQuantity',
label: '本次报工', label: '本次报工',
width: 120, width: 100,
type: 'slot', type: 'slot',
slot: 'reportQuantity' slot: 'reportQuantity'
}, },
...@@ -2460,6 +2535,20 @@ export default { ...@@ -2460,6 +2535,20 @@ export default {
type: 'slot', type: 'slot',
slot: 'netWeight' slot: 'netWeight'
}, },
{
name: 'grossWeight',
label: '毛重',
width: 100,
type: 'slot',
slot: 'grossWeight'
},
{
name: 'packageStandard',
label: '装箱规格',
width: 120,
type: 'slot',
slot: 'packageStandard'
},
{ {
name: 'peration', name: 'peration',
label: '操作', label: '操作',
...@@ -2631,6 +2720,57 @@ export default { ...@@ -2631,6 +2720,57 @@ export default {
}) })
}, },
handleBlPackagePrintInfo(item, row, i) {
if (item.printTemplate && !this.vuex_printConnect) {
this.$u.toast('打印机连接失败');
return;
}
item.feedbackTime = this.parseTime(new Date())
this.$u.api
.blPackagePrintInfo({
taskWorkunitId: item.taskWorkunitId,
checkBy: item.checkBy,
encasementNum: item.encasementNum,
mergePack: item.mergePack,
packNum: item.packNum,
printTemplate: item.printTemplate,
quantityUnqualify: item.quantityUnqualify,
taskId: item.taskId,
userName: item.userName,
feedbackTime: item.feedbackTime,
workorderId: item.workorderId,
'reportData.grossWeight': row.grossWeight,
'reportData.packageStandard': row.packageStandard,
'reportData.boxWeight': row.boxWeight,
'reportData.netWeight': row.netWeight,
'reportData.reportQuantity': row.reportQuantity,
'reportData.packageNum': row.packageNum,
'reportData.qrcode': row.qrcode,
'reportData.workorderSoDirectiveId': row.workorderSoDirectiveId,
'reportData.workorderSoSizeItemId': row.workorderSoSizeItemId
})
.then((res) => {
if (res.code === 200) {
// this.proVisible = false;
item.quantityUnqualify = 0;
this.$u.toast('上报成功');
this.getWorkorderDirectiveList(item, i)
if (item.printTemplate) {
let params = {};
res.data.forEach((datas) => {
params = {
reportName: 'mysql:' + item.printTemplate,
values: {
packagePrint: datas
}
};
this.printPdfSocket(params);
});
}
this.getTaskList();
}
});
},
handleSubmitPackageFeedback(item, row, i) { handleSubmitPackageFeedback(item, row, i) {
if (item.printTemplate && !this.vuex_printConnect) { if (item.printTemplate && !this.vuex_printConnect) {
this.$u.toast('打印机连接失败'); this.$u.toast('打印机连接失败');
...@@ -2647,6 +2787,7 @@ export default { ...@@ -2647,6 +2787,7 @@ export default {
printTemplate: item.printTemplate, printTemplate: item.printTemplate,
quantityUnqualify: item.quantityUnqualify, quantityUnqualify: item.quantityUnqualify,
taskId: item.taskId, taskId: item.taskId,
userName: item.userName,
feedbackTime: item.feedbackTime, feedbackTime: item.feedbackTime,
workorderId: item.workorderId, workorderId: item.workorderId,
'reportData.netWeight': row.netWeight, 'reportData.netWeight': row.netWeight,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment