| | |
| | | <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"> |
| | |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <!-- <el-tab-pane v-if="workType !== 1" label="详情" name="detail"> </el-tab-pane> --> |
| | | <el-tab-pane label="产品" name="first"> </el-tab-pane> |
| | | <el-tab-pane label="发货信息" name="two"></el-tab-pane> |
| | | <el-tab-pane label="物流信息" name="two" v-if="this.workType===2"></el-tab-pane> |
| | | </el-tabs> |
| | | <!-- 操作 --> |
| | | <div v-if="activeName === 'first'"> |
| | |
| | | </template> |
| | | </CommonFormTableView> |
| | | </div> |
| | | <!-- 发货信息 --> |
| | | <div v-if="activeName==='two'"> |
| | | <el-form label-position="left" label-width="80px" :model="shipmentsInfo"> |
| | | <el-form-item label="承运商" style="width: 50%;"> |
| | | <el-select :disabled="!showFooter" v-model="editConfig.infomation.logisticCompanyId" placeholder="请选择" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in shipmentsInfo.carrier" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="运单号" style="width: 50%;"> |
| | | <el-input :disabled="!showFooter" v-model="editConfig.infomation.waybillNumber"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="重量" style="width: 50%;"> |
| | | <el-input :disabled="!showFooter" v-model="editConfig.infomation.weight"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="物流重量" style="width: 50%;"> |
| | | <el-input :disabled="!showFooter" v-model="editConfig.infomation.logisticWeight"></el-input> |
| | | </el-form-item> |
| | | <!-- 物流信息 --> |
| | | <div v-if="activeName==='two'&&this.workType===2"> |
| | | <el-form |
| | | label-position="right" |
| | | :model="shipmentsInfo" |
| | | label-width="120px" |
| | | size="mini" |
| | | style="margin-top: 20px;" |
| | | > |
| | | <el-col :span="12"> |
| | | <el-form-item label="承运商" > |
| | | <el-select |
| | | size="mini" :disabled="!showFooter" v-model="editConfig.infomation.logisticCompanyId" placeholder="请选择" style="width: 90%;"> |
| | | <el-option |
| | | v-for="item in shipmentsInfo.carrier" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="运单号" > |
| | | <el-input style="width: 90%;" :disabled="!showFooter" v-model="editConfig.infomation.waybillNumber"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="收货人"> |
| | | <el-input style="width: 90%;" :disabled="!showFooter" v-model="editConfig.infomation.receiverName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系电话"> |
| | | <el-input style="width: 90%;" :disabled="!showFooter" v-model="editConfig.infomation.receiverPhone"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="收货地址"> |
| | | <el-input style="width: 90%;" :disabled="!showFooter" v-model="editConfig.infomation.receiverAddr"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="重量"> |
| | | <el-input style="width: 90%;" :disabled="!showFooter" v-model="editConfig.infomation.weight"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="物流重量"> |
| | | <el-input style="width: 90%;" :disabled="!showFooter" v-model="editConfig.infomation.logisticWeight"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <!-- 详情 --> |
| | |
| | | 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() { |
| | |
| | | weight:data.weight||0, |
| | | logisticWeight:data.logisticWeight||0, |
| | | logisticCompanyId:data.logisticCompanyId, |
| | | receiverAddr:data.receiverAddr||'', |
| | | receiverName:data.receiverName||'', |
| | | receiverPhone:data.receiverPhone||'' |
| | | } |
| | | return params |
| | | }, |