Răsfoiți Sursa

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!81
黄梓星 2 ani în urmă
părinte
comite
57ac5bea8c

+ 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;
+    },
+  },
 ];

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

@@ -29,8 +29,8 @@ export default {
     },
     // 默认查询参数
     queryParams: {
-      type: Object,
-      default: () => ({}),
+      type: Function,
+      default: () => {},
     },
     // 组件大小
     size: {
@@ -81,6 +81,7 @@ export default {
   },
   components: {},
   data() {
+    console.log(this.$props.queryParams,'queryParams----------');
     return {
       width: "50%",
       page: { pageNum: 1, pageSize: 25, total: 0 },
@@ -146,12 +147,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 +284,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

+ 37 - 24
src/views/purchase/PurchaseDemandList/add.vue

@@ -15,7 +15,7 @@
          </el-col>
 
         <el-col :span="1.5">
-            <el-form-item label="组织">
+            <el-form-item label="组织" prop="org" :rules="{ required: true, message: '请选择组织', trigger: 'blur' }">
               <el-select clearable size="small" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" style="width: 200px">
                 <el-option v-for="item in orgOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
@@ -41,7 +41,7 @@
           </el-col>
 
          <el-col :span="1.5">
-            <el-form-item label="需求客户">
+            <el-form-item label="需求客户" prop="customer" :rules="{ required: true, message: '请选择需求客户', trigger: 'blur' }">
               <el-select clearable size="small" v-model="basicForm.customer" :disabled="sonDisable" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
                 <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
@@ -82,7 +82,7 @@
           </el-col>
 
           <el-col :span="1.5">
-            <el-form-item label="需求日期">
+            <el-form-item label="需求日期" prop="demandDate" :rules="{ required: true, message: '请选择需求日期', trigger: 'blur' }">
               <el-date-picker
                 v-model="basicForm.demandDate"
                 :disabled="sonDisable"
@@ -227,7 +227,7 @@
           <el-table-column show-overflow-tooltip label="采购员" align="center"  prop="buyer"/>
           <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'materialCode'" :rules="{ required: true, message: '请选择物料编码', trigger: 'blur' }">
                 <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.materialCode" @focus="chooseMaterial(scope.$index)">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
                 </el-input>
@@ -262,7 +262,7 @@
           <el-table-column show-overflow-tooltip label="月均销量" align="center"  prop="averageQtyMonth" width="120px"/>
           <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center"  prop="qty" width="120px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
                 <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty"/>
               </el-form-item>
             </template>
@@ -271,7 +271,7 @@
           <el-table-column show-overflow-tooltip label="集团预测分类" align="center"  prop="forecastClassify" width="120px"/>
           <el-table-column show-overflow-tooltip label="交货日期" align="center"  prop="deliveryDate" width="230px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'deliveryDate'" :rules="{ required: true, message: '请填写交货日期', trigger: 'blur' }">
                 <el-date-picker
                   v-model="scope.row.deliveryDate"
                   :readonly="sonDisable"
@@ -386,7 +386,7 @@
           </el-table-column>
           <el-table-column show-overflow-tooltip label="补单供应商编码" align="center"  prop="additionalSupplier" width="200px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'additionalSupplier'" :rules="{ required: isBDXQ, message: '请选择补单供应商', trigger: 'blur' }">
                 <el-input clearable :disabled="sonDisable || BDZT" size="small" v-model="scope.row.additionalSupplier" @clear="clearHang(scope.$index, '选择补单供应商')" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
                   <el-button size="small" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
                 </el-input>
@@ -548,6 +548,7 @@ export default {
       personOptions: [],
       deptOptions: [],
       customerOptions: [],
+      isBDXQ: false
     }
   },
   created() {
@@ -562,9 +563,11 @@ export default {
     // 更改业务类型调整明细行内补单或紧急标识
     changeBillType() {
       if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.isBDXQ = true
         this.BDZT = false
         this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
       } else {
+        this.isBDXQ = false
         this.BDZT = true
         this.basicForm.puDemandItemList.forEach(item => { 
           item.isReplenishment = 'N' 
@@ -620,23 +623,27 @@ export default {
     },
     async save() {
       if(this.basicForm.puDemandItemList.length !== 0) {
-        if(this.sonPageStu == 'add') {
-          await this.handleData()
-          await addDemand(this.basicForm).then(res => {
-            console.log(333)
-            if (res.code === 200) {
-              this.$modal.msgSuccess("保存成功");
-              this.back()
-            }
-          })
-        } else if (this.sonPageStu == 'edit') {
-          editDemand(this.basicForm).then(res => {
-            if (res.code === 200) {
-              this.$modal.msgSuccess("编辑成功");
-              this.back()
+        this.$refs['basic'].validate((valid) => {
+          if(valid) {
+            if(this.sonPageStu == 'add') {
+              this.handleData()
+              addDemand(this.basicForm).then(res => {
+                console.log(333)
+                if (res.code === 200) {
+                  this.$modal.msgSuccess("保存成功");
+                  this.back()
+                }
+              })
+            } else if (this.sonPageStu == 'edit') {
+              editDemand(this.basicForm).then(res => {
+                if (res.code === 200) {
+                  this.$modal.msgSuccess("编辑成功");
+                  this.back()
+                }
+              })
             }
-          })
-        }
+          }
+        })
       } else {
         this.$modal.msgWarning("明细信息不能为空!");
       }
@@ -798,7 +805,13 @@ export default {
               if(this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
               // 详情时将收货仓库id赋值给stordocId
               // 如果业务类型为补单需求,则明细内补单供应商编码可以编辑
-              if(this.basicForm.billType == 'BDXQ') { this.BDZT = false } else { this.BDZT = true }
+              if(this.basicForm.billType == 'BDXQ') {
+                 this.BDZT = false 
+                 this.isBDXQ = true
+              } else {
+                 this.BDZT = true
+                 this.isBDXQ = false
+              }
             }
           })
         }

+ 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,41 +47,53 @@ 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() {
+      this.$refs['orderAddForm'].clearValidate();
       const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
       this.params.puOrg = orgId;
       this.params.puOrgName = orgName;
@@ -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,18 +280,16 @@ 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 {
-
       }
     },
 
-    // 下框选择改变
+    // 下框选择改变
     handleChangeSelect(val,typeName){
       if(val === 'billType'){
        this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
@@ -294,242 +298,278 @@ export default {
 
   },
   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%"
-                @change="handleChangeSelect(column.key,column.referName)"
-                >
-                <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>
@@ -538,7 +578,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>

+ 142 - 5
src/views/purchase/purchase-order/column.js

@@ -8,14 +8,14 @@ import {
 export const TableColumns = [
   // { key: "id", title: "主键" },
   // { key: "puOrg", title: "采购组织" },
-  { key: "puOrgName", title: "采购组织名称", search: true, inputType: "Input" },
+  { key: "puOrgName", title: "采购组织", inputType: "Input" },
   {
     key: "billType",
     title: "订单类型",
     inputType: "Select",
     referName: "sys_order_type",
   },
-  { key: "code", title: "订单编号", search: true, inputType: "Input" },
+  { key: "code", title: "订单编号",  inputType: "Input" },
   {
     key: "status",
     title: "单据状态",
@@ -25,7 +25,7 @@ export const TableColumns = [
   },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },
-  { key: "supplierName", title: "供应商", search: true, inputType: "Input" },
+  { key: "supplierName", title: "供应商", inputType: "Input" },
   { key: "paymentAgreementName", title: "付款协议" },
   // { key: "paymentAgreement", title: "付款协议" },
   // { key: "currency", title: "币种" },
@@ -295,9 +295,144 @@ export const TabColumns = [
   },
 ];
 
-export const SearchColumns = TableColumns.filter((element) => element.search);
+// export const SearchColumns = TableColumns.filter((element) => element.search);
+export const SearchColumns = [
+  {
+    key: "source",
+    title: "订单来源",  
+    inputType: "Select",
+    referName: "order_source", // 字典名
+    clearable:true,
+  },
+  {
+    key: "code",
+    title: "订单编号",  
+    inputType: "Input",
+    clearable:true,
+  },
+  {
+    key: "date",
+    title: "订单日期",  
+    type: "daterange",
+    inputType: "DatePicker",
+    unlinkPanels: true,
+    rangeSeparator: "至",
+    valueFormat: "yyyy-MM-dd",
+    endPlaceholder: "结束日期",
+    startPlaceholder: "开始日期",
+    clearable:true,
+  },
+  {
+    key: "status",
+    title: "单据状态",
+    inputType: "Select",
+    referName: "documents_status", // 字典名
+    clearable:true,
+  },
+  { 
+    key: "supplierName", 
+    title: "供应商", 
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "SUPPLIER_PARAM",
+    dataMapping: {
+      // supplier: "id",
+      supplierName: "name",
+    },
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "puOrgIds",
+    title: "采购组织",
+    inputType: "PopoverSelect",
+    multiple:true,
+    valueKey: "id",
+    referName: "ORG_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "materialCode",
+    title: "物料编码",
+    inputType: "PopoverSelect",
+    valueKey: "code",
+    referName: "MATERIAL_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "materialName",
+    title: "物料名称",
+    inputType: "PopoverSelect",
+    valueKey: "name",
+    referName: "MATERIAL_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  { 
+    key: "deliveryStatus",
+    title: "erp发送状态", 
+    inputType: "Select",
+    referName: "order_delivery_status", // 字典名
+    clearable:true,
+  },
+  { 
+    key: "contractNo",
+    title: "合同号", 
+    inputType: "Input",
+    clearable:true,
+  },
+  {
+    key: "projectNowName",
+    title: "在建工程项目",
+    inputType: "PopoverSelect",
+    require: true,
+    valueKey: "name",
+    referName: "PROJECT_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "buyers",
+    title: "采购员",
+    inputType: "PopoverSelect",
+    multiple:true,
+    valueKey: "code",
+    referName: "CONTACTS_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "billTypes",
+    title: "订单类型",
+    inputType: "Select",
+    referName: "sys_order_type", // 字典名
+    multiple:true,
+    tags:true,
+    clearable:true,
+  },
+  { 
+    key: "demandCode",
+    title: "采购需求单号", 
+    inputType: "Input",
+    clearable:true,
+  },
+  { 
+    key: "isDrug",
+    title: "物料药品属性", 
+    inputType: "SelectCheck",
+    clearable:true,
+  },
+];
 
 const NewColumns = initColumns(TableColumns);
+const NewSearchColumns = initColumns(SearchColumns);
 const NewTabColumns = TabColumns.map((element) => ({
   ...element,
   tableColumns: initColumns(element.tableColumns),
@@ -307,4 +442,6 @@ export const SelectColumns = NewColumns.filter(column => column.inputType === 'S
 
 NewTabColumns.forEach(column => {
   SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
-});
+});
+
+SelectColumns.push(...NewSearchColumns.filter(column => column.inputType === 'Select'))

+ 0 - 1
src/views/purchase/purchase-order/components/FileUploadCenter/index.vue

@@ -73,7 +73,6 @@ export default {
     }
   },
   data() {
-    console.log(process.env, 'process.env');
     return {
       number: 0,
       uploadList: [],

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

@@ -220,6 +220,12 @@ export default {
     handleIsRevise(status) {
       return status == '2';
     },
+     // 下拉框选择改变
+     handleChangeSelect(val,typeName){
+      if(val === 'billType'){
+       this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
+      }
+    },
   },
   created() {
     console.log("EDIT CREATED");
@@ -291,7 +297,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]" 
@@ -316,6 +322,7 @@ export default {
                 :clearable="column.clearable" 
                 :placeholder="column.placeholder" 
                 style="width: 100%"
+                @change="handleChangeSelect(column.key,column.referName)"
                 >
                 <el-option 
                   v-for="item in dict.type[column.referName]" 

+ 72 - 6
src/views/purchase/purchase-order/index.vue

@@ -86,6 +86,12 @@ export default {
     },
     // 查询操作
     handleQueryList() {
+      console.log(this.params,'this.params---------------------');
+      let {date} = this.params;
+      if(date){
+        this.params.startDate = date[0];
+        this.params.endDate = date[1];
+      }
       this.fetchList(this.params, this.page);
     },
     // 重置操作
@@ -317,16 +323,76 @@ export default {
       :model="params" 
       style="padding: 20px 0 0 0"
     >
-      <el-row :gutter="24" style="display:flex; flex-wrap: wrap;">
+      <el-row :gutter="24" >
         <el-col :span="20">
-          <el-row :gutter="20">
+          <el-row :gutter="20" style="display:flex; flex-wrap: wrap;">
             <el-col 
               v-for="column in showSearchColumns" 
               :key="column.title" 
               :xl="6" :lg="6" :md="8" :sm="12" :xs="24"
             >
               <el-form-item :prop="column.key" :label="column.title">
-                <el-input v-model="params[column.key]" :placeholder="column.placeholder"></el-input>
+
+                <el-input v-if="column.inputType === 'Input'" 
+                  v-model="params[column.key]" 
+                  :placeholder="column.placeholder"
+                ></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"
+                  :readonly="column.readonly"
+                  :value-key="column.valueKey"
+                  :placeholder="column.placeholder"
+                  :data-mapping="column.dataMapping"
+                  :query-params="column.queryParams(params)"
+                ></dr-popover-select>
+                <!-- @keyup.enter.native="useQuery(params, page)" -->
+
+                <el-select v-if="column.inputType === 'Select'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                :multiple="column.multiple"
+                :collapse-tags="column.tags"
+                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>
+              <!-- 只有是否 -->
+              <el-select v-if="column.inputType === 'SelectCheck'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                style="width: 100%"
+                >
+                <el-option key="N" label="否" value="N"></el-option>
+                <el-option key="Y" label="是" value="Y"></el-option>
+              </el-select>
+
+              <el-date-picker v-if="column.inputType === 'DatePicker'" 
+                v-model="params[column.key]"
+                size="mini"
+                type="daterange"
+                :value-format="column.valueFormat"
+                :unlink-panels="column.unlinkPanels"
+                :picker-options="column.pickerOptions"
+                :range-separator="column.rangeSeparator"
+                :end-placeholder="column.endPlaceholder"
+                :start-placeholder="column.startPlaceholder"
+                :clearable="column.clearable"
+                style="width: 100%"
+              >
+              </el-date-picker>
               </el-form-item>
             </el-col>
           </el-row>
@@ -339,10 +405,10 @@ export default {
       </el-row>
     </el-form>
 
-    <!-- <el-divider>
+    <el-divider>
       <i :class="isSimpleSearch ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="cursor: pointer"
         @click="handleSearchChange"></i>
-    </el-divider> -->
+    </el-divider>
 
     <!-- 操作 -->
     <el-row :gutter="24" style="padding: 0 20px">
@@ -395,7 +461,7 @@ export default {
       >
 
         <template slot-scope="scope">
-          <dict-tag v-if="column.referName" 
+          <dict-tag v-if="column.inputType === 'Select'" 
             size="small" 
             :value="scope.row[column.key]"
             :options="dict.type[column.referName]"

+ 3 - 2
src/views/purchase/purchase-order/see/index.vue

@@ -94,7 +94,8 @@ export default {
       let {source,status,deliveryStatus} = this.params;
 
       // 自制 & 状态为:自由态、驳回
-      if(source === '3' &&(status === '0' || status === '3')){
+      // if(source === '3' &&(status === '0' || status === '3')){
+      if(status === '2'){
 
         // 发送NC之后展示 SUCCESS("0","成功"),SEND_IN("1","发送中"),FAILURE("2","失败");
         //    未发送                发送过但未成功
@@ -167,7 +168,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>

+ 12 - 0
src/views/purchase/transferOrder/add.vue

@@ -317,6 +317,7 @@
                   :readonly="sonDisable"
                   type="date"
                   size="small"
+                  :picker-options="pickerOptionsEnd"
                   value-format="yyyy-MM-dd">
                 </el-date-picker>
               </el-form-item>
@@ -681,6 +682,17 @@ export default {
       receiveInfo: [],
       priceList: [],
       resultList: [],
+      pickerOptionsEnd: {
+        disabledDate: (time) => {
+          let beginDateVal = this.basicForm.billDate;
+          if (beginDateVal) {
+            return (
+              time.getTime() <
+              new Date(beginDateVal).getTime()
+            );
+          }
+        }
+      }
     }
   },
   created() {

+ 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: "./", //到根目录下
+        };
     });
   },
 };