| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12" class="line_height_30px"> |
| | | <el-form-item |
| | | label="仓库" |
| | | prop="warehouseId"> |
| | | <el-select |
| | | @change="selWarehouse" |
| | | v-model="editConfig.infomation.warehouseId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width:90%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="warehouse.name" :value="warehouse.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" class="line_height_30px"> |
| | | <el-form-item label="位置名称" prop="name"> |
| | | <el-input |
| | | :disabled="!showFooter" |
| | |
| | | <script> |
| | | import { addLocation, updateLocation, deleteLocation } from "@/api/warehouseManage/warehouse" |
| | | import { getDataByType } from "@/api/data" |
| | | import {getWarehouseList} from '@/api/warehouseManage/warehouse.js' |
| | | import {getLocationList} from "@/api/overview/overview"; |
| | | export default { |
| | | name: "AddScrapDialog", |
| | | props: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | positionList: { |
| | | /* positionList: { |
| | | type: [Array] |
| | | } |
| | | }*/ |
| | | }, |
| | | components: {}, |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | positionList:[], |
| | | warehouseList:[], |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | warehouseId:[{ required: true, message: "请输选择仓库", trigger: "change" }], |
| | | name: [{ required: true, message: "请输入", trigger: "change" }], |
| | | // parentId: [{ required: true, message: "请选择位置类型", trigger: "change" }], |
| | | type: [{ required: true, message: "请选择上级位置", trigger: "change" }], |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.editConfig.infomation) |
| | | this.setBottonView() |
| | | this.queryWareHouse(); |
| | | this.queryLocationList(); |
| | | }, |
| | | methods: { |
| | | async queryWareHouse(){ |
| | | const {code,data}=await getWarehouseList({page:0,pageSize:0,keyword: ""}); |
| | | if(code===200){ |
| | | this.warehouseList=data; |
| | | } |
| | | }, |
| | | queryLocationList(val){ |
| | | getLocationList({ |
| | | warehouseId:val, |
| | | type:3, |
| | | keyWord: "", |
| | | page: 0, |
| | | pageSize: 0, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.positionList=res.data; |
| | | } |
| | | }); |
| | | }, |
| | | selWarehouse(val){ |
| | | this.queryLocationList(val); |
| | | }, |
| | | validatorNum(rule, value, callback) { |
| | | if (value) { |
| | | if (value == undefined || value == null) { |
| | |
| | | }, |
| | | saveParams() { |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)) |
| | | |
| | | let params = { |
| | | name: data.name, |
| | | parentId: data.parentId, |
| | |
| | | countFrequency: data.countFrequency ? Number(data.countFrequency) : 0, |
| | | recentlyCount: data.recentlyCount, |
| | | nextCount: data.nextCount, |
| | | notes: data.notes |
| | | } |
| | | notes: data.notes, |
| | | warehouseId:data.warehouseId |
| | | }; |
| | | if (data.id) { |
| | | params.id = data.id |
| | | params.jointName = data.jointName |