Browse Source

Merge remote-tracking branch 'origin/dev' into dev

001295 1 year ago
parent
commit
65b01bba48
30 changed files with 396 additions and 159 deletions
  1. 2 2
      src/api/business/purchase/apply.js
  2. 144 0
      src/components/BatchImport/index.vue
  3. 1 1
      src/components/Pagination/index.vue
  4. 12 12
      src/components/popover-select/components/MATERIAL_PARAM.js
  5. 0 0
      src/views/business/spd/bo/plan/add.vue
  6. 0 0
      src/views/business/spd/bo/plan/index.vue
  7. 27 0
      src/views/business/spd/goal_management/experiment/DemoChildren.vue
  8. 48 0
      src/views/business/spd/goal_management/experiment/DemoFather.vue
  9. 35 35
      src/views/material/changeApply/add/column.js
  10. 18 18
      src/views/material/changeApply/add/index.vue
  11. 3 0
      src/views/material/requisition/add.vue
  12. 8 0
      src/views/material/requisition/columns.js
  13. 3 3
      src/views/purchase/DemandSummary/index.vue
  14. 9 17
      src/views/purchase/PurchaseDemandList/add.vue
  15. 3 3
      src/views/purchase/PurchaseDemandList/index.vue
  16. 12 15
      src/views/purchase/apply/add/columns.js
  17. 2 2
      src/views/purchase/apply/add/index.vue
  18. 12 11
      src/views/purchase/apply/copy/columns.js
  19. 4 3
      src/views/purchase/apply/copy/index.vue
  20. 13 16
      src/views/purchase/apply/edit/columns.js
  21. 3 3
      src/views/purchase/apply/edit/index.vue
  22. 13 11
      src/views/purchase/apply/see/columns.js
  23. 1 1
      src/views/purchase/apply/see/index.vue
  24. 8 0
      src/views/purchase/catalogue/columns.js
  25. 4 1
      src/views/purchase/catalogue/see/columns.js
  26. 5 1
      src/views/purchase/contract/columns.js
  27. 1 0
      src/views/purchase/purchase-order/add/index.vue
  28. 1 0
      src/views/purchase/purchase-order/edit/index.vue
  29. 3 3
      src/views/purchase/transferOrder/index.vue
  30. 1 1
      vue.config.js

+ 2 - 2
src/api/business/purchase/apply.js

@@ -9,9 +9,9 @@ export function LIST(data, params) {
   });
 }
 
-export function ITEM(data) {
+export function ITEM(data, isCopy) {
   return request({
-    url: `/pu/priceApply/${data}`,
+    url: `/pu/priceApply/${data}/${isCopy}`,
     method: "GET",
   });
 }

+ 144 - 0
src/components/BatchImport/index.vue

@@ -0,0 +1,144 @@
+
+
+<script>
+export default {
+  name:'BatchImport',
+  props:{
+    disabled:{
+      type:Boolean,
+      default:false,
+    },
+    limit:{
+      type:Number,
+      default:1,
+    },
+    fileType:{
+      type:Array,
+      default:()=>['xls', 'xlsx'],
+    },
+    size:{
+      type:String,
+      default:'mini',
+    },
+    isShowTip:{
+      type:Boolean,
+      default:true,
+    },
+    isTemplate:{
+      type:Boolean,
+      default:true,
+    },
+    fileSize: {
+      type: Number,
+      default: 100,
+    },
+  },
+  computed:{
+    tips:{
+      get(){
+        // this.accept.
+      },
+      set(){},
+    },
+     // 是否显示提示
+     showTip() {
+      return this.isShowTip && (this.fileType || this.fileSize);
+    },
+  },
+  data(){
+    return {
+      title:'批量导入',
+      visible:false,
+      loading:false,
+      fileList:[],
+
+    }
+  },
+  methods:{
+    // 确认上传
+    async submitUpload(){
+
+    },
+    // 模板下载
+    async templateDownload(){
+      // 放父组件
+      // this.download('/system/material/download', {}, `物料基本信息模板.xlsx`);
+    },
+    // 
+    beforeClose(done){
+      // 关闭前清空
+      done();
+    },
+    // 预览
+    handlePreview(){},
+    // 移除
+    handleRemove(file, fileList){
+      this.fileList = fileList;
+    },
+    // 文件改变
+    onChange(file, fileList){
+      this.fileList = fileList;
+    },
+    // 取消
+    cancal(){
+      this.visible = false;
+    },
+    
+  },
+  created(){},
+}
+</script>
+
+<template>
+  <el-button :disabled="disabled">
+    {{ title }}
+    <el-dialog 
+      :title="title" 
+      :visible.sync="visible"
+      v-loading="loading"
+      width="35%" 
+      center
+      :before-close="beforeClose"
+    >
+      <el-upload
+        ref="upload"
+        :accept="accept"
+        action="#"
+        :on-preview="handlePreview"
+        :on-remove="handleRemove"
+        :file-list="fileList"
+        :auto-upload="false"
+        :on-change="onChange" 
+        :limit="limit"
+        append-to-body
+      >
+        <el-button 
+          slot="trigger" 
+          :size="size" 
+          type="primary"
+        >选取文件</el-button>
+        <el-button 
+          v-if="isTemplate"
+          style="margin-left: 10px;" 
+          :size="size" 
+          type="success" 
+          @click="templateDownload"
+        >下载模板</el-button>
+        <div slot="tip" class="el-upload__tip" v-if="isShowTip">
+          请上传
+          <template v-if="fileSize">
+            大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
+          </template>
+          <template v-if="fileType">
+            格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
+          </template>
+        </div>
+      </el-upload>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancal">取 消</el-button>
+        <el-button type="primary" @click="submitUpload">确 定</el-button>
+      </div>
+    </el-dialog>
+  </el-button>
+</template>

+ 1 - 1
src/components/Pagination/index.vue

@@ -36,7 +36,7 @@ export default {
     pageSizes: {
       type: Array,
       default() {
-        return [1, 10, 20, 50, 100];
+        return [10, 20, 50, 100, 200, 500];
       },
     },
     // 移动端页码按钮的数量端默认值5

+ 12 - 12
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -43,18 +43,18 @@ export default [
       },
     },
   },
-  {
-    item: {
-      key: "oriRegistrationNo",
-      title: "注册证号/备案凭证编号",
-      width: "auto",
-    },
-    attr: {
-      formatter: (prop) => {
-        return prop.materialMedcine.oriRegistrationNo;
-      },
-    },
-  },
+  // {
+  //   item: {
+  //     key: "oriRegistrationNo",
+  //     title: "注册证号/备案凭证编号",
+  //     width: "auto",
+  //   },
+  //   attr: {
+  //     formatter: (prop) => {
+  //       return prop.materialMedcine.oriRegistrationNo;
+  //     },
+  //   },
+  // },
   {
     item: { key: "dosageFrom", title: "剂型", width: "auto" },
     attr: {

+ 0 - 0
src/views/business/spd/task_management/visitingPlan/add.vue → src/views/business/spd/bo/plan/add.vue


+ 0 - 0
src/views/business/spd/task_management/visitingPlan/index.vue → src/views/business/spd/bo/plan/index.vue


+ 27 - 0
src/views/business/spd/goal_management/experiment/DemoChildren.vue

@@ -0,0 +1,27 @@
+<template>
+<div>
+  <span>{{user}}</span>
+  <span><el-button type="info" @change="sendMessageToFather">change</el-button></span>
+</div>
+</template>
+
+<script>
+export default {
+  name: "DemoChildren",
+  props: ['user'],
+  data () {
+    return {
+
+    }
+  },
+  methods: {
+    sendMessageToFather() {
+      this.$emit('sendMessageToFather', 'uyasjhfasb')
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 48 - 0
src/views/business/spd/goal_management/experiment/DemoFather.vue

@@ -0,0 +1,48 @@
+<template>
+  <div>
+    <div>
+      <el-table :data="myUser">
+        <el-table-column label="name" prop="name"></el-table-column>
+        <el-table-column label="age" prop="age"></el-table-column>
+        <el-table-column>
+          <template scope="scope">
+            <el-button type="primary">主要按钮</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <DemoChildren :user="myUser" @sendMessageToFather="handlerTitle"></DemoChildren>
+  </div>
+</template>
+
+<script>
+import DemoChildren from "./DemoChildren"
+export default {
+  name: "DemoFather",
+  components: {
+    DemoChildren
+  },
+  data () {
+    return {
+      myUser: [
+        {id: null, name: 'lz', age: 12},
+        {id: 1, name: 'lz', age: 12},
+        {id: 2, name: 'lz', age: 12},
+        {id: 3, name: 'lz', age: 12},
+        {id: null, name: 'lz', age: 12}
+      ]
+    }
+  },
+  methods: {
+    handlerTitle(title) {
+      for (const element of this.myUser) {
+        element.name = title
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 35 - 35
src/views/material/changeApply/add/column.js

@@ -46,7 +46,7 @@ export default function useColumns(){
     //     is: "el-input",
     //     disabled:true,
     //   },
-      
+
     // },
     {
       item:{
@@ -58,7 +58,7 @@ export default function useColumns(){
         valueFormat: "yyyy-MM-dd HH:mm:ss",
         disabled:true,
       },
-  
+
     },
     {
       item:{
@@ -69,7 +69,7 @@ export default function useColumns(){
         is: "el-input",
         disabled:true,
       },
-  
+
     },
     {
       item:{
@@ -81,7 +81,7 @@ export default function useColumns(){
         valueFormat: "yyyy-MM-dd HH:mm:ss",
         disabled:true,
       },
-  
+
     },
     {
       item:{
@@ -92,7 +92,7 @@ export default function useColumns(){
         is: "el-input",
         disabled:true,
       },
-  
+
     },
     {
       item:{
@@ -104,14 +104,14 @@ export default function useColumns(){
         valueFormat: "yyyy-MM-dd HH:mm:ss",
         disabled:true,
       },
-  
+
     },
-    
+
   ].map(({ item, attr }) => ({
     attr,
     item: { ...item, hidden: true, span: item.span || 6 },
   }));
-  
+
   const TabColumns = [
     {
       item:{
@@ -129,7 +129,7 @@ export default function useColumns(){
             require: true,
           },
           attr:{
-            readonly:true,
+            // readonly:true,
             is: "el-popover-select-v2",
             valueKey: "code",
             referName: "MATERIAL_PARAM",
@@ -154,7 +154,7 @@ export default function useColumns(){
               threeClass:'threeClass',
               fourClass:'fourClass',
               drug:'isDrugNumber',
-              registrationNo:'oriRegistrationNo',
+              registrationNo:'registrationNo',
               dosageFrom:'dosageFrom',
               dosageFromName:'dosageFromName',
               maintenanceType:'curingType',
@@ -162,9 +162,9 @@ export default function useColumns(){
               leadTime:'deliveryPeriod',
             },
 
-            
+
           },
-         
+
         },
         {
           item:{
@@ -176,7 +176,7 @@ export default function useColumns(){
             is: "el-input",
             // disabled:true,
           },
-         
+
         },
         {
           item:{
@@ -187,7 +187,7 @@ export default function useColumns(){
             is: "el-select",
             dictName: "sys_number_yes_no", // 字典名
           },
-         
+
         },
         {
           item:{
@@ -197,7 +197,7 @@ export default function useColumns(){
           attr:{
             is: "el-input",
           },
-          
+
         },
         {
           item:{
@@ -208,7 +208,7 @@ export default function useColumns(){
           attr:{
             is: "el-input",
           },
-         
+
         },
         {
           item:{
@@ -218,7 +218,7 @@ export default function useColumns(){
           attr:{
             is: "el-input",
           },
-         
+
         },
         {
           item:{
@@ -234,7 +234,7 @@ export default function useColumns(){
               factory:'id'
             }
           },
-          
+
         },
         {
           item:{
@@ -245,7 +245,7 @@ export default function useColumns(){
           attr:{
             is: "el-input",
           },
-         
+
         },
         {
           item:{
@@ -257,7 +257,7 @@ export default function useColumns(){
             is: "el-select",
             dictName: "sys_storage_condition", // 字典名
           },
-          
+
         },
         {
           item:{
@@ -268,7 +268,7 @@ export default function useColumns(){
             is: "el-select",
             dictName: "sys_conditions_carriage", // 字典名
           },
-         
+
         },
         {
           item:{
@@ -280,7 +280,7 @@ export default function useColumns(){
             controlsPosition:"right",
             min:0
           },
-         
+
         },
         // {
         //   item:{
@@ -290,7 +290,7 @@ export default function useColumns(){
         //   attr:{
         //     is: "el-input",
         //   },
-         
+
         // },
         // {
         //   item:{
@@ -300,7 +300,7 @@ export default function useColumns(){
         //   attr:{
         //     is: "el-input",
         //   },
-         
+
         // },
         {
           item:{
@@ -311,7 +311,7 @@ export default function useColumns(){
             is: "el-input",
             disabled:true,
           },
-          
+
         },
         {
           item:{
@@ -322,7 +322,7 @@ export default function useColumns(){
             is: "el-input",
             disabled:true,
           },
-         
+
         },
         {
           item:{
@@ -333,7 +333,7 @@ export default function useColumns(){
             is: "el-input",
             disabled:true,
           },
-          
+
         },
         {
           item:{
@@ -344,7 +344,7 @@ export default function useColumns(){
             is: "el-input",
             disabled:true,
           },
-         
+
         },
         {
           item:{
@@ -355,7 +355,7 @@ export default function useColumns(){
             is: "el-select",
             dictName: "sys_medicine", // 字典名
           },
-         
+
         },
         {
           item:{
@@ -365,7 +365,7 @@ export default function useColumns(){
           attr:{
             is: "el-input",
           },
-         
+
         },
         {
           item:{
@@ -376,7 +376,7 @@ export default function useColumns(){
             is: "el-select",
             dictName: "medical_instruments", // 字典名
           },
-          
+
         },
         {
           item:{
@@ -387,7 +387,7 @@ export default function useColumns(){
             is: "el-select",
             dictName: "curing_type", // 字典名
           },
-         
+
         },
         {
           item:{
@@ -402,11 +402,11 @@ export default function useColumns(){
               dosageFrom:'id'
             }
           },
-          
+
         },
-  
+
       ]
-    }, 
+    },
   ]
 
   return {TableColumns,TabColumns}

+ 18 - 18
src/views/material/changeApply/add/index.vue

@@ -78,10 +78,10 @@ export default {
       },
       set(){},
     }
-  
+
   },
   watch: {
-    
+
   },
   methods: {
     setVisible(prop){
@@ -117,7 +117,7 @@ export default {
         if(code == 200){
           this.params = data;
         }
-        
+
       } catch (err) {
         // catch
         console.error(err);
@@ -126,7 +126,7 @@ export default {
         this.loading = false;
       }
     },
-    
+
     //
     async hide() {
       const {
@@ -145,7 +145,7 @@ export default {
     },
     //
     async useRowAdd(prop) {
-      
+
       const { TableColumns } = this.TabColumns.find(
         ({ item: { key } }) => key === prop
       );
@@ -188,7 +188,7 @@ export default {
                 message:'物料信息不能不为空!'
               })
             }
-            
+
           } catch (err) {
             // catch
             console.error(err);
@@ -217,13 +217,13 @@ export default {
               title: msg,
             });
           }
-          
+
         } catch (error) {}
         finally{
           this.loading = false;
         }
 
-        
+
         // await;
       })
     },
@@ -247,8 +247,8 @@ export default {
       @open="beforeOpen"
       v-loading="loading"
     >
-      <div 
-        slot="title" 
+      <div
+        slot="title"
         style="display: flex;
             justify-content: space-between;
             align-items: center;"
@@ -288,8 +288,8 @@ export default {
           </component
         ></template>
       </el-super-form>
-      
-  
+
+
       <el-tabs v-model="tabName" style="padding: 0 20px 20px">
         <el-tab-pane
           v-for="({ item, TableColumns: columns }, index) in TabColumns"
@@ -333,7 +333,7 @@ export default {
                   </el-option>
                 </component>
               </template>
-  
+
               <template slot="registrationNo" slot-scope="scope">
                 <component
                   v-bind="scope.attr"
@@ -344,7 +344,7 @@ export default {
                 >
                 </component>
               </template>
-  
+
               <template slot="medicalDevices" slot-scope="scope">
                 <component
                   v-bind="scope.attr"
@@ -389,8 +389,8 @@ export default {
                 >
                 </component>
               </template>
-              
-  
+
+
               <el-table-column fixed="right" label="操作" width="120" align="center">
                 <template slot="header" slot-scope="scope">
                   <el-button
@@ -420,8 +420,8 @@ export default {
         </el-tab-pane>
       </el-tabs>
 
-      
-     
+
+
     </el-drawer>
 </template>
 

+ 3 - 0
src/views/material/requisition/add.vue

@@ -1297,6 +1297,9 @@
 
               this.basicForm.updateTime = '';
 
+              this.basicForm.auditTime = '';
+              
+              this.basicForm.applyBillInfo.auditTime = '';
 
             }
 

+ 8 - 0
src/views/material/requisition/columns.js

@@ -87,6 +87,14 @@
         clearable:true,
       },
     },
+   {
+     item: { key: "materialCodes", title: "物料编码" },
+     attr: {
+       clearable: true,
+       is: "el-input",
+       placeholder: '多物料编码使用 , 隔开',
+     },
+   },
     {
       item: { key: "classifySearchList", title: "品类" },
       attr: {

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

@@ -349,7 +349,7 @@
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
           :page-sizes="[10, 20, 50, 100, 200, 500]"
-          :page-size="10"
+          :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -473,7 +473,7 @@ export default {
         isCustomerSpecified: '',
         isUrgency: '',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 100
       },
       personOptions: [],
       classOptions: [],
@@ -573,7 +573,7 @@ export default {
         isCustomerSpecified: '',
         isUrgency: '',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 100
       }
       this.getList(this.queryParams)
     },

+ 9 - 17
src/views/purchase/PurchaseDemandList/add.vue

@@ -215,7 +215,7 @@
           <ux-table-column resizable title="需求可用周期" align="center"  field="demandPeriod" width="80px"/>
           <ux-table-column resizable title="实际(业务)需求量" align="center"  field="qty" width="150px" :render-header="addRedStar" edit-render>
             <template v-slot:edit="scope">
-                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)" @paste.native="pasteMe($event, scope, scope.rowIndex)"/>
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @paste.native="pasteMe($event, scope, scope.rowIndex)"/>
             </template>
           </ux-table-column>
           <ux-table-column resizable title="紧急标识" align="center" field="isUrgency" width="100px" edit-render>
@@ -277,20 +277,24 @@
           <ux-table-column resizable title="有效期单位" align="center"  field="expiryUnit" width="100px"/>
           <ux-table-column resizable title="安全库存" align="center"  field="safeStock" width="100px"/>
           <ux-table-column resizable title="注册人" align="center"  field="registrant" width="100px"/>
-          <ux-table-column resizable title="预留比例" align="center" field="reservedProportion" width="120px" edit-render>
+          <!-- <ux-table-column resizable title="预留比例" align="center" field="reservedProportion" width="120px" edit-render>
             <template v-slot:edit="scope">
-                <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
+                <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @clear="cleanYLSL(scope)">
                   <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
                   </el-option>
                 </el-select>
             </template>
-          </ux-table-column>
+          </ux-table-column> -->
           <ux-table-column resizable title="预留周期" align="center" field="reservedPeriod" width="120px" edit-render>
             <template v-slot:edit="scope">
                 <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
             </template>
           </ux-table-column>
-          <ux-table-column resizable title="预留数量" align="center"  field="reservedQty" width="120px"/>
+          <ux-table-column resizable title="预留数量" align="center"  field="reservedQty" width="120px" edit-render>
+            <template v-slot:edit="scope">
+                <el-input type="number" min="0" oninput="value=value.replace(/^(0+)|[^\d]+/g, '')" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedQty"></el-input>
+            </template>
+          </ux-table-column>
           <ux-table-column resizable title="集团预测分类" align="center"  field="forecastClassify" width="120px"/>
           <ux-table-column resizable title="近一月需求" align="center"  field="onemonthAvgVolume" width="100px"/>
           <ux-table-column resizable title="近三月需求" align="center"  field="threemonthAvgVolume" width="100px"/>
@@ -862,18 +866,6 @@ export default {
           return '总供应可满足'
       }
     },
-    // 获取预留数量
-    getYLSL(scope) {
-      if (scope.row.reservedProportion) {
-        scope.row.reservedQty = Math.ceil(scope.row.reservedProportion.replace('%', '') / 100 * scope.row.qty)
-      }
-      // 如果选择预留比例,预留周期必填
-      // if(scope.row.reservedQty && scope.row.reservedQty !== 0) {
-      //   this.isYl = true
-      // } else {
-      //   this.isYl = false
-      // }
-    },
     // 清空
     cleanYLSL(scope) {
       scope.row.reservedQty = ''

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

@@ -220,7 +220,7 @@
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
           :page-sizes="[10, 20, 50, 100, 200, 500]"
-          :page-size="10"
+          :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -379,7 +379,7 @@ export default {
         materialCode: '',
         status: '',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 100
       },
       referCondition: {
         type: '',
@@ -480,7 +480,7 @@ export default {
         materialCode: '',
         status: '',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 100
       }
       this.getList(this.queryParams)
     },

+ 12 - 15
src/views/purchase/apply/add/columns.js

@@ -119,6 +119,7 @@ export default function useColumns() {
           attr: {
             is: "el-popover-select-v2",
             checkbox: true,
+            clearable: true,
             valueKey: "name",
             referName: "MATERIAL_PARAM",
             dataMapping: {
@@ -336,40 +337,36 @@ export default function useColumns() {
           attr: {
             formatter: (prop) => {
               const { priceDiffer = 0, recentlyPrice = 0 } = prop;
-              return (prop.increase = recentlyPrice
-                ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(
-                    2
-                  )
-                : "0.00");
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%' : "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : prop * 1;
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             formatter: (prop) => {
-              const { priceDiffer = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yAffectedAmount =
-                Number(priceDiffer) * Number(yPurchaseQuantity));
+              const { priceDiffer = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.yaffectedAmount =
+                Number(priceDiffer) * Number(ypurchaseQuantity));
             },
           },
         },

+ 2 - 2
src/views/purchase/apply/add/index.vue

@@ -86,7 +86,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
+          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: "", priceType: prop.row.priceType});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
             ...item,
@@ -122,7 +122,7 @@
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst

+ 12 - 11
src/views/purchase/apply/copy/columns.js

@@ -119,6 +119,7 @@ export default function useColumns() {
           attr: {
             is: "el-popover-select-v2",
             checkbox: true,
+            clearable: true,
             valueKey: "name",
             referName: "MATERIAL_PARAM",
             dataMapping: {
@@ -336,36 +337,36 @@ export default function useColumns() {
           attr: {
             formatter: (prop) => {
               const { priceDiffer = 0, recentlyPrice = 0 } = prop;
-              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(2) : "0.00");
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%' : "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             formatter: (prop) => {
-              const { priceDiffer = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yAffectedAmount = (
-                Number(priceDiffer) * Number(yPurchaseQuantity)
+              const { priceDiffer = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.yaffectedAmount = (
+                Number(priceDiffer) * Number(ypurchaseQuantity)
               ));
             },
           },

+ 4 - 3
src/views/purchase/apply/copy/index.vue

@@ -102,7 +102,7 @@ export default {
         const {
           recentlyPrice = "0",
           isApprovalFirst = "N",
-        } = await fetchExist({ puOrg, customer, supplier, materialCode });
+        } = await fetchExist({ puOrg, customer, supplier, materialCode, priceType: prop.row.priceType });
         this.loading = false;
         await this.onRowAdd(this.tabName, {
           ...item,
@@ -138,7 +138,7 @@ export default {
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst
@@ -152,7 +152,8 @@ export default {
         const { TableColumns } = TabColumns.find(
           ({ item: { key } }) => key === tabName
         );
-        const { code, data } = await ITEM(prop);
+        console.log('看看prop', prop)
+        const { code, data } = await ITEM(prop, true);
         if (code === 200) {
           this.params = data;
           this.params.priceApplyItems = data.priceApplyItems.map((item) => ({

+ 13 - 16
src/views/purchase/apply/edit/columns.js

@@ -87,7 +87,7 @@ export default function useColumns() {
     },
     {
       item: { key: "sourceType", title: "来源单据类型" },
-      attr: { is: "el-input", disabled: true, readonly: true },
+      attr: { is: "el-select", dictName: "price_source", disabled: true, readonly: true },
     },
     {
       item: { key: "status", title: "单据状态" },
@@ -119,6 +119,7 @@ export default function useColumns() {
           attr: {
             is: "el-popover-select-v2",
             checkbox: true,
+            clearable:true,
             valueKey: "name",
             referName: "MATERIAL_PARAM",
             dataMapping: {
@@ -336,40 +337,36 @@ export default function useColumns() {
           attr: {
             formatter: (prop) => {
               const { priceDiffer = 0, recentlyPrice = 0 } = prop;
-              return (prop.increase = recentlyPrice
-                ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(
-                    2
-                  )
-                : "0.00");
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%': "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             formatter: (prop) => {
-              const { priceDiffer = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yAffectedAmount = (
-                Number(priceDiffer) * Number(yPurchaseQuantity)
+              const { priceDiffer = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.yaffectedAmount = (
+                Number(priceDiffer) * Number(ypurchaseQuantity)
               ));
             },
           },

+ 3 - 3
src/views/purchase/apply/edit/index.vue

@@ -131,7 +131,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
+          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: "",priceType: prop.row.priceType});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
             ...item,
@@ -168,7 +168,7 @@
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst
@@ -182,7 +182,7 @@
           const {TableColumns} = TabColumns.find(
             ({item: {key}}) => key === tabName
           );
-          const {code, data} = await ITEM(prop);
+          const {code, data} = await ITEM(prop, false);
           if (code === 200) {
             this.params = data;
             this.params.priceApplyItems = data.priceApplyItems.map((item) => ({

+ 13 - 11
src/views/purchase/apply/see/columns.js

@@ -51,7 +51,10 @@ export default function useColumns() {
     },
     {
       item: { width: 100, key: "sourceType", title: "来源单据类型" },
-      attr: {},
+      attr: {
+        is: "el-dict-tag",
+        dictName: "price_source",
+      },
     },
     {
       item: { width: 100, key: "status", title: "单据状态" },
@@ -169,7 +172,6 @@ export default function useColumns() {
         {
           item: { width: 100, key: "isPriceAdjustmentName", title: "调价类型" },
           attr: {
-            is: "el-dict-tag",
           },
         },
         {
@@ -214,33 +216,33 @@ export default function useColumns() {
         {
           item: { width: 100, key: "increase", title: "涨幅" },
           attr: {
-            is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              const { priceDiffer = 0, recentlyPrice = 0 } = prop;
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%' : "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {

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

@@ -67,7 +67,7 @@ export default {
           total,
           rows: [{ id }],
         } = await LIST({ ...model }, { pageNum: prop, pageSize: 1 });
-        const { code, data } = await ITEM(id);
+        const { code, data } = await ITEM(id, false);
         if (code === 200) {
           this.params = data;
           this.params.$index = prop;

+ 8 - 0
src/views/purchase/catalogue/columns.js

@@ -137,6 +137,14 @@ export default function useColumns() {
         referName: "MATERIAL_PARAM",
       },
     },
+    {
+      item: { key: "materialCodes", title: "物料编码"},
+      attr: {
+        clearable: true,
+        is: "el-input",
+        placeholder: '多物料编码使用 , 隔开',
+      },
+    },
     // {
     //   item: { width: 100, key: "materialCodeList", title: "物料编码" },
     //   attr: {

+ 4 - 1
src/views/purchase/catalogue/see/columns.js

@@ -30,7 +30,10 @@ export default function useColumns() {
     { item: { width:100,key: "effectiveDate", title: "价格生效日期" }, attr: {} },
     { item: { width:100,key: "endDate", title: "价格失效日期" }, attr: {} },
     { item: { width:100,key: "buyerName", title: "采购员" }, attr: {} },
-    { item: { width:100,key: "source", title: "来源单据" }, attr: {} },
+    { item: { width:100,key: "source", title: "来源单据" }, attr: {
+      is: "el-dict-tag",
+      dictName: "price_source",
+    } },
     {
       item: { width:100,key: "convertRate", title: "换算率" },
       attr: {

+ 5 - 1
src/views/purchase/contract/columns.js

@@ -274,6 +274,7 @@ export default function useColumns() {
       item: { key: "buyerName", title: "采购员", width: 100 },
       attr: {
         is: "el-popover-select-v2",
+        clearable: true,
         valueKey: "name",
         referName: "CONTACTS_PARAM",
         dataMapping: {
@@ -289,6 +290,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-popover-select-v2",
+        clearable: true,
         valueKey: "name",
         referName: "ORG_PARAM",
         dataMapping: {
@@ -330,9 +332,10 @@ export default function useColumns() {
       },
     },
     {
-      item: { width: 100, key: "status", title: "合同号" },
+      item: { width: 100, key: "code", title: "合同编码" },
       attr: {
         is: "el-input",
+        clearable: true,
       },
     },
     {
@@ -342,6 +345,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-popover-select-v2",
+        clearable: true,
         valueKey: "name",
         referName: "SUPPLIER_PARAM",
         dataMapping: {

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

@@ -756,6 +756,7 @@ export default {
                       @change="handleInputChange(scope.row, cColumn.key)"
                       :clearable="cColumn.clearable"
                       :disabled="cColumn.disabled"
+                      :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
                       size="mini"
                       style="width: 100%"
                     ></el-input-number>

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

@@ -725,6 +725,7 @@ export default {
                     :precision="cColumn.precision"
                     :controls-position="cColumn.controlsPosition"
                     :max="getInputNumberMax(cColumn.key, scope.row)"
+                    :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
                     @change="handleInputChange(scope.row, cColumn.key)" 
                     :placeholder="cColumn.placeholder"
                     :clearable="cColumn.clearable" 

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

@@ -146,7 +146,7 @@
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
           :page-sizes="[10, 20, 50, 100, 200, 500]"
-          :page-size="10"
+          :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -357,7 +357,7 @@ export default {
         code: '',
         createBy:'',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 100
       },
       //单据日期查询范围
       dateRange:[],
@@ -462,7 +462,7 @@ export default {
         code: '',
         createBy:'',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 100
       }
       this.getList(this.queryParams)
     },

+ 1 - 1
vue.config.js

@@ -46,7 +46,7 @@ module.exports = {
         // target: `http://172.16.13.47:8000/drp-admin`, //这是一个美女的本地
         // 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.61.99:8000/drp-admin`, //lz's localhost
         //  target: `http://127.0.0.1:8000/drp-admin`,
         changeOrigin: true,
         pathRewrite: {