Browse Source

参照内容字段修改

黄梓星 1 year ago
parent
commit
1a6f4b3623

+ 37 - 3
src/components/Refers/refers.vue

@@ -20,17 +20,21 @@
             <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable"
               @select="handleSelectionChange" @row-click="rowSelect" height="calc(100% - 40px)">
               <el-table-column show-overflow-tooltip type="selection" header-align="center" align="center" width="50"/>
-              <el-table-column show-overflow-tooltip prop="id" header-align="center" align="center" min-width="90" :label="reciveForm.title + 'id'"/>
-              <el-table-column show-overflow-tooltip prop="code" header-align="center" align="center" min-width="90" :label="reciveForm.title + '编码'"/>
-              <el-table-column show-overflow-tooltip prop="name" header-align="center" align="center" min-width="90" :label="reciveForm.title + '名称'"/>
+              <!-- <el-table-column show-overflow-tooltip prop="id" header-align="center" align="center" min-width="90" :label="reciveForm.title + 'id'"/> -->
+              <el-table-column show-overflow-tooltip prop="code" header-align="center" align="center" min-width="90" label="编码"/>
+              <el-table-column show-overflow-tooltip prop="name" header-align="center" align="center" min-width="90" label="名称"/>
+              <el-table-column show-overflow-tooltip v-if="warehouseAttributes" prop="warehouseAttributes" header-align="center" align="center" min-width="90" label="仓库属性"/>
               <el-table-column show-overflow-tooltip v-if="orgName" prop="orgName" header-align="center" align="center" min-width="90" label="所属组织"/>
               <el-table-column show-overflow-tooltip v-if="warehouseCode" prop="warehouseCode" header-align="center" align="center" min-width="90" label="所属仓库编码"/>
               <el-table-column show-overflow-tooltip v-if="warehouseName" prop="warehouseName" header-align="center" align="center" min-width="90" label="所属仓库"/>
+              <el-table-column show-overflow-tooltip v-if="warehouseProperty" prop="warehouseProperty" header-align="center" align="center" min-width="90" label="仓库属性" :formatter="cksx"/>
               <el-table-column show-overflow-tooltip v-if="contactsName" prop="contactsName" header-align="center" align="center" min-width="90" label="联系人"/>
               <el-table-column show-overflow-tooltip v-if="contactsPhone" prop="contactsPhone" header-align="center" align="center" min-width="90" label="联系人电话"/>
               <el-table-column show-overflow-tooltip v-if="address" prop="address" header-align="center" align="center" min-width="90" label="详细地址"/>
               <el-table-column show-overflow-tooltip v-if="materialClassifyName" prop="materialClassifyName" header-align="center" align="center" min-width="90" label="物料分类"/>
               <el-table-column show-overflow-tooltip v-if="remark" prop="remark" header-align="center" align="center" min-width="90" label="备注"/>
+              <el-table-column show-overflow-tooltip v-if="shortName" prop="shortName" header-align="center" align="center" min-width="90" label="简称"/>
+              <el-table-column show-overflow-tooltip v-if="mneCode" prop="mneCode" header-align="center" align="center" min-width="90" label="助记码"/>
             </el-table>
             <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
               :current-page="searchForm.pageNo" :page-sizes="[5, 10, 15, 20]" :page-size="searchForm.pageSize"
