| | |
| | | <div slot="title" class="dialog-header"> |
| | | <span>{{ editCommonConfig.title === "查看" ? editCommonConfig.title : editCommonConfig.title + addName }}</span> |
| | | <div class="header_btns"> |
| | | <span class="btn"> |
| | | <span class="btn" @click="btnPrint"> |
| | | <i class="el-icon-printer"></i> |
| | | <span>打印</span> |
| | | </span> |
| | |
| | | <i class="el-icon-s-tools"></i> |
| | | <span>动作</span> |
| | | </span> |
| | | <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | <el-button v-if="showEdit" :disabled="this.editConfig.infomation.status===5" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- 内容 --> |
| | |
| | | :showButton="showButton" |
| | | :isValidateClick="isValidateClick" |
| | | :isDelClick="isDelClick" |
| | | :isCancel="isCancel" |
| | | :list="list" |
| | | :showCancel="showCancel" |
| | | @delClick="delClick" |
| | |
| | | stateCancel, |
| | | deleteOperation, |
| | | getListTransfer, |
| | | getLogisticCompanyList |
| | | getLogisticCompanyList, |
| | | printReceipts |
| | | } from "@/api/overview/overview" |
| | | import { getCompanyList } from "@/api/common/other" |
| | | export default { |
| | |
| | | companyOptions: [], // 公司 |
| | | memberOptions: [{ id: 1, name: "管理员" }], |
| | | toLocationOptions: [], // 源位置 仓库位置 |
| | | list: [ |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 }, |
| | | { label: "已取消", status: "todo", value: 5 } |
| | | ], |
| | | showButton: true, |
| | | activeName: "first", |
| | | productTableList: {}, |
| | |
| | | isNoProduct: true, // 添加明细行时是否有产品未选择 |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | isDelClick: false, // 删除按钮是否可点击 |
| | | isCancel:false, //验证按钮是否可点击 |
| | | showFooter: false, // 是否显示取消保存 |
| | | currentState: "todo", // 当前状态 |
| | | detailTableList: {}, |
| | |
| | | logisticWeight:0, |
| | | }, |
| | | showCancel:false, // 取消是否可以显示 |
| | | list:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.setStatusList() |
| | | this.setTableForm() |
| | | this.setBottonView() |
| | | this.setDetailTableForm() |
| | |
| | | this.getLogisticCompanyList() |
| | | }, |
| | | methods: { |
| | | setStatusList(){ |
| | | if(this.editConfig.infomation.status===5){ |
| | | this.list=[ |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 }, |
| | | { label: "已取消", status: "todo", value: 5 } |
| | | ] |
| | | }else{ |
| | | console.log(this.editConfig.infomation.status,"藕片") |
| | | this.list=[ |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 } |
| | | ] |
| | | } |
| | | }, |
| | | // 获取公司列表 |
| | | async getCompanyList() { |
| | | await getCompanyList().then((res) => { |
| | |
| | | }else if(this.editConfig.infomation.status === 3){ |
| | | this.isValidateClick = true |
| | | this.showCancel=true |
| | | }else if(this.editConfig.infomation.status===5){ |
| | | this.isCancel=true |
| | | this.isValidateClick=true |
| | | }else{ |
| | | this.isValidateClick = true |
| | | |
| | | } |
| | | } else if (this.editConfig.infomation.status === 4 || this.editConfig.infomation.status === "完成") { |
| | | this.showButton = true |
| | |
| | | this.showFooter = false |
| | | this.isValidateClick = false |
| | | } else if (this.editConfig.infomation.status === 5) { |
| | | this.isCancel=true |
| | | this.showButton = true |
| | | this.showEdit = false |
| | | this.showFooter = false |
| | |
| | | }) |
| | | }).catch(() => { |
| | | }); |
| | | }, |
| | | //打印 |
| | | async btnPrint(){ |
| | | await printReceipts(this.editCommonConfig.infomation.id).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.$message.success("打印成功") |
| | | const link = document.createElement('a'); |
| | | link.href = res.data; |
| | | link.download = '出库单.xlsx'; |
| | | link.click(); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | margin-left: auto; |
| | | margin-right: 60px; |
| | | .btn { |
| | | cursor: pointer; |
| | | } |
| | | .btn:nth-of-type(2){ |
| | | cursor: no-drop; |
| | | } |
| | | } |