Qukatie 1 tahun lalu
induk
melakukan
785657cf62

+ 63 - 0
src/api/tirePartsMall/basicData/costInformation/index.js

@@ -0,0 +1,63 @@
+import request from '@/router/axios';
+
+//仓库列表全部查询
+export function customerListAll(data) {
+  return request({
+    url: '/api/blade-sales-part/storageDesc/listAll',
+    method: 'get',
+    params: data
+  })
+}
+//仓库列表查询
+export function customerList(data) {
+  return request({
+    url: '/api/blade-sales-part/storageDesc/list',
+    method: 'get',
+    params: data
+  })
+}
+export const getDeptLazyTree = (parentId) => {
+  return request({
+    url: '/api/blade-client/storagetype/lazy-tree',
+    method: 'get',
+    params: {
+      parentId
+    }
+  })
+}
+
+export const getDeptTree = (parentId) => {
+  return request({
+    url: '/api/blade-client/storagetype/tree',
+    method: 'get',
+    params: {
+      parentId
+    }
+  })
+}
+
+//仓库列表修改和新增
+export function typeSave(data) {
+  return request({
+    url: '/api/blade-sales-part/storageDesc/submit',
+    method: 'post',
+    data: data
+  })
+}
+//仓库列表查看明细
+export function detail(data) {
+  return request({
+    url: '/api/blade-sales-part/storageDesc/detail?id='+data,
+    method: 'get'
+  })
+}
+//仓库列表删除
+export function deleteDetails(data) {
+  return request({
+    url: '/api/blade-sales-part/storageDesc/update',
+    method: 'post',
+    data: {
+      id:data
+    }
+  })
+}

+ 4 - 4
src/components/bill/selectOrderDetailList.vue

@@ -144,13 +144,13 @@ export default {
       if (columns.length > 0) {
         columns.forEach((column, index) => {
           let prop = column.property
-          if (['goodsTotalNum', 'totalMoney', 'returnsNumber', 'returnsAmount'].includes(prop)) {
+          if (['goodsTotalNum', 'totalMoney', 'returnsNumber', 'returnsAmount', 'balanceAmount', 'returnsBalanceAmount'].includes(prop)) {
             if (this.goodsListSave.length > 0) {
               let values = this.goodsListSave.map(item => Number(item[prop] || 0));
               let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
                 return a + b;
               }) : 0
-              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount') {
+              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount' || prop == 'balanceAmount' || prop == 'returnsBalanceAmount') {
                 sums[index] = all
               }
             } else {
@@ -158,12 +158,12 @@ export default {
               let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
                 return a + b;
               }) : 0
-              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount') {
+              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount' || prop == 'balanceAmount' || prop == 'returnsBalanceAmount') {
                 sums[index] = all
               }
             }
           } else {
-            sums[index] = '-'
+            sums[index] = ''
           }
         });
       }

+ 4 - 4
src/components/bill/selectOrderDetailListCG.vue

@@ -145,13 +145,13 @@ export default {
       if (columns.length > 0) {
         columns.forEach((column, index) => {
           let prop = column.property
-          if (['goodsTotalNum', 'totalMoney', 'returnsNumber', 'returnsAmount'].includes(prop)) {
+          if (['goodsTotalNum', 'totalMoney', 'returnsNumber', 'returnsAmount','balanceAmount','returnsBalanceAmount'].includes(prop)) {
             if (this.goodsListSave.length > 0) {
               let values = this.goodsListSave.map(item => Number(item[prop] || 0));
               let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
                 return a + b;
               }) : 0
-              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount') {
+              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount'|| prop == 'balanceAmount'||prop =='returnsBalanceAmount') {
                 sums[index] = all
               }
             } else {
@@ -159,12 +159,12 @@ export default {
               let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
                 return a + b;
               }) : 0
-              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount') {
+              if (prop == 'goodsTotalNum' || prop == 'totalMoney' || prop == 'returnsNumber' || prop == 'returnsAmount'|| prop == 'balanceAmount'||prop =='returnsBalanceAmount') {
                 sums[index] = all
               }
             }
           } else {
-            sums[index] = '-'
+            sums[index] = ''
           }
         });
       }

+ 4 - 1
src/components/iosbasic-data/searchquery.vue

@@ -6,7 +6,7 @@
                 <el-select style="width: 100%" v-model="selectValue" :size="size" :placeholder="placeholder"
                     :filterable="filterable" :clearable="clearable" :remote="remote" :remote-method="remoteMethod"
                     :multiple="multiple" :collapse-tags="collapseTags" :disabled="disabled" :allow-create="allowCreate"
-                    @change="corpChange" @focus="corpFocus">
+                    @change="corpChange" @focus="corpFocus" @clear="corpClear">
                     <el-option v-for="item in datalist" :key="item[forParameter.key]" :label="item[forParameter.label]"
                         :value="item[forParameter.value]"
                         :disabled="item[forParameter.disabled] ? item[forParameter.disabled] == disabledStatus : false">
