Przeglądaj źródła

【修改】bug

howie 2 lat temu
rodzic
commit
07cbbd09e8

+ 11 - 0
src/api/engin_deposit/refund_list.js

@@ -63,3 +63,14 @@ export function getCommonFileGetStream(params) {
     params,
   });
 }
+
+
+
+// 批量审核家用
+export function examineData(params) {
+  return request({
+    url: "/deposit-manage/bach-condition-examine-home",
+    method: "post",
+    params,
+  });
+}

+ 1 - 1
src/mixin/print.js

@@ -300,7 +300,7 @@ export default {
           const newInvoicePickBeans = invoicePickBeans.splice(0, 5);
           for (let e = newInvoicePickBeans.length; e > 0; e--) {
             const tempData = newInvoicePickBeans[e - 1];
-            total += +tempData.refundableQty
+            total += Math.abs(+tempData.refundableQty)
             //添加表格数据
             table.push({
               id: tempData.id,

+ 1 - 1
src/views/deposit_commerce/components/deposit-apply-surrender.vue

@@ -441,7 +441,7 @@ export default {
             }
         // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
         item.sums1 = ['hasSendQty', 'dataQty', 'qty']
-        item.sums2 = ['totalAmount', 'diffAmount', 'price']
+        item.sums2 = ['totalAmount', 'diffAmount', 'price','depositAmount']
       })
       res.data.items = arr
       this.details = res.data

+ 1 - 1
src/views/deposit_commerce/components/deposit_list-detail.vue

@@ -909,7 +909,7 @@ export default {
             }
             // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
             item.sums1 = ['orderHasSendQty', 'dataQty', 'qty']
-            item.sums2 = ['totalAmount', 'diffAmount', 'price']
+            item.sums2 = ['totalAmount', 'diffAmount', 'price','depositAmount']
           })
           res.data.items = arr
           this.details = res.data

+ 1 - 1
src/views/deposit_commerce/components/refund_list-detail.vue

@@ -737,7 +737,7 @@ export default {
             }
         // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
         item.sums1 = ["orderHasSendQty", "dataQty", "qty"];
-        item.sums2 = ["totalAmount", "diffAmount", "price"];
+        item.sums2 = ["totalAmount", "diffAmount", "price",'depositAmount'];
       });
       res.data.items = arr
       this.detailList = res.data;

+ 1 - 1
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -459,7 +459,7 @@ export default {
             }
         // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
         item.sums1 = ['orderHasSendQty', 'dataQty', 'qty']
-        item.sums2 = ['totalAmount', 'diffAmount', 'price']
+        item.sums2 = ['totalAmount', 'diffAmount', 'price','depositAmount']
       })
       res.data.items = arr
       this.details = res.data

+ 1 - 1
src/views/deposit_home/components/deposit_list-detail.vue

@@ -931,7 +931,7 @@ export default {
             }
             // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
             item.sums1 = ['orderHasSendQty', 'dataQty', 'qty']
-            item.sums2 = ['totalAmount', 'diffAmount', 'price']
+            item.sums2 = ['totalAmount', 'diffAmount', 'price','depositAmount']
           })
           res.data.items = arr
           this.details = res.data

+ 1 - 1
src/views/deposit_home/components/refund_list-detail.vue

@@ -746,7 +746,7 @@ export default {
             }
         // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
         item.sums1 = ["orderHasSendQty", "dataQty", "qty"];
-        item.sums2 = ["totalAmount", "diffAmount", "price"];
+        item.sums2 = ["totalAmount", "diffAmount", "price",'depositAmount'];
       });
       res.data.items = arr
       this.detailList = res.data;

+ 46 - 0
src/views/deposit_home/refund_list.vue

@@ -195,6 +195,14 @@
             <el-radio-button label="TRADE">商用工程</el-radio-button>
           </el-radio-group> -->
           <!-- <el-button type="primary" size="mini" @click="syncDateFn">同步资料日期</el-button> -->
