| | |
| | | <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> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item prop="companyName"> |
| | | <span slot="label">{{ workType === 1 ? "供应商" : workType === 2 ? "客户" : "联系人" }}</span> |
| | | |
| | | <el-select |
| | | v-if="workType === 1" |
| | | v-model="editConfig.infomation.companyName" |
| | | placeholder="请选择" |
| | | size="mini" |
| | |
| | | @change="companyChange" |
| | | > |
| | | <el-option |
| | | v-for="item in supplierOptions" |
| | | :key="item.SupplierId" |
| | | :label="item.SupplierName" |
| | | :value="{ value: item.SupplierId, label: item.SupplierName }" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-select |
| | | v-else-if="workType === 2" |
| | | v-model="editConfig.infomation.companyName" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 90%" |
| | | :disabled="!showFooter" |
| | | @change="companyChange" |
| | | > |
| | | <el-option |
| | | v-for="item in clientOptions" |
| | | :key="item.ClientId" |
| | | :label="item.ClientName" |
| | | :value="{ value: item.ClientId, label: item.ClientName }" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-select |
| | | v-else |
| | | v-model="editConfig.infomation.companyName" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 90%" |
| | | :disabled="!showFooter" |
| | | @change="companyChange" |
| | | > |
| | | <el-option |
| | | v-for="item in companyOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12"> |
| | |
| | | stateCancel, |
| | | deleteOperation, |
| | | getListTransfer, |
| | | getLogisticCompanyList |
| | | getLogisticCompanyList, |
| | | printReceipts |
| | | } from "@/api/overview/overview" |
| | | import { getCompanyList } from "@/api/common/other" |
| | | import { getSupplierList,getCompanyList,getClientList } from "@/api/common/other" |
| | | export default { |
| | | name: "AddOverviewDialog", |
| | | props: { |
| | |
| | | operationTypeId: [{ required: true, message: "请选择入库类型", trigger: "change" }] |
| | | }, |
| | | companyOptions: [], // 公司 |
| | | supplierOptions:[],//供应商 |
| | | clientOptions:[],//客户 |
| | | memberOptions: [{ id: 1, name: "管理员" }], |
| | | toLocationOptions: [], // 源位置 仓库位置 |
| | | showButton: true, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getCompanyList() |
| | | this.setStatusList() |
| | | this.setTableForm() |
| | | this.setBottonView() |
| | | this.setDetailTableForm() |
| | | this.getCompanyList() |
| | | this.getLocationList() |
| | | this.receiptType = this.editConfig.title === "查看" ? this.editConfig.infomation.operationTypeName : this.addName |
| | | if (this.showOperationType) { |
| | |
| | | }, |
| | | // 获取公司列表 |
| | | async getCompanyList() { |
| | | await getCompanyList().then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.companyOptions = res.data |
| | | } |
| | | }) |
| | | if(this.workType === 1){ |
| | | await getSupplierList().then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.supplierOptions = res.data |
| | | } |
| | | }) |
| | | }else if(this.workType === 2){ |
| | | await getClientList().then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.clientOptions = res.data |
| | | } |
| | | }) |
| | | }else{ |
| | | await getCompanyList().then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.companyOptions = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 获取仓库位置列表 |
| | | async getLocationList() { |
| | |
| | | }) |
| | | }).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; |
| | | } |
| | | } |