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

修改了部分接口

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