| | |
| | | :show-apply="false" |
| | | :placeholder="'请输入位置/产品'" |
| | | :amount-view="false" |
| | | :search-task-map="searchTaskMap" |
| | | :show-sreen="false" |
| | | :screen-array="screenArray" |
| | | @addCommonClick="addProductClick" |
| | | @searchClick="getList" |
| | | @discardBtnClick="discardBtnClick" |
| | | @delSelectClick="delSelectClick" |
| | | @switchKeywords="switchKeywords" |
| | | /> |
| | | </div> |
| | | <div class="content_wrap"> |
| | |
| | | data() { |
| | | return { |
| | | datas: [], |
| | | // datas: [{ |
| | | // label: '一级 1', |
| | | // children: [{ |
| | | // label: '二级 1-1', |
| | | // children: [{ |
| | | // label: '三级 1-1-1' |
| | | // }] |
| | | // }] |
| | | // }, { |
| | | // label: '一级 2', |
| | | // children: [{ |
| | | // label: '二级 2-1', |
| | | // children: [{ |
| | | // label: '三级 2-1-1' |
| | | // }] |
| | | // }, { |
| | | // label: '二级 2-2', |
| | | // children: [{ |
| | | // label: '三级 2-2-1' |
| | | // }] |
| | | // }] |
| | | // }, { |
| | | // label: '一级 3', |
| | | // children: [{ |
| | | // label: '二级 3-1', |
| | | // children: [{ |
| | | // label: '三级 3-1-1' |
| | | // }] |
| | | // }, { |
| | | // label: '二级 3-2', |
| | | // children: [{ |
| | | // label: '三级 3-2-1' |
| | | // }] |
| | | // }] |
| | | // }], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "jointName" |
| | |
| | | amount: 0, |
| | | operationId: 0, |
| | | minInventory: 0, |
| | | maxInventory: 0, |
| | | orderNumber: 0, |
| | | maxInventory: 1, |
| | | orderNumber: 1, |
| | | unit: "", |
| | | reorderId: 0 |
| | | reorderId: 0, |
| | | searchTaskMap: [], |
| | | type: "bh", |
| | | screenArray: [{ id: "0", type: "bh", title: "重新订购" }] |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.$route.params.productId) { |
| | | this.getData({ |
| | | productId: this.$route.params.productId, |
| | | pageSize: 15, |
| | | page: 1 |
| | | }) |
| | | }else if(this.$route.params.locationId){ |
| | | this.searchTaskMap=[] |
| | | this.getData({ |
| | | id: this.$route.params.locationId, |
| | | jointName:this.$route.params.locationName, |
| | | // type:"", |
| | | pageSize: 15, |
| | | page: 1 |
| | | }) |
| | | }else { |
| | | this.getData() |
| | | } |
| | | this.setTable() |
| | | this.getData() |
| | | this.searchTaskMap = [{ id: "0", type: this.type, title: "重新订购" }] |
| | | this.getLocationList() |
| | | }, |
| | | methods: { |
| | |
| | | async getData(data) { |
| | | await getReorderRuleList({ |
| | | locationId: data?.id, |
| | | type: "bh", |
| | | type: this.type, |
| | | keyWord: data?.jointName, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | pageSize: this.pagerOptions.pageSize, |
| | | productId: data?.productId |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | console.log(res) |
| | |
| | | }, |
| | | // 操作输入 |
| | | inputContent(val, prop, row) { |
| | | console.log(val, prop, row) |
| | | console.log(row) |
| | | if (prop === "minInventory") { |
| | | this.minInventory = val |
| | | if (parseFloat(this.minInventory) - parseFloat(this.prediction) > 0) { |
| | |
| | | }, |
| | | // 新增 |
| | | addProductClick() { |
| | | console.log(this.addTitle) |
| | | console.log(this.addTitle, "qqqqqqqqqqqq") |
| | | this.isSel() |
| | | if (this.isNoProduct && this.addTitle === "新建") { |
| | | this.$refs.tablelistRef.getProductList() |
| | |
| | | editable: false, |
| | | isOrder: true |
| | | }) |
| | | this.tableList.tableData = this.tableData |
| | | this.locationId = 0 |
| | | this.productId = 0 |
| | | } else { |
| | |
| | | this.showDiscard = false |
| | | let requestUrl = this.currentRowId === 0 ? addReorderRule : updateReorderRule |
| | | let params = this.saveParams() |
| | | requestUrl(params) |
| | | if(params.productId===0){ |
| | | this.$message.warning("请填写产品信息!") |
| | | }else{ |
| | | requestUrl(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | |
| | | console.log(err) |
| | | this.getData() |
| | | }) |
| | | } |
| | | // } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | // 选中产品方法 |
| | | selProductClick(item) { |
| | | this.productId = item.value |
| | | this.productId = item.productId |
| | | this.unit = item.unit |
| | | this.amount = item.amount |
| | | this.prediction = item.prediction |
| | | }, |
| | | // 选中路线方法 |
| | | selRouteClick(item, prop) { |
| | |
| | | }, |
| | | ...res.data |
| | | ] |
| | | console.log(res, "res666") |
| | | }) |
| | | }, |
| | | // 删除type |
| | | delSelectClick() { |
| | | this.type = "" |
| | | this.getData() |
| | | }, |
| | | switchKeywords(item) { |
| | | console.log(item, "switchKeywords") |
| | | this.type = item?.length > 0 ? "bh" : "" |
| | | this.getData() |
| | | } |
| | | } |
| | | } |