重订货点击空白显示对象问题 位置模块编辑查看的时候点击当前库存跳转到位置报表并且把当前位置商品列出来
| | |
| | | <!-- 产品 --> |
| | | <el-form-item v-else-if="item.product" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <div class="custom-name"> |
| | | <span v-if="scope.row.isEdit || scope.row.editable">{{ scope.row[item.prop] }}</span> |
| | | <span v-if="scope.row.isEdit || scope.row.editable">{{ |
| | | scope.row[item.prop]?.label ?? scope.row[item.prop] |
| | | }}</span> |
| | | <el-select |
| | | v-else |
| | | v-model="scope.row[item.prop]" |
| | |
| | | <div class="right-label">已售</div> |
| | | </div> |
| | | </div> --> |
| | | <div v-if="showPosition" class="sub-number no-cursor"> |
| | | <div v-if="showPosition" :class="showPositionCursor?'sub-number yes-cursor':'no-cursor sub-number'" @click="positionReport"> |
| | | <div class="left"><i class="el-icon-help"></i></div> |
| | | <div class="right"> |
| | | <div class="right-one">当前库存</div> |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | showPositionCursor:{ |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | countObject: { |
| | | type: Object, |
| | | default: () => { |
| | |
| | | return {} |
| | | }, |
| | | methods: { |
| | | positionReport(){ |
| | | this.$emit("positionReport") |
| | | }, |
| | | // 进出 |
| | | inOutBoundClick() { |
| | | this.$emit("inOutBoundClick") |
| | |
| | | } |
| | | return { |
| | | ...item, |
| | | productName: item.product.name, |
| | | productName: { label: item.product.name, value: item.product.id }, |
| | | locationName: item.location.name, |
| | | isSet: false, |
| | | isEdit: true, |
| | |
| | | }, |
| | | productId: this.$route.params.id, |
| | | productName: this.$route.params.name, |
| | | metaTitle: this.$route.meta.title |
| | | metaTitle: this.$route.meta.title, |
| | | keyWord:'' |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | }else{ |
| | | this.getLocationData({ |
| | | let params={ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | pageSize: this.pagerOptions.pageSize, |
| | | keyWord:this.keyWord, |
| | | } |
| | | if(this.$route.params.positionId){ |
| | | params.positionId=this.$route.params.positionId |
| | | } |
| | | this.getLocationData(params) |
| | | } |
| | | }, |
| | | |
| | | // 搜索 |
| | | getList(val) { |
| | | this.getLocationData({ |
| | | page: 1, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | keyWord: val |
| | | }) |
| | | this.keyWord=val |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | |
| | | size="mini" |
| | | > |
| | | <div class="content-number-bg"> |
| | | <FormBtnsView :showPosition="true" :showWarehouse="false" @productClick="productClick" /> |
| | | <FormBtnsView :showPosition="true" :showPositionCursor="this.editConfig.title != '新建'?true:false" @positionReport="positionReport" :showWarehouse="false" @productClick="productClick" /> |
| | | </div> |
| | | <div class="basic-info"> |
| | | <div class="basic-info-view"> |
| | |
| | | callback() |
| | | } |
| | | }, |
| | | // 当前库存 |
| | | positionReport(){ |
| | | if(this.editConfig.title != '新建'){ |
| | | this.$router.push({ |
| | | name: "locationReport", |
| | | params: { |
| | | positionId: this.editConfig.infomation.id |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 路线 |
| | | productClick() {}, |
| | | // 设置删除/打印/编辑是否显示 |
| | |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | await getLocationList({ |
| | | let params={ |
| | | type: this.type, |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | pageSize: this.pagerOptions.pageSize, |
| | | } |
| | | await getLocationList(params).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data ? res.data : [] |
| | | this.tableList.tableInfomation = list |