@@ -174,6 +174,9 @@ export default {
         corpFocus() {
             this.$emit('corpFocus')
         },
+        corpClear(){
+            this.$emit('corpClear')
+        },
         // 下拉change
         corpChange(value) {
             this.$emit('corpChange', value)

+ 3 - 0
src/enums/column-name.js

@@ -1736,6 +1736,9 @@ const columnName = [{
   },{
     code: 370,
     name: '轮胎商城-商城管理-活动-添加商品列表列表'
+  },{
+    code: 371,
+    name: '轮胎商城-基础资料-费用信息-费用信息列表'
   }
 ]
 export const getColumnName = (key) => {

+ 92 - 92
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -631,11 +631,11 @@ import {getToken} from "@/util/auth";
               span:6,
               searchOrder:3,
             },
-            {
-                label: "所属团队",
-                prop: "teamName",
-                overHidden:true,
-            },
+            // {
+            //     label: "所属团队",
+            //     prop: "teamName",
+            //     overHidden:true,
+            // },
             {
               label: "客户名",
               prop: "corpCnName",
@@ -1036,70 +1036,70 @@ import {getToken} from "@/util/auth";
                 width:"100",
                 overHidden:true,
             },
-            {
-              label: "需陆运",
-              prop: "isNeedLand",
-                type: 'select',
-                dicData: [{
-                    label: '否',
-                    value: 0
-                }, {
-                    label: '是',
-                    value: 1
-                }],
-                overHidden:true,
-            },
-            {
-              label: "需报关",
-              prop: "isNeedDeclare",
-                type: 'select',
-                dicData: [{
-                    label: '否',
-                    value: 0
-                }, {
-                    label: '是',
-                    value: 1
-                }],
-                overHidden:true,
-            },
-            {
-              label: "需三检",
-              prop: "isNeedIq",
-                type: 'select',
-                dicData: [{
-                    label: '否',
-                    value: 0
-                }, {
-                    label: '是',
-                    value: 1
-                }],
-                overHidden:true,
-            },
-            {
-              label: "应收(CNY)",
-              prop: "amountDr",
-                width: "160",
-                overHidden:true,
-            },
-            {
-              label: "应付(CNY)",
-              prop: "amountCr",
-                width: "160",
-                overHidden:true,
-            },
-            {
-              label: "利润(CNY)",
-              prop: "amountProfit",
-                width: "160",
-                overHidden:true,
-            },
-            {
-                // label: "综合 USD 应付(USD) - 非 USD 外币转换为 USD",
-              label: "综合应付(USD)",
-              prop: "amountCrUsd",
-                width: "120",
-                overHidden:true,
-            },
+            // {
+            //   label: "需陆运",
+            //   prop: "isNeedLand",
+            //     type: 'select',
+            //     dicData: [{
+            //         label: '否',
+            //         value: 0
+            //     }, {
+            //         label: '是',
+            //         value: 1
+            //     }],
+            //     overHidden:true,
+            // },
+            // {
+            //   label: "需报关",
+            //   prop: "isNeedDeclare",
+            //     type: 'select',
+            //     dicData: [{
+            //         label: '否',
+            //         value: 0
+            //     }, {
+            //         label: '是',
+            //         value: 1
+            //     }],
+            //     overHidden:true,
+            // },
+            // {
+            //   label: "需三检",
+            //   prop: "isNeedIq",
+            //     type: 'select',
+            //     dicData: [{
+            //         label: '否',
+            //         value: 0
+            //     }, {
+            //         label: '是',
+            //         value: 1
+            //     }],
+            //     overHidden:true,
+            // },
+            // {
+            //   label: "应收(CNY)",
+            //   prop: "amountDr",
+            //     width: "160",
+            //     overHidden:true,
+            // },
+            // {
+            //   label: "应付(CNY)",
+            //   prop: "amountCr",
+            //     width: "160",
+            //     overHidden:true,
+            // },
+            // {
+            //   label: "利润(CNY)",
+            //   prop: "amountProfit",
+            //     width: "160",
+            //     overHidden:true,
+            // },
+            // {
+            //     // label: "综合 USD 应付(USD) - 非 USD 外币转换为 USD",
+            //   label: "综合应付(USD)",
+            //   prop: "amountCrUsd",
+            //     width: "120",
+            //     overHidden:true,
+            // },
             {
               label: "综合利润(USD)",
               prop: "amountProfitUsd",
@@ -1130,12 +1130,12 @@ import {getToken} from "@/util/auth";
                 width:"160",
                 overHidden:true,
             },
-            {
-              label: "应付对账状态",
-              prop: "checkCrStatusDescr",
-                width:"160",
-                overHidden:true,
-            },
+            // {
+            //   label: "应付对账状态",
+            //   prop: "checkCrStatusDescr",
+            //     width:"160",
+            //     overHidden:true,
+            // },
             {
               label: "应收结算状态",
               prop: "stlDrStatusDescr",
@@ -1154,12 +1154,12 @@ import {getToken} from "@/util/auth";
                 width:"160",
                 overHidden:true,
             },
-            {
-              label: "进项发票状态",
-              prop: "invoiceCrStatusDescr",
-                width:"160",
-                overHidden:true,
-            },
+            // {
+            //   label: "进项发票状态",
+            //   prop: "invoiceCrStatusDescr",
+            //     width:"160",
+            //     overHidden:true,
+            // },
               {
                   label: "创建人",
                   prop: "createUserName",
@@ -1176,17 +1176,17 @@ import {getToken} from "@/util/auth";
                   width:"160",
                   overHidden:true,
               },
-              {
-                  label: "更新人",
-                  prop: "updateUserName",
-                  overHidden:true,
-              },
-              {
-                  label: "更新时间",
-                  prop: "updateTime",
-                  width:"160",
-                  overHidden:true,
-              },
+            //   {
+            //       label: "更新人",
+            //       prop: "updateUserName",
+            //       overHidden:true,
+            //   },
+            //   {
+            //       label: "更新时间",
+            //       prop: "updateTime",
+            //       width:"160",
+            //       overHidden:true,
+            //   },
             {
                 label: "edi发送状态",
                 prop: "ediStatus",

+ 5 - 2
src/views/iosBasicData/balanceSheet/reports.vue

@@ -82,7 +82,9 @@ export default {
       bbDisabled: false,
       form: {},
       formReport: {},
-      query: {},
+      query: {
+        code: 'ZCFZ'
+      },
       loading: true,
       page: {
         pageSize: 10,
@@ -633,7 +635,8 @@ export default {
       // console.log(row.authorizedUsersId)
       // row.authorizedUsersId = row.authorizedUsersId.join()
       update(row).then(() => {
-        this.onLoad(this.page);
+        this.query.code = 'ZCFZ'
+        this.onLoad(this.page, this.query);
         this.$message({
           type: "success",
           message: "操作成功!"

+ 107 - 0
src/views/iosBasicData/finvouchers/components/loading.vue

@@ -0,0 +1,107 @@
+<template>
+  <div>
+    <div class="loading-overlay" v-if="isLoading">
+      <div class="loading-content">
+        <el-progress type="circle" :percentage="percentage"></el-progress>
+      </div>
+    </div>
+    <div>
+      <slot>
+      </slot>
+    </div>
+  </div>
+</template>
+   
+<script>
+export default {
+  name: 'CustomLoading',
+  props: {
+  },
+  data() {
+    return {
+      isLoading: false,
+      percentage: 0,
+      timer: null,
+      timer2: null,
+      timer3: null,
+    };
+  },
+  created() {
+  },
+  methods: {
+    getLoading() {
+      this.timer = setInterval(() => {
+        if (this.percentage < 60) {
+          this.percentage += 1;
+        } else {
+          clearTimeout(this.timer);
+          this.slowLoading()
+        }
+      }, 100);
+    },
+    slowLoading() {
+      this.timer2 = setInterval(() => {
+        if (this.percentage < 90) {
+          this.percentage += 1;
+        } else {
+          clearTimeout(this.timer2);
+          this.SlowestLoading()
+        }
+      }, 300);
+    },
+    SlowestLoading() {
+      this.timer3 = setInterval(() => {
+        if (this.percentage < 98) {
+          this.percentage += 1;
+        } else {
+          clearTimeout(this.timer3);
+        }
+      }, 1000);
+    },
+    startLoading() {
+      this.isLoading = true
+      this.getLoading()
+    },
+    endLoading() {
+      if (this.percentage < 60) {
+        clearTimeout(this.timer);
+        this.percentage = 100
+
+      } else if (this.percentage < 98) {
+        clearTimeout(this.timer2);
+        this.percentage = 100
+
+      } else {
+        clearTimeout(this.timer3);
+        this.percentage = 100
+      }
+      setTimeout(() => {
+        this.percentage = 0
+        this.isLoading = false
+      }, 500);
+    }
+  }
+
+}
+</script>
+   
+<style scoped>
+.loading-overlay {
+  position: absolute;
+  z-index: 2000;
+  background-color: hsla(0, 0%, 100%, .9);
+  margin: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  transition: opacity .3s;
+}
+
+.loading-content {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+}
+</style>

+ 526 - 546
src/views/iosBasicData/finvouchers/index.vue

@@ -1,593 +1,573 @@
 <template>
   <div>
-      <basic-container v-if="isShow">
-          <avue-crud :option="option"
-                     :table-loading="loading"
-                     :data="data"
-                     :page.sync="page"
-                     :search.sync="query"
-                     :permission="permissionList"
-                     :before-open="beforeOpen"
-                     v-model="form"
-                     id="out-table"
-                     :header-cell-class-name="headerClassName"
-                     ref="crud"
-                     @row-update="rowUpdate"
-                     @row-save="rowSave"
-                     @row-del="rowDel"
-                     @search-change="searchChange"
-                     @search-reset="searchReset"
-                     @selection-change="selectionChange"
-                     @current-change="currentChange"
-                     @size-change="sizeChange"
-                     @refresh-change="refreshChange"
-                     @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 321)"
-                     @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 321)"
-                     @on-load="onLoad" >
-              <template slot="menuLeft">
-                  <el-button type="primary"
-                             size="small"
-                             icon="el-icon-plus"
-                             @click="addbtnfun()">新建财务凭证
-                  </el-button>
-                  <el-button type="danger"
-                             size="small"
-                             icon="el-icon-delete"
-                             plain
-                             @click="handleDelete">删 除
-                  </el-button>
-                  <el-button type="success"
-                             size="small"
-                             plain @click.stop="voucherAccountingfun" >凭证记账
-                  </el-button>
-                  <el-button type="danger"
-                             size="small"
-                             plain
-                             @click="revokeFinVouchersfun">撤销记账
-                  </el-button>
-              </template>
-              <template slot="menu" slot-scope="{row}">
-                  <el-button type="text"
-                             size="small"
-                             @click="editFun(row)">编辑
-                  </el-button>
-                  <el-button type="text"
-                             size="small"
-                             @click="rowDel(row)">删除
-                  </el-button>
-              </template>
-              <template slot="billNo" slot-scope="{row}">
-                  <span class="textHide" style="color: #1e9fff;cursor: pointer;" @click="editFun(row)">{{row.billNo}}</span>
-              </template>
-          </avue-crud>
-      </basic-container>
-      <finvouchersitems ref="finvouchersitemsRef" v-if="!isShow" @goBack="goBack"></finvouchersitems>
+    <basic-container v-if="isShow">
+      <custom-loading ref="customLloading">
+        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
+          :permission="permissionList" :before-open="beforeOpen" v-model="form" id="out-table"
+          :header-cell-class-name="headerClassName" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
+          @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+          @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+          @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 321)"
+          @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 321)" @on-load="onLoad">
+          <template slot="menuLeft">
+            <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新建财务凭证
+            </el-button>
+            <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
+            </el-button>
+            <el-button type="success" size="small" plain @click.stop="voucherAccountingfun">凭证记账
+            </el-button>
+            <el-button type="danger" size="small" plain @click="revokeFinVouchersfun">撤销记账
+            </el-button>
+          </template>
+          <template slot="menu" slot-scope="{row}">
+            <el-button type="text" size="small" @click="editFun(row)">编辑
+            </el-button>
+            <el-button type="text" size="small" @click="rowDel(row)">删除
+            </el-button>
+          </template>
+          <template slot="billNo" slot-scope="{row}">
+            <span class="textHide" style="color: #1e9fff;cursor: pointer;" @click="editFun(row)">{{ row.billNo }}</span>
+          </template>
+        </avue-crud>
+      </custom-loading>
+
+    </basic-container>
+    <finvouchersitems ref="finvouchersitemsRef" v-if="!isShow" @goBack="goBack"></finvouchersitems>
   </div>
 </template>
 
 <script>
 import {
-    finvouchersList,
-    finvouchersDetail,
-    finvouchersSubmit,
-    finvouchersRemove,
-    confirmFinVouchers, revokeFinVouchers
+  finvouchersList,
+  finvouchersDetail,
+  finvouchersSubmit,
+  finvouchersRemove,
+  confirmFinVouchers, revokeFinVouchers
 } from "@/api/iosBasicData/finvouchers";
-  import {mapGetters} from "vuex";
-  import finvouchersitems from "@/views/iosBasicData/finvouchers/finvouchersitems.vue";
-  import finstlbillsDetails from "@/views/iosBasicData/finstlbills/finstlbillsDetails.vue";
-  import {getWorkDicts} from "@/api/system/dictbiz";
-
-  export default {
-    data() {
-      return {
-        isShow:true, // 详情弹窗
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option:{},
-        optionBack: {
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          menuWidth:'100',
-          searchIcon: true,
-          searchIndex: 3,
-          column: [
-            {
-              label: "账单编号",
-              prop: "billNo",
-              search: true,
-              overHidden:true,
-            },
-            {
-              label: "凭证来源",
-              prop: "voucherSource",
-              search: true,
-              type:'select',
-              dicData:[],
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_source_los",
-              props: {
-                  label: "dictValue",
-                  value: "dictKey"
-              },
-              overHidden:true,
-            },
-            {
-              label: "凭证类型",
-              prop: "voucherType",
-              overHidden:true,
-            },
-            {
-              label: "凭证号",
-              prop: "voucherNo",
-              search: true,
-              overHidden:true,
-            },
-            {
-              label: "凭证日期",
-              prop: "voucherDate",
-              overHidden:true,
-            },
-              {
-                  label: "凭证开始日期",
-                  prop: "voucherDateStart",
-                  search:true,
-                  overHidden:true,
-                  searchLabelWidth:"100",
-                  hide:true,
-                  type: "date",
-                  format: "yyyy-MM-dd",
-                  valueFormat: "yyyy-MM-dd HH:mm:ss",
-              },
-              {
-                  label: "凭证结束日期",
-                  prop: "voucherDateEnd",
-                  search:true,
-                  overHidden:true,
-                  searchLabelWidth:"100",
-                  hide:true,
-                  type: "date",
-                  format: "yyyy-MM-dd",
-                  valueFormat: "yyyy-MM-dd HH:mm:ss",
-              },
-            {
-              label: "财务年",
-              prop: "accountYear",
-              overHidden:true,
-            },
-            {
-              label: "财务月",
-              prop: "accountMonth",
-              overHidden:true,
-            },
-            {
-              label: "财务日",
-              prop: "accountDay",
-              overHidden:true,
-            },
-            {
-              label: "分录摘要",
-              prop: "descr",
-              overHidden:true,
-            },
-            {
-              label: "借方金额(CNY)",
-              prop: "amountDr",
-              width:'140',
-              overHidden:true,
-            },
-            {
-              label: "贷方金额(CNY)",
-              prop: "amountCr",
-              width:'140',
-              overHidden:true,
-            },
-            {
-              label: "借方金额(USD)",
-              prop: "amountDrUsd",
-              width:'140',
-              overHidden:true,
-            },
-            {
-              label: "贷方金额(USD)",
-              prop: "amountCrUsd",
-              width:'140',
-              overHidden:true,
-            },
-            {
-              label: "合计本位币借方金额(CNY)",
-              prop: "amountDrLoc",
-              width:'170',
-              overHidden:true,
-            },
-            {
-              label: "合计本位币贷方金额(CNY)",
-              prop: "amountCrLoc",
-              width:'170',
-              overHidden:true,
-            },
-            {
-              label: "外币凭证",
-              prop: "isForeign",
-              search: true,
-              type:'select',
-              dicData:[],
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              overHidden:true,
-            },
-            {
-              label: "数量凭证",
-              prop: "isQuantity",
-              search: true,
-              type:'select',
-              dicData:[],
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
-              props: {
-                 label: "dictValue",
-                 value: "dictKey"
-              },
-              overHidden:true,
-            },
-            {
-              label: "复核人",
-              prop: "checkUserName",
-              overHidden:true,
-            },
-            {
-              label: "复核时间",
-              prop: "checkTime",
-              overHidden:true,
-            },
-            {
-              label: "记账人",
-              prop: "postUserName",
-              overHidden:true,
+import { mapGetters } from "vuex";
+import finvouchersitems from "@/views/iosBasicData/finvouchers/finvouchersitems.vue";
+import finstlbillsDetails from "@/views/iosBasicData/finstlbills/finstlbillsDetails.vue";
+import { getWorkDicts } from "@/api/system/dictbiz";
+import CustomLoading from '@/views/iosBasicData/finvouchers/components/loading.vue'
+export default {
+  data() {
+    return {
+      isShow: true, // 详情弹窗
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: '100',
+        searchIcon: true,
+        searchIndex: 3,
+        column: [
+          {
+            label: "账单编号",
+            prop: "billNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "凭证来源",
+            prop: "voucherSource",
+            search: true,
+            type: 'select',
+            dicData: [],
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_source_los",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-            {
-              label: "记账时间",
-              prop: "postTime",
-              overHidden:true,
+            overHidden: true,
+          },
+          {
+            label: "凭证类型",
+            prop: "voucherType",
+            overHidden: true,
+          },
+          {
+            label: "凭证号",
+            prop: "voucherNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "凭证日期",
+            prop: "voucherDate",
+            overHidden: true,
+          },
+          {
+            label: "凭证开始日期",
+            prop: "voucherDateStart",
+            search: true,
+            overHidden: true,
+            searchLabelWidth: "100",
+            hide: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "凭证结束日期",
+            prop: "voucherDateEnd",
+            search: true,
+            overHidden: true,
+            searchLabelWidth: "100",
+            hide: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "财务年",
+            prop: "accountYear",
+            overHidden: true,
+          },
+          {
+            label: "财务月",
+            prop: "accountMonth",
+            overHidden: true,
+          },
+          {
+            label: "财务日",
+            prop: "accountDay",
+            overHidden: true,
+          },
+          {
+            label: "分录摘要",
+            prop: "descr",
+            overHidden: true,
+          },
+          {
+            label: "借方金额(CNY)",
+            prop: "amountDr",
+            width: '140',
+            overHidden: true,
+          },
+          {
+            label: "贷方金额(CNY)",
+            prop: "amountCr",
+            width: '140',
+            overHidden: true,
+          },
+          {
+            label: "借方金额(USD)",
+            prop: "amountDrUsd",
+            width: '140',
+            overHidden: true,
+          },
+          {
+            label: "贷方金额(USD)",
+            prop: "amountCrUsd",
+            width: '140',
+            overHidden: true,
+          },
+          {
+            label: "合计本位币借方金额(CNY)",
+            prop: "amountDrLoc",
+            width: '170',
+            overHidden: true,
+          },
+          {
+            label: "合计本位币贷方金额(CNY)",
+            prop: "amountCrLoc",
+            width: '170',
+            overHidden: true,
+          },
+          {
+            label: "外币凭证",
+            prop: "isForeign",
+            search: true,
+            type: 'select',
+            dicData: [],
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-            {
-              label: "凭证状态",
-              prop: "voucherStatus",
-              search: true,
-              type:'select',
-              dicData:[],
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_status_los",
-              props: {
-                 label: "dictValue",
-                 value: "dictKey"
-              },
-              overHidden:true,
+            overHidden: true,
+          },
+          {
+            label: "数量凭证",
+            prop: "isQuantity",
+            search: true,
+            type: 'select',
+            dicData: [],
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-            {
-              label: "备注",
-              prop: "remarks",
-              overHidden:true,
+            overHidden: true,
+          },
+          {
+            label: "复核人",
+            prop: "checkUserName",
+            overHidden: true,
+          },
+          {
+            label: "复核时间",
+            prop: "checkTime",
+            overHidden: true,
+          },
+          {
+            label: "记账人",
+            prop: "postUserName",
+            overHidden: true,
+          },
+          {
+            label: "记账时间",
+            prop: "postTime",
+            overHidden: true,
+          },
+          {
+            label: "凭证状态",
+            prop: "voucherStatus",
+            search: true,
+            type: 'select',
+            dicData: [],
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_status_los",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-          ]
-        },
-        data: []
-      };
-    },
-    components:{finstlbillsDetails, finvouchersitems},
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.finvouchers_add, false),
-          viewBtn: this.vaildData(this.permission.finvouchers_view, false),
-          delBtn: this.vaildData(this.permission.finvouchers_delete, false),
-          editBtn: this.vaildData(this.permission.finvouchers_edit, false)
-        };
+            overHidden: true,
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            overHidden: true,
+          },
+        ]
       },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
+      data: []
+    };
+  },
+  components: { finstlbillsDetails, finvouchersitems, CustomLoading },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.finvouchers_add, false),
+        viewBtn: this.vaildData(this.permission.finvouchers_view, false),
+        delBtn: this.vaildData(this.permission.finvouchers_delete, false),
+        editBtn: this.vaildData(this.permission.finvouchers_edit, false)
+      };
     },
-    async created() {
-        this.option = await this.getColumnData(this.getColumnName(321), this.optionBack);
-        this.voucherStatusWorkDictsfun()
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(321), this.optionBack);
+    this.voucherStatusWorkDictsfun()
+  },
+  methods: {
+    revokeFinVouchers,
+    // 获取字典数据
+    voucherStatusWorkDictsfun() {
+      getWorkDicts("voucher_status_los").then(res => {
+        this.findObject(this.option.column, "voucherStatus").dicData = res.data.data;
+      })
+      // 是否字典
+      getWorkDicts("ifInvoice").then(res => {
+        this.findObject(this.option.column, "isForeign").dicData = res.data.data;
+        this.findObject(this.option.column, "isQuantity").dicData = res.data.data;
+      })
+      getWorkDicts("voucher_source_los").then(res => {
+        this.findObject(this.option.column, "voucherSource").dicData = res.data.data;
+      })
     },
-    methods: {
-        revokeFinVouchers,
-      // 获取字典数据
-        voucherStatusWorkDictsfun(){
-          getWorkDicts("voucher_status_los").then(res => {
-              this.findObject(this.option.column, "voucherStatus").dicData = res.data.data;
-          })
-          // 是否字典
-          getWorkDicts("ifInvoice").then(res => {
-              this.findObject(this.option.column, "isForeign").dicData = res.data.data;
-              this.findObject(this.option.column, "isQuantity").dicData = res.data.data;
-          })
-          getWorkDicts("voucher_source_los").then(res => {
-              this.findObject(this.option.column, "voucherSource").dicData = res.data.data;
-          })
-      },
 
-      // 凭证记账
-      voucherAccountingfun(){
-          if (this.selectionList.length === 0) {
-              this.$message.warning("请选择至少一条数据");
-              return;
-          }
-          if (this.selectionList.length === 1) {
-              if (this.selectionList[0].voucherStatus == 1) {
-                  return this.$message.warning("请选择还未记账的数据");
-              }
-          }
-          this.$confirm("确定将选择数据进行记账?", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-          }).then(()=>{
-              let arrids = this.selectionList.map(item=>{
-                  if (item.voucherStatus == 0) {
-                      return item.id
-                  }
-              })
-              this.loading = true;
-              confirmFinVouchers({ids:arrids.join(',')}).then(res=>{
-                  this.$message({
-                      type: "success",
-                      message: "操作成功!"
-                  });
-                  this.loading = false;
-                  this.onLoad(this.page, this.query);
-              })
-          })
-      },
-      // 撤销记账
-      revokeFinVouchersfun(){
-          if (this.selectionList.length === 0) {
-              this.$message.warning("请选择至少一条数据");
-              return;
-          }
-          if (this.selectionList.length === 1) {
-              if (this.selectionList[0].voucherStatus == 0) {
-                  return this.$message.warning("请选择已记账的数据");
-              }
+    // 凭证记账
+    voucherAccountingfun() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      if (this.selectionList.length === 1) {
+        if (this.selectionList[0].voucherStatus == 1) {
+          return this.$message.warning("请选择还未记账的数据");
+        }
+      }
+      this.$confirm("确定将选择数据进行记账?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let arrids = this.selectionList.map(item => {
+          if (item.voucherStatus == 0) {
+            return item.id
           }
-          this.$confirm("确定将选择数据撤销记账?", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-          }).then(()=>{
-              let arrids = this.selectionList.map(item=>{
-                  if (item.voucherStatus == 1) {
-                      return item.id
-                  }
-              })
-              this.loading = true;
-              revokeFinVouchers({ids:arrids.join(',')}).then(res=>{
-                  this.$message({
-                      type: "success",
-                      message: "操作成功!"
-                  });
-                  this.loading = false;
-                  this.onLoad(this.page, this.query);
-              })
-          })
-      },
-      // 新建凭证
-      addbtnfun(){
-          this.isShow = false
-      },
-      // 编辑
-      editFun(row) {
-          this.isShow = false
-          this.$nextTick(()=>{
-              this.$refs.finvouchersitemsRef.finvouchersDetailfun(row.id)
-          })
-      },
-      // 详情的返回列表
-      goBack() {
-          // 初始化数据
-          if (JSON.stringify(this.$route.query) != "{}") {
-              this.$router.$avueRouter.closeTag();
-              this.$router.push({
-                  path: "/iosBasicData/finvouchers/index"
-              });
+        })
+        // this.loading = true;
+        this.$refs.customLloading.startLoading()
+        confirmFinVouchers({ ids: arrids.join(',') }).then(res => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // this.loading = false;
+          this.onLoad(this.page, this.query);
+        })
+        .finally(() => {
+          this.$refs.customLloading.endLoading()
+        });
+      })
+    },
+    // 撤销记账
+    revokeFinVouchersfun() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      if (this.selectionList.length === 1) {
+        if (this.selectionList[0].voucherStatus == 0) {
+          return this.$message.warning("请选择已记账的数据");
+        }
+      }
+      this.$confirm("确定将选择数据撤销记账?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let arrids = this.selectionList.map(item => {
+          if (item.voucherStatus == 1) {
+            return item.id
           }
-          this.isShow = true;
+        })
+        this.$refs.customLloading.startLoading()
+        revokeFinVouchers({ ids: arrids.join(',') }).then(res => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
           this.onLoad(this.page, this.query);
-      },
+        })
+        .finally(() => {
+          this.$refs.customLloading.endLoading()
+        });
+      })
+    },
+    // 新建凭证
+    addbtnfun() {
+      this.isShow = false
+    },
+    // 编辑
+    editFun(row) {
+      this.isShow = false
+      this.$nextTick(() => {
+        this.$refs.finvouchersitemsRef.finvouchersDetailfun(row.id)
+      })
+    },
+    // 详情的返回列表
+    goBack() {
+      // 初始化数据
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/iosBasicData/finvouchers/index"
+        });
+      }
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
+    },
 
