Browse Source

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!356
黄梓星 1 year ago
parent
commit
2880e061f1

+ 2 - 2
src/components/FileUpload/index.vue

@@ -79,12 +79,12 @@ export default {
     // 大小限制(MB)
     fileSize: {
       type: Number,
-      default: 5,
+      default: 100,
     },
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {
       type: Array,
-      default: () => ["doc", "xls", "ppt", "txt", "pdf"],
+      default: () => ["doc", "xls", "ppt", "txt", "pdf",'png', 'jpg', 'jpeg'],
     },
     // 是否显示提示
     isShowTip: {

+ 137 - 0
src/components/date-wrapper/index.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class="date-wrapper">
+    <el-date-picker 
+      :type="type" 
+      :placeholder="startPlaceholder" 
+      :clearable="clearable"  
+      :value-format="valueFormat" 
+      v-model="startTime"
+      :picker-options="pickerOptions" 
+      ></el-date-picker>
+      <span style="padding: 0 3px">{{rangeSeparator}}</span>
+    <el-date-picker 
+      :type="type" 
+      :placeholder="endPlaceholder" 
+      :clearable="clearable" 
+      :value-format="valueFormat" 
+      v-model="endTime" 
+      :picker-options="pickerOptions1" 
+      ></el-date-picker>
+  </div>
+</template>
+<script>
+
+  export default {
+    name: "dateWrapper",
+    props:{
+      value:{
+        type:Array,
+        require:true,
+      },
+      rangeSeparator:{
+        type:String,
+        default:'-'
+      },
+      type:{
+        type:String,
+        default:'date',
+      },
+      valueFormat:{
+        type:String,
+        default:'yyyy-MM-dd',
+      },
+      startPlaceholder:{
+        type:String,
+        default:'选择开始日期'
+      },
+      endPlaceholder:{
+        type:String,
+        default:'选择结束日期'
+      },
+      clearable:{
+        type:Boolean,
+        require:false,
+      }
+    },
+    computed:{
+      startTime:{
+        get(){
+          console.log(this.value,'this.value');
+          return (this.value && this.value[0]) || '';
+        },
+        set(value){
+          console.log(value,'startTime');
+          this.$emit('input',[value,this.endTime])
+        }
+      },
+      
+      endTime: {
+        get(){
+          return (this.value &&this.value[1]) || '';
+        },
+        set(value){
+          console.log(value,'endTime');
+          this.$emit('input',[this.startTime,value])
+        }
+      },
+
+      pickerOptions: {
+        get(){
+          const that = this
+          return {
+            disabledDate(time) {
+              if(that.endTime && that.endTime !== ''){
+                return time.getTime() > new Date(that.endTime).getTime()
+              }
+            }
+          }
+        },
+        set(value){
+          this.$emit("input", value);
+        }
+      },
+      pickerOptions1:{
+        get(){
+          const that = this
+          return {
+            disabledDate(time) {
+              if(that.startTime && that.startTime !== ''){
+                return (time.getTime()+ 3600 * 1000 * 24) < new Date(that.startTime).getTime()
+              }
+            }
+          }
+        },
+        set(value){
+          this.$emit("input", value);
+        }
+      }
+    },
+    data() {
+      return {
+        // form:{
+        //   startTime: '',
+        //   endTime: '',
+        // }
+      }
+    }
+  }
+</script>
+<style lang="scss">
+  .date-wrapper{
+    display: flex;
+    justify-content: flex-start;
+    vertical-align: center;
+    .el-date-editor{
+      // width: 102px !important;
+      .el-input__inner{
+        padding: 0px 0px 0 10px !important;
+      }
+      .el-input__prefix{
+        display: none;
+      }
+      .el-input__suffix{
+        text-align: right;
+      }
+    }
+  }
+</style>

+ 11 - 0
src/components/super-search/index.vue

@@ -25,6 +25,7 @@ export default {
       import("@/components/popover-tree-select/index.vue"),
     ElPopoverMultipleTreeSelect: () =>
       import("@/components/popover-tree-select/multiple.vue"),
+    ElDateWrapper: () => import("@/components/date-wrapper/index.vue"),
   },
   data() {
     const { columns } = this.$props;
@@ -172,6 +173,16 @@ export default {
               style="width: 100%"
             >
             </component>
+
+            <component
+              v-if="attr.is === 'el-date-wrapper'"
+              v-bind="attr"
+              v-model="innerValue[item.key]"
+              :source.sync="innerValue"
+              @change="$emit('submit')"
+              style="width: 100%"
+            >
+            </component>
           </el-form-item>
         </el-col>
       </el-row>

+ 224 - 54
src/views/material/basicFile/columns.js

@@ -1,29 +1,56 @@
 export const SearchColumns = [
   {
+    item:{
+      key: "codes",
+      title: "物料编码",  
+    },
+    attr:{
+      clearable:true,
+      is: "el-popover-multiple-select-v2",
+      valueKey: "code",
+      referName: "MATERIAL_PARAM",
+    },
+  },
+  {
+    item:{
+      key: "name",
+      title: "物料名称",  
+    },
+    attr:{
+      clearable:true,
+      is: "el-popover-select-v2",
+      valueKey: "name",
+      referName: "MATERIAL_PARAM",
+    },
+  },
+  {
     item: {
-      key: "classifyIdName",
+      key: "classifys",
       title: "物料分类",
     },
     attr: {
-      is: "el-popover-tree-select",
+      is: "el-popover-multiple-tree-select",
       referName: "MATERIALCLASSIFY_PARAM",
-      valueKey: "name",
+      valueKey: "id",
       clearable:true,
-      dataMapping: {
-        classifyId: "id",
-      },
+      // dataMapping: {
+      //   classifys: "id",
+      // },
     },
   },
   {
     item:{
-      key: "codes",
-      title: "物料编码",  
+      key: "puPersonnelIdName",
+      title: "采购员",
     },
-    attr:{
+    attr: {
       clearable:true,
-      is: "el-popover-multiple-select-v2",
-      valueKey: "code",
-      referName: "MATERIAL_PARAM",
+      is: "el-popover-select-v2",
+      referName: "CONTACTS_PARAM",
+      valueKey: "name",
+      dataMapping: {
+        puPersonnelId: "code",
+      },
     },
   },
   {
@@ -43,8 +70,19 @@ export const SearchColumns = [
   },
   {
     item:{
+      key: "isEnable",
+      title: "启用状态",  
+    },
+    attr:{
+      clearable:true,
+      is: "el-select",
+      dictName: "material_enable",
+    },
+  },
+  {
+    item:{
       key: "isMedicine",
-      title: "医药物料",  
+      title: "是否医药物料",  
     },
     attr:{
       clearable:true,
@@ -52,40 +90,93 @@ export const SearchColumns = [
       dictName: "sys_number_yes_no",
     },
   },
-
-
-
-
-
-
   {
     item:{
-      key: "name",
-      title: "物料名称",  
+      key: "medicalInstruments",
+      title: "医疗器械",  
     },
     attr:{
       clearable:true,
-      is: "el-popover-select-v2",
-      valueKey: "name",
-      referName: "MATERIAL_PARAM",
+      is: "el-select",
+      dictName: "medical_instruments",
     },
   },
-  
   {
     item:{
-      key: "isEnable",
-      title: "启用状态",  
+      key: "specification",
+      title: "规格",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  {
+    item:{
+      key: "model",
+      title: "型号",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  // {
+  //   item:{
+  //     key: "model",
+  //     title: "品牌",
+  //   },
+  //   attr: {
+  //     clearable:true,
+  //     is: "el-input",
+  //   },
+  // },
+  {
+    item:{
+      key: "version",
+      title: "版本号",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  {
+    item:{
+      key: "registrant",
+      title: "注册人",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  {
+    item:{
+      key: "registrationNo",
+      title: "注册证号",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  {
+    item:{
+      key: "serialNoManager",
+      title: "是否序列号管理",  
     },
     attr:{
       clearable:true,
       is: "el-select",
-      dictName: "material_enable",
+      dictName: "sys_number_yes_no",
     },
   },
+
   {
     item:{
-      key: "puPersonnelIdName",
-      title: "采购员",
+      key: "createByName",
+      title: "创建人",
     },
     attr: {
       clearable:true,
@@ -93,12 +184,114 @@ export const SearchColumns = [
       referName: "CONTACTS_PARAM",
       valueKey: "name",
       dataMapping: {
-        puPersonnelId: "code",
+        createBy: "code",
+      },
+    },
+  },
+  
+  {
+    item:{
+      key: "updateByName",
+      title: "最后修改人",
+    },
+    attr: {
+      clearable:true,
+      is: "el-popover-select-v2",
+      referName: "CONTACTS_PARAM",
+      valueKey: "name",
+      dataMapping: {
+        updateBy: "code",
       },
     },
   },
   {
     item:{
+      key: "createTimeQueue",
+      title: "创建时间",
+      span:12,
+    },
+    attr: {
+      clearable:true,
+      is: "el-date-wrapper",
+    },
+  },
+  // {
+  //   item:{
+  //     key: "createTimeEnd",
+  //     title: "创建时间结束",
+  //   },
+  //   attr: {
+  //     clearable:true,
+  //     is: "el-input",
+  //   },
+  // },
+  {
+    item:{
+      key: "updateTimeQueue",
+      title: "修改时间",
+      span:12,
+    },
+    attr: {
+      clearable:true,
+      is: "el-date-wrapper",
+    },
+  },
+  // {
+  //   item:{
+  //     key: "updateTimeBegin",
+  //     title: "最后修改时间开始",
+  //   },
+  //   attr: {
+  //     clearable:true,
+  //     is: "el-input",
+  //   },
+  // },
+  // {
+  //   item:{
+  //     key: "updateTimeEnd",
+  //     title: "最后修改时间结束",
+  //   },
+  //   attr: {
+  //     clearable:true,
+  //     is: "el-input",
+  //   },
+  // },
+
+  
+
+
+
+
+  
+  
+  
+];
+
+export const OtherDictColumns = [
+  {
+    item:{
+      key:"expiryUnitId",
+      title:'效期单位',
+    },
+    attr:{
+      is: "el-select",
+      dictName: "period_unit",
+    }
+  },
+  {
+    item:{
+      key:'usefulLifeUnitId',
+      title:'有效期至单位',
+    },
+    attr:{
+      is: "el-select",
+      dictName: "expiry_date",
+    }
+  },
+ 
+ 
+  {
+    item:{
       key: "registrant",
       title: "注册人/上市许可持有人",
     },
@@ -153,28 +346,5 @@ export const SearchColumns = [
       dictName: "abc_type",
     }
   },
-];
-
-export const OtherDictColumns = [
-  {
-    item:{
-      key:"expiryUnitId",
-      title:'效期单位',
-    },
-    attr:{
-      is: "el-select",
-      dictName: "period_unit",
-    }
-  },
-  {
-    item:{
-      key:'usefulLifeUnitId',
-      title:'有效期至单位',
-    },
-    attr:{
-      is: "el-select",
-      dictName: "expiry_date",
-    }
-  },
   
 ]

+ 44 - 34
src/views/material/basicFile/index.vue

@@ -99,7 +99,7 @@
         <el-col :span="1.5">
           <el-button-group>
             <el-button size="small" @click="handleImport" v-hasPermi="['system:material:import']">批量导入</el-button>
-            <el-button size="small" @click="handleQueryExport" v-hasPermi="['system:material:export']">批量导出</el-button>
+            <el-button size="small" @click="handleExport" v-hasPermi="['system:material:export']">批量导出</el-button>
           </el-button-group>
         </el-col>
 
@@ -206,6 +206,7 @@
     components: {
       ElSuperSearch: () => import("@/components/super-search/index.vue"),
       ElDictTag: () => import("@/components/DictTag/index.vue"),
+      
     },
     data() {
       const params = this.$init.params(SearchColumns);
@@ -459,13 +460,8 @@
         this.importData.list = fileList;
       },
 
-      // 查询条件导出
-      handleQueryExport(){
-        console.log(this.params,'this.params');
-        this.download('/system/material/export', this.params, `物料基本信息${new Date().getTime()}.xlsx`);
-      },
-      // 多选批量导出
-      handleSelectExport() {
+      // 批量导出
+      handleExport() {
 
         let ids = this.checkedList.length ? this.checkedList.map(i => i.id) : [];
 
@@ -477,11 +473,7 @@
           }
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
-          this.$notify({
-                title:'警告',
-                message: '请选择需要导出的数据!',
-                type: 'warning'
-              });
+          this.download('/system/material/export', this.params, `物料基本信息${new Date().getTime()}.xlsx`);
         }
 
       },
@@ -542,31 +534,49 @@
         this.checkedList = selection;
       },
       // 获取物料列表信息
-      getMaterialList(templateCode, query) {
-        // (params, page)
-        let _this = this;
-        this.loading = true;
-        let page = {
-          pageNum: this.queryParams.pageNum,
-          pageSize: this.queryParams.pageSize,
-        }
+      async getMaterialList(templateCode, query) {
 
-        let param = {
-          templateCode,
-          ...this.params
-          // ...this.queryForm
-        }
-        // console.log(param, 'param');
-        materialApi.materialList(param, page).then((res) => {
-          _this.loading = false;
-          console.log(res, '获取物料列表信息以及表头字段');
-          let {code, data} = res;
+        try {
+          this.loading = true;
+          let page = {
+            pageNum: this.queryParams.pageNum,
+            pageSize: this.queryParams.pageSize,
+          }
+
+          let param = {
+            templateCode,
+            ...this.params,
+            createTimeBegin: (this.params.createTimeQueue && this.params.createTimeQueue[0]) || '',
+            createTimeEnd:(this.params.createTimeQueue && this.params.createTimeQueue[1]) || '',
+            updateTimeBegin:(this.params.updateTimeQueue && this.params.updateTimeQueue[0]) || '',
+            updateTimeEnd:(this.params.updateTimeQueue && this.params.updateTimeQueue[1]) || ''
+          }
+
+          console.log(param,'param--------------');
+
+          let {code,data} = await  materialApi.materialList(param, page);
+          
           if (code == 200) {
-            _this.taskList = data.tableBody.rows;
-            _this.total = data.tableBody.total;
+            this.taskList = data.tableBody.rows;
+            this.total = data.tableBody.total;
 
           }
-        })
+        } catch (error) {
+          
+        }finally{
+          this.loading = false;
+        }
+       
+        // materialApi.materialList(param, page).then((res) => {
+        //   _this.loading = false;
+        //   console.log(res, '获取物料列表信息以及表头字段');
+        //   let {code, data} = res;
+        //   if (code == 200) {
+        //     _this.taskList = data.tableBody.rows;
+        //     _this.total = data.tableBody.total;
+
+        //   }
+        // })
       },
       // 获取物料列表表头
       getTagList(templateCode) {

+ 1 - 3
src/views/purchase/contract/add/columns.js

@@ -206,9 +206,7 @@ export default function useColumns() {
         pickerOptions: (prop) => {
           return {
             disabledDate(time) {
-              return (
-                time.getTime() < Date.now(prop.effectiveDate) - 3600 * 1000 * 24
-              );
+              return time.getTime() < Date.now(prop.effectiveDate);
             },
           };
         },

+ 1 - 1
src/views/purchase/contract/add/index.vue

@@ -134,7 +134,7 @@ export default {
         this.params.puDeptName = puDeptName;
         //
         const { title } = this.$props;
-        this.params.source = title === "新 增" ? "自制" : "期初补录";
+        this.params.source = title === "新增" ? "自制" : "期初补录";
         //
         const { id, code, name } = await currency("人民币");
         this.params.currency = id;

+ 1 - 3
src/views/purchase/contract/edit/columns.js

@@ -206,9 +206,7 @@ export default function useColumns() {
         pickerOptions: (prop) => {
           return {
             disabledDate(time) {
-              return (
-                time.getTime() < Date.now(prop.effectiveDate) - 3600 * 1000 * 24
-              );
+              return time.getTime() < Date.now(prop.effectiveDate);
             },
           };
         },

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

@@ -115,19 +115,19 @@ export default {
     async useSee(prop) {
       const { id } = prop;
       this.drawerVisible = true;
-      this.components.title = id ? "明 细-" + id : "明 细";
+      this.components.title = id ? `明细-${id}` : "明细";
       this.components.is = "SeeFormModel";
     },
     // 新 增
     useAdd() {
       this.drawerVisible = true;
-      this.components.title = "新 增";
+      this.components.title = "新增";
       this.components.is = "AddFormModel";
     },
     // 期 初 补 录
     useReord() {
       this.drawerVisible = true;
-      this.components.title = "期   录";
+      this.components.title = "期初补录";
       this.components.is = "AddFormModel";
     },
     // 编 辑
@@ -214,14 +214,14 @@ export default {
           @success="useQuery(params, page)"
         ></pige-button>
       </el-button-group>
-      <el-button-group>
+      <!-- <el-button-group>
         <export-button
           :size="size"
           :page="page"
           :data="params"
           @success="useQuery(params, page)"
         ></export-button>
-      </el-button-group>
+      </el-button-group> -->
     </div>
     <el-super-table
       v-model="tableData"

+ 272 - 222
src/views/purchase/contract/see/columns.js

@@ -3,10 +3,11 @@ import CONFIG from "@/config";
 export default function useColumns() {
   const TableColumns = [
     {
-      item: { width:100,key: "puOrgName", title: "采购组织", require: true },
+      item: { width: 100, key: "puOrgName", title: "采购组织", require: true },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "ORG_PARAM",
         dataMapping: {
           puOrg: "code",
@@ -14,9 +15,12 @@ export default function useColumns() {
         },
       },
     },
-    { item: { width:100,key: "code", title: "合同编码" }, attr: { is: "el-input" } },
     {
-      item: { width:100,key: "status", title: "状态" },
+      item: { width: 100, key: "code", title: "合同编码" },
+      attr: { is: "el-input" },
+    },
+    {
+      item: { width: 100, key: "status", title: "状态" },
       attr: {
         is: "el-dict-tag",
         dictName: "documents_status",
@@ -25,17 +29,18 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "lastPuMoney", title: "上年度采购额" },
+      item: { width: 100, key: "lastPuMoney", title: "上年度采购额" },
       attr: {
         is: "el-input-number",
         precision: CONFIG.precision,
       },
     },
     {
-      item: { width:100,key: "buyerName", title: "采购员", require: true },
+      item: { width: 100, key: "buyerName", title: "采购员", require: true },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "CONTACTS_PARAM",
         dataMapping: {
           buyer: "code",
@@ -46,10 +51,11 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "supplierName", title: "供应商", require: true },
+      item: { width: 100, key: "supplierName", title: "供应商", require: true },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "SUPPLIER_PARAM",
         dataMapping: {
           supplier: "code",
@@ -58,21 +64,27 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "contractType", title: "合同类型", require: true },
+      item: {
+        width: 100,
+        key: "contractType",
+        title: "合同类型",
+        require: true,
+      },
       attr: { is: "el-dict-tag", dictName: "puarchase_contract_contract_type" },
     },
     {
-      item: { width:100,key: "puMoneyYear", title: "本年度采购额" },
+      item: { width: 100, key: "puMoneyYear", title: "本年度采购额" },
       attr: {
         is: "el-input-number",
         precision: CONFIG.precision,
       },
     },
     {
-      item: { width:100,key: "puDeptName", title: "采购部门", require: true },
+      item: { width: 100, key: "puDeptName", title: "采购部门", require: true },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "DEPT_PARAM",
         dataMapping: {
           puDept: "code",
@@ -81,33 +93,63 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "supplierTier", title: "供应商层级", require: true },
+      item: {
+        width: 100,
+        key: "supplierTier",
+        title: "供应商层级",
+        require: true,
+      },
       attr: { is: "el-dict-tag", dictName: "puarchase_contract_supplier_tier" },
     },
     {
-      item: { width:100,key: "contractName", title: "合同名称", require: true },
+      item: {
+        width: 100,
+        key: "contractName",
+        title: "合同名称",
+        require: true,
+      },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
+      item: {
+        width: 100,
+        key: "grossRateAverage",
+        title: "平均毛利率 (%)",
+        require: true,
+      },
       attr: {
         is: "el-input-number",
         precision: 2,
       },
     },
     {
-      item: { width:100,key: "approveFlow", title: "审批流程", require: true },
+      item: {
+        width: 100,
+        key: "approveFlow",
+        title: "审批流程",
+        require: true,
+      },
       attr: { is: "el-dict-tag", dictName: "puarchase_contract_approve_flow" },
     },
     {
-      item: { width:100,key: "consumableClass", title: "耗材类别", require: true },
+      item: {
+        width: 100,
+        key: "consumableClass",
+        title: "耗材类别",
+        require: true,
+      },
       attr: {
         is: "el-dict-tag",
         dictName: "puarchase_contract_consumable_class",
       },
     },
     {
-      item: { width:100,key: "effectiveDate", title: "合同生效日期", require: true },
+      item: {
+        width: 100,
+        key: "effectiveDate",
+        title: "合同生效日期",
+        require: true,
+      },
       attr: {
         is: "el-date-picker",
         valueFormat: "yyyy-MM-dd",
@@ -115,7 +157,8 @@ export default function useColumns() {
     },
     {
       item: {
-        width:100,key: "brandGrossRate",
+        width: 100,
+        key: "brandGrossRate",
         title: "同类品牌及毛利率 (%)",
         require: true,
       },
@@ -125,25 +168,46 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "contractFormat", title: "合同格式", require: true },
+      item: {
+        width: 100,
+        key: "contractFormat",
+        title: "合同格式",
+        require: true,
+      },
       attr: {
         is: "el-dict-tag",
         dictName: "puarchase_contract_contract_format",
       },
     },
     {
-      item: { width:100,key: "productName", title: "产品类别&名称", require: true },
+      item: {
+        width: 100,
+        key: "productName",
+        title: "产品类别&名称",
+        require: true,
+      },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "endDate", title: "合同终止日期", require: true },
+      item: {
+        width: 100,
+        key: "endDate",
+        title: "合同终止日期",
+        require: true,
+      },
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
     },
     {
-      item: { width:100,key: "invoiceTax", title: "发票税率 (%)", require: true },
+      item: {
+        width: 100,
+        key: "invoiceTax",
+        title: "发票税率 (%)",
+        require: true,
+      },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "ntaxrate",
+        valuewidth: 100,
+        key: "ntaxrate",
         referName: "TAX_RATE_PARAM",
         dataMapping: {
           invoiceTax: "ntaxrate",
@@ -151,29 +215,40 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "emergencyDegree", title: "紧急程度", require: true },
+      item: {
+        width: 100,
+        key: "emergencyDegree",
+        title: "紧急程度",
+        require: true,
+      },
       attr: {
         is: "el-dict-tag",
         dictName: "puarchase_contract_emergency_degree",
       },
     },
     {
-      item: { width:100,key: "project", title: "项目医院", require: true },
+      item: { width: 100, key: "project", title: "项目医院", require: true },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "deliveryType", title: "交货方式", require: true },
+      item: {
+        width: 100,
+        key: "deliveryType",
+        title: "交货方式",
+        require: true,
+      },
       attr: { is: "el-dict-tag", dictName: "puarchase_contract_delivery_type" },
     },
     {
-      item: { width:100,key: "source", title: "合同来源" },
+      item: { width: 100, key: "source", title: "合同来源" },
       attr: { is: "el-input", value: "自制", disabled: true },
     },
     {
-      item: { width:100,key: "contractPartycName", title: "合同丙方" },
+      item: { width: 100, key: "contractPartycName", title: "合同丙方" },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "SUPPLIER_PARAM",
         dataMapping: {
           contractPartyc: "code",
@@ -182,30 +257,45 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "guaranteePeriodEnd", title: "质保期限", require: true },
+      item: {
+        width: 100,
+        key: "guaranteePeriodEnd",
+        title: "质保期限",
+        require: true,
+      },
       attr: { is: "el-input-number", precision: 2 },
     },
     {
-      item: { width:100,key: "freightMethods", title: "运费承担方式" },
+      item: { width: 100, key: "freightMethods", title: "运费承担方式" },
       attr: {
         is: "el-dict-tag",
         dictName: "puarchase_contract_freight_methods",
       },
     },
     {
-      item: { width:100,key: "signDate", title: "合同签订日期" },
+      item: { width: 100, key: "signDate", title: "合同签订日期" },
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
     },
     {
-      item: { width:100,key: "isTarget", title: "是否有指标", require: true },
+      item: { width: 100, key: "isTarget", title: "是否有指标", require: true },
       attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
     },
     {
-      item: { width:100,key: "contractTarget", title: "合同指标", require: true },
+      item: {
+        width: 100,
+        key: "contractTarget",
+        title: "合同指标",
+        require: true,
+      },
       attr: { is: "el-input", placeholder: '当【是否有指标】="有"时,必填' },
     },
     {
-      item: { width:100,key: "exemptionPostageCondtion", title: "包邮条件", span: 12 },
+      item: {
+        width: 100,
+        key: "exemptionPostageCondtion",
+        title: "包邮条件",
+        span: 12,
+      },
       attr: {
         is: "el-input",
         placeholder:
@@ -213,31 +303,37 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "isRebate", title: "是否有返利", require: true },
+      item: { width: 100, key: "isRebate", title: "是否有返利", require: true },
       attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
     },
     {
-      item: { width:100,key: "rebatePolicy", title: "返利政策", span: 18 },
+      item: { width: 100, key: "rebatePolicy", title: "返利政策", span: 18 },
       attr: {
         is: "el-input",
         placeholder: '当【是否有返利】="有"时,必填',
       },
     },
     {
-      item: { width:100,key: "externalContract", title: "外部合同号" },
+      item: { width: 100, key: "externalContract", title: "外部合同号" },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "rollbackPolicy", title: "退换货政策", require: true },
+      item: {
+        width: 100,
+        key: "rollbackPolicy",
+        title: "退换货政策",
+        require: true,
+      },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "enquiryCode", title: "询价单号" },
+      item: { width: 100, key: "enquiryCode", title: "询价单号" },
       attr: { is: "el-input" },
     },
     {
       item: {
-        width:100,key: "contractContent",
+        width: 100,
+        key: "contractContent",
         title: "合同主要内容",
         require: true,
         span: 24,
@@ -245,47 +341,66 @@ export default function useColumns() {
       attr: { is: "el-input", type: "textarea" },
     },
     {
-      item: { width:100,key: "refusalReasons", title: "拒绝理由", span: 24 },
+      item: { width: 100, key: "refusalReasons", title: "拒绝理由", span: 24 },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "pigeonhole", title: "是否归档" },
+      item: { width: 100, key: "pigeonhole", title: "是否归档" },
       attr: { is: "el-dict-tag", dictName: "sys_yes_no", disabled: true },
     },
     {
-      item: { width:100,key: "pigeonholeFile", title: "归档附件", span: 24 },
+      item: { width: 100, key: "pigeonholeFile", title: "归档附件", span: 24 },
       attr: { is: "el-file-preview", fileType: ["pdf"], disabled: true },
     },
     {
-      item: { width:100,key: "externalFile", title: "对外附件", span: 24 },
+      item: { width: 100, key: "externalFile", title: "对外附件", span: 24 },
       attr: { is: "el-file-preview", fileType: ["pdf"] },
     },
     {
-      item: { width:100,key: "puFile", title: "采购商盖章合同附件", span: 24 },
+      item: {
+        width: 100,
+        key: "puFile",
+        title: "采购商盖章合同附件",
+        span: 24,
+      },
       attr: { is: "el-file-preview", fileType: ["pdf"] },
     },
     {
-      item: { width:100,key: "supplierFile", title: "供应商盖章合同附件", span: 24 },
+      item: {
+        width: 100,
+        key: "supplierFile",
+        title: "供应商盖章合同附件",
+        span: 24,
+      },
       attr: { is: "el-file-preview", fileType: ["pdf"] },
     },
     {
-      item: { width:100,key: "projectCode", title: "项目编号" },
+      item: { width: 100, key: "projectCode", title: "项目编号" },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "projectName", title: "项目名称" },
+      item: { width: 100, key: "projectName", title: "项目名称" },
       attr: { is: "el-input" },
     },
-    { item: { width:100,key: "area", title: "区域" }, attr: { is: "el-input" } },
     {
-      item: { width:100,key: "consigneePhone", title: "收货人联系方式" },
+      item: { width: 100, key: "area", title: "区域" },
       attr: { is: "el-input" },
     },
     {
-      item: { width:100,key: "paymentAgreement", title: "付款协议", require: true },
+      item: { width: 100, key: "consigneePhone", title: "收货人联系方式" },
+      attr: { is: "el-input" },
+    },
+    {
+      item: {
+        width: 100,
+        key: "paymentAgreement",
+        title: "付款协议",
+        require: true,
+      },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "PAYAGREEMENT_PARAM",
         dataMapping: {
           paymentAgreement: "code",
@@ -294,17 +409,18 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "taxPrice", title: "价税合计" },
+      item: { width: 100, key: "taxPrice", title: "价税合计" },
       attr: {
         is: "el-input-number",
         precision: CONFIG.precision,
       },
     },
     {
-      item: { width:100,key: "currencyName", title: "币种", require: true },
+      item: { width: 100, key: "currencyName", title: "币种", require: true },
       attr: {
         is: "el-popover-select-v2",
-        valuewidth:100,key: "name",
+        valuewidth: 100,
+        key: "name",
         referName: "CURRENCY_PARAM",
         dataMapping: {
           currency: "code",
@@ -313,7 +429,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { width:100,key: "guaranteePeriod", title: "质保期" },
+      item: { width: 100, key: "guaranteePeriod", title: "质保期" },
       attr: {
         is: "el-input-number",
         precision: CONFIG.precision,
@@ -321,209 +437,166 @@ export default function useColumns() {
     },
   ].map(({ item, attr }) => ({
     attr,
-    item: { ...item, hidden: true, span: item.span || 6 },
+    item: { ...item, span: item.span || 6 },
   }));
 
   const TabColumns = [
     {
-      item: { title: "物料基本信息", width:100,key: "contractItemList" },
+      item: { title: "物料基本信息", width: 100, key: "contractItemList" },
       attr: { value: [] },
       TableColumns: [
         {
           item: {
             title: "物料名称",
-            width:100,key: "materialName",
-          },
-          attr: {
-            is: "el-popover-select-v2",
-            valuewidth:100,key: "name",
-            referName: "MATERIAL_PARAM",
-            dataMapping: {
-              material: "code",
-              materialName: "name",
-              puUnit: "unitIdName",
-              registration: "registrationNo",
-              specification: "specification",
-              manufacturer: "manufacturerIdName",
-            },
+            width: 100,
+            key: "materialName",
           },
+          attr: {},
         },
         {
           item: {
             title: "物料编码",
-            width:100,key: "material",
+            width: 100,
+            key: "material",
           },
           attr: {},
         },
         {
           item: {
             title: "规格",
-            width:100,key: "specification",
+            width: 100,
+            key: "specification",
           },
           attr: {},
         },
         {
           item: {
             title: "生产厂家",
-            width:100,key: "manufacturer",
-          },
-          attr: {
-            is: "el-input",
+            width: 100,
+            key: "manufacturer",
           },
+          attr: {},
         },
         {
-          item: { title: "采购单位", width:100,key: "puUnit" },
-          attr: {
-            is: "el-popover-select-v2",
-            valuewidth:100,key: "name",
-            referName: "UNIT_PARAM",
-            dataMapping: {
-              puUnit: "name",
-            },
-          },
+          item: { title: "采购单位", width: 100, key: "puUnit" },
+          attr: {},
         },
         {
-          item: { title: "税率%", width:100,key: "tax" },
-          attr: {
-            is: "el-popover-select-v2",
-            valuewidth:100,key: "ntaxrate",
-            referName: "TAX_RATE_PARAM",
-            dataMapping: {
-              tax: "ntaxrate",
-            },
-          },
+          item: { title: "税率%", width: 100, key: "tax" },
+          attr: {},
         },
         {
-          item: { title: "采购数量", width:100,key: "qty" },
-          attr: {
-            is: "el-input-number",
-          },
+          item: { title: "采购数量", width: 100, key: "qty" },
+          attr: {},
         },
         {
-          item: { title: "含税单价", width:100,key: "taxPrice" },
-          attr: {
-            is: "el-input-number",
-            precision: CONFIG.precision,
-          },
+          item: { title: "含税单价", width: 100, key: "taxPrice" },
+          attr: {},
         },
         {
-          item: { title: "含税金额合计", width:100,key: "taxMoney" },
-          attr: {
-            formatter: (prop) => {
-              const { qty = 0, taxPrice = 0 } = prop;
-              prop.taxMoney = (qty * taxPrice * 1);
-              return prop.taxMoney;
-            },
-          },
+          item: { title: "含税金额合计", width: 100, key: "taxMoney" },
+          attr: {},
         },
         {
-          item: { title: "无税单价", width:100,key: "taxFreePrice" },
-          attr: {
-            formatter: (prop) => {
-              const { tax = 0, taxPrice = 0 } = prop;
-              prop.taxFreePrice = ((taxPrice / (tax / 100 + 1)) * 1).toFixed(
-                CONFIG.precision
-              );
-              return prop.taxFreePrice;
-            },
-          },
+          item: { title: "无税单价", width: 100, key: "taxFreePrice" },
+          attr: {},
         },
         {
-          item: { title: "无税金额合计", width:100,key: "taxFreeMoney" },
-          attr: {
-            formatter: (prop) => {
-              const { qty = 0, tax = 0, taxPrice = 0 } = prop;
-              prop.taxFreeMoney = (
-                qty *
-                (taxPrice / (tax / 100 + 1)) *
-                1
-              );
-              return prop.taxFreeMoney;
-            },
-          },
+          item: { title: "无税金额合计", width: 100, key: "taxFreeMoney" },
+          attr: {},
         },
         {
-          item: { title: "注册证号及备案凭证号", width:100,key: "registration" },
-          attr: {
-            is: "el-input",
+          item: {
+            title: "注册证号及备案凭证号",
+            width: 100,
+            key: "registration",
           },
+          attr: {},
         },
         {
-          item: { title: "收货客户", width:100,key: "customerName" },
-          attr: {
-            is: "el-popover-select-v2",
-            valuewidth:100,key: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "code",
-              customerName: "name",
-            },
-          },
+          item: { title: "收货客户", width: 100, key: "customerName" },
+          attr: {},
         },
       ],
     },
     {
-      item: { title: "合同条款", width:100,key: "contractClauseList" },
+      item: { title: "合同条款", width: 100, key: "contractClauseList" },
       attr: {
         value: [],
       },
       TableColumns: [
         {
-          item: { title: "条款编码", width:100,key: "code", width: "auto" },
-          attr: { is: "el-input" },
+          item: { title: "条款编码", width: 100, key: "code", width: "auto" },
+          attr: {},
         },
         {
-          item: { title: "条款名称", width:100,key: "name", width: "auto" },
-          attr: { is: "el-input" },
+          item: { title: "条款名称", width: 100, key: "name", width: "auto" },
+          attr: {},
         },
         {
-          item: { title: "条款内容", width:100,key: "content", width: "auto" },
-          attr: { is: "el-input" },
+          item: {
+            title: "条款内容",
+            width: 100,
+            key: "content",
+            width: "auto",
+          },
+          attr: {},
         },
         {
-          item: { title: "变量序号", width:100,key: "variableRowno", width: "auto" },
-          attr: { is: "el-input" },
+          item: {
+            title: "变量序号",
+            width: 100,
+            key: "variableRowno",
+            width: "auto",
+          },
+          attr: {},
         },
         {
-          item: { title: "变量内容", width:100,key: "variableContent", width: "auto" },
-          attr: { is: "el-input" },
+          item: {
+            title: "变量内容",
+            width: 100,
+            key: "variableContent",
+            width: "auto",
+          },
+          attr: {},
         },
       ],
     },
     {
-      item: { title: "合同费用", width:100,key: "contractExpenseList" },
+      item: { title: "合同费用", width: 100, key: "contractExpenseList" },
       attr: {
         value: [],
       },
       TableColumns: [
         {
-          item: { title: "费用编码", width:100,key: "code", width: "auto" },
-          attr: { is: "el-input" },
+          item: { title: "费用编码", width: 100, key: "code", width: "auto" },
+          attr: {},
         },
         {
-          item: { title: "费用名称", width:100,key: "name", width: "auto" },
-          attr: { is: "el-input" },
+          item: { title: "费用名称", width: 100, key: "name", width: "auto" },
+          attr: {},
         },
         {
-          item: { title: "费用金额", width:100,key: "money", width: "auto" },
-          attr: { is: "el-input-number", precision: CONFIG.precision },
+          item: { title: "费用金额", width: 100, key: "money", width: "auto" },
+          attr: {},
         },
       ],
     },
     {
-      item: { title: "付款协议信息", width:100,key: "contractAgreementList" },
+      item: { title: "付款协议信息", width: 100, key: "contractAgreementList" },
       attr: {
         value: [],
       },
       TableColumns: [
         {
-          item: { title: "付款阶段", width:100,key: "satge" },
+          item: { title: "付款阶段", width: 100, key: "satge" },
           attr: { is: "el-input-number" },
         },
         {
           item: {
             title: "付款起点",
-            width:100,key: "origin",
+            width: 100,
+            key: "origin",
           },
           attr: {
             is: "el-dict-tag",
@@ -531,30 +604,22 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "账期天数", width:100,key: "paymetDays" },
-          attr: {
-            is: "el-input-number",
-            precision: 2,
-          },
+          item: { title: "账期天数", width: 100, key: "paymetDays" },
+          attr: {},
         },
         {
-          item: { title: "付款比例%", width:100,key: "ratio" },
-          attr: {
-            is: "el-input-number",
-            precision: CONFIG.precision,
-          },
+          item: { title: "付款比例%", width: 100, key: "ratio" },
+          attr: {},
         },
         {
-          item: { title: "付款金额", width:100,key: "money" },
-          attr: {
-            is: "el-input-number",
-            precision: CONFIG.precision,
-          },
+          item: { title: "付款金额", width: 100, key: "money" },
+          attr: {},
         },
         {
           item: {
             title: "是否预付款",
-            width:100,key: "isAdvance",
+            width: 100,
+            key: "isAdvance",
           },
           attr: {
             is: "el-dict-tag",
@@ -564,7 +629,8 @@ export default function useColumns() {
         {
           item: {
             title: "是否质保金",
-            width:100,key: "isQuality",
+            width: 100,
+            key: "isQuality",
           },
           attr: {
             is: "el-dict-tag",
@@ -574,21 +640,16 @@ export default function useColumns() {
         {
           item: {
             title: "结算方式",
-            width:100,key: "paymentMeans",
-          },
-          attr: {
-            is: "el-popover-select-v2",
-            valuewidth:100,key: "name",
-            referName: "BALATYPE_PARAM",
-            dataMapping: {
-              paymentMeans: "name",
-            },
+            width: 100,
+            key: "paymentMeans",
           },
+          attr: {},
         },
         {
           item: {
             title: "需进度确认",
-            width:100,key: "schedule",
+            width: 100,
+            key: "schedule",
           },
           attr: {
             is: "el-dict-tag",
@@ -598,38 +659,27 @@ export default function useColumns() {
       ],
     },
     {
-      item: { title: "合同执行组织范围", width:100,key: "contractApplyOrgList" },
+      item: {
+        title: "合同执行组织范围",
+        width: 100,
+        key: "contractApplyOrgList",
+      },
       attr: { value: [] },
       TableColumns: [
         {
           item: {
             title: "组织名称",
-            width:100,key: "orgName",
+            key: "orgName",
             width: "auto",
           },
-          attr: {
-            is: "el-popover-select-v2",
-            valuewidth:100,key: "name",
-            referName: "ORG_PARAM",
-            dataMapping: {
-              org: "code",
-              orgName: "name",
-            },
-          },
+          attr: {},
+        },
+        {
+          item: { title: "组织编码", key: "org", width: "auto" },
+          attr: {},
         },
-        { item: { title: "组织编码", width:100,key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ].map(({item,attr,TableColumns}) =>({
-    attr,
-    item,
-    TableColumns:TableColumns.map(({item, attr}) =>({
-      attr,
-      item: { ...item, hidden: true, span: item.span || 6 },
-  
-    }))
-
-  }))
-  ;
+  ];
   return { TableColumns, TabColumns };
 }

+ 14 - 14
src/views/purchase/purchase-order/add/column.js

@@ -336,20 +336,20 @@ export const Columns = [
     disabled:true,
    },
   // { key: "agent", title: "代理人", inputType: "Input", }, // 建议删除
-  {
-    key: "agentName",
-    title: "代理人",
-    inputType: "PopoverSelect",
-    valueKey: "code",
-    referName: "CONTACTS_PARAM",
-    dataMapping: {
-      agent: 'code',
-      agentName: 'name'
-    },
-     isShow:true,
-    queryParams: () => ({}),
-    width: 200,
-  },
+  // {
+  //   key: "agentName",
+  //   title: "代理人",
+  //   inputType: "PopoverSelect",
+  //   valueKey: "code",
+  //   referName: "CONTACTS_PARAM",
+  //   dataMapping: {
+  //     agent: 'code',
+  //     agentName: 'name'
+  //   },
+  //    isShow:true,
+  //   queryParams: () => ({}),
+  //   width: 200,
+  // },
 
   { 
     key: "isClose", 

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

@@ -248,12 +248,12 @@ export const TableColumns = [
     },
 
   },
-  { 
-    item:{ key: "agentName", title: "代理人" ,},
-    attr:{
-      isHidden:true,
-    },
-  },
+  // { 
+  //   item:{ key: "agentName", title: "代理人" ,},
+  //   attr:{
+  //     isHidden:true,
+  //   },
+  // },
   {
     item:{ 
       key: "isClose",

+ 1 - 2
vue.config.js

@@ -47,8 +47,7 @@ module.exports = {
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.21:8000/drp-admin`, //CKF本地
         // target: `http://172.16.13.43:8000/drp-admin`, //lz's localhost
-      //  target: `http://172.16.63.126:8000/drp-admin`, //wjie
-         // target: `http://127.0.0.1:8000/drp-admin`,
+        //  target: `http://127.0.0.1:8000/drp-admin`,
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",