| | |
| | | editVisible: false, |
| | | isSelectBox: false, |
| | | title: "", |
| | | infomation: {} |
| | | infomation: {}, |
| | | supplierId:null, |
| | | }, |
| | | productIndex: 0 |
| | | productIndex: 0, |
| | | supplierId:null, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.getTableInfo() |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | supplierId(n,o) { |
| | | this.editSelCommonConfig.supplierId=n |
| | | console.log(n,o,"看看那") |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | |
| | | async getProductList() { |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc |
| | | await fn({ |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | page: 1, |
| | | pageSize: 100, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | this.productList = res.data.list |
| | |
| | | }) |
| | | }, |
| | | // 新增 |
| | | selClientClick(scope, prop) { |
| | | console.log(scope, prop) |
| | | selClientClick(scope) { |
| | | this.productIndex = scope.$index |
| | | this.editSelCommonConfig.title = "产品名称" |
| | | this.editSelCommonConfig.isSelectBox = true |
| | |
| | | clientId: 0, |
| | | isRequest: true, |
| | | client_name: "", |
| | | tableInfomation: [] |
| | | tableInfomation: [], |
| | | supplierId:null, |
| | | } |
| | | } |
| | | }, |
| | |
| | | tableColumn: [], |
| | | selectArray: [] |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData() |
| | |
| | | async getProductList() { |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc |
| | | await fn({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | supplierId:this.editConfig.supplierId, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | |
| | | <div class="basic-info-title" style="display: flex">产品信息</div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView |
| | | ref="tableRef" |
| | | :detailEnter="editCommonConfig.detailEnter" |
| | | :show-summary="showSummary" |
| | | :recalculateShow="false" |
| | |
| | | }, |
| | | // 选择供应商 |
| | | async handleSelectClient(value, item) { |
| | | this.$refs.tableRef.supplierId=item.id |
| | | this.productTableList.supplierId = item.id |
| | | if (value === "client") { |
| | | this.supplierId = item.id |
| | |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.productTableList.tableProductList = res.data.list |
| | | this.$refs.tableRef.productList=res.data.list |
| | | console.log(this.productTableList.tableProductList, "pop") |
| | | } |
| | | }) |
| | |
| | | this.editSelectSupplierConfig.editVisible = true |
| | | }, |
| | | async selClient(row) { |
| | | this.$refs.tableRef.supplierId=row.id |
| | | await getProductList({ |
| | | supplierId: row.id, |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$refs.tableRef.productList=res.data.list |
| | | this.productTableList.tableProductList = res.data.list |
| | | } |
| | | }) |
| | |
| | | this.editConfig.infomation.supplierId = row.id |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | async clearupClient(value) { |
| | | if (value == "client") { |
| | | this.$refs.tableRef.supplierId=null |
| | | this.$set(this.editConfig.infomation, "supplierName", "") |
| | | this.supplierId = null |
| | | this.$forceUpdate() |
| | | await getProductList({ |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.productTableList.tableProductList = res.data.list |
| | | this.$refs.tableRef.productList=res.data.list |
| | | console.log(this.productTableList.tableProductList, "pop") |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | setTableForm() { |
| | |
| | | :show-download="false" |
| | | :amount-view="false" |
| | | :show-action-btn="false" |
| | | :placeholder="'请输入供应商名称/物料名称/采购单名称'" |
| | | :placeholder="'请输入供应商名称/物料名称/采购单名称/采购单号等..'" |
| | | @searchClick="onFilterSearch" |
| | | /> |
| | | </div> |
| | |
| | | tableColumn: [ |
| | | { label: "单据类型", prop: "orderType", min: 130 }, |
| | | { label: "采购单号", prop: "number", min: 150, isCommonClick: true, default: true }, |
| | | { label: "销售明细单", prop: "sourceOrder", min: 130 }, |
| | | { label: "采购单名称", prop: "name", min: 130, isCommonClick: true }, |
| | | { label: "供应商名称", prop: "supplierName", min: 130 }, |
| | | { label: "采购数量", prop: "quantity", min: 130 }, |
| | |
| | | { label: "经办人", prop: "handledBy", min: 130 }, |
| | | { label: "制单人", prop: "creator", min: 130 } |
| | | ], |
| | | showCol: ["采购单号", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"], |
| | | showCol: ["采购单号","销售明细单", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"], |
| | | tableBottomColumn: [], |
| | | showBottomCol: [], |
| | | TabsIndex: 0, |