002201 2 年之前
父節點
當前提交
eb60696918

+ 9 - 1
src/api/business/purchase/contract.js

@@ -77,9 +77,17 @@ export function TABLELIST(params, name) {
   });
 }
 
+export function TABLEADD(data, name) {
+  return request({
+    url: `${switchUrl(name)}/add`,
+    method: "POST",
+    data: data,
+  });
+}
+
 export function TABLEEDIT(data, name) {
   return request({
-    url: `${switchUrl(name)}/edit`,
+    url: `${switchUrl(name)}`,
     method: "PUT",
     data: data,
   });

+ 10 - 3
src/components/popover-select/components/TAX_RATE_PARAM.js

@@ -1,6 +1,4 @@
-// 货位
 export default [
-  // 树
   {
     key: "id",
     title: "ID",
@@ -15,8 +13,17 @@ export default [
   },
   {
     key: "name",
-    title: "货位",
+    title: "名称",
     type: "Input",
     search: true,
   },
+  {
+    key: "ntaxrate",
+    title: "税率",
+    type: "ComputedInput",
+    computed: (prop) => {
+      const { ntaxrate } = prop;
+      return ntaxrate === "0E-8" ? "0.00000000" : ntaxrate;
+    },
+  },
 ];

+ 17 - 6
src/components/popover-select/index.vue

@@ -29,8 +29,8 @@ export default {
     },
     // 默认查询参数
     queryParams: {
-      type: Object,
-      default: () => ({}),
+      type: Function,
+      default: () => {},
     },
     // 组件大小
     size: {
@@ -146,12 +146,12 @@ export default {
     },
     // reset list
     async resetList() {
-      const { type, queryParams } = this.$props;
+      const { type, source, queryParams } = this.$props;
       this.model = {
-        ...queryParams,
-        ...this.model,
-        search: "",
         type,
+        search: "",
+        ...this.model,
+        ...queryParams(source),
       };
       await this.fetchList(this.model, this.page);
     },
@@ -283,6 +283,17 @@ export default {
             :width="column.width"
             show-overflow-tooltip
           >
+            <template slot-scope="scope">
+              <dr-computed-input
+                v-if="column.type === 'ComputedInput'"
+                v-model="scope.row[column.key]"
+                :source="scope.row"
+                :computed="column.computed"
+                :placeholder="column.placeholder"
+                style="width: 100%"
+              ></dr-computed-input>
+              <span v-else> {{ scope.row[column.key] }}</span>
+            </template>
           </el-table-column>
         </el-table>
         <el-pagination

+ 11 - 8
src/views/purchase/contract/add/index.vue

@@ -9,9 +9,11 @@ export default {
   dicts: Array.from(
     new Set([
       ...initDicts(Columns),
-      ...initDicts(TabColumns.map((item) => item.tableColumns))
-        .flat()
-        .filter((cItem) => cItem.inputType === "Select"),
+      ...initDicts(
+        TabColumns.map((item) => item.tableColumns)
+          .flat()
+          .filter((item) => item.inputType === "Select")
+      ),
     ])
   ),
   components: {},
@@ -49,8 +51,8 @@ export default {
       const {
         deptId: puDept,
         deptName: puDeptName,
-        id: buyer,
-        name: buyerName,
+        name: buyer,
+        nickName: buyerName,
         orgId: puOrg,
         orgName: puOrgName,
       } = this.$store.state.user;
@@ -94,7 +96,7 @@ export default {
           });
           if (code === 200) {
             const [{ ntaxrate }] = rows;
-            source.tax = ntaxrate;
+            source.tax = ntaxrate === "0E-8" ? "0.00000000" : ntaxrate;
           }
         } catch (err) {
           // catch
@@ -132,7 +134,6 @@ export default {
             if (code === 200) {
               this.hide();
               this.$emit("success");
-              
             } else {
               this.$notify.warning({ title: msg });
             }
@@ -147,7 +148,9 @@ export default {
       });
     },
   },
-  created() {},
+  created() {
+    console.log(this);
+  },
   mounted() {},
   destroyed() {},
 };

+ 3 - 7
src/views/purchase/contract/column.js

@@ -394,7 +394,7 @@ export const TabColumns = [
         width: 200,
         computed: (prop) => {
           const { tax, taxPrice } = prop;
-          const newTax = tax === "0E-8" ? 0 : Number(tax) / 100;
+          const newTax = Number(tax) / 100;
           const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
           return taxFreePrice === "NaN" ? null : taxFreePrice;
         },
@@ -470,13 +470,9 @@ export const TabColumns = [
       {
         title: "付款起点",
         key: "origin",
-        inputType: "PopoverSelect",
         width: 200,
-        referName: "MATERIAL_PARAM",
-        dataMapping: {
-          material: "code",
-          materialName: "name",
-        },
+        inputType: "Select",
+        referName: "puarchase_contract_origin",
       },
       { title: "账期天数", key: "paymetDays", inputType: "Input", width: 200 },
       { title: "付款比例%", key: "ratio", inputType: "Input", width: 200 },

+ 10 - 5
src/views/purchase/contract/edit/index.vue

@@ -4,6 +4,7 @@ import {
   EDIT,
   ITEM,
   TABLELIST,
+  TABLEADD,
   TABLEEDIT,
   TABLEROMOVE,
 } from "@/api/business/purchase/contract";
@@ -128,7 +129,7 @@ export default {
           });
           if (code === 200) {
             const [{ ntaxrate }] = rows;
-            source.tax = ntaxrate;
+            source.tax = ntaxrate === "0E-8" ? "0.00000000" : ntaxrate;
           }
         } catch (err) {
           // catch
@@ -144,12 +145,12 @@ export default {
       this.params[prop].push(initParams(tab.tableColumns));
     },
     //
-    async rowDelete(prop, { row: { id }, $index }) {
+    async rowDelete(prop, { row: { id } }) {
       try {
         this.loading = true;
         const { code } = await TABLEROMOVE(id, prop);
         if (code === 200) {
-          this.params[prop].splice($index, 1);
+          this.fetchTable(this.params.code, this.tabName);
         }
       } catch (err) {
         // catch
@@ -162,8 +163,12 @@ export default {
     async rowSubmit(prop, { row }) {
       try {
         this.loading = true;
-        const { code } = await TABLEEDIT(row, prop);
-        if (code === 200) {
+        const { contractId } = row;
+        if (contractId) {
+          await TABLEEDIT(row, prop);
+        } else {
+          const { code } = this.params;
+          await TABLEADD({ ...row, contractId: code }, prop);
         }
       } catch (err) {
         // catch

+ 244 - 202
src/views/purchase/purchase-order/add/index.vue

@@ -9,7 +9,9 @@ const NewTabColumns = TabColumns.map((element) => ({
   tableColumns: initColumns(element.tableColumns),
 }));
 
-const SelectColumns = NewColumns.filter((column) => column.inputType === "Select");
+const SelectColumns = NewColumns.filter(
+  (column) => column.inputType === "Select"
+);
 NewTabColumns.forEach((column) => {
   SelectColumns.push(
     ...column.tableColumns.filter((cColumn) => cColumn.inputType === "Select")
@@ -20,8 +22,8 @@ export default {
   name: "AddPurchaseOrderDrawer",
   dicts: initDicts(SelectColumns),
   components: {
-    FileUploadCenter: () => import('../components/FileUploadCenter/index.vue'),
-    popDialog: () => import('@/components/PopDialog/index.vue'),
+    FileUploadCenter: () => import("../components/FileUploadCenter/index.vue"),
+    popDialog: () => import("@/components/PopDialog/index.vue"),
   },
 
   data() {
@@ -45,42 +47,54 @@ export default {
   watch: {
     "params.puOrderItemList": {
       handler(nVal, oVal) {
-        this.visible && this.handleSynchronousMaterial("puOrderItemList", "puOrderExecuteList");
+        this.visible &&
+          this.handleSynchronousMaterial(
+            "puOrderItemList",
+            "puOrderExecuteList"
+          );
       },
       deep: true,
     },
     "params.puOrderExecuteList": {
       handler(nVal, oVal) {
-        this.visible && this.handleSynchronousMaterial("puOrderExecuteList", "puOrderItemList");
+        this.visible &&
+          this.handleSynchronousMaterial(
+            "puOrderExecuteList",
+            "puOrderItemList"
+          );
       },
       deep: true,
     },
-    "params": {
+    params: {
       handler(nVal, oVal) {
         // 组织变化
-        if (this.visible && (nVal.puOrg != oVal.puOrg)) {
-          console.log(nVal.puOrg, 'nVal.puOrg', oVal.puOrg, 'oVal.puOrg');
+        if (this.visible && nVal.puOrg != oVal.puOrg) {
+          console.log(nVal.puOrg, "nVal.puOrg", oVal.puOrg, "oVal.puOrg");
           for (const key in this.params) {
             if (Array.isArray(this.params[key])) {
               this.params[key] = [];
+            } else if (
+              key != "puOrg" &&
+              key != "puOrgName" &&
+              key != "buyer" &&
+              key != "buyerName" &&
+              key != "puDept" &&
+              key != "puDeptName" &&
+              key != "status"
+            ) {
+              this.params[key] = "";
+            } else {
             }
-            else if (key != 'puOrg' && key != 'puOrgName'
-              && key != 'buyer' && key != 'buyerName'
-              && key != 'puDept' && key != 'puDeptName'
-              && key != 'status') {
-              this.params[key] = '';
-            }
-            else { }
           }
         }
-
       },
       deep: true,
-    }
+    },
   },
   methods: {
     beforeOpen() {
-      const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
+      const { deptName, deptId, name, nickName, orgName, orgId } =
+        this.$store.state.user;
       this.params.puOrg = orgId;
       this.params.puOrgName = orgName;
       this.params.buyer = name;
@@ -94,32 +108,26 @@ export default {
     },
     // 复制赋值
     async setCopyParams(id) {
-      console.log(id, 'iid-----------------------');
+      console.log(id, "iid-----------------------");
       try {
         const { code, msg, data } = await orderApi.details(id);
 
         if (code === 200) {
-
           this.params = {
             ...data,
-            id: '',
-            code: '',
-            status: '0',
-            source: '3',
+            id: "",
+            code: "",
+            status: "0",
+            source: "3",
           };
 
           for (const key in this.params) {
-
             if (Array.isArray(this.params[key])) {
-
-              this.params[key].forEach(v => {
-
-                v.id = '';
-
-              })
+              this.params[key].forEach((v) => {
+                v.id = "";
+              });
             }
           }
-
         }
       } catch (err) {
         //
@@ -143,7 +151,7 @@ export default {
             (rowData["rowNo"] = this.params[key].length + 1);
 
           // 是否完成询价,新增明细行需默认明细为false
-          rowData['whetherCompleteInquiry'] = false;
+          rowData["whetherCompleteInquiry"] = false;
 
           this.params[key].push(rowData);
         }
@@ -167,24 +175,24 @@ export default {
     handleSynchronousMaterial(key1, key2) {
       let _this = this;
       // this.params[key1]-- -> this.params[key2]
-      this.params[key1] && this.params[key1].forEach((item, index) => {
-
-        for (const key in item) {
-
-          if (key in _this.params[key2][index]) {
-
-            if (key == 'material' || key == 'materialName' || key == 'materialCode') {
-              _this.params[key2][index].material = item.material;
-              _this.params[key2][index].materialName = item.materialName;
-              _this.params[key2][index].materialCode = item.materialCode;
-            } else {
-
-              _this.params[key2][index][key] = item[key];
+      this.params[key1] &&
+        this.params[key1].forEach((item, index) => {
+          for (const key in item) {
+            if (key in _this.params[key2][index]) {
+              if (
+                key == "material" ||
+                key == "materialName" ||
+                key == "materialCode"
+              ) {
+                _this.params[key2][index].material = item.material;
+                _this.params[key2][index].materialName = item.materialName;
+                _this.params[key2][index].materialCode = item.materialCode;
+              } else {
+                _this.params[key2][index][key] = item[key];
+              }
             }
           }
-        }
-
-      });
+        });
     },
     // 取消
     handleCancel() {
@@ -193,8 +201,7 @@ export default {
         ...initParams(this.columns),
         puOrderItemList: [],
         puOrderExecuteList: [],
-      }
-
+      };
     },
     // 保存
     async handleSava() {
@@ -250,23 +257,22 @@ export default {
       });
     },
     // 子表参照改变之后
-    handleReferChange(val,type, source) {
-      console.log(val, 'val');
-      console.log(source, 'source');
-      console.log(type, 'type');
+    handleReferChange(val, type, source) {
+      console.log(val, "val");
+      console.log(source, "source");
+      console.log(type, "type");
 
       // 触发物料参照
-      if (type == 'MATERIAL_PARAM' && source.qty && source.qty != '') {
-
+      if (type == "MATERIAL_PARAM" && source.qty && source.qty != "") {
         this.handleGetPrice();
       }
     },
 
     // 子表inputNumber
     handleInputChange(row, type) {
-      console.log(type, 'type');
+      console.log(type, "type");
       // 物料数量变化----询价
-      if (type == 'qty' && row.material) {
+      if (type == "qty" && row.material) {
         this.handleGetPrice();
       }
     },
@@ -274,254 +280,288 @@ export default {
     async handleGetPrice() {
       try {
         // let { puOrg, priceType, customer, assignSupplier, material, } = data;
-        let { code, data } = await orderApi.getPrice({ ...this.params })
+        let { code, data } = await orderApi.getPrice({ ...this.params });
         if (code == 200) {
           this.params = data;
         }
       } catch (error) {
-
       } finally {
-
       }
     },
-
   },
   created() {
-    console.log("ADD CREATED", this.params)
+    console.log("ADD CREATED", this.params);
   },
-  mounted() { },
-  destroyed() { },
+  mounted() {},
+  destroyed() {},
 };
 </script>
 <template>
-  <el-drawer 
-    direction="btt" 
-    size="100%" 
-    :with-header="false" 
+  <el-drawer
+    direction="btt"
+    size="100%"
+    :with-header="false"
     :visible.sync="visible"
     @open="beforeOpen"
     @close="$emit('close')"
-    >
-    <el-form 
-      size="mini" 
-      label-position="right" 
-      ref="orderAddForm" 
-      label-width="140px" 
-      :model="params" 
+  >
+    <el-form
+      size="mini"
+      label-position="right"
+      ref="orderAddForm"
+      label-width="140px"
+      :model="params"
       :rules="rules"
+    >
+      <el-card
+        :body-style="{
+          padding: '20px',
+          display: 'flex',
+          'flex-wrap': 'wrap',
+        }"
+        style="margin: 10px"
       >
-      <el-card :body-style="{
-        padding: '20px',
-        display: 'flex',
-        'flex-wrap': 'wrap',
-      }" style="margin: 10px">
-        <div slot="header" style="
+        <div
+          slot="header"
+          style="
             display: flex;
             justify-content: space-between;
             align-items: center;
-          ">
+          "
+        >
           <h3>新增</h3>
           <div style="text-align: right">
             <el-button size="mini" @click="handleCancel">取消</el-button>
-            <el-button size="mini" type="danger" @click="handleSava">保存</el-button>
+            <el-button size="mini" type="danger" @click="handleSava"
+              >保存</el-button
+            >
             <!-- <el-button size="mini" type="info" @click="handleSubmit">
               保存并新增
             </el-button> -->
           </div>
         </div>
-        <el-row style="display:flex; flex-wrap: wrap;">
-          <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 6">
-            <el-form-item :prop="column.key" :label="column.title" v-if="column.isShow">
-
-              <el-input v-if="column.inputType === 'Input'" 
-                v-model="params[column.key]" 
+        <el-row style="display: flex; flex-wrap: wrap">
+          <el-col
+            v-for="(column, index) in columns"
+            :key="index"
+            :span="column.span || 6"
+          >
+            <el-form-item
+              :prop="column.key"
+              :label="column.title"
+              v-if="column.isShow"
+            >
+              <el-input
+                v-if="column.inputType === 'Input'"
+                v-model="params[column.key]"
                 :placeholder="column.placeholder"
-                :clearable="column.clearable" 
-                :disabled="column.disabled" 
+                :clearable="column.clearable"
+                :disabled="column.disabled"
                 style="width: 100%"
-                >
+              >
               </el-input>
-              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" 
+              <dr-popover-select
+                v-if="column.inputType === 'PopoverSelect'"
                 v-model="params[column.key]"
-                :value-key="column.valueKey" 
-                :source.sync="params" 
-                :title="column.title" 
+                :value-key="column.valueKey"
+                :source.sync="params"
+                :title="column.title"
                 :type="column.referName"
-                :multiple="column.multiple" 
-                :placeholder="column.placeholder" 
+                :multiple="column.multiple"
+                :placeholder="column.placeholder"
                 :data-mapping="column.dataMapping"
-                :query-params="column.queryParams(params)"
-                ></dr-popover-select>
+                :query-params="column.queryParams"
+              ></dr-popover-select>
 
-              <el-input v-if="column.inputType === 'Textarea'" 
-                v-model="params[column.key]" 
+              <el-input
+                v-if="column.inputType === 'Textarea'"
+                v-model="params[column.key]"
                 type="textarea"
-                :placeholder="column.placeholder" 
-                :clearable="column.clearable" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
                 :disabled="column.disabled"
                 style="width: 100%"
-                ></el-input>
+              ></el-input>
 
-              <el-input-number v-if="column.inputType === 'InputNumber'" 
+              <el-input-number
+                v-if="column.inputType === 'InputNumber'"
                 v-model="params[column.key]"
-                :controls-position="column.controlsPosition" 
+                :controls-position="column.controlsPosition"
                 :placeholder="column.placeholder"
-                :clearable="column.clearable" 
-                :disabled="column.disabled" 
+                :clearable="column.clearable"
+                :disabled="column.disabled"
                 style="width: 100%"
-                > </el-input-number>
-              <el-select v-if="column.inputType === 'Select'" 
-                v-model="params[column.key]" 
+              >
+              </el-input-number>
+              <el-select
+                v-if="column.inputType === 'Select'"
+                v-model="params[column.key]"
                 :disabled="column.disabled"
-                :clearable="column.clearable" 
-                :placeholder="column.placeholder" 
+                :clearable="column.clearable"
+                :placeholder="column.placeholder"
                 style="width: 100%"
-                >
-                <el-option 
-                  v-for="item in dict.type[column.referName]" 
-                  :key="item.value" 
+              >
+                <el-option
+                  v-for="item in dict.type[column.referName]"
+                  :key="item.value"
                   :label="item.label"
                   :value="item.value"
-                  ></el-option>
+                ></el-option>
               </el-select>
-              <el-select v-if="column.inputType === 'TagSelect'" 
-                v-model="params[column.key]" 
-                multiple 
+              <el-select
+                v-if="column.inputType === 'TagSelect'"
+                v-model="params[column.key]"
+                multiple
                 clearable
-                collapse-tags 
-                :placeholder="column.placeholder" 
-                :clearable="column.clearable" 
+                collapse-tags
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
                 :disabled="column.disabled"
                 style="width: 100%"
-                >
+              >
                 <template #prefix>
-                  <el-icon 
-                    class="el-icon-view" 
-                    style="cursor: pointer" 
-                    @click.stop="$message.info(234)">
+                  <el-icon
+                    class="el-icon-view"
+                    style="cursor: pointer"
+                    @click.stop="$message.info(234)"
+                  >
                   </el-icon>
                 </template>
-                <el-option 
-                  v-for="item in options" 
-                  :key="item.value" 
-                  :label="item.label" 
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
                   :value="item.value"
-                  ></el-option>
+                ></el-option>
               </el-select>
-              <el-date-picker v-if="column.inputType === 'DatePicker'" 
-                v-model="params[column.key]" 
+              <el-date-picker
+                v-if="column.inputType === 'DatePicker'"
+                v-model="params[column.key]"
                 :type="column.type"
-                :placeholder="column.placeholder" 
-                :clearable="column.clearable" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
                 :disabled="column.disabled"
-                :picker-options="column.pickerOptions" 
+                :picker-options="column.pickerOptions"
                 style="width: 100%"
-                ></el-date-picker>
-              <el-checkbox v-if="column.inputType === 'Checkbox'" 
-                v-model="params[column.key]" 
+              ></el-date-picker>
+              <el-checkbox
+                v-if="column.inputType === 'Checkbox'"
+                v-model="params[column.key]"
                 true-label="Y"
                 false-label="N"
-                ></el-checkbox>
-              <file-upload-center v-if="column.inputType === 'Upload'" 
+              ></el-checkbox>
+              <file-upload-center
+                v-if="column.inputType === 'Upload'"
                 v-model="params[column.key]"
                 :file-type="column.fileType"
-                ></file-upload-center>
+              ></file-upload-center>
             </el-form-item>
           </el-col>
         </el-row>
       </el-card>
 
-      <el-card :body-style="{
-        padding: '20px',
-        display: 'flex',
-        'flex-wrap': 'wrap',
-        position: 'relative',
-      }" style="margin: 10px">
+      <el-card
+        :body-style="{
+          padding: '20px',
+          display: 'flex',
+          'flex-wrap': 'wrap',
+          position: 'relative',
+        }"
+        style="margin: 10px"
+      >
         <el-tabs v-model="tabName" style="width: 100%">
-          <el-tab-pane 
-            v-for="(column, index) in tabColumns" 
-            :key="index" 
-            :label="column.title" 
+          <el-tab-pane
+            v-for="(column, index) in tabColumns"
+            :key="index"
+            :label="column.title"
             :name="column.key"
-            >
+          >
             <el-table :data="params[column.key]" style="width: 100%">
-              <el-table-column 
-                v-for="(cColumn, cIndex) in column.tableColumns" 
-                :key="cIndex" 
+              <el-table-column
+                v-for="(cColumn, cIndex) in column.tableColumns"
+                :key="cIndex"
                 :prop="cColumn.key"
-                :label="cColumn.title" 
+                :label="cColumn.title"
                 :width="cColumn.width || 80"
-                >
+              >
                 <template slot-scope="scope">
                   <el-tag v-if="cColumn.key === 'index'">
                     {{ scope.$index + 1 }}
                   </el-tag>
-                  <el-input v-if="cColumn.inputType === 'Input'" 
+                  <el-input
+                    v-if="cColumn.inputType === 'Input'"
                     v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" 
-                    :clearable="cColumn.clearable" 
+                    :placeholder="cColumn.placeholder"
+                    :clearable="cColumn.clearable"
                     :disabled="cColumn.disabled"
-                    size="mini" 
+                    size="mini"
                     style="width: 100%"
-                    ></el-input>
+                  ></el-input>
 
                   <!--  -->
-                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" 
+                  <dr-popover-select
+                    v-if="cColumn.inputType === 'PopoverSelect'"
                     v-model="scope.row[cColumn.key]"
-                    :source.sync="scope.row" 
-                    :title="cColumn.title" 
+                    :source.sync="scope.row"
+                    :title="cColumn.title"
                     :value-key="cColumn.valueKey"
-                    :type="cColumn.referName" 
-                    :multiple="cColumn.multiple" 
+                    :type="cColumn.referName"
+                    :multiple="cColumn.multiple"
                     :placeholder="cColumn.placeholder"
-                    :data-mapping="cColumn.dataMapping" 
-                    :query-params="cColumn.queryParams(scope.row)"
-                    @change="handleReferChange" 
+                    :data-mapping="cColumn.dataMapping"
+                    :query-params="cColumn.queryParams"
+                    @change="handleReferChange"
                     size="mini"
-                    > </dr-popover-select>
+                  >
+                  </dr-popover-select>
 
-                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
+                  <el-input-number
+                    v-if="cColumn.inputType === 'InputNumber'"
                     v-model="scope.row[cColumn.key]"
-                    :controls-position="cColumn.controlsPosition" 
+                    :controls-position="cColumn.controlsPosition"
                     :placeholder="cColumn.placeholder"
-                    @change="handleInputChange(scope.row, cColumn.key)" 
+                    @change="handleInputChange(scope.row, cColumn.key)"
                     :clearable="cColumn.clearable"
-                    :disabled="cColumn.disabled" 
-                    size="mini" 
+                    :disabled="cColumn.disabled"
+                    size="mini"
                     style="width: 100%"
-                    ></el-input-number>
+                  ></el-input-number>
 
-                  <el-select v-if="cColumn.inputType === 'Select'" 
-                    v-model="scope.row[cColumn.key]" 
+                  <el-select
+                    v-if="cColumn.inputType === 'Select'"
+                    v-model="scope.row[cColumn.key]"
                     size="mini"
-                    :disabled="cColumn.disabled" 
-                    :clearable="cColumn.clearable" 
+                    :disabled="cColumn.disabled"
+                    :clearable="cColumn.clearable"
                     :placeholder="cColumn.placeholder"
                     style="width: 100%"
-                    >
-                    <el-option 
-                      v-for="item in dict.type[cColumn.referName]" 
-                      :key="item.value" 
+                  >
+                    <el-option
+                      v-for="item in dict.type[cColumn.referName]"
+                      :key="item.value"
                       :label="item.label"
                       :value="item.value"
-                      ></el-option>
+                    ></el-option>
                   </el-select>
 
-
-                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
-                    v-model="scope.row[cColumn.key]" 
+                  <el-checkbox
+                    v-if="cColumn.inputType === 'Checkbox'"
+                    v-model="scope.row[cColumn.key]"
                     true-label="Y"
                     false-label="N"
-                    ></el-checkbox>
-
+                  ></el-checkbox>
                 </template>
               </el-table-column>
 
               <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
-                  <el-button @click.native.prevent="
-                    delTableRow(params[tabName], scope.$index)
-                    " type="text" size="small">
+                  <el-button
+                    @click.native.prevent="
+                      delTableRow(params[tabName], scope.$index)
+                    "
+                    type="text"
+                    size="small"
+                  >
                     删行
                   </el-button>
                 </template>
@@ -530,7 +570,9 @@ export default {
           </el-tab-pane>
         </el-tabs>
         <el-row style="position: absolute; top: 20px; right: 20px">
-          <el-button size="mini" @click="addTableRow(params[tabName])">增行</el-button>
+          <el-button size="mini" @click="addTableRow(params[tabName])"
+            >增行</el-button
+          >
         </el-row>
       </el-card>
     </el-form>

+ 1 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -291,7 +291,7 @@ export default {
                 :placeholder="column.placeholder" 
                 :data-mapping="column.dataMapping"
                 :disabled="column.disabled" 
-                :query-params="column.queryParams(params)"
+                :query-params="column.queryParams"
                 ></dr-popover-select>
               <el-input v-if="column.inputType === 'Textarea'" 
                 v-model="params[column.key]" 

+ 1 - 1
src/views/purchase/purchase-order/see/index.vue

@@ -167,7 +167,7 @@ export default {
               <dr-popover-select v-if="column.inputType === 'PopoverSelect'" v-model="params[column.key]" disabled
                 :value-key="column.valueKey" :source.sync="params" :title="column.title" :type="column.referName"
                 :multiple="column.multiple" :placeholder="column.placeholder" :data-mapping="column.dataMapping"
-                :query-params="column.queryParams(params)">
+                :query-params="column.queryParams">
               </dr-popover-select>
 
               <el-input v-if="column.inputType === 'Textarea'" v-model="params[column.key]" type="textarea"

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

@@ -91,7 +91,7 @@ export const SearchColumns = [
     queryParams: () => ({}),
   },
   { key: "materialDesc", title: "物料描述", inputType: "Input" },
-  { key: "source", title: "需求来源", inputType: "Input" },
+  { key: "code", title: "单据号", inputType: "Input" },
   {
     key: "puOrgIds",
     title: "采购组织",

+ 3 - 3
src/views/purchase/task/index.vue

@@ -96,7 +96,7 @@ export default {
     // 转 派
     async useShift(prop) {
       const { id } = prop;
-      const { open } = this.$refs.ShiftModTel;
+      const { open } = this.$refs.ShiftModel;
       await open(id);
     },
     // 明 细
@@ -205,7 +205,7 @@ export default {
               :value-key="column.valueKey"
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
-              :query-params="column.queryParams(params)"
+              :query-params="column.queryParams"
               @keyup.enter.native="useQuery(params, page)"
             >
             </dr-popover-select>
@@ -220,7 +220,7 @@ export default {
               :value-key="column.valueKey"
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
-              :query-params="column.queryParams(params)"
+              :query-params="column.queryParams"
             >
             </dr-popover-tree-select>
           </el-form-item>

+ 6 - 6
vue.config.js

@@ -45,8 +45,8 @@ module.exports = {
         // 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本地
-        // target: `http://127.0.0.1:8000/drp-admin`, //
+        // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地
+        target: `http://172.16.13.21:8000/drp-admin`, // 雪豹的本地
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",
@@ -144,10 +144,10 @@ module.exports = {
         },
       });
       config.optimization.runtimeChunk("single"),
-      {
-        from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件
-        to: "./", //到根目录下
-      };
+        {
+          from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件
+          to: "./", //到根目录下
+        };
     });
   },
 };