Explorar el Código

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

001295 hace 1 año
padre
commit
02aefb40bc

+ 8 - 0
src/api/requisition/basic.js

@@ -193,4 +193,12 @@ export function classifyDetails(params) {
     method: 'get',
     params: params,
   })
+}
+
+// 物料DI /system/apply/material/getDiCode/{dicode)
+export function getDiCode(dicode) {
+  return request({
+    url: `/system/apply/material/getDiCode/${dicode}`,
+    method: 'get',
+  })
 }

+ 2 - 2
src/components/popover-tree-select/index.vue

@@ -142,8 +142,8 @@ export default {
     },
     // query list
     async useQuery(value) {
-      await this.$refs.tree.filter(value);
-      // await this.fetchList(this.model);
+      // await this.$refs.tree.filter(value);
+      await this.fetchList(this.model);
     },
     // auto
     async useAutocomplete(prop, cb) {

+ 13 - 3
src/views/business/spd/target/MonthSaleGoal.vue

@@ -320,8 +320,9 @@
                       <div slot="content">{{ scope.row.memo }}</div>
                       <el-popover-select-v2 v-model="monthSaleGoalDetailsList[scope.$index].material" title="物料"
                         valueKey="name" referName="MATERIAL_PARAM"
-                        @change="setClassify(scope.row.oneLevelClassify, scope.row.twoLevelClassify, monthSaleGoalDetailsList[scope.$index])"
-                        :dataMapping="{ materialCode: 'code', material: 'name', oneLevelClassify: 'oneClass', twoLevelClassify: 'twoClass'}"
+                        @change="setClassify(scope.row.oneLevelClassify, scope.row.twoLevelClassify, monthSaleGoalDetailsList[scope.$index], scope.row)"
+                        :dataMapping="{ materialCode: 'code', material: 'name', oneLevelClassify: 'oneClass', twoLevelClassify: 'twoClass',
+                        specification: 'specification', packExplain: 'packExplain', model: 'model'}"
                         :source.sync="monthSaleGoalDetailsList[scope.$index]" placeholder="请输入物料">
                       </el-popover-select-v2>
                     </el-tooltip>
@@ -581,6 +582,9 @@
           twoLevelClassifyCode: null,
           twoLevelClassify: null,
           materialCode: null,
+          specification: null,
+          packExplain: null,
+          model: null,
           material: null,
           department: null,
           num: null,
@@ -809,6 +813,9 @@
           twoLevelClassifyCode: null,
           twoLevelClassify: null,
           materialCode: null,
+          specification: null,
+          packExplain: null,
+          model: null,
           material: null,
           department: null,
           num: null,
@@ -1096,9 +1103,12 @@
         this.$refs.upload.submit();
       },
       // 选择物料后,给一级分类和二级分类复赋值
-      setClassify(one, two, obj) {
+      setClassify(one, two, obj, row) {
         const oneArray = one.split("&")
         const twoArray = two.split("&")
+        // 物料提醒文本
+        const memo = '名称:' + row.material + '; 编码:' + row.materialCode + '; 规格:' + row.specification + ';  包装:' + row.packExplain + '; 型号:' + row.model + '。';
+        obj.memo = memo;
         obj.oneLevelClassifyCode = oneArray[1]
         obj.oneLevelClassify = oneArray[0]
         obj.twoLevelClassifyCode = twoArray[1]

+ 40 - 1
src/views/material/changeApply/add/index.vue

@@ -284,10 +284,12 @@ export default {
       }
       this.changeExpiryDateManagerment(row);
     },
-    
+
     changeExpiryDateManagerment(row) {
       if (row.expiryDateManagerment === "2") {
         row.usefulLife = "";
+        row.expiryUnitId = "";
+        row.usefulLifeUnitId = "";
       }
     },
     // 物料编码
@@ -521,6 +523,43 @@ export default {
               </component>
             </template>
 
+            <!-- 效期单位 -->
+            <template slot="expiryUnitId" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="scope.row.expiryDateManagerment !== '0'"
+              >
+                <el-option
+                  v-for="item in dict.type[scope.attr.dictName]"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </component>
+            </template>
+            <!-- 有效期至单位 -->
+            <template slot="usefulLifeUnitId" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="scope.row.expiryDateManagerment !== '0'"
+              >
+                <el-option
+                  v-for="item in dict.type[scope.attr.dictName]"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </component>
+            </template>
+
             <ux-table-column
               fixed="right"
               title="操作"

+ 5 - 0
src/views/material/requisition/details/columns.js

@@ -83,6 +83,7 @@ export default function useColumns(){
             valueKey: "name",
             // 末级
             onlyFinal: true,
+            readonly:true,
             defaultProps: {
               label: function (data, node) {
                 return data.code + " " + data.name;
@@ -165,6 +166,7 @@ export default function useColumns(){
             is: "el-popover-select-v2",
             valueKey: "name",
             referName: "UNIT_PARAM",
+            readonly:true,
             dataMapping: {
               unitId:'id'
             }
@@ -435,6 +437,7 @@ export default function useColumns(){
             dataMapping: {
               originPlace: 'id'
             },
+            readonly:true,
             // disabled: true,
           },
           
@@ -492,6 +495,7 @@ export default function useColumns(){
             dataMapping: {
               purchasingOrganization:'id'
             },
+            readonly:true,
           },
         },
         {
@@ -543,6 +547,7 @@ export default function useColumns(){
             dataMapping: {
               puPersonnelId: "code",
             },
+            readonly:true,
           },
         },
         {

+ 21 - 2
src/views/material/requisition/details/index.vue

@@ -7,6 +7,7 @@ import {
   saveAndToOa,
   betchSubmit,
   classifyDetails,
+  getDiCode,
 } from "@/api/requisition/basic";
 import { REFER } from "@/components/popover-select/api/index";
 export default {
@@ -524,6 +525,23 @@ export default {
         sysMaterialApply.recentWarningPeriod = "";
       }
     },
+    async changeDiCode(prop) {
+      console.log(prop, "prop");
+      try {
+        let { code, data } = await getDiCode(prop);
+        let { sysMaterialApply, sysMaterialMedcineApply } = this.params;
+        if (code == 200) {
+          if (data.length) {
+            sysMaterialApply.name = data[0].cpmctymc;
+            sysMaterialApply.model = data[0].ggxh;
+            sysMaterialApply.registrant = data[0].ylqxzcrbarmc;
+            sysMaterialApply.minPackQty = data[0].zxxsdyzsydydsl;
+            sysMaterialApply.manufacturersMaterialCode = data[0].cphhhbh;
+            sysMaterialMedcineApply.registrationNo = data[0].zczbhhzbapzbh;
+          }
+        }
+      } catch (error) {}
+    },
   },
   created() {},
   mounted() {},
@@ -831,7 +849,7 @@ export default {
           </template>
 
           <!-- DI -->
-          <!-- <template slot="diCode" slot-scope="scope">
+          <template slot="diCode" slot-scope="scope">
             <component
               v-bind="scope.attr"
               v-model="scope.row[scope.item.key]"
@@ -839,8 +857,9 @@ export default {
               :source.sync="scope.row"
               :disabled="addType === 'see'"
               style="width: 100%"
+              @change="changeDiCode"
             ></component>
-          </template> -->
+          </template>
         </component>
 
         <!--  -->