Bläddra i källkod

【修改】bug

howie 3 år sedan
förälder
incheckning
b2abf2ab53
1 ändrade filer med 41 tillägg och 4 borttagningar
  1. 41 4
      src/views/supply/price/modify_list.vue

+ 41 - 4
src/views/supply/price/modify_list.vue

@@ -125,6 +125,7 @@
             icon="el-icon-info"
             icon-color="red"
             title="内容确定删除吗?"
+            style="margin-right:10px"
             @onConfirm="hanleDeleteAll"
           >
             <el-button
@@ -136,6 +137,7 @@
               >删除</el-button
             >
           </el-popconfirm>
+          <el-button size="mini"  type="warning" icon="el-icon-finished" @click="batchExamine"  v-if="$checkBtnRole('examine', $route.meta.roles)">批量审批</el-button>
         </div>
         <div class="fr">
             <ExportButton :exUrl="'/product-upd-price/export'" :exParams="exParams" />
@@ -479,6 +481,7 @@
     <ModifyListApply v-else-if="show === 2 || show==5" :cid='cid'/>
     <ModifyListApproval v-else-if="show === 3 " :detail="detail" />
     <ModifyListDetail v-else :detail="detail" />
+       <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
   </div>
 </template>
 
@@ -486,13 +489,15 @@
 import ModifyListApply from './components/modify_list-apply.vue'
 import ModifyListApproval from './components/modify_list-approval.vue'
 import ModifyListDetail from './components/modify_list-detail.vue'
+import ExamineDialog from '@/components/Common/examine-dialog'
 import Mixin from '@/mixin/index'
 import {
   getPriceSubmit,
   getProductRricedel,
   getProductRriceDetail,
   getProductRriceList,
-  getTypeList
+  getTypeList,
+  examineData
 } from '@/api/basic_data/material'
 import { downloadFiles } from '@/utils/util'
 import { getCategoryList } from '@/api/common'
@@ -560,10 +565,16 @@ export default {
       },
       cid:'',
       typeList: [],
-      dictList:[]
+      dictList:[],
+       isShowExamineDialog: false,
+      examineForm: {
+        status: 'OK',
+        remark: '',
+      },
     };
   },
   components: {
+    ExamineDialog,
     ModifyListApply,
     ModifyListApproval,
     ModifyListDetail,
@@ -574,7 +585,7 @@ export default {
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         startDate:this.screenForm.startDate,
-             billType:'HOME'
+         billType:'HOME'
       };
     },
   },
@@ -615,9 +626,34 @@ export default {
         });
       });
     },
+      // 打开 批量审批
+    batchExamine() {
+      if (this.ids.length) {
+        this.isShowExamineDialog = true;
+        return
+      }
+      this.$errorMsg('请选择审核项')
+    },
+    // 提交 批量审批
+    submitExamineForm() {
+      // let ids = this.dis.map(item => {
+      //   return item
+      // });
+    const  ids = [...new Set(this.ids)]
+      examineData({
+        ids: ids.join(','),
+        examineStatus: this.examineForm.status,
+        examineRemark: this.examineForm.remark,
+      })
+        .then((res) => {
+          this.isShowExamineDialog = false;
+          this.$successMsg("修改成功");
+          this.getList();
+        })
+    },
     handleGetPriceSubmit(id) {
       console.log(id);
-      getPriceSubmit({ id }).then((res) => {
+      getPriceSubmit({ ids:id }).then((res) => {
         this.$successMsg("已提审");
         this.getList();
       });
@@ -704,6 +740,7 @@ export default {
         customerName: this.screenForm.customerName,
         freeDay: this.screenForm.freeDay,
         toll: this.screenForm.toll,
+        billType:'HOME'
       };
       downloadFiles("/product-compose/export", screenData);
     },