-      rowSave(row, done, loading) {
-        finvouchersSubmit(row).then(() => {
+    rowSave(row, done, loading) {
+      finvouchersSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      finvouchersSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return finvouchersRemove(row.id);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        finvouchersSubmit(row).then(() => {
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return finvouchersRemove(this.ids);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+          this.$refs.crud.toggleSelection();
         });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return finvouchersRemove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        finvouchersDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      finvouchersList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records.map(item => {
+          item.isForeign = item.isForeign + ''
+          item.isQuantity = item.isQuantity + ''
+          item.voucherStatus = item.voucherStatus + ''
+          return item
         })
-          .then(() => {
-            return finvouchersRemove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          finvouchersDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
         }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, this.query);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        finvouchersList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records.map(item=>{
-              item.isForeign = item.isForeign + ''
-              item.isQuantity = item.isQuantity + ''
-              item.voucherStatus = item.voucherStatus + ''
-              return item
-          })
-          this.loading = false;
-          this.selectionClear();
-        });
-      },
-      //自定义列保存
-      async saveColumnTwo(ref, option, optionBack, code) {
-          /**
-           * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-           * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-           * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-           */
-          const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
-          if (inSave) {
-              this.$message.success("保存成功");
-              //关闭窗口
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      //自定义列重置
-      async resetColumnTwo(ref, option, optionBack, code) {
-          this[option] = this[optionBack];
-          const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
-          if (inSave) {
-              this.$message.success("重置成功");
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      // 更改表格颜色
-      headerClassName(tab){
-          //颜色间隔
-          let back = ""
-          if (tab.columnIndex >= 0 && tab.column.level === 1) {
-              if (tab.columnIndex % 2 === 0) {
-                  back = "back-one"
-              } else if (tab.columnIndex % 2 === 1) {
-                  back = "back-two"
-              }
-          }
-          return back;
-      },
+      }
+      return back;
+    },
 
-    }
-  };
+  }
+};
 </script>
 
 <style scoped>
 ::v-deep#out-table .back-one {
