howie преди 3 години
родител
ревизия
f591839ac0

+ 1 - 1
src/layout/components/AppMain.vue

@@ -1,7 +1,7 @@
 <template>
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
-      <keep-alive >
+      <keep-alive max="1">
         <router-view />
       </keep-alive>
     </transition>

+ 25 - 2
src/views/basic_data/material/components/modify_list-apply.vue

@@ -630,7 +630,7 @@
                     :key="item.bool"
                     :value="item.bool"
                     :label="item.value"
-                  />  
+                  />
                 </el-select>
               </el-form-item>
             </template>
@@ -971,6 +971,7 @@ export default {
   methods: {
     handleSale(e, index, saleTypes) {
       // console.log(this.rebateList);
+       this.$set(this.items[index], 'rebateList', [])
       const linshi = []
       let saleArr = []
       const rebateList = []
@@ -1360,6 +1361,7 @@ export default {
     // },
     hanleSbumit() {
       this.filterWallets(this.items)
+      // return
       const params = {
         ...this.base,
         items: this.items,
@@ -1370,9 +1372,18 @@ export default {
         serviceName: this.nickName
       }
       getProductRriceAdd(params).then((res) => {
+        console.log(res.code,'klkk');
         this.$successMsg('成功')
         this.$parent.show = 1
         this.$parent.getList()
+
+      }).catch((err)=>{
+        console.log(err);
+       for (let j = 0; j < this.items.length; j++) {
+          this.$set(this.items[j],'wallets',[])
+        }
+
+
       })
     },
     hanleSave() {
@@ -1390,6 +1401,15 @@ export default {
         this.$parent.cid = ''
         this.$parent.show = 1
         this.$parent.getList()
+
+      }).catch((err)=>{
+       for (let j = 0; j < this.items.length; j++) {
+
+         this.$set(this.items[j],'wallets',[])
+
+        }
+
+
       })
     },
     handleReseat() {
@@ -1544,7 +1564,9 @@ export default {
     filterWallets(array){
       const wallets = []
       for (let i = 0; i < array.length; i++) {
-        if (!array[i].walletsId.length) return
+        if (array[i].walletsId.length){
+
+
         for (let j = 0; j < array[i].walleList.length; j++) {
           for (let k = 0; k < array[i].walletsId.length; k++) {
             if (array[i].walleList[j].id === array[i].walletsId[k]) {
@@ -1574,6 +1596,7 @@ export default {
         }
 
         array[i].wallets = wallets
+          }
       }
     }
   }

+ 4 - 3
src/views/engin_deposit/components/deposit-apply-surrender.vue

@@ -473,9 +473,10 @@ export default {
         downloadPdf(this.$imageUrl + v, fileName)
         return
       }
-      getFileUrl({ key: v }).then((res) => {
-        window.open(res.data)
-      })
+        downloadFiles("/common/file/getStream", { key: v, fileName});
+      // getFileUrl({ key: v }).then((res) => {
+      //   window.open(res.data)
+      // })
     },
     openPdf(pdfUrl) {
       window.open(this.$imageUrl + pdfUrl)

+ 40 - 31
src/views/sales_policy/components/AddCondition.vue

@@ -1,7 +1,10 @@
 <template>
   <el-container class="app-container">
     <el-header height="50px" class="header">
-      <el-page-header @back="handleBack" :content="!id ? !edit? '新增':'编辑' : '详情页面'">
+      <el-page-header
+        @back="handleBack"
+        :content="!id ? (!edit ? '新增' : '编辑') : '详情页面'"
+      >
       </el-page-header>
     </el-header>
     <div class="line">
@@ -11,7 +14,7 @@
     </div>
     <el-main v-if="!id">
       <el-row v-if="conditionBox.length">
-        <el-row :gutter="50" >
+        <el-row :gutter="50">
           <el-col
             :xs="24"
             :sm="24"
@@ -40,6 +43,8 @@
               </el-row>
               <el-row>
                 <el-table
+                  ref="multipleTable"
+                  v-loading="listLoadingArr[`listLoading${index}`]"
                   style="width: 100%"
                   :data="item"
                   border
@@ -57,7 +62,7 @@
                   >
                     <template slot-scope="scope">
                       <CopyButton :copyText="scope.row.materialName" />
-                      <span>{{scope.row.materialName}}</span>
+                      <span>{{ scope.row.materialName }}</span>
                     </template>
                   </el-table-column>
                   <el-table-column
@@ -68,7 +73,7 @@
                   >
                     <template slot-scope="scope">
                       <CopyButton :copyText="scope.row.specification" />
-                      <span>{{scope.row.specification}}</span>
+                      <span>{{ scope.row.specification }}</span>
                     </template>
                   </el-table-column>
                 </el-table>
@@ -144,9 +149,8 @@
                   >
                     <template slot-scope="scope">
                       <CopyButton :copyText="scope.row.materialName" />
-                      <span>{{scope.row.materialName}}</span>
+                      <span>{{ scope.row.materialName }}</span>
                     </template>
-
                   </el-table-column>
                   <el-table-column
                     prop="specification"
@@ -156,7 +160,7 @@
                   >
                     <template slot-scope="scope">
                       <CopyButton :copyText="scope.row.specification" />
-                      <span>{{scope.row.specification}}</span>
+                      <span>{{ scope.row.specification }}</span>
                     </template>
                   </el-table-column>
                 </el-table>
@@ -277,7 +281,7 @@
                         >
                           <template slot-scope="scope">
                             <CopyButton :copyText="scope.row.materialNumber" />
-                            <span>{{scope.row.materialNumber}}</span>
+                            <span>{{ scope.row.materialNumber }}</span>
                           </template>
                         </el-table-column>
                         <el-table-column
@@ -289,7 +293,7 @@
                         >
                           <template slot-scope="scope">
                             <CopyButton :copyText="scope.row.materialName" />
-                            <span>{{scope.row.materialName}}</span>
+                            <span>{{ scope.row.materialName }}</span>
                           </template>
                         </el-table-column>
                         <el-table-column
@@ -301,7 +305,7 @@
                         >
                           <template slot-scope="scope">
                             <CopyButton :copyText="scope.row.specification" />
-                            <span>{{scope.row.specification}}</span>
+                            <span>{{ scope.row.specification }}</span>
                           </template>
                         </el-table-column>
                         <el-table-column
@@ -398,7 +402,7 @@
                         >
                           <template slot-scope="scope">
                             <CopyButton :copyText="scope.row.materialNumber" />
-                            <span>{{scope.row.materialNumber}}</span>
+                            <span>{{ scope.row.materialNumber }}</span>
                           </template>
                         </el-table-column>
                         <el-table-column
@@ -410,7 +414,7 @@
                         >
                           <template slot-scope="scope">
                             <CopyButton :copyText="scope.row.materialName" />
-                            <span>{{scope.row.materialName}}</span>
+                            <span>{{ scope.row.materialName }}</span>
                           </template>
                         </el-table-column>
                         <el-table-column
@@ -422,7 +426,7 @@
                         >
                           <template slot-scope="scope">
                             <CopyButton :copyText="scope.row.specification" />
-                            <span>{{scope.row.specification}}</span>
+                            <span>{{ scope.row.specification }}</span>
                           </template>
                         </el-table-column>
                         <el-table-column
@@ -458,13 +462,13 @@ import {
   addPoliyCondition,
   getConditionMaterialDetail,
   getConditionMaterialList,
-  getMaterialList
-} from '@/api/policy_list'
-import TabelTransfer from './TabelTransfer.vue'
+  getMaterialList,
+} from "@/api/policy_list";
+import TabelTransfer from "./TabelTransfer.vue";
 
-import { mapState } from 'vuex'
-import AddModel from './AddModel'
-import Minxin from '@/mixin'
+import { mapState } from "vuex";
+import AddModel from "./AddModel";
+import Minxin from "@/mixin";
 
 export default {
   mixins: [Minxin],
@@ -520,14 +524,15 @@ export default {
       fang: false,
       newConditionBox: [],
       currentPage: 1,
-      edit:''
+      edit: "",
+      listLoadingArr:{}
     };
   },
   created() {
     this.getCommonApi();
   },
   computed: mapState({
-    comCode: (state) => state.sales.code ,
+    comCode: (state) => state.sales.code,
   }),
   methods: {
     getList() {},
@@ -557,32 +562,37 @@ export default {
     },
     async getCommonApi(policyId) {
       if (this.id || policyId) {
-        this.edit = 'eidt'
+        this.edit = "eidt";
 
-        const res = await getConditionMaterialDetail({ id: this.policyId || policyId });
+        const res = await getConditionMaterialDetail({
+          id: this.policyId || policyId,
+        });
         this.pop = res.data.pop;
         let pop = res.data.pop.split(":");
-          this.conditionBox = []
+        this.conditionBox = [];
         for (let i = 0; i < pop.length; i++) {
           if (i == 0) {
             this.limit = pop[i];
             continue;
           }
           this.$set(this.popArr, `line_${i - 1}`, pop[i]);
+          this.$set(this.listLoadingArr,`listLoading${i}`,false)
         }
+
         for (let k = 0; k < pop.length; k++) {
+          this.listLoadingArr[`listLoading${k}`]=true
           const { data } = await getConditionMaterialList({
             pageNum: 1,
             pageSize: -1,
             policyConditionId: res.data.id,
             popType: k + 1,
           });
-          if (policyId){
+          if (policyId) {
             this.conditionBox.push(data.records);
-          }else {
+          } else {
             this.conditionBoxs.push(data.records);
           }
-
+          this.listLoadingArr[`listLoading${k}`]=false
         }
       }
     },
@@ -664,6 +674,7 @@ export default {
         }
         this.conditionBox[index] = [];
         this.$set(this.conditionBox, index, arr);
+        this.$refs.multipleTable.clearSelection();
       }
     },
     // 更改每页数量
@@ -693,8 +704,7 @@ export default {
         let datas = [];
         for (let j = 0; j < this.conditionBox.length; j++) {
           datas = [...datas, ...this.conditionBox[j]];
-
-         }
+        }
 
         /**
          * @value newConditionBox 首页保存的所有选中者,即条件1
@@ -703,7 +713,6 @@ export default {
          * 如:上一个或者所有条件中已经存在disabled
          */
         if (this.newConditionBox.length) {
-
           this.conditList = res.data.records;
           if (this.conditionBox[index].length) {
             for (let n = 0; n < this.newConditionBox.length; n++) {
@@ -738,7 +747,7 @@ export default {
           }
           this.conditList = res.data.records;
         } else {
-          console.log(datas,'4455454' ,res.data.records)
+          console.log(datas, "4455454", res.data.records);
           const newData = datas;
           if (newData.length) {
             for (let i = 0; i < res.data.records.length; i++) {

+ 6 - 3
src/views/supply/policy/components/retail_form.vue

@@ -240,7 +240,7 @@
         >
           <template slot-scope="scope">
             {{
-              ((scope.row.price - scope.row.discAmount)*((scope.row.rebateRate * scope.row.qty) * 100)/100 || 0 ).toFixed(2)
+              ((scope.row.price - scope.row.discAmount)*((scope.row.rebateRate * scope.row.qty) * 100)/100 || 0 ) | numToFixed
             }}
           </template>
         </el-table-column>
@@ -327,7 +327,7 @@
         >
           <template slot-scope="scope">
             <template v-if="scope.row.rebateRate">
-              {{ (((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100).toFixed(2) }}
+              {{ (((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100) | numToFixed }}
             </template>
             <template v-else>
               {{ (scope.row.price*scope.row.qty ).toFixed(2) }}
@@ -1020,8 +1020,11 @@ export default {
         const service = row.wallets.filter((k) => {
           return e == k.customerWalletId
         })[0]
-        this.$set(this.mainForm, 'k3ServiceId', service.serviceId)
+        if (index==0) {
+               this.$set(this.mainForm, 'k3ServiceId', service.serviceId)
         this.$set(this.mainForm, 'k3ServiceName', service.serviceName)
+        }
+
         this.$set(row, 'serviceId', service.serviceId)
         this.$set(row, 'serviceName', service.serviceName)
         this.$set(row,'amount',service.amount || 0)