Bladeren bron

Finish Hotfix-mo-14

莫绍宝 3 jaren geleden
bovenliggende
commit
51236b7431

+ 3 - 3
src/views/supply/apply/components/engin_form.vue

@@ -170,8 +170,8 @@
       <el-form ref="screenForm" :model="screenForm" size="small" label-position="left" label-width="100px">
         <el-row :gutter="20">
           <el-col :xs="12" :sm="12" :lg="6">
-            <el-form-item prop="loginNum" label="工程登录编号">
-              <el-input v-model="screenForm.loginNum" placeholder="请输入工程登录编号"></el-input>
+            <el-form-item prop="loginNum" label="工程订单号">
+              <el-input v-model="screenForm.loginNum" placeholder="请输入工程订单号"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="12" :lg="6">
@@ -226,7 +226,7 @@
               {{scope.row.orderType | orderTypeFilter}}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="工程登录编号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>

+ 10 - 2
src/views/supply/engin/components/home_detail.vue

@@ -232,7 +232,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDeliverDialog">取 消</el-button>
-        <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
+        <el-button type="primary" @click="submitDeliverForm" :loading="formLoading">确 定</el-button>
       </span>
     </el-dialog>
 
@@ -298,7 +298,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDirectDialog">取 消</el-button>
-        <el-button type="primary" @click="submitDirectForm">确 定</el-button>
+        <el-button type="primary" @click="submitDirectForm" :loading="formLoading">确 定</el-button>
       </span>
     </el-dialog>
 
@@ -376,6 +376,8 @@ export default {
       positionList1: [],
       positionList2: [],
       directGoodsList: [],
+
+      formLoading: false,
     }
   },
 
@@ -487,10 +489,13 @@ export default {
             stockId: this.deliverForm.position,
             items: this.deliverGoodsList
           }
+          this.formLoading = true;
           deliverOrder(params).then(res => {
             this.$successMsg();
             this.isShowDeliverDialog = false;
             this.getDetail();
+          }).finally(res => {
+            this.formLoading = false;
           })
         }
       })
@@ -566,10 +571,13 @@ export default {
             inStockId: this.directForm.position2,
             inStockName: positionItem2.name,
           }
+          this.formLoading = true;
           directOrder(params).then(res => {
             this.$successMsg();
             this.isShowDirectDialog = false;
             this.getDetail();
+          }).finally(res => {
+            this.formLoading = false;
           })
         }
       })

+ 12 - 4
src/views/supply/engin/components/home_examine.vue

@@ -131,7 +131,11 @@
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.price" size="small" type="number"></el-input>
+          </template>
+        </el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -178,8 +182,8 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
-        <el-button type="warning" @click="clickSubmitForm(0)">审批驳回</el-button>
+        <el-button type="primary" @click="clickSubmitForm(1)" :loading="formLoading">审批通过</el-button>
+        <el-button type="warning" @click="clickSubmitForm(0)" :loading="formLoading">审批驳回</el-button>
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
           <el-button slot="reference">关 闭</el-button>
         </el-popconfirm>
@@ -215,12 +219,13 @@ export default {
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
       detailData: {},
 
-      formLoading: false,
       examineForm: {
         remark: '',
       },
 
       salesTypeList: [],
+
+      formLoading: false,
     }
   },
 
@@ -282,10 +287,13 @@ export default {
         params.saleTypeId = this.detailData.saleTypeId;
         params.saleTypeCode = saleTypeItem.saleCode;
         params.saleTypeName = saleTypeItem.saleName;
+        this.formLoading = true;
         examineHome(params).then(res => {
           this.$successMsg();
           this.goBack();
           this.$parent.getList();
+        }).finally(res => {
+          this.formLoading = false;
         })
       }).catch(() => {});
     },

+ 13 - 3
src/views/supply/engin/components/home_form.vue

@@ -249,8 +249,8 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
-        <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
+        <el-button type="primary" @click="clickSubmitForm(1)" :loading="formLoading">保 存</el-button>
+        <el-button type="primary" @click="clickSubmitForm(2)" :loading="formLoading">提交审核</el-button>
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
           <el-button slot="reference">关 闭</el-button>
         </el-popconfirm>
@@ -506,6 +506,8 @@ export default {
 
       leftSelection: [],
       rightSelection: [],
+
+      formLoading: false,
     }
   },
 
@@ -991,18 +993,24 @@ export default {
             fileNo: this.mainForm.fileNum || '',
             items: goodsList,
           }
+
+          this.formLoading = true;
           if(type === 1) {
             if(this.listItem) {
               editHome(params).then(res => {
                 this.$successMsg('编辑成功');
                 this.goBack();
                 this.$parent.getList();
+              }).finally(res => {
+                this.formLoading = false;
               })
             }else {
               addHome(params).then(res => {
                 this.$successMsg('新增成功');
                 this.goBack();
                 this.$parent.getList();
+              }).finally(res => {
+                this.formLoading = false;
               })
             }
           }else if(type === 2) {
@@ -1010,7 +1018,9 @@ export default {
               this.$successMsg('提交审核成功');
               this.goBack();
               this.$parent.getList();
-            })
+            }).finally(res => {
+                this.formLoading = false;
+              })
           }
         }
       })