Browse Source

联调询价接口,调整参照

002390 2 years ago
parent
commit
8838f5f4f7

+ 187 - 194
src/views/purchase/purchase-order/add/column.js

@@ -1,29 +1,29 @@
 export const Columns = [
   {
-    key: "puOrgName",
+    key: "puOrg",
     title: "采购组织",
-    type: "PopoverSelect",
-    config: {
-      componentName: "ORG_PARAM",
-      dataMapping: {
-        puOrg: "code",
-        puOrgName: "name",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "ORG_PARAM",
+    dataMapping: {
+      // puOrg: "id",
+      puOrgName: "name",
     },
+    queryParams: () => ({}),
+    // config: {
+    //   componentName: "ORG_PARAM",
+    //   dataMapping: {
+    //     puOrg: "code",
+    //     puOrgName: "name",
+    //   },
+    // },
     require: true,
   },
   {
     key: "billTypeName",
     title: "订单类型",
-    type: "Select",
-
-    config: {
-      optionsName: "sys_order_type", // 字典名
-      dataMapping: {
-        billType: "code",
-        billTypeName: "name",
-      },
-    },
+    inputType: "Select",
+    referName: "sys_order_type", // 字典名
   },
   // { key: "billTypeName", title: "订单类型名称", },
   { key: "oaDemandNo", title: "OA需求单号", type: "Input", },
@@ -37,95 +37,96 @@ export const Columns = [
     width: 200,
   },
   {
-    key: "supplierName",
+    key: "supplier",
     title: "供应商",
-    type: "PopoverSelect",
-    config: {
-      componentName: "SUPPLIER_PARAM",
-      dataMapping: {
-        supplier: "code",
-        supplierName: "name",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "SUPPLIER_PARAM",
+    dataMapping: {
+      // supplier: "id",
+      supplierName: "name",
     },
+    queryParams: () => ({}),
+    // config: {
+    //   componentName: "SUPPLIER_PARAM",
+    //   // dataMapping: {
+    //   //   supplier: "code",
+    //   //   supplierName: "name",
+    //   // },
+    // },
     require: true,
   },
   {
-    key: "paymentAgreementName",
+    key: "paymentAgreement",
     title: "付款协议",
-    type: "PopoverSelect",
-    config: {
-      componentName: "PAYAGREEMENT_PARAM",
-      dataMapping: {
-        paymentAgreement: "code",
-        paymentAgreementName: "name",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "PAYAGREEMENT_PARAM",
+    dataMapping: {
+      paymentAgreementName: 'name'
     },
+    queryParams: () => ({}),
+
   },
   {
-    key: "finalTypeName",
+    key: "finalType",
     title: "结算方式",
-    type: "PopoverSelect",
-    config: {
-      componentName: "BALATYPE_PARAM",
-      dataMapping: {
-        finalType: "code",
-        finalTypeName: "name",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "BALATYPE_PARAM",
+    dataMapping: {
+      finalTypeName: 'name'
     },
+    queryParams: () => ({}),
   },
   {
-    key: "currencyName",
+    key: "currency",
     title: "币种",
-    type: "PopoverSelect",
-    config: {
-      componentName: "CURRENCY_PARAM",
-      dataMapping: {
-        currency: "code",
-        currencyName: "name",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "CURRENCY_PARAM",
+    dataMapping: {
+      currencyName: 'name'
     },
+    queryParams: () => ({}),
+
   },
   {
-    key: "buyerName",
+    key: "buyer",
     title: "采购员",
-    type: "PopoverSelect",
-    config: {
-      componentName: "CONTACTS_PARAM",
-      dataMapping: {
-        buyer: "code",
-        buyerName: "name",
-        // puDept: "deptId",
-        // puDeptName: "deptName",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "CONTACTS_PARAM",
+    dataMapping: {
+      buyerName: 'name'
     },
+    queryParams: () => ({}),
     require: true,
   },
   {
-    key: "puDeptName",
+    key: "puDept",
     title: "采购部门",
-    type: "PopoverSelect",
-    config: {
-      componentName: "DEPT_PARAM",
-      dataMapping: {
-        puDept: "code",
-        puDeptName: "name",
-      },
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "DEPT_PARAM",
+    dataMapping: {
+      puDeptName: 'name'
     },
+    queryParams: () => ({}),
     require: true,
   },
   {
-    key: "customerName",
+    key: "customer",
     title: "收货客户",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     width: 200,
     require: true,
-    config: {
-      componentName: "CUSTOMER_PARAM",
-      dataMapping: {
-        customer: "code",
-        customerName: "name",
-      },
+    valueKey: "id",
+    referName: "CUSTOMER_PARAM",
+    dataMapping: {
+      customerName: 'name'
     },
+    queryParams: () => ({}),
   },
   {
     key: "qty",
@@ -145,45 +146,49 @@ export const Columns = [
   {
     key: "status",
     title: "单据状态",
-    type: "Select",
-    require: true,
-    config: {
-      optionsName: "sys_status", // 字典名
-    },
-
+    inputType: "Select",
+    referName: "sys_status", // 字典名
   },
   { key: "freezeCause", title: "冻结原因", type: "Checkbox", },
   { key: "isBack", title: "退货", type: "Input", type: "Checkbox", },
   { key: "isMarketing", title: "已协同生成销售订单", type: "Checkbox", },
   { key: "isMarketingSource", title: "由销售订单协同生成", type: "Checkbox", },
   {
-    key: "warehouseName",
+    key: "warehouse",
     title: "WMS入库仓库", // 收货仓库
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "WAREHOUSE_PARAM",
-      dataMapping: {
-        warehouse: "code",
-        warehouseName: "name",
-      }
+    valueKey: "id",
+    referName: "WAREHOUSE_PARAM",
+    dataMapping: {
+      warehouseName: 'name'
     },
+    queryParams: () => ({}),
   },
   {
-    key: "goodsAllocationName",
+    key: "goodsAllocation",
     title: "货位",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "ALLOCATION_PARAM",
-      dataMapping: {
-        goodsAllocation: "code",
-        goodsAllocationName: "name",
-      },
-      queryParams: {
-        pkOrg: 'puOrg',
-      }
+    valueKey: "id",
+    referName: "ALLOCATION_PARAM",
+    dataMapping: {
+      goodsAllocationName: 'name'
     },
+    queryParams: () => ({
+      pkOrg: 'puOrg',
+    }),
+
+    // config: {
+    //   componentName: "ALLOCATION_PARAM",
+    //   dataMapping: {
+    //     goodsAllocation: "code",
+    //     goodsAllocationName: "name",
+    //   },
+    //   queryParams: {
+    //     pkOrg: 'puOrg',
+    //   }
+    // },
     width: 200,
   },
   { key: "isSendSrm", title: "是否同步SRM", type: "Checkbox", },
@@ -194,30 +199,29 @@ export const Columns = [
   { key: "address", title: "收货地址", type: "Input", },
   { key: "contacts", title: "收货联系人", type: "Input", },
   {
-    key: "customerDeptName",
+    key: "customerDept",
     title: "客户部门",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     width: 200,
-    config: {
-      componentName: "CUSTOMERDEPT_PARAM",
-      dataMapping: {
-        customerDept: "code",
-        customerDeptName: "name",
-      },
+    valueKey: "id",
+    referName: "CUSTOMERDEPT_PARAM",
+    dataMapping: {
+      customerDeptName: 'name'
     },
+    queryParams: () => ({}),
+
   },
   {
-    key: "supplierContactsName",
+    key: "supplierContacts",
     title: "供应商业务联系人",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "SUPPLIERCONTACTS_PARAM",
-      dataMapping: {
-        supplierContacts: "code",
-        supplierContactsName: "name",
-      },
+    valueKey: "id",
+    referName: "SUPPLIERCONTACTS_PARAM",
+    dataMapping: {
+      supplierContactsName: 'name'
     },
+    queryParams: () => ({}),
     width: 200,
   },
   { key: "isUrgency", title: "紧急程度", type: "Checkbox", },
@@ -235,78 +239,68 @@ export const Columns = [
   { key: "applyPaymentMoney", title: "累计付款申请金额", type: "Input", },
   { key: "paymentMoney", title: "累计付款金额", type: "Input", },
   { key: "invoiceMoney", title: "发票金额", type: "Input", },
-  // {
-  //   key: "supplierPersonal",
-  //   title: "供应商业务员",
-  //   type: "Input",
-  //   // type: "PopoverSelect",
-  // },
   {
-    key: "supplierPersonalName",
-    title: "供应商业务员名称",
-    type: "PopoverSelect",
-    config: {
-      componentName: "SUPPLIERCONTACTS_PARAM",
-      dataMapping: {
-        supplierPersonal: "code",
-        supplierPersonalName: "name",
-      },
+    key: "supplierPersonal",
+    title: "供应商业务员",
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "SUPPLIERCONTACTS_PARAM",
+    dataMapping: {
+      supplierPersonalName: 'name'
     },
+    queryParams: () => ({}),
     require: true,
   },
   { key: "isDeliver", title: "是否发货", type: "Checkbox", },
   {
-    key: "retReasonName",
+    key: "retReason",
     title: "退换原因",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "RETREASON_PARAM",
-      dataMapping: {
-        retReason: "code",
-        retReasonName: "name",
-      },
+    valueKey: "id",
+    referName: "RETREASON_PARAM",
+    dataMapping: {
+      retReasonName: 'name'
     },
+    queryParams: () => ({}),
   },
   {
-    key: "processTypeName",
+    key: "processType",
     title: "处理方式",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "PROCESSTYPE_PARAM",
-      dataMapping: {
-        processType: "code",
-        processTypeName: "name",
-      },
+    valueKey: "id",
+    referName: "PROCESSTYPE_PARAM",
+    dataMapping: {
+      processTypeName: 'name'
     },
+    queryParams: () => ({}),
   },
   { key: "isEnd", title: "整单关闭标识", type: "Input", },
   {
-    key: "projectNowName",
+    key: "projectNow",
     title: "在建工程项目",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "PROJECT_PARAM",
-      dataMapping: {
-        projectNow: "code",
-        projectNowName: "name",
-      },
+    valueKey: "id",
+    referName: "PROJECT_PARAM",
+    dataMapping: {
+      projectNowName: 'name'
     },
+    queryParams: () => ({}),
   },
   {
-    key: "operatingItemsName",
+    key: "operatingItems",
     title: "经营性项目",
-    type: "PopoverSelect",
+    inputType: "PopoverSelect",
     require: true,
-    config: {
-      componentName: "OPERATING_PARAM",
-      dataMapping: {
-        operatingItems: "code",
-        operatingItemsName: "name",
-      },
+    valueKey: "id",
+    referName: "OPERATING_PARAM",
+    dataMapping: {
+      operatingItemsName: 'name'
     },
+    queryParams: () => ({}),
+
   },
   { key: "isArrivalReson", title: "到货超期原因", type: "Input", },
   { key: "midOrderNo", title: "中台采购订单号", type: "Input", },
@@ -343,20 +337,25 @@ export const TabColumns = [
       { key: "rowNo", title: "行号", type: "Input", },
       { key: "orderId", title: "采购订单ID", type: "Input", width: 180 },
       // {key: "material",title: "物料",type: "Input",   },
-      { key: "materialName", title: "物料", type: "Input", width: 180 },
+      {
+        key: "materialName",
+        title: "物料",
+        inputType: "PopoverSelect",
+        width: 180,
+        valueKey: "id",
+        referName: "MATERIAL_PARAM",
+        queryParams: () => ({}),
+        dataMapping: {
+          material: "id",
+          materialName: "name",
+          materialCode: "code",
+        },
+      },
       {
         key: "materialCode",
         title: "物料编码",
-        type: "PopoverSelect",
+        type: "Input",
         width: 180,
-        config: {
-          componentName: "MATERIAL_PARAM",
-          dataMapping: {
-            material: "id",
-            materialName: "name",
-            materialCode: "code",
-          },
-        },
       },
       { key: "materialClassify", title: "物料分类", type: "Input", width: 180 },
       { key: "materialManufacturersCode", title: "厂家物料编码", type: "Input", width: 180 },
@@ -381,16 +380,15 @@ export const TabColumns = [
       { key: "isPayment", title: "付款关闭", type: "Input", },
       { key: "isGift", title: "赠品", type: "Input", width: 180 },
       {
-        key: "warehouseName",
+        key: "warehouse",
         title: "收货仓库", //WMS入库仓库
-        type: "PopoverSelect",
-        config: {
-          componentName: "WAREHOUSE_PARAM",
-          dataMapping: {
-            warehouse: "code",
-            warehouseName: "name",
-          }
+        inputType: "PopoverSelect",
+        valueKey: "id",
+        referName: "WAREHOUSE_PARAM",
+        dataMapping: {
+          warehouseName: 'name'
         },
+        queryParams: () => ({}),
         width: 200,
       },
       { key: "place", title: "收货地点", type: "Input", width: 180 },
@@ -404,19 +402,16 @@ export const TabColumns = [
       {
         key: "storageCondition",
         title: "存储条件",
-        type: "Select",
-        config: {
-          optionsName: "sys_storage_condition",
-        },
+        inputType: "Select",
+        referName: "sys_storage_condition", // 字典名
         width: 180
       },
       {
         key: "carriageCondition",
         title: "运输条件",
-        type: "Select",
-        config: {
-          optionsName: "sys_conditions_carriage",
-        },
+        inputType: "Select",
+        referName: "sys_conditions_carriage", // 字典名
+
         width: 180
       },
 
@@ -438,10 +433,8 @@ export const TabColumns = [
       {
         key: "priceType",
         title: "价格类型",
-        type: "Select",
-        config: {
-          optionsName: "sys_price_type",
-        },
+        inputType: "Select",
+        referName: "sys_price_type", // 字典名
       },
       { key: "isDistributionPrice", title: "配送价", type: "Input", },
       { key: "createByName", title: "创建人名称", type: "Input", },
@@ -462,7 +455,7 @@ export const TabColumns = [
       {
         key: "materialName",
         title: "物料",
-        type: "PopoverSelect",
+        inputType: "PopoverSelect",
         config: {
           componentName: "MATERIAL_PARAM",
           dataMapping: {

+ 49 - 36
src/views/purchase/purchase-order/add/index.vue

@@ -9,12 +9,13 @@ const NewTabColumns = TabColumns.map((element) => ({
   tableColumns: initColumns(element.tableColumns),
 }));
 
-const SelectColumns = NewColumns.filter((column) => column.type === "Select");
+const SelectColumns = NewColumns.filter((column) => column.inputType === "Select");
 NewTabColumns.forEach((column) => {
   SelectColumns.push(
-    ...column.tableColumns.filter((cColumn) => cColumn.type === "Select")
+    ...column.tableColumns.filter((cColumn) => cColumn.inputType === "Select")
   );
 });
+console.log(SelectColumns, 'SelectColumns');
 
 export default {
   name: "AddPurchaseOrderDrawer",
@@ -58,9 +59,13 @@ export default {
         for (const key in this.params) {
           if (Array.isArray(this.params[key])) {
             this.params[key] = [];
-          } else {
+          }
+          else if (key != 'puOrg' && key != 'puOrgName'
+            && key != 'buyer' && key != 'buyerName'
+            && key != 'puDept' && key != 'puDeptName') {
             this.params[key] = '';
           }
+          else { }
         }
       },
       deep: true,
@@ -69,12 +74,13 @@ export default {
   methods: {
     beforeOpen() {
       const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
-      // this.params.puOrg = orgId;
-      // this.params.puOrgName = orgName;
+      this.params.puOrg = orgId;
+      this.params.puOrgName = orgName;
       this.params.buyer = name;
       this.params.buyerName = nickName;
       this.params.puDept = deptId;
       this.params.puDeptName = deptName;
+
     },
     setVisible(prop) {
       this.visible = prop;
@@ -94,6 +100,10 @@ export default {
           "rowNo" in rowData &&
             (rowData["rowNo"] = this.params[key].length + 1);
 
+          // 是否完成询价,新增明细行需默认明细为false
+          rowData['whetherCompleteInquiry'] = false;
+          console.log(rowData, 'rowData*******************');
+
           this.params[key].push(rowData);
         }
       }
@@ -187,19 +197,10 @@ export default {
     handleReferChange(val, source) {
       console.log(val, 'val');
       console.log(source, 'source');
-      let { puOrg, customer, assignSupplier } = this.params;
       let parmas = {
-        // 组织
-        puOrg,
-        // 价格类型
-        // priceType:'',
-        // 客户
-        customer,
-        // 供应商
-        assignSupplier,
-        // 物料
-        material: source.material,
+        ...this.params
       }
+      console.log(parmas, 'parmas---------------');
       this.handleGetPrice(parmas);
     },
     // 询价 getPrice
@@ -221,7 +222,7 @@ export default {
 
   },
   created() {
-    console.log("ADD CREATED", this.params);
+    console.log("ADD CREATED", this.params)
   },
   mounted() { },
   destroyed() { },
@@ -255,22 +256,26 @@ export default {
             <el-form-item :prop="column.key" :label="column.title">
 
               <el-input v-if="column.type === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%"></el-input>
-              <dr-popover-select v-if="column.type === 'PopoverSelect'" v-model="params[column.key]"
-                :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                :readonly="column.readonly" :title="column.title" :type="column.config.componentName"
-                :data-mapping="column.config.dataMapping" :query-params="column.config.queryParams" :source.sync="params">
+                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
+              </el-input>
+              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" v-model="params[column.key]"
+                :source.sync="params" :title="column.title" :type="column.referName" :multiple="column.multiple"
+                :placeholder="column.placeholder" :data-mapping="column.dataMapping"
+                :query-params="column.queryParams(params)">
               </dr-popover-select>
+
               <el-input v-if="column.type === 'Textarea'" v-model="params[column.key]" type="textarea"
                 :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                style="width: 100%"></el-input>
+                style="width: 100%">
+              </el-input>
+
               <el-input-number v-if="column.type === 'InputNumber'" v-model="params[column.key]"
                 :controls-position="column.config.controlsPosition" :placeholder="column.placeholder"
                 :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
               </el-input-number>
-              <el-select v-if="column.type === 'Select'" v-model="params[column.key]" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
-                <el-option v-for="item in dict.type[column.config.optionsName]" :key="item.value" :label="item.label"
+              <el-select v-if="column.inputType === 'Select'" v-model="params[column.key]" :disabled="column.disabled"
+                :clearable="column.clearable" :placeholder="column.placeholder" style="width: 100%">
+                <el-option v-for="item in dict.type[column.referName]" :key="item.value" :label="item.label"
                   :value="item.value">
                 </el-option>
               </el-select>
@@ -322,27 +327,35 @@ export default {
                   <el-input v-if="cColumn.type === 'Input'" v-model="scope.row[cColumn.key]"
                     :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
                     size="mini" style="width: 100%"></el-input>
-                  <dr-popover-select v-if="cColumn.type === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
-                    :readonly="cColumn.readonly" :title="cColumn.title" :type="cColumn.config.componentName"
-                    :data-mapping="cColumn.config.dataMapping" :source.sync="scope.row" size="mini"
-                    @change="handleReferChange">
+
+                  <!--  -->
+                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
+                    :source.sync="scope.row" :title="cColumn.title" :type="cColumn.referName" :multiple="cColumn.multiple"
+                    :placeholder="cColumn.placeholder" :data-mapping="cColumn.dataMapping"
+                    :query-params="cColumn.queryParams(scope.row)" @change="handleReferChange">
                   </dr-popover-select>
+
                   <el-input-number v-if="cColumn.type === 'InputNumber'" v-model="scope.row[cColumn.key]"
                     :controls-position="cColumn.config.controlsPosition" :placeholder="cColumn.placeholder"
                     :clearable="cColumn.clearable" :disabled="cColumn.disabled" size="mini" style="width: 100%">
                   </el-input-number>
-                  <el-select v-if="cColumn.type === 'Select'" v-model="params[cColumn.key]"
-                    :placeholder="column.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
+
+                  <el-select v-if="cColumn.inputType === 'Select'" v-model="scope.row[cColumn.key]"
+                    :disabled="cColumn.disabled" :clearable="cColumn.clearable" :placeholder="cColumn.placeholder"
                     style="width: 100%">
-                    <el-option v-for="item in dict.type[cColumn.config.optionsName]" :key="item.value" :label="item.label"
+                    <el-option v-for="item in dict.type[cColumn.referName]" :key="item.value" :label="item.label"
                       :value="item.value">
                     </el-option>
                   </el-select>
-                  <el-checkbox v-if="cColumn.type === 'Checkbox'" v-model="params[cColumn.key]" true-label="Y"
-                    false-label="N"></el-checkbox>
+
+
+                  <el-checkbox v-if="cColumn.type === 'Checkbox'" v-model="scope.row[cColumn.key]" true-label="Y"
+                    false-label="N">
+                  </el-checkbox>
+
                 </template>
               </el-table-column>
+
               <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
                   <el-button @click.native.prevent="

+ 1 - 1
src/views/purchase/purchase-order/column.js

@@ -2,7 +2,7 @@ export const TableColumns = [
   // { key: "id", title: "主键" },
   // { key: "puOrg", title: "采购组织" },
   { key: "puOrgName", title: "采购组织名称", search: true, type: "Input" },
-  { key: "billType", title: "订单类型" },
+  { key: "billTypeName", title: "订单类型" },
   { key: "code", title: "订单编号", search: true, type: "Input" },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },

+ 19 - 17
src/views/purchase/purchase-order/edit/index.vue

@@ -9,9 +9,9 @@ const NewTabColumns = TabColumns.map((element) => ({
   tableColumns: initColumns(element.tableColumns),
 }));
 // 
-const SelectColumns = NewColumns.filter(column => column.type === 'Select')
+const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
 NewTabColumns.forEach(column => {
-  SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.type === 'Select'))
+  SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
 });
 
 export default {
@@ -206,10 +206,10 @@ export default {
               <el-input v-if="column.type === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
                 :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
               </el-input>
-              <dr-popover-select v-if="column.type === 'PopoverSelect'" v-model="params[column.key]"
-                :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                :readonly="column.readonly" :title="column.title" :type="column.config.componentName"
-                :data-mapping="column.config.dataMapping" :query-params="column.config.queryParams" :source.sync="params">
+              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" v-model="params[column.key]"
+                :source.sync="params" :title="column.title" :type="column.referName" :multiple="column.multiple"
+                :placeholder="column.placeholder" :data-mapping="column.dataMapping"
+                :query-params="column.queryParams(params)">
               </dr-popover-select>
               <el-input v-if="column.type === 'Textarea'" v-model="params[column.key]" type="textarea"
                 :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
@@ -219,9 +219,9 @@ export default {
                 :controls-position="column.config.controlsPosition" :placeholder="column.placeholder"
                 :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
               </el-input-number>
-              <el-select v-if="column.type === 'Select'" v-model="params[column.key]" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
-                <el-option v-for="item in dict.type[column.config.optionsName]" :key="item.value" :label="item.label"
+              <el-select v-if="column.inputType === 'Select'" v-model="params[column.key]" :disabled="column.disabled"
+                :clearable="column.clearable" :placeholder="column.placeholder" style="width: 100%">
+                <el-option v-for="item in dict.type[column.referName]" :key="item.value" :label="item.label"
                   :value="item.value">
                 </el-option>
               </el-select>
@@ -278,19 +278,21 @@ export default {
                     :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
                     :size="size" style="width: 100%">
                   </el-input>
-                  <dr-popover-select v-if="cColumn.type === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
-                    :readonly="cColumn.readonly" :title="cColumn.title" :type="cColumn.config.componentName"
-                    :data-mapping="cColumn.config.dataMapping" :source.sync="scope.row" size="mini">
+                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
+                    :source.sync="scope.row" :title="cColumn.title" :type="cColumn.referName" :multiple="cColumn.multiple"
+                    :placeholder="cColumn.placeholder" :data-mapping="cColumn.dataMapping"
+                    :query-params="cColumn.queryParams(scope.row)">
                   </dr-popover-select>
-                  <el-select v-if="cColumn.type === 'Select'" v-model="params[cColumn.key]"
-                    :placeholder="column.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
+
+                  <el-select v-if="cColumn.inputType === 'Select'" v-model="scope.row[cColumn.key]"
+                    :disabled="cColumn.disabled" :clearable="cColumn.clearable" :placeholder="cColumn.placeholder"
                     style="width: 100%">
-                    <el-option v-for="item in dict.type[cColumn.config.optionsName]" :key="item.value" :label="item.label"
+                    <el-option v-for="item in dict.type[cColumn.referName]" :key="item.value" :label="item.label"
                       :value="item.value">
                     </el-option>
                   </el-select>
-                  <el-checkbox v-if="cColumn.type === 'Checkbox'" v-model="params[cColumn.key]" true-label="Y"
+
+                  <el-checkbox v-if="cColumn.type === 'Checkbox'" v-model="scope.row[cColumn.key]" true-label="Y"
                     false-label="N">
                   </el-checkbox>
                   <el-input-number v-if="cColumn.type === 'InputNumber'" v-model="scope.row[cColumn.key]"

+ 2 - 2
vue.config.js

@@ -37,12 +37,12 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-        target: `http://test-sy.derom.com/drp-admin`, //测试
+        // target: `http://test-sy.derom.com/drp-admin`, //测试
         // target: `http://release-sy.derom.com/drp-admin`, //预发
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
-        // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
+        target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
         // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地