zuozhengqing
2024-03-29 46d46b7159c3f97e3e4cb0bf00e90e27b5367325
采购管理产品名称列表绑定供应商列表
4个文件已修改
58 ■■■■ 已修改文件
src/components/makepager/CommonFormTableView.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectCommonDialog.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/components/AddPurchase.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue
@@ -315,9 +315,11 @@
        editVisible: false,
        isSelectBox: false,
        title: "",
        infomation: {}
        infomation: {},
        supplierId:null,
      },
      productIndex: 0
      productIndex: 0,
      supplierId:null,
    }
  },
  created() {
@@ -332,7 +334,11 @@
        this.getTableInfo()
      },
      immediate: true
    }
    },
    supplierId(n,o) {
      this.editSelCommonConfig.supplierId=n
      console.log(n,o,"看看那")
    }
  },
  computed: {},
  methods: {
@@ -371,9 +377,9 @@
    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
@@ -559,8 +565,7 @@
      })
    },
    // 新增
    selClientClick(scope, prop) {
      console.log(scope, prop)
    selClientClick(scope) {
      this.productIndex = scope.$index
      this.editSelCommonConfig.title = "产品名称"
      this.editSelCommonConfig.isSelectBox = true
src/views/other/commonDialog/SelectCommonDialog.vue
@@ -72,7 +72,8 @@
          clientId: 0,
          isRequest: true,
          client_name: "",
          tableInfomation: []
          tableInfomation: [],
          supplierId:null,
        }
      }
    },
@@ -115,7 +116,7 @@
      tableColumn: [],
      selectArray: []
    }
  },
  },
  created() {
    this.setTable()
    this.getData()
@@ -175,10 +176,11 @@
    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) => {
src/views/purchaseManage/purchase/components/AddPurchase.vue
@@ -230,6 +230,7 @@
          <div class="basic-info-title" style="display: flex">产品信息</div>
          <div class="product-view">
            <CommonFormTableView
              ref="tableRef"
              :detailEnter="editCommonConfig.detailEnter"
              :show-summary="showSummary"
              :recalculateShow="false"
@@ -754,6 +755,7 @@
    },
    // 选择供应商
    async handleSelectClient(value, item) {
      this.$refs.tableRef.supplierId=item.id
      this.productTableList.supplierId = item.id
      if (value === "client") {
        this.supplierId = item.id
@@ -766,6 +768,7 @@
      }).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")
        }
      })
@@ -774,12 +777,14 @@
      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
        }
      })
@@ -789,11 +794,22 @@
      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() {
src/views/purchaseManage/purchase/index.vue
@@ -9,7 +9,7 @@
          :show-download="false"
          :amount-view="false"
          :show-action-btn="false"
          :placeholder="'请输入供应商名称/物料名称/采购单名称'"
          :placeholder="'请输入供应商名称/物料名称/采购单名称/采购单号等..'"
          @searchClick="onFilterSearch"
        />
      </div>
@@ -246,6 +246,7 @@
      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 },
@@ -253,7 +254,7 @@
        { label: "经办人", prop: "handledBy", min: 130 },
        { label: "制单人", prop: "creator", min: 130 }
      ],
      showCol: ["采购单号", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"],
      showCol: ["采购单号","销售明细单", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"],
      tableBottomColumn: [],
      showBottomCol: [],
      TabsIndex: 0,