| | |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :showAdd="false" |
| | | :placeholder="'请输入参考'" |
| | | :placeholder="'请根据单号、产品、业务类型进行搜索'" |
| | | :amount-view="false" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getHistory } from "@/api/reportForm/inventoryRwport" |
| | | import { getProductOperatonList } from "@/api/product/product" |
| | | // import { getProductOperatonList } from "@/api/product/product" |
| | | |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog" |
| | | |
| | |
| | | default: true |
| | | }, |
| | | { |
| | | label: "业务类型", |
| | | prop: "baseOperationType", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "从", |
| | | prop: "fromLocation", |
| | | isShowColumn: true, |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | await getProductOperatonList({ |
| | | productId: this.params.id, |
| | | // await getProductOperatonList({ |
| | | // productId: this.params.id, |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // const list = res.data.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // fromLocation: item.fromLocation.name, |
| | | // toLocation: item.toLocation.name, |
| | | // productName: this.params.name, |
| | | // amount: item.details[0].product.amount, |
| | | // unit: item.details[0].product.unit |
| | | // } |
| | | // }) |
| | | // this.tableList.tableInfomation = list || [] |
| | | // this.pagerOptions.totalCount = res.total |
| | | // } |
| | | // }) |
| | | await getHistory({ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | fromLocation: item.fromLocation.name, |
| | | toLocation: item.toLocation.name, |
| | | productName: this.params.name, |
| | | amount: item.details[0].product.amount, |
| | | unit: item.details[0].product.unit |
| | | // let arr=[] |
| | | res.data.map((item)=>{ |
| | | if(item.baseOperationType===1){ |
| | | item.baseOperationType="收货" |
| | | }else if(item.baseOperationType===2){ |
| | | item.baseOperationType="交货" |
| | | }else if(item.baseOperationType===3){ |
| | | item.baseOperationType="内部调拨" |
| | | }else if(item.baseOperationType===4){ |
| | | item.baseOperationType="报废" |
| | | }else if(item.baseOperationType===5){ |
| | | item.baseOperationType="库存盘点" |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.tableList.tableInfomation = res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | // getHistory({ |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.tableList.tableInfomation = res.data |
| | | // this.pagerOptions.totalCount = res.total |
| | | // } |
| | | // }) |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |