Explorar el Código

【物料申请单】
1.增加批量导出
2.查询条件增加规格和型号,列表界面增加型号
3.医药物料栏填写否,对应栏注册证号/备案凭证编号禁止填写

002390 hace 1 año
padre
commit
2d94762a3c

+ 1 - 1
src/api/requisition/basic.js

@@ -209,4 +209,4 @@ export function deleteApplies(data) {
     method: "POST",
     data: data,
   })
-}
+}

+ 88 - 71
src/views/material/requisition/columns.js

@@ -1,63 +1,65 @@
 
-export default function useColumns (){
+export default function useColumns() {
 
   const TableColumns = [
-  { item: { key: "createName", title: "创建人" ,width:100, }, attr: {} },
-  { item: { key: "createTime", title: "创建时间" ,width:150,}, attr: {} },
-  { item: { key: "billCode", title: "单据编码" }, attr: {} },
-  
-  {
-    item: { key: "proposerName", title: "申请人",width:100, },
-    attr: { },
-  },
-  { item: { key: "status", title: "单据状态",width:100, }, 
-      attr: {
-        
+    { item: { key: "createName", title: "创建人", width: 100, }, attr: {} },
+    { item: { key: "createTime", title: "创建时间", width: 150, }, attr: {} },
+    { item: { key: "billCode", title: "单据编码", width: 150, }, attr: {} },
+
+    {
+      item: { key: "proposerName", title: "申请人", width: 100, },
+      attr: {},
+    },
+    {
+      item: { key: "status", title: "单据状态", width: 80, },
+      attr: {
+
         is: "el-dict-tag",
         dictName: "documents_status", // 字典名
-      } 
+      }
     },
 
-    { item: { key: "oneClassify", title: "物料一级分类" ,width:150,}, attr: {} },
-    { item: { key: "materialType", title: "物料基本分类" ,width:150,}, attr: {} },
-    { 
-      item: { key: "code", title: "物料编码" }, 
+    { item: { key: "oneClassify", title: "物料一级分类", width: 150, }, attr: {} },
+    { item: { key: "materialType", title: "物料基本分类", width: 150, }, attr: {} },
+    {
+      item: { key: "code", title: "物料编码" },
       attr: {
-   
-      } 
+
+      }
     },
     { item: { key: "name", title: "物料名称" }, attr: {} },
-     { item: { key: "specification", title: "规格" ,width:150,}, attr: {} },
-    { item: { key: "manufacturerName", title: "生产厂家/代理人" ,width:150,}, attr: {} },
-     { item: { key: "registrationNo", title: "注册证号" ,width:150,}, attr: {} },
-    { item: { key: "registrant", title: "注册人" ,width:150,}, attr: {} },
-    { item: { key: "updateTime", title: "最后修改时间" ,width:150,}, attr: {} },
-    { item: { key: "reviewedName", title: "最后审批人" ,width:150,}, attr: {} },
-     { item: { key: "auditTime", title: "最后审批时间" ,width:150,}, attr: {} },
-     { 
-      item:{ key: "approveUser", title: "当前审批人" ,},
-      attr:{
+    { item: { key: "specification", title: "规格", width: 150, }, attr: {} },
+    { item: { key: "model", title: "型号", width: 150, }, attr: {}, },
+    { item: { key: "manufacturerName", title: "生产厂家/代理人", width: 150, }, attr: {} },
+    { item: { key: "registrationNo", title: "注册证号", width: 150, }, attr: {} },
+    { item: { key: "registrant", title: "注册人", width: 150, }, attr: {} },
+    { item: { key: "updateTime", title: "最后修改时间", width: 150, }, attr: {} },
+    { item: { key: "reviewedName", title: "最后审批人", width: 150, }, attr: {} },
+    { item: { key: "auditTime", title: "最后审批时间", width: 150, }, attr: {} },
+    {
+      item: { key: "approveUser", title: "当前审批人", },
+      attr: {
       },
     },
-     // { item: { key: "orgName", title: "审批语" ,width:150,}, attr: {} },
+    // { item: { key: "orgName", title: "审批语" ,width:150,}, attr: {} },
 
 
 
 
     // { item: { key: "orgName", title: "所属组织" ,width:150,}, attr: {} },
-   
+
     // { item: { key: "createTime", title: "申请时间",width:150, }, attr: {} },
- 
+
     // {
     //   item: { key: "updateName", title: "最后修改人" ,width:150, },
     //   attr: {  },
     // },
-    
-   
+
+
   ].map(({ item, attr }) => ({
     attr,
-    item: { 
-      ...item, 
+    item: {
+      ...item,
       sortabled: true,
       fixedabled: true,
       filterabled: true,
@@ -70,7 +72,7 @@ export default function useColumns (){
       item: { key: "billCode", title: "单据编码" },
       attr: {
         is: "el-input",
-        clearable:true,
+        clearable: true,
       },
     },
     {
@@ -87,7 +89,7 @@ export default function useColumns (){
         is: "el-popover-select-v2",
         referName: "MATERIAL_PARAM",
         valueKey: "name",
-        clearable:true,
+        clearable: true,
       },
     },
     {
@@ -96,24 +98,39 @@ export default function useColumns (){
         is: "el-popover-select-v2",
         referName: "MATERIAL_PARAM",
         valueKey: "code",
-        clearable:true,
+        clearable: true,
+      },
+    },
+    {
+      item: { key: "materialCodes", title: "物料编码" },
+      attr: {
+        clearable: true,
+        is: "el-input",
+        placeholder: '多物料编码使用 , 隔开',
+      },
+    },
+    {
+      item: { key: "specification", title: "规格" },
+      attr: {
+        clearable: true,
+        is: "el-input",
       },
     },
-   {
-     item: { key: "materialCodes", title: "物料编码" },
-     attr: {
-       clearable: true,
-       is: "el-input",
-       placeholder: '多物料编码使用 , 隔开',
-     },
-   },
+    {
+      item: { key: "model", title: "型号" },
+      attr: {
+        clearable: true,
+        is: "el-input",
+      },
+    },
+
     {
       item: { key: "classifySearchList", title: "品类" },
       attr: {
         is: "el-popover-multiple-tree-select",
         referName: "MATERIALCLASSIFY_PARAM",
         valueKey: "id",
-        clearable:true,
+        clearable: true,
       },
     },
     {
@@ -140,7 +157,7 @@ export default function useColumns (){
     //     clearable: true,
     //   } 
     // },
-    
+
     // {
     //   item: { key: "createTimeString", title: "申请时间" },
     //   attr: {
@@ -172,7 +189,7 @@ export default function useColumns (){
     {
       item: { key: "manufacturerName", title: "生产厂家/代理人" },
       attr: {
-        clearable:true,
+        clearable: true,
         is: "el-popover-select-v2",
         valueKey: "name",
         referName: "MANUFACTURER_PARAM",
@@ -184,52 +201,52 @@ export default function useColumns (){
     {
       item: { key: "registrationNo", title: "注册证号" },
       attr: {
-        clearable:true,
+        clearable: true,
         is: "el-input",
       },
     },
     {
-      item:{
+      item: {
         key: "createTimeString",
         title: "申请时间",
-        span:12,
+        span: 12,
       },
       attr: {
-        clearable:true,
+        clearable: true,
         // is: "el-date-wrapper",
         is: "el-date-picker",
-        type:"daterange",
-        rangeSeparator:"-",
-        startPlaceholder:"开始日期",
-        endPlaceholder:"结束日期",
-        valueFormat:"yyyy-MM-dd",
+        type: "daterange",
+        rangeSeparator: "-",
+        startPlaceholder: "开始日期",
+        endPlaceholder: "结束日期",
+        valueFormat: "yyyy-MM-dd",
       },
     },
-    
+
     {
-      item:{
+      item: {
         key: "auditTimeString",
         title: "审批时间",
-        span:12,
+        span: 12,
       },
       attr: {
-        clearable:true,
+        clearable: true,
         is: "el-date-picker",
-        type:"daterange",
-        rangeSeparator:"-",
-        startPlaceholder:"开始日期",
-        endPlaceholder:"结束日期",
-        valueFormat:"yyyy-MM-dd",
+        type: "daterange",
+        rangeSeparator: "-",
+        startPlaceholder: "开始日期",
+        endPlaceholder: "结束日期",
+        valueFormat: "yyyy-MM-dd",
       },
     },
-    
-  
+
+
   ].map(({ item, attr }) => ({
     attr,
     item: { ...item, hidden: true, span: item.span || 6 },
   }));
 
-  return { TableColumns,SearchColumns }
+  return { TableColumns, SearchColumns }
 
 }
 

+ 12 - 0
src/views/material/requisition/details/index.vue

@@ -860,6 +860,18 @@ export default {
               @change="changeDiCode"
             ></component>
           </template>
+          <!-- 注册证号/备案凭证编号 -->
+          <template slot="registrationNo" slot-scope="scope">
+            <component
+              v-bind="scope.attr"
+              v-model="scope.row[scope.item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              :disabled="addType === 'see' || params.sysMaterialApply.isMedicine =='2'"
+              style="width: 100%"
+              @change="changeDiCode"
+            ></component>
+          </template>
         </component>
 
         <!--  -->

+ 48 - 0
src/views/material/requisition/fun-button/pldc/index.vue

@@ -0,0 +1,48 @@
+<script>
+export default {
+  name: "PiLiangDaoChu",
+  props: {
+    selectData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      title: "批量导出",
+    };
+  },
+  computed: {
+    disabled: {
+      get() {
+        let { selectData } = this.$props;
+
+        if (selectData.length > 0) {
+          return false;
+        }
+        return true;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    async onClick() {
+      try {
+        let ids = this.$props.selectData.map((item) => item.id);
+        console.log(ids, "ids");
+        this.download(
+          "/system/apply/material/exportApplies",
+          { ids },
+          `物料申请单${new Date().getTime()}.xlsx`
+        );
+      } catch (error) {}
+    },
+  },
+  created() {},
+};
+</script>
+<template>
+  <el-button @click="onClick" :disabled="disabled" :size="$attrs.size">
+    {{ title }}
+  </el-button>
+</template>

+ 0 - 0
src/views/material/requisition/fun-button/pi-liang-shan-chu/index.vue → src/views/material/requisition/fun-button/plsc/index.vue


+ 8 - 1
src/views/material/requisition/index.vue

@@ -21,7 +21,8 @@ export default {
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
     BatchImport: () => import("@/components/BatchImport/index.vue"),
-    plscButton: () => import("./fun-button/pi-liang-shan-chu/index.vue"),
+    plscButton: () => import("./fun-button/plsc/index.vue"),
+    pldcButton: () => import("./fun-button/pldc/index.vue"),
   },
   data() {
     const { SearchColumns, TableColumns } = useColumns();
@@ -285,6 +286,12 @@ export default {
           :select-data="selectData"
           @success="useQuery(params, page)"
         ></plsc-button>
+
+        <pldc-button
+          :size="size"
+          :select-data="selectData"
+          @success="useQuery(params, page)"
+        ></pldc-button>
       </el-col>
     </el-row>