Commit 50bb07b0 authored by 沈翠玲's avatar 沈翠玲

修改了部分接口

parent e6e671d4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "mes-pad", "name" : "mes-pad",
"appid" : "__UNI__EFAA56F", "appid" : "__UNI__EFAA56F",
"description" : "MES-PAD", "description" : "MES-PAD",
"versionName" : "1.0.3", "versionName" : "1.0.4",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
......
...@@ -235,16 +235,17 @@ ...@@ -235,16 +235,17 @@
</template> </template>
<template slot="peration" slot-scope="scope"> <template slot="peration" slot-scope="scope">
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-button v-if="Number(scope.row.packageNum) > Number(scope.row.feedbackQuantity)"
@tap="handleSubmitPackageFeedback(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini">
打印/报工
</u-button>
<u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0" <u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0"
@tap="rePackageInfoPrint(feedback, scope.row, i)" type="success" @tap="rePackageInfoPrint(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini"> style="margin-left: 20rpx" size="mini">
补打印 补打印
</u-button> </u-button>
<u-button v-else-if="Number(scope.row.packageNum) > Number(scope.row.feedbackQuantity)"
@tap="handleSubmitPackageFeedback(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini">
打印/报工
</u-button>
<!-- <u-input v-model="scope.row.reportQuantity" type="number"></u-input> --> <!-- <u-input v-model="scope.row.reportQuantity" type="number"></u-input> -->
</template> </template>
</zb-table> </zb-table>
...@@ -263,7 +264,12 @@ ...@@ -263,7 +264,12 @@
</template> </template>
<template slot="peration" slot-scope="scope"> <template slot="peration" slot-scope="scope">
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-button @tap="handleSubmitPackageFeedback(feedback, scope.row, i)" type="success" <u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0"
@tap="rePackageInfoPrint(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini">
补打印
</u-button>
<u-button v-else @tap="handleSubmitPackageFeedback(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini">打印/报工</u-button> style="margin-left: 20rpx" size="mini">打印/报工</u-button>
<!-- <u-input v-model="scope.row.reportQuantity" type="number"></u-input> --> <!-- <u-input v-model="scope.row.reportQuantity" type="number"></u-input> -->
</template> </template>
...@@ -283,7 +289,12 @@ ...@@ -283,7 +289,12 @@
</template> </template>
<template slot="peration" slot-scope="scope"> <template slot="peration" slot-scope="scope">
<!-- {{ scope.row }} --> <!-- {{ scope.row }} -->
<u-button @tap="handleSubmitPackageFeedback(feedback, scope.row, i)" type="success" <u-button v-if="scope.row.feedbackQuantity && Number(scope.row.feedbackQuantity) > 0"
@tap="rePackageInfoPrint(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini">
补打印
</u-button>
<u-button v-else @tap="handleSubmitPackageFeedback(feedback, scope.row, i)" type="success"
style="margin-left: 20rpx" size="mini">打印/报工</u-button> style="margin-left: 20rpx" size="mini">打印/报工</u-button>
</template> </template>
</zb-table> </zb-table>
...@@ -2391,40 +2402,49 @@ export default { ...@@ -2391,40 +2402,49 @@ export default {
}); });
}, },
rePackageInfoPrint(item, row, i){ rePackageInfoPrint(item, row, i){
if (!item.printTemplate) { uni.showModal({
return this.$u.toast('请选择打印模版') title: '系统提示',
} content: '是否确认补打?',
if (item.printTemplate && !this.vuex_printConnect) { success: (res) => {
this.$u.toast('打印机连接失败'); if (res.confirm) {
return; if (!item.printTemplate) {
} return this.$u.toast('请选择打印模版')
item.feedbackTime = this.parseTime(new Date())
this.$u.api
.rePackageInfoPrint({
workorderId: item.workorderId,
qrcode: row.qrcode,
})
.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();
} }
}); if (item.printTemplate && !this.vuex_printConnect) {
this.$u.toast('打印机连接失败');
return;
}
item.feedbackTime = this.parseTime(new Date())
this.$u.api
.rePackageInfoPrint({
workorderId: item.workorderId,
qrcode: row.qrcode,
})
.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) {
...@@ -2565,8 +2585,7 @@ export default { ...@@ -2565,8 +2585,7 @@ export default {
this.$u.toast('打印机连接失败'); this.$u.toast('打印机连接失败');
return; return;
} }
this.$u.api const par = {
.feedback({
//工单 //工单
taskWorkunitId: item.taskWorkunitId, taskWorkunitId: item.taskWorkunitId,
taskId: item.taskId, taskId: item.taskId,
...@@ -2581,7 +2600,6 @@ export default { ...@@ -2581,7 +2600,6 @@ export default {
processId: item.processId, processId: item.processId,
processCode: item.processCode, processCode: item.processCode,
processName: item.processName, processName: item.processName,
closeType: item.taskType === 3 ? item.closeType : null,
itemId: item.itemId, itemId: item.itemId,
itemCode: item.itemCode, itemCode: item.itemCode,
itemName: item.itemName, itemName: item.itemName,
...@@ -2596,7 +2614,12 @@ export default { ...@@ -2596,7 +2614,12 @@ export default {
feedbackTime: item.feedbackTime, feedbackTime: item.feedbackTime,
minPackageNum: item.minPackageNum, minPackageNum: item.minPackageNum,
printContents: item.whether == '1' ? item.printContents : null printContents: item.whether == '1' ? item.printContents : null
}) }
if (item.taskType === 3) {
par.closeType = item.closeType
}
this.$u.api
.feedback(par)
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.proVisible = false; this.proVisible = false;
......
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