+                      <el-popconfirm
+              title="批量审核吗?"
+              @onConfirm="batchExamine"  v-if="$checkBtnRole('examine', $route.meta.roles)"
+            >
+              <el-button slot="reference" size="mini" type="warning" icon="el-icon-finished" >批量审批</el-button>
+
+            </el-popconfirm>
+
         </div>
         <div class="fr">
           <el-button type="primary" size="mini" @click="exportFn">导出</el-button>
@@ -363,20 +371,26 @@
       </div>
     </div>
     <RefundListDetail @updateList="updateList" :detailId="detailId" v-else />
+    <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
+
   </div>
 </template>
 
 <script>
 import {
+  examineData,
   getDepositManageList,
   getDepositManageDate,
   getDepositManagExport,
 } from "@/api/engin_deposit/refund_list";
 import { downloadFiles, handleImport } from "@/utils/util";
+import ExamineDialog from '@/components/Common/examine-dialog'
+
 import RefundListDetail from "./components/refund_list-detail.vue";
 export default {
   components: {
     RefundListDetail,
+    ExamineDialog
   },
   data() {
     return {
@@ -453,6 +467,11 @@ export default {
       showSurrender: true,
       detailId: "",
       selectData: [],
+      isShowExamineDialog: false,
+      examineForm: {
+        status: 'OK',
+        remark: '',
+      },
     };
   },
   created() {
@@ -510,6 +529,33 @@ export default {
         this.$message.error(result.message);
       }
     },
+         // 打开 批量审批
+     batchExamine() {
+      if (this.selectData.length) {
+        this.submitExamineForm()
+        // this.isShowExamineDialog = true;
+        return
+      }
+      this.$errorMsg('请选择审核项')
+    },
+    // 提交 批量审批
+    submitExamineForm() {
+      let ids = this.selectData.map(item => {
+        return item.id;
+      });
+      ids = [...new Set(ids)]
+      examineData({
+        id: ids.join(','),
+        examineStatus: this.examineForm.status,
+        examineRemark: this.examineForm.remark,
+        serviceId:''
+      })
+        .then((res) => {
+          this.isShowExamineDialog = false;
+          this.$successMsg("修改成功");
+          this.getList();
+        })
+    },
     //审批后更新列表数据
     updateList() {
       this.getDataList({

+ 49 - 5
src/views/supply/engin/components/home_form.vue

@@ -222,7 +222,7 @@
             <el-input v-model="scope.row.realMaterialNumber" size="small" readonly @click.native="getRealMaterData(scope.$index)" ></el-input>
           </template>
         </el-table-column>
-            <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="120" show-overflow-tooltip>
+            <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
               <template slot-scope="scope">
             <el-input v-model="scope.row.realMaterialOldNumber" size="small" readonly @click.native="getRealMaterData(scope.$index)"></el-input>
           </template>
@@ -534,7 +534,8 @@
               </template>
             </el-table-column>
            <el-table-column align="center" label="销售类型" prop="saleName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
+           <el-table-column align="center" label="物料编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
+           <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="name" 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="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
@@ -1099,6 +1100,7 @@ export default {
     // 重置筛选表单
     resetGoodsScreenForm() {
       this.$refs.goodsScreenForm.resetFields();
+      this.currentRadio = ''
       this.currentPage = 1;
       this.getGoodsList();
     },
@@ -1174,7 +1176,25 @@ export default {
     // 确定 添加产品
     submitAddGoods() {
       // this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
+
       this.goodsList = this.goodsList.concat(this.rightGoodsList);
+      this.goodsList.forEach((k,i)=>{
+        this.$set(this.goodsList[i],'realMaterialId',k.materialId)
+          this.$set(this.goodsList[i],'realMaterialName',k.materialName)
+          this.$set(this.goodsList[i],'realMaterialNumber',k.materialNumber)
+          this.$set(this.goodsList[i],'realMaterialOldNumber',k.materialOldNumber)
+          this.$set(this.goodsList[i],'realSpecification',k.specification)
+          if(!this.listItem){
+            let str =`实装物料编号:${k.materialNumber}实装厂产品编码:${k.materialOldNumber}`
+              let remark
+              if (!this.goodsList[i].remark) {
+                remark = str
+              }else{
+                remark = this.goodsList[i].remark.replace(/str/g,str)
+              }
+            this.$set(this.goodsList[i],'remark',remark)
+          }
+      })
       this.isShowGoodsDialog = false;
       this.leftGoodsList = [];
       this.rightGoodsList = [];
@@ -1196,13 +1216,21 @@ export default {
       //        realSpecification
       // 实装规格型号
       const currentData = this.leftGoodsList.find(e=>e.id===this.currentRadio)
-
           this.$set(this.goodsList[this.currentId],'realMaterialId',currentData.materialId)
           this.$set(this.goodsList[this.currentId],'realMaterialName',currentData.materialName)
           this.$set(this.goodsList[this.currentId],'realMaterialNumber',currentData.materialNumber)
           this.$set(this.goodsList[this.currentId],'realMaterialOldNumber',currentData.materialOldNumber)
           this.$set(this.goodsList[this.currentId],'realSpecification',currentData.specification)
-          this.$set(this.goodsList[this.currentId],'remark',`${this.goodsList[this.currentId].remark},实装物料编号:${currentData.materialNumber},实装厂产品编码:${currentData.materialOldNumber}`)
+          if(!this.listItem){
+            let str =`实装物料编号:${currentData.materialNumber}实装厂产品编码:${currentData.materialOldNumber}`
+            let remark
+            if (!this.goodsList[this.currentId].remark) {
+              remark = str
+            }else{
+              remark = this.goodsList[this.currentId].remark.replace(/str/g,str)
+            }
+            this.$set(this.goodsList[this.currentId],'remark',remark)
+          }
           this.isSetMaterial = false
     },
     // 检查库存
@@ -1400,7 +1428,23 @@ export default {
           }),
         }
       })
-
+      this.goodsList.forEach((k,i)=>{
+        this.$set(this.goodsList[i],'realMaterialId',k.materialId)
+          this.$set(this.goodsList[i],'realMaterialName',k.materialName)
+          this.$set(this.goodsList[i],'realMaterialNumber',k.materialNumber)
+          this.$set(this.goodsList[i],'realMaterialOldNumber',k.materialOldNumber)
+          this.$set(this.goodsList[i],'realSpecification',k.specification)
+          if(!this.listItem){
+            let str =`实装物料编号:${k.materialNumber}实装厂产品编码:${k.materialOldNumber}`
+              let remark
+              if (!this.goodsList[i].remark) {
+                remark = str
+              }else{
+                remark = this.goodsList[i].remark.replace(/str/g,str)
+              }
+            this.$set(this.goodsList[i],'remark',remark)
+          }
+      })
       this.goodsList.forEach(item => {
         item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
         item.serviceId = (item.wallets && item.wallets.length) ? item.wallets[0].serviceId : '';

+ 4 - 10
vue.config.js

@@ -51,24 +51,18 @@ module.exports = {
     before: require('./mock/mock-server.js')
   },
   configureWebpack: {
+    // provide the app's title in webpack's name field, so that
+    // it can be accessed in index.html to inject the correct title.
+    name: name,
     plugins: [
       new webpack.ProvidePlugin({
       }),
     ],
     resolve: {
       alias: {
+        '@': resolve('src')
       },
       extensions: ['*', '.js', '.vue', '.json']
-    },
-  },
-  configureWebpack: {
-    // provide the app's title in webpack's name field, so that
-    // it can be accessed in index.html to inject the correct title.
-    name: name,
-    resolve: {
-      alias: {
-        '@': resolve('src')
-      }
     }
   },
   chainWebpack(config) {