@@ -63,13 +67,17 @@ export default {
       dataList: [],
       total: 0,
       orgName: false,
+      warehouseAttributes: false,
       warehouseCode: false,
       warehouseName: false,
+      warehouseProperty: false,
       contactsName: false,
       contactsPhone: false,
       address: false,
       materialClassifyName: false,
       remark: false,
+      shortName: false,
+      mneCode: false,
       orders: [],
       loading: false,
       visible: false,
@@ -89,6 +97,20 @@ export default {
     }
   },
   methods: {
+    cksx(row) {
+      switch (row.warehouseProperty) {
+        case '1':
+          return '电商库存'
+        case '2':
+          return '区域分仓公共库存'
+        case '3':
+          return '各项目仓库存'
+        case '4':
+          return '中心仓公共库存'
+        case '5':
+          return '事业发展部仓库'
+      }
+    },
     init(val) {
       this.visible = true;
       console.log("🚀 ~ file: refers.vue:79 ~ init ~ init(val):", val)
@@ -110,8 +132,10 @@ export default {
         // 仓库里面加组织
         if(res.rows.length !== 0 && res.rows[0].orgName) {
           this.orgName = true
+          this.warehouseAttributes = true
         } else {
           this.orgName = false
+          this.warehouseAttributes = false
         }
         // 选择货位里面加仓库
         if(res.rows.length !== 0 && res.rows[0].warehouseCode) {
@@ -125,16 +149,26 @@ export default {
         if(res.rows.length !== 0 && res.rows[0].contactsName) {
           this.contactsName = true
           this.contactsPhone = true
+          this.warehouseProperty = true
           this.address = true
           this.materialClassifyName = true
           this.remark = true
         } else {
           this.contactsName = false
           this.contactsPhone = false
+          this.warehouseProperty = false
           this.address = false
           this.materialClassifyName = false
           this.remark = false
         }
+        // 补单供应商档案
+        if (res.rows.length !== 0 && res.rows[0].mneCode) {
+          this.shortName = true
+          this.mneCode = true
+        } else {
+          this.shortName = false
+          this.mneCode = false
+        }
         this.loading = false;
         this.$nextTick(() => {
           this.setSelectRow();

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

@@ -308,7 +308,7 @@
         </el-button>
       </el-col>
       <el-col :span="1.5" style="margin: 0 10px;">
-        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
+        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button type="primary" size="small" plain @click="back">返回</el-button>

+ 33 - 25
src/views/material/requisition/add.vue

@@ -610,7 +610,7 @@
           v-if="pageStu == 'add' || pageStu == 'edit' || pageStu ==='copy' ">保存</el-button>
       </el-col>
       <el-col :span="1.5" style="margin: 0 10px;">
-        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
+        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button type="primary" size="small" plain @click="back">返回</el-button>
@@ -1302,19 +1302,23 @@ export default {
           })
         })
         Promise.all([form1, form2]).then(() => {
-          this.$modal.loading("保存中...");
-          editReq(sparams).then(res => {
-            if (res.code === 200) {
-              this.$message({
-                message: res.msg,
-                type: 'success'
-              });
+          if(this.basicForm.isMedicine == '0' && this.sysMaterialMedcineItemApply.length == 0) {
+            this.$modal.notifyWarning("医药物料需要维护物料类别!");
+          } else {
+            this.$modal.loading("保存中...");
+            editReq(sparams).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+                this.$modal.closeLoading();
+                this.back()
+              }
+            }).catch(err => {
               this.$modal.closeLoading();
-              this.back()
-            }
-          }).catch(err => {
-            this.$modal.closeLoading();
-          })
+            })
+          }
         })
       } else {
 
@@ -1340,19 +1344,23 @@ export default {
           })
         })
         Promise.all([form1, form2]).then(() => {
-          this.$modal.loading("保存中...");
-          addReq(sparams).then(res => {
-            if (res.code === 200) {
-              this.$message({
-                message: res.msg,
-                type: 'success'
-              });
+          if (this.basicForm.isMedicine == '0' && this.sysMaterialMedcineItemApply.length == 0) {
+            this.$modal.notifyWarning("医药物料需要维护物料类别!");
+          } else {
+            this.$modal.loading("保存中...");
+            addReq(sparams).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+                this.$modal.closeLoading();
+                this.back()
+              }
+            }).catch(err => {
               this.$modal.closeLoading();
-              this.back()
-            }
-          }).catch(err => {
-            this.$modal.closeLoading();
-          })
+            })
+          }
         })
       }
     },