| | |
| | | id |
| | | }) |
| | | } |
| | | |
| | | // 取消-状态 |
| | | export function stateCancel(id) { |
| | | return request({ |
| | | url: `/api-wms/v1/operation/cancel/${id}`, |
| | | method: "put", |
| | | id |
| | | }) |
| | | } |
| | | // 获取位置列表 |
| | | export function getLocationList(data) { |
| | | return request({ |
| | |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 获取物流公司信息 |
| | | export const getLogisticCompanyList = (data) => { |
| | | return request({ |
| | | url: "/api-wms/v1/operation/getLogisticCompanyList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | |
| | | <div v-if="showButton" style="margin-left: 30px"> |
| | | <el-button v-if="isValidateClick" plain size="mini" @click="validateClick">验证</el-button> |
| | | <el-button v-if="showOther" plain size="mini" @click="delClick" :disabled="isDelClick">删除</el-button> |
| | | <el-button v-if="showCancel" plain size="mini" @click="btnCancel">取消</el-button> |
| | | <el-button v-if="showOther" plain size="mini" disabled>打印</el-button> |
| | | </div> |
| | | <div class="arrowsBox"> |
| | |
| | | showOther: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | showCancel: { |
| | | type: Boolean, |
| | | default:false |
| | | }, |
| | | }, |
| | | data() { |
| | | return {} |
| | |
| | | // 删除 |
| | | delClick() { |
| | | this.$emit("delClick") |
| | | }, |
| | | // 取消 |
| | | btnCancel(){ |
| | | this.$emit("btnCancel") |
| | | } |
| | | } |
| | | } |
| | |
| | | :isValidateClick="isValidateClick" |
| | | :isDelClick="isDelClick" |
| | | :list="list" |
| | | :showCancel="showCancel" |
| | | @delClick="delClick" |
| | | @validateClick="validateClick" |
| | | @btnCancel="btnCancel" |
| | | /> |
| | | </div> |
| | | <div class="basic-info"> |
| | |
| | | addOperation, |
| | | updateOperation, |
| | | updateStatus, |
| | | stateCancel, |
| | | deleteOperation, |
| | | getListTransfer, |
| | | getLogisticCompanyList |
| | |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 } |
| | | { label: "完成", status: "todo", value: 4 }, |
| | | { label: "已取消", status: "todo", value: 5 } |
| | | ], |
| | | showButton: true, |
| | | activeName: "first", |
| | |
| | | waybillNumber:'', |
| | | weight:0, |
| | | logisticWeight:0, |
| | | } |
| | | }, |
| | | showCancel:false, // 取消是否可以显示 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.showFooter = false |
| | | if (this.editConfig.infomation.status === "完成") { |
| | | this.isValidateClick = false |
| | | } else { |
| | | }else if(this.editConfig.infomation.status === 3){ |
| | | this.isValidateClick = true |
| | | this.showCancel=true |
| | | }else{ |
| | | this.isValidateClick = true |
| | | |
| | | } |
| | | } else if (this.editConfig.infomation.status === 4 || this.editConfig.infomation.status === "完成") { |
| | | this.showButton = true |
| | |
| | | this.showEdit = true |
| | | this.showFooter = false |
| | | this.isValidateClick = true |
| | | this.showCancel=true |
| | | } |
| | | if (this.editConfig.title === "新建") { |
| | | this.list[0].status = "active" |
| | |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 取消 |
| | | btnCancel(){ |
| | | this.$confirm('确定取消吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | stateCancel(this.editConfig.infomation.id).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("取消调拨") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | this.list.map((item) => { |
| | | if (item.label==="已取消") { |
| | | item.status = "active" |
| | | } else { |
| | | item.status = "todo" |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | }); |
| | | } |
| | | } |
| | | } |