全栈: 接收任务写入remark — 后端receive接口+Body参数+前端接收弹窗备注输入
This commit is contained in:
@ -224,6 +224,7 @@
|
||||
<text class="popup-title">确认接收任务</text>
|
||||
<view class="popup-task">{{ actionPopup.task && actionPopup.task.task_name }}</view>
|
||||
<text class="popup-hint">状态: {{ statusLabel(actionPopup.task && actionPopup.task.status) }} → 进行中</text>
|
||||
<textarea v-model="receiveRemark" class="popup-textarea" placeholder="接收备注(选填)" :maxlength="500" />
|
||||
<view class="popup-btns">
|
||||
<button class="btn-cancel" @tap="closeActionPopup">取消</button>
|
||||
<button class="btn-primary" :disabled="actionLoading" @tap="doReceive">确认接收</button>
|
||||
@ -357,6 +358,7 @@ export default {
|
||||
actionPopup: { visible: false, type: "", task: null },
|
||||
actionLoading: false,
|
||||
rejectReason: "",
|
||||
receiveRemark: "",
|
||||
transferForm: { branches: [{ task_name: "", assignee_id: "" }], note: "" },
|
||||
};
|
||||
},
|
||||
@ -682,6 +684,7 @@ export default {
|
||||
|
||||
this.actionPopup = { visible: true, type, task };
|
||||
this.rejectReason = "";
|
||||
this.receiveRemark = "";
|
||||
this.transferForm = { branches: [{ task_name: "", assignee_id: "" }], note: "" };
|
||||
},
|
||||
handleViewRecords(task) {
|
||||
@ -692,7 +695,8 @@ export default {
|
||||
async doReceive() {
|
||||
this.actionLoading = true;
|
||||
try {
|
||||
await post(`/tasks/${this.actionPopup.task.id}/receive`);
|
||||
const remark = this.receiveRemark.trim() || undefined;
|
||||
await post(`/tasks/${this.actionPopup.task.id}/receive`, { remark });
|
||||
uni.showToast({ title: "已接收", icon: "success" });
|
||||
this.closeActionPopup();
|
||||
this.doQuery(this.product.serial_number);
|
||||
|
||||
Reference in New Issue
Block a user