-    background: #ecf5ff !important;
-    text-align: center;
+  background: #ecf5ff !important;
+  text-align: center;
 }
+
 ::v-deep#out-table .back-two {
-    background: #ecf5ff !important;
-    text-align: center;
+  background: #ecf5ff !important;
+  text-align: center;
 }
+
 .textHide {
-    width: 100%;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }
+
 /deep/ .el-col-md-8 {
-    width: 24.33333%;
+  width: 24.33333%;
 }
 </style>

+ 5 - 2
src/views/iosBasicData/incomeStatement/reports.vue

@@ -82,7 +82,9 @@ export default {
       bbDisabled: false,
       form: {},
       formReport: {},
-      query: {},
+      query: {
+        code:'SY'
+      },
       loading: true,
       page: {
         pageSize: 10,
@@ -633,7 +635,8 @@ export default {
       // console.log(row.authorizedUsersId)
       // row.authorizedUsersId = row.authorizedUsersId.join()
       update(row).then(() => {
-        this.onLoad(this.page);
+        this.query.code='SY'
+        this.onLoad(this.page,this.query);
         this.$message({
           type: "success",
           message: "操作成功!"

+ 31 - 8
src/views/tirePartsMall/activity/detailsPage.vue

@@ -149,7 +149,8 @@
                             </el-dialog>
                         </trade-card>
                     </div>
-                    <el-dialog title="商城数据" append-to-body v-dialog-drag :visible.sync="detailsVisible" width="80%" @closed="goodsClosed">
+                    <el-dialog title="商城数据" append-to-body v-dialog-drag :visible.sync="detailsVisible" width="80%"
+                        @closed="goodsClosed">
                         <assembly-details ref="assemblyDetails" @selectionDetails="selectionDetails"></assembly-details>
                         <span slot="footer" class="dialog-footer">
                             <el-button @click="detailsVisible = false">取 消</el-button>
@@ -469,13 +470,12 @@ export default {
     },
     methods: {
         handleClick(e) {
-            console.log(e)
             if (e == 'importName') {
                 this.excelBoxfun('名称')
             } else if (e == 'excelName') {
-                this.excelBoxfun2('code')
+                this.excelBoxfun2('名称')
             } else if (e == 'importCode') {
-                this.excelBoxfun('名称')
+                this.excelBoxfun('code')
             } else if (e == 'excelCode') {
                 this.excelBoxfun2('code')
             }
@@ -513,10 +513,33 @@ export default {
         },
         uploadAfter(res, done, loading, column) {
             if (Array.isArray(res)) {
-                console.log(res, this.form.activityItemsList)
                 let arr = []
-                arr = this.form.activityItemsList
-                this.form.activityItemsList = arr.concat(res)
+                // arr = this.form.activityItemsList
+                res.forEach(e => {
+                    if (e.id) {
+                        if (this.form.activityItemsList.filter(el => el.id == e.id).length==1) {
+                            for (let i = 0; i < this.form.activityItemsList.length; i++) {
+                                if (this.form.activityItemsList[i].id == e.id) {
+                                    this.form.activityItemsList[i].minQuantity = e.minQuantity
+                                    this.form.activityItemsList[i].maxQuantity = e.maxQuantity
+                                    this.form.activityItemsList[i].priceOne = e.priceOne
+                                    this.form.activityItemsList[i].priceTwo = e.priceTwo
+                                    this.form.activityItemsList[i].priceThree = e.priceThree
+                                    this.form.activityItemsList[i].priceFour = e.priceFour
+                                    break; // 终止循环
+                                }
+                            }
+                        } else {
+                            e.id = null
+                            this.form.activityItemsList.push(e)
+                        }
+
+                    } else {
+                        this.form.activityItemsList.push(e)
+                    }
+
+                })
+                // this.form.activityItemsList = arr.concat(res)
                 // this.form.activityItemsList.concat(res)
             } else {
                 this.$message.error(res)
@@ -704,7 +727,7 @@ export default {
             this.$refs.assemblyDetails.getGoodsdata()
             this.selectionDetails()
         },
-        goodsClosed(){
+        goodsClosed() {
             this.$refs.assemblyDetails.reset()
         },
         // 详情添加商品

+ 292 - 0
src/views/tirePartsMall/basicData/costInformation/index.vue

@@ -0,0 +1,292 @@
+<template>
+    <basic-container class="page-crad" v-if="flag">
+      <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" @row-del="rowDel"
+        @row-update="rowUpdate" :before-open="beforeOpen" :before-close="beforeClose" @row-save="rowSave"
+        @search-change="searchChange" @search-reset="searchReset" @on-load="onLoad"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 371)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 371)" @search-criteria-switch="searchCriteriaSwitch"
+        @tree-load="treeLoad">
+          <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+              <el-button icon="el-icon-plus" type="primary" :size="size" @click="handleAdd">新增</el-button>
+          </template>
+      </avue-crud>
+    </basic-container>
+  </template>
+  
+  <script>
+  import {
+    customerList,
+    typeSave,
+    detail,
+    deleteDetails
+  } from "@/api/tirePartsMall/basicData/warehouse";
+  import {
+    customerListAll
+  } from "@/api/tirePartsMall/basicData/warehouse";
+  import {getUser} from "@/api/system/user";
+  export default {
+    name: "customerInformation",
+    data() {
+      return {
+        form: {},
+        option: {},
+        optionBack: {
+            addBtn:false,
+          headerAlign: "center",
+          align: "center",
+          border: true,
+          index: true,
+          // lazy: true,
+          stripe: true,
+          height: "auto",
+          tip: false,
+          simplePage: true,
+          searchShow: true,
+          tree: true,
+          searchMenuSpan: 16,
+          searchSpan: 8,
+          searchIcon: true,
+          searchIndex: 2,
+          selection: true,
+          viewBtn: false,
+          menuWidth: 140,
+          column: [{
+            label: "费用名称",
+            prop: "cname",
+            search: true,
+            overHidden: true,
+            // width: 120,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+          }, {
+            label: "费用编码",
+            prop: "code",
+            search: true,
+            overHidden: true,
+            // width: 120,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+          }, {
+            label: "收付",
+            prop: "contacts",
+            search: true,
+            overHidden: true,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+          }, {
+            label: "币别",
+            prop: "tel",
+            search: true,
+            overHidden: true,
+            // width: 120,
+          }
+          ,{
+            label: "备注",
+            prop: "remarks",
+            type: "textarea",
+            minRows: 3,
+            span: 24,
+            overHidden: true,
+          }]
+        },
+        parentId: 0,
+        dataList: [],
+        page: {
+          pageSize: 20,
+          currentPage: 1,
+          total: 0,
+          pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        treeDeptId: "",
+        corpTypeListCk: [],
+        flag:false,
+      };
+    },
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(371), this.optionBack);
+      this.key++
+      let i = 0;
+      this.option.column.forEach(item => {
+        if (item.search) i++
+      })
+      if (i % 3 !== 0) {
+        const num = 3 - Number(i % 3)
+        this.option.searchMenuSpan = num * 8;
+        this.option.searchMenuPosition = "right";
+      }
+      setTimeout(()=>{
+        this.flag = true
+      },200)
+    },
+    methods: {
+      //删除列表后面的删除按钮触发触发(row, index, done)
+      rowDel(row, index, done) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return deleteDetails(row.id);
+          })
+          .then(() => {
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            // 数据回调进行刷新
+            done(row);
+          });
+      },
+      //修改时的修改按钮点击触发
+      rowUpdate(row, index, done, loading) {
+        typeSave(row).then(
+          () => {
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            // 数据回调进行刷新
+            done(row);
+          },
+          error => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      //新增修改时保存触发
+      rowSave(row, done, loading) {
+        console.log(row);
+        typeSave(row).then(
+          res => {
+            console.log(res);
+            this.page.currentPage = 1;
+            this.onLoad(this.page, {});
+            done();
+          },
+          error => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      //新增按钮触发
+      handleAdd(row) {
+        // this.parentId = row.id;
+        // const column = this.findObject(this.option.column, "parentId");
+        // column.value = row.id;
+        // column.addDisabled = true;
+          getUser(JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id).then(res=>{
+              this.form.salesCompanyName = res.data.data.deptName
+              this.form.salesCompanyId = res.data.data.deptId
+          })
+  
+        this.$refs.crud.rowAdd();
+      },
+      //新增子项和新增触发查询所有
+      beforeOpen(done, type) {
+        if (["add", "edit"].includes(type)) {
+          this.option.column.forEach(e => {
+            if (e.prop == "storageTypeId") {
+              this.$set(this.option.column, 3, { ...e, value: this.treeDeptId });
+            }
+          });
+        }
+        if (["edit", "view"].includes(type)) {
+          detail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      //点击新增时触发
+      beforeClose(done) {
+        this.parentId = "";
+        // const column = this.findObject(this.option.column, "parentId");
+        // column.value = "";
+        // column.addDisabled = false;
+        done();
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.treeDeptId = "";
+        this.onLoad(this.page);
+      },
+      onLoad(page, params = { parentId: 0 }) {
+        let queryParams = Object.assign({}, params, {
+          size: page.pageSize,
+          current: page.currentPage,
+          parentId: 0,
+          storageTypeId: this.treeDeptId
+        });
+        customerList(queryParams).then(res => {
+          this.dataList = res.data.data.records;
+          this.page.total = res.data.data.total;
+        });
+      },
+      searchCriteriaSwitch(type) {
+        this.$refs.crud.doLayout();
+        this.$refs.crud.getTableHeight();
+      },
+      //树桩列点击展开触发
+      treeLoad(tree, treeNode, resolve) {
+        const parentId = tree.id;
+        customerList({ parentId: parentId }).then(res => {
+          resolve(res.data.data.records);
+        });
+      },
+      //自定义列保存
+      async saveColumnTwo(ref, option, optionBack, code) {
+        /**
+         * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+         * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+         * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+         */
+        const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        }
+      },
+      //自定义列重置
+      async resetColumnTwo(ref, option, optionBack, code) {
+        this[option] = this[optionBack];
+        const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+        if (inSave) {
+          this.$message.success("重置成功");
+          this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        }
+      }
+    }
+  };
+  </script>
+  
+  <style scoped>
+  .page-crad ::v-deep .basic-container__card {
+    height: 94.8vh;
+  }
+  </style>
+  

+ 25 - 12
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -61,7 +61,8 @@
                             :buttonIf="false" :filterable="true" :remote="true"
                             :disabled="findObject(optionForm.column, 'customerName').disabled || form.businessSource == '外部销售'"
                             placeholder="请选择客户" :forParameter="{ key: 'id', label: 'cname', value: 'cname' }"
-                            @corpFocus="KHgetListfun" @remoteMethod="KHgetListfun" @corpChange="KHcorpChange">
+                            @corpFocus="KHgetListfun" @remoteMethod="KHgetListfun" @corpChange="KHcorpChange"
+                            @corpClear="KHClear">
                         </search-query>
                     </tempalte>
                     <template slot-scope="{row,index}" slot="contacts">
@@ -1330,19 +1331,19 @@ export default {
     },
     methods: {
         uploadAfter(res, done, loading, column) {
-            if(Array.isArray(res)){
+            if (Array.isArray(res)) {
                 if (res instanceof Array) {
-                this.form.orderItemsList = this.form.orderItemsList.concat(res)
-                res.forEach(item => {
-                    dotList({
-                        storageId: this.form.storageId,
-                        goodsId: res.goodsId
-                    }).then(e => {
-                        this.findObject(this.optionContactsBack.column, "dot").dicData = e.data.data
+                    this.form.orderItemsList = this.form.orderItemsList.concat(res)
+                    res.forEach(item => {
+                        dotList({
+                            storageId: this.form.storageId,
+                            goodsId: res.goodsId
+                        }).then(e => {
+                            this.findObject(this.optionContactsBack.column, "dot").dicData = e.data.data
+                        })
                     })
-                })
-            }
-            }else{
+                }
+            } else {
                 this.$message.error(res)
             }
 
@@ -1415,6 +1416,18 @@ export default {
                 }
             }
         },
+        KHClear() {
+            this.form.customerId=''
+            this.form.customerName=''
+            this.dicUrlWithCustomId =''
+            this.form.storageId =''
+            this.form.contacts = ''
+            this.form.phone =''
+            this.contactsOption =''
+            this.form.recAddress = ''
+            this.form.salerId = ''
+            this.KHgetListfun()
+        },
         // 获取客户数据
         KHgetListfun(cname) {
             KHgetList({