Jelajahi Sumber

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 tahun lalu
induk
melakukan
ed751d2d44

+ 34 - 0
src/api/basicData/rateManagement.js

@@ -0,0 +1,34 @@
+import request from '@/router/axios';
+//列表查询
+export function getRateList(params) {
+  return request({
+    url: '/api/blade-client/parities/page',
+    method: 'get',
+    params
+  })
+}
+//修改和保存
+export function typeSave(data) {
+  return request({
+    url: '/api/blade-client/parities/submit',
+    method: 'post',
+    data
+  })
+}
+//查看详情
+export function dataDetail(data) {
+  return request({
+    url: '/api/blade-client/parities/detail?id='+data,
+    method: 'get'
+  })
+}
+//列表删除
+export function deleteDetails(data) {
+  return request({
+    url: '/api/blade-client/parities/remove',
+    method: 'post',
+    params: {
+      ids: data
+    }
+  })
+}

+ 1 - 1
src/cache.js

@@ -10,7 +10,7 @@ Vue.mixin({
     })
   },
   beforeRouteLeave: function (to, from, next) {
-    if (store.getters.tagList.length >= 8 && !store.getters.tagList.find(res => to.fullPath == res.value)) {
+    if (store.getters.tagList.length >= 16 && !store.getters.tagList.find(res => to.fullPath == res.value)) {
       this.$confirm('打开页面数超出最大限制,请先关闭其它页面!', '温馨提示', {
         confirmButtonText: '确定',
         showCancelButton: false,

+ 195 - 33
src/views/basicData/rateManagement/detailsPage.vue

@@ -38,7 +38,32 @@
           ref="form"
           v-model="form"
           :option="option"
-        />
+        >
+          <template slot="parities">
+            <el-input-number
+              v-model="form.parities"
+              size="small"
+              :controls="false"
+              style="width: 100%"
+              placeholder="请输入 默认汇率"
+            ></el-input-number>
+          </template>
+          <template slot="standardMoney">
+            <el-switch
+              v-model="form.standardMoney"
+              :active-value="1"
+              :inactive-value="0"
+            >
+            </el-switch>
+          </template>
+          <template slot="button">
+            <el-button
+              size="small"
+              type="primary"
+              @click="createExRate"
+            >产生汇率项目</el-button>
+          </template>
+        </avue-form>
       </basic-container>
       <containerTitle title="基础明细"></containerTitle>
       <basic-container>
@@ -59,7 +84,7 @@
 <script>
 import { getToken } from "@/util/auth";
 import { dateFormat } from "@/util/date";
-import { detail, submit, delItem } from "@/api/salaryManagement/primarySchool";
+import { typeSave, dataDetail } from "@/api/basicData/rateManagement";
 import { optionList } from "./js/optionList";
 import reportDialog from "@/components/report-dialog/main";
 export default {
@@ -80,15 +105,71 @@ export default {
         labelWidth: 100,
         column: [
           {
+            label: "货币代码",
+            prop: "code",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
             label: "货币名称",
-            prop: "a",
-            span: 6
+            prop: "cname",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
+            label: "默认汇率",
+            prop: "parities",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
+            label: "本位币",
+            prop: "standardMoney",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
+            label: "符号",
+            prop: "symbol",
+            span: 6,
+            rules: [
+              {
+                required: false,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
           },
           {
             label: "汇率类型",
-            prop: "b",
+            prop: "paritiesType",
             type: "select",
             filterable: true,
+            clearable:false,
             props: {
               label: "dictValue",
               value: "dictValue"
@@ -107,18 +188,32 @@ export default {
                 dictKey: 2
               }
             ],
-            span: 6
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
           },
           {
             label: "汇率年度",
-            prop: "c",
+            prop: "annual",
             type: "year",
             valueFormat: "yyyy",
-            span: 6
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
           },
           {
             label: "月份",
-            prop: "d",
+            prop: "moon",
             type: "select",
             filterable: true,
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=month",
@@ -127,8 +222,19 @@ export default {
               value: "dictKey"
             },
             span: 6,
-            display: false
-          }
+            display: false,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
+          },
+          {
+            prop: "button",
+            span: 6
+          },
         ]
       },
       optionList: optionList
@@ -143,6 +249,7 @@ export default {
     reportDialog
   },
   created() {
+    this.$set(this.form,'standardMoney', 0);
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -156,15 +263,14 @@ export default {
       return "padding:0;height:40px;";
     },
     getDetail(id) {
-      // detail(id)
-      //   .then(res => {
-      //     this.form = res.data.data;
-      //     this.getItemDetail();
-      //     this.getitemAnnex();
-      //   })
-      //   .finally(() => {
-      //     this.allloading = false;
-      //   });
+      dataDetail(id)
+        .then(res => {
+          this.form = res.data.data;
+          this.dataList = res.data.data.paritiesItemList? res.data.data.paritiesItemList: [];
+        })
+        .finally(() => {
+          this.allloading = false;
+        });
     },
     rowDel(row) {
       this.$confirm("确定删除数据?", {
@@ -178,7 +284,6 @@ export default {
               type: "success",
               message: "删除成功!"
             });
-            this.getItemDetail();
           });
         } else {
           this.$message({
@@ -195,15 +300,14 @@ export default {
         done();
         if (valid) {
           this.loadingBtn = true;
-          submit({
+          typeSave({
             ...this.form,
-            salaryType: "小学部",
-            salaryItemList: this.dataList
+            paritiesItemList: this.dataList
           })
             .then(res => {
               this.$message.success("保存成功");
-              this.form = res.data.data;
-              this.getItemDetail();
+              // this.form = res.data.data;
+              this.getDetail(res.data.data.id)
             })
             .finally(() => {
               this.loadingBtn = false;
@@ -244,17 +348,75 @@ export default {
       }
       this.$emit("goBack");
       this.leaveDetailsKey(this.$route.name);
-    }
+    },
+    // 产生汇率项目
+    createExRate() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          this.dataList = [];
+          if (this.form.paritiesType == '年汇率') {
+            const data = {
+              annual: this.form.annual,
+              receivableParities: this.form.parities,
+              handleParities: this.form.parities,
+              receiptsParities: this.form.parities,
+              actuallyParities: this.form.parities,
+            }
+            this.dataList.push(data)
+          } else if (this.form.paritiesType == '月汇率') {
+            for (let i = 1;i <= 12;i++) {
+              const data = {
+                annual: this.form.annual,
+                moon: i + '月',
+                receivableParities: this.form.parities,
+                handleParities: this.form.parities,
+                receiptsParities: this.form.parities,
+                actuallyParities: this.form.parities,
+              }
+              this.dataList.push(data)
+            }
+          } else if (this.form.paritiesType == '日汇率') {
+            const days = this.getCountDays(this.form.annual, this.form.moon)
+            for (let i = 1;i <= days;i++) {
+              const data = {
+                annual: this.form.annual,
+                moon: this.form.moon + '月',
+                national: i + '号',
+                receivableParities: this.form.parities,
+                handleParities: this.form.parities,
+                receiptsParities: this.form.parities,
+                actuallyParities: this.form.parities,
+              }
+              this.dataList.push(data)
+              console.log(this.dataList)
+            }
+          }
+        }
+      })
+    },
+    // 获取一个月的天数
+    getCountDays(curDate, month) {
+      let date = new Date(curDate);
+      date.setMonth(month);
+      date.setDate(0);
+      return date.getDate();
+    },
   },
   watch: {
-    "form.b": function(row) {
-      console.log(row);
+    "form.paritiesType": function(row) {
       if (row == "日汇率") {
-        this.findObject(this.option.column, "d").display = true;
-        this.findObject(this.optionList.column, "DAY").hide = false;
+        this.findObject(this.option.column, "moon").display = true;
+        this.findObject(this.optionList.column, "national").hide = false;
+        this.findObject(this.optionList.column, "moon").hide = false;
+      } else if (row == "月汇率") {
+        this.findObject(this.option.column, "moon").display = false;
+        this.findObject(this.optionList.column, "national").hide = true;
+        this.findObject(this.optionList.column, "moon").hide = false;
       } else {
-        this.findObject(this.option.column, "d").display = false;
-        this.findObject(this.optionList.column, "DAY").hide = true;
+        this.findObject(this.option.column, "moon").display = false;
+        this.findObject(this.optionList.column, "national").hide = true;
+        this.findObject(this.optionList.column, "moon").hide = true;
       }
     }
   }

+ 17 - 12
src/views/basicData/rateManagement/index.vue

@@ -53,7 +53,8 @@
 
 <script>
 import detailPage from "./detailsPage";
-import { getList, remove } from "@/api/salaryManagement/primarySchool";
+import { getRateList, deleteDetails } from "@/api/basicData/rateManagement";
+
 export default {
   name: "index",
   components: {
@@ -67,6 +68,7 @@ export default {
       loading: false,
       isShow: true,
       detailData: {},
+      search: {},
       page: {
         pageSize: 10,
         currentPage: 1
@@ -91,28 +93,28 @@ export default {
         column: [
           {
             label: "货币代码",
-            prop: "A",
+            prop: "code",
             overHidden: true,
             search:true
           },
           {
             label: "名称",
-            prop: "B",
+            prop: "cname",
             overHidden: true
           },
           {
             label: "符号",
-            prop: "C",
+            prop: "symbol",
             overHidden: true
           },
           {
             label: "本位币",
-            prop: "D",
+            prop: "standardMoney",
             overHidden: true
           },
           {
             label: "默认汇率",
-            prop: "E",
+            prop: "parities",
             overHidden: true
           },
           {
@@ -168,11 +170,14 @@ export default {
     },
     onLoad(page, params = {}) {
       this.loading = true;
-      params.salaryType = "小学部";
-      getList(
-        page.currentPage,
-        page.pageSize,
-        Object.assign(params, this.search)
+      let queryParams = {
+        ...params,
+        ...this.search,
+        size: page.pageSize,
+        current: page.currentPage,
+      }
+      getRateList(
+        queryParams
       )
         .then(res => {
           this.dataList = res.data.data.records ? res.data.data.records : [];
@@ -199,7 +204,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        remove(row.id).then(res => {
+        deleteDetails(row.id).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",

+ 9 - 8
src/views/basicData/rateManagement/js/optionList.js

@@ -38,39 +38,40 @@ export const optionList = {
   dialogFullscreen: true,
   column: [{
     label: "年",
-    prop: "A",
+    prop: "annual",
     width: 150,
     overHidden: true,
   }, {
     label: "月",
-    prop: "B",
+    prop: "moon",
     width: 150,
+    hide:true,
     overHidden: true,
   },{
     label: "日",
-    prop: "DAY",
+    prop: "national",
     width: 150,
     overHidden: true,
     hide:true,
     showColumn:false,
   }, {
     label: "应收汇率",
-    prop: "C",
+    prop: "receivableParities",
     width: 150,
     overHidden: true,
   }, {
     label: "应付汇率",
-    prop: "D",
+    prop: "handleParities",
     width: 150,
     overHidden: true,
   }, {
-    label: "实汇率",
-    prop: "E",
+    label: "实汇率",
+    prop: "receiptsParities",
     width: 150,
     overHidden: true,
   }, {
     label: "实付汇率",
-    prop: "F",
+    prop: "actuallyParities",
     width: 150,
     overHidden: true,
   }]

+ 50 - 3
src/views/dealer/purchase/config/mainList.json

@@ -18,7 +18,22 @@
   "searchSpan": 8,
   "showSummary": true,
   "summaryText": "合计",
-  "sumColumnList": [],
+  "expand": true,
+  "expandWidth": 38,
+  "sumColumnList": [
+    {
+      "name": "orderQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "debitAmount",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "采购订单号",
@@ -30,7 +45,7 @@
     },
     {
       "label": "供应商",
-      "prop": "corpId",
+      "prop": "strCorpName",
       "search": true,
       "index": 2,
       "minWidth": 80,
@@ -74,6 +89,38 @@
       "overHidden": true
     },
     {
+      "label": "收货仓库",
+      "prop": "storageName",
+      "search": true,
+      "index": 7,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "总数量",
+      "prop": "orderQuantity",
+      "search": false,
+      "index": 8,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "应付金额",
+      "prop": "debitAmount",
+      "search": false,
+      "index": 9,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "总金额",
+      "prop": "amount",
+      "search": false,
+      "index": 10,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
       "type": "select",
       "props": {
         "label": "name",
@@ -82,7 +129,7 @@
       "label": "制单人",
       "prop": "createUser",
       "search": true,
-      "index": 7,
+      "index": 11,
       "width": 100,
       "overHidden": true
     }

+ 118 - 3
src/views/dealer/purchase/index.vue

@@ -20,22 +20,40 @@
         @search-criteria-switch="searchCriteriaSwitch"
         @saveColumn="saveColumn"
         @resetColumn="resetColumn"
+        @expand-change="expandChange"
       >
         <template slot="orderNo" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
         </template>
-        <template slot="corpId" slot-scope="scope">
+        <template slot="strCorpName" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.strCorpName }}</span>
         </template>
         <template slot="createUser" slot-scope="scope">
           <span>{{ scope.row.createUserName }}</span>
         </template>
-        <template slot="corpIdSearch">
+        <template slot="amount" slot-scope="scope">
+          <span>{{ scope.row.amount | decimalFormat }}</span>
+        </template>
+        <template slot="strCorpNameSearch">
           <crop-select
             v-model="search.corpId"
             corpType="GYS"
           ></crop-select>
         </template>
+        <template slot="storageNameSearch">
+          <warehouse-select
+            v-model="search.storageId"
+            :configuration="configurationWarehouse"/>
+        </template>
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud
+            :data="row.itemData"
+            :option="itemOption"
+            :table-loading="row.itemLoading"
+            :cell-style="cellStyle"
+            class="itemTable"
+          ></avue-crud>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -76,7 +94,7 @@
 import option from './config/mainList.json';
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getPurchaseList, deleteDetails} from "@/api/dealer/purchase";
+import {getPurchaseList, deleteDetails, dataDetail} from "@/api/dealer/purchase";
 
 export default {
   name: "index",
@@ -97,6 +115,82 @@ export default {
       loading: false,
       selection: [],
       detailData: {},
+      itemOption: {
+        align: "center",
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: "产品编码",
+            prop: "code",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "商品名称",
+            prop: "cname",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "花纹",
+            prop: "brandItem",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "负荷指数",
+            prop: "specsOne",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "速度级别",
+            prop: "specsTwo",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "单位",
+            prop: "unit",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "尺寸",
+            prop: "size",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "价格",
+            prop: "price",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "小计",
+            prop: "amount",
+            width: 138,
+            overHidden: true
+          },
+        ]
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        clearable: true,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
     }
   },
   async created() {
@@ -114,6 +208,11 @@ export default {
       this.option.searchMenuPosition = "right";
     }
   },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
@@ -188,6 +287,10 @@ export default {
       delete queryParams.businesDate;
       this.loading = true;
       getPurchaseList(queryParams).then(res => {
+        res.data.data.records.forEach(e => {
+          e.itemLoading = false;
+          e.itemData = [];
+        });
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;
         this.option.height = window.innerHeight - 240;
@@ -251,6 +354,18 @@ export default {
         query: true, // 表示只是查询
       };
     },
+    expandChange(row) {
+      if (this.dataList[row.$index].itemLoading == false) {
+        this.dataList[row.$index].itemLoading = true;
+        dataDetail(row.id)
+          .then(res => {
+            this.dataList[row.$index].itemData = res.data.data.orderItemsList? res.data.data.orderItemsList: [];
+          })
+          .finally(() => {
+            this.dataList[row.$index].itemLoading = false;
+          });
+      }
+    },
   },
 }
 </script>

+ 44 - 5
src/views/dealer/sales/config/mainList.json

@@ -17,7 +17,22 @@
   "searchSpan": 8,
   "showSummary": true,
   "summaryText": "合计",
-  "sumColumnList": [],
+  "expand": true,
+  "expandWidth": 38,
+  "sumColumnList": [
+    {
+      "name": "orderQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "debitAmount",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "销售订单号",
@@ -29,7 +44,7 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpId",
+      "prop": "corpsName",
       "search": true,
       "index": 2,
       "minWidth": 80,
@@ -103,17 +118,41 @@
     },
     {
       "label": "发货仓库",
-      "prop": "storageId",
+      "prop": "storageName",
       "search": true,
       "index": 10,
       "minWidth": 80,
       "overHidden": true
     },
     {
+      "label": "总数量",
+      "prop": "orderQuantity",
+      "search": true,
+      "index": 11,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "总金额",
+      "prop": "amount",
+      "search": true,
+      "index": 12,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "应收金额",
+      "prop": "debitAmount",
+      "search": true,
+      "index": 13,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
       "label": "系统编号",
       "prop": "sysNo",
       "search": true,
-      "index": 11,
+      "index": 14,
       "minWidth": 80,
       "overHidden": true
     },
@@ -126,7 +165,7 @@
       "label": "制单人",
       "prop": "createUser",
       "search": true,
-      "index": 12,
+      "index": 15,
       "width": 100,
       "overHidden": true
     }

+ 113 - 5
src/views/dealer/sales/index.vue

@@ -19,30 +19,43 @@
         @search-criteria-switch="searchCriteriaSwitch"
         @saveColumn="saveColumn"
         @resetColumn="resetColumn"
+        @expand-change="expandChange"
       >
         <template slot="orderNo" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
         </template>
-        <template slot="corpId" slot-scope="scope">
+        <template slot="corpsName" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
         </template>
-        <template slot="storageId" slot-scope="scope">
+        <template slot="storageName" slot-scope="scope">
           <span>{{ scope.row.storageName }}</span>
         </template>
         <template slot="createUser" slot-scope="scope">
           <span>{{ scope.row.createUserName }}</span>
         </template>
-        <template slot="storageIdSearch">
+        <template slot="amount" slot-scope="scope">
+          <span>{{ scope.row.amount | decimalFormat }}</span>
+        </template>
+        <template slot="storageNameSearch">
           <warehouse-select
             v-model="search.storageId"
             :configuration="configurationWarehouse"/>
         </template>
-        <template slot="corpIdSearch">
+        <template slot="corpsNameSearch">
           <crop-select
             v-model="search.corpId"
             corpType="KH"
           ></crop-select>
         </template>
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud
+            :data="row.itemData"
+            :option="itemOption"
+            :table-loading="row.itemLoading"
+            :cell-style="cellStyle"
+            class="itemTable"
+          ></avue-crud>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -83,7 +96,7 @@
 import option from './config/mainList.json';
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getSalesList, detail, deleteDetails} from "@/api/dealer/sales";
+import {getSalesList, dataDetail, deleteDetails} from "@/api/dealer/sales";
 
 export default {
   name: "index",
@@ -110,8 +123,82 @@ export default {
         multiple: false,
         collapseTags: false,
         placeholder: "请点击右边按钮选择",
+        clearable: true,
         dicData: [],
       },
+      itemOption: {
+        align: "center",
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: "产品编码",
+            prop: "code",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "商品名称",
+            prop: "cname",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "花纹",
+            prop: "brandItem",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "负荷指数",
+            prop: "specsOne",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "速度级别",
+            prop: "specsTwo",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "单位",
+            prop: "unit",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "批次号",
+            prop: "lotNo",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "尺寸",
+            prop: "size",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "价格",
+            prop: "price",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "小计",
+            prop: "amount",
+            width: 138,
+            overHidden: true
+          },
+        ]
+      },
     }
   },
   async created() {
@@ -133,6 +220,11 @@ export default {
       this.option.searchMenuPosition = "right";
     }
   },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
   methods: {
     searchCriteriaSwitch(type) {
       if (type){
@@ -204,6 +296,10 @@ export default {
       }
       delete queryParams.businesDate;
       getSalesList(queryParams).then(res => {
+        res.data.data.records.forEach(e => {
+          e.itemLoading = false;
+          e.itemData = [];
+        });
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;
         this.option.height = window.innerHeight - 240;
@@ -267,6 +363,18 @@ export default {
         query: true, // 表示只是查询
       };
     },
+    expandChange(row) {
+      if (this.dataList[row.$index].itemLoading == false) {
+        this.dataList[row.$index].itemLoading = true;
+        dataDetail(row.id)
+          .then(res => {
+            this.dataList[row.$index].itemData = res.data.data.orderItemsList? res.data.data.orderItemsList: [];
+          })
+          .finally(() => {
+            this.dataList[row.$index].itemLoading = false;
+          });
+      }
+    },
   },
 }
 </script>

+ 4 - 5
src/views/salaryManagement/highSchool/detailsPage.vue

@@ -26,7 +26,7 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item
-                 :disabled="form.status > 0"
+              :disabled="form.status > 0"
               @click.native="pleaseCheck"
               >请核数据</el-dropdown-item
             >
@@ -101,7 +101,6 @@
               type="primary"
               size="small"
               @click.stop="openExport()"
-              :disabled="detailData.status == 1"
               >导出
             </el-button>
             <el-button
@@ -923,7 +922,7 @@
         width="70%"
         :before-close="handleClose"
         append-to-body
-        class='abnormal'
+        class="abnormal"
       >
         <span>
           <avue-crud :data="auditList" :option="auditOption">
@@ -1770,7 +1769,7 @@ export default {
     },
     handleClose() {
       this.auditList = [];
-      this.dialogVisible = false
+      this.dialogVisible = false;
     },
     exportAbnormal() {
       window.open(
@@ -2078,6 +2077,6 @@ export default {
   display: none;
 }
 .abnormal ::v-deep .el-dialog__body {
-    padding: 10px 20px;
+  padding: 10px 20px;
 }
 </style>

+ 4 - 5
src/views/salaryManagement/juniorhighSchool/detailsPage.vue

@@ -101,7 +101,6 @@
               type="primary"
               size="small"
               @click.stop="openExport()"
-              :disabled="detailData.status == 1"
               >导出
             </el-button>
             <el-button
@@ -923,7 +922,7 @@
         width="70%"
         :before-close="handleClose"
         append-to-body
-        class='abnormal'
+        class="abnormal"
       >
         <span>
           <avue-crud :data="auditList" :option="auditOption">
@@ -1725,7 +1724,7 @@ export default {
       });
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
-              this.onLock(data).then(res => {
+          this.onLock(data).then(res => {
             if (res.data.code == 200) {
               this.detailData.status = 2;
               this.option = this.$options.data().option;
@@ -1770,7 +1769,7 @@ export default {
     },
     handleClose() {
       this.auditList = [];
-      this.dialogVisible = false
+      this.dialogVisible = false;
     },
     exportAbnormal() {
       window.open(
@@ -2078,6 +2077,6 @@ export default {
   display: none;
 }
 .abnormal ::v-deep .el-dialog__body {
-    padding: 10px 20px;
+  padding: 10px 20px;
 }
 </style>

+ 4 - 5
src/views/salaryManagement/logisticsDepartment/detailsPage.vue

@@ -26,7 +26,7 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item
-                :disabled="form.status > 0"
+              :disabled="form.status > 0"
               @click.native="pleaseCheck"
               >请核数据</el-dropdown-item
             >
@@ -101,7 +101,6 @@
               type="primary"
               size="small"
               @click.stop="openExport()"
-              :disabled="detailData.status == 1"
               >导出
             </el-button>
             <el-button
@@ -923,7 +922,7 @@
         width="70%"
         :before-close="handleClose"
         append-to-body
-        class='abnormal'
+        class="abnormal"
       >
         <span>
           <avue-crud :data="auditList" :option="auditOption">
@@ -1770,7 +1769,7 @@ export default {
     },
     handleClose() {
       this.auditList = [];
-      this.dialogVisible = false
+      this.dialogVisible = false;
     },
     exportAbnormal() {
       window.open(
@@ -2078,6 +2077,6 @@ export default {
   display: none;
 }
 .abnormal ::v-deep .el-dialog__body {
-    padding: 10px 20px;
+  padding: 10px 20px;
 }
 </style>

+ 3 - 4
src/views/salaryManagement/primarySchool/detailsPage.vue

@@ -101,7 +101,6 @@
               type="primary"
               size="small"
               @click.stop="openExport()"
-              :disabled="detailData.status == 1"
               >导出
             </el-button>
             <el-button
@@ -923,7 +922,7 @@
         width="70%"
         :before-close="handleClose"
         append-to-body
-        class='abnormal'
+        class="abnormal"
       >
         <span>
           <avue-crud :data="auditList" :option="auditOption">
@@ -1770,7 +1769,7 @@ export default {
     },
     handleClose() {
       this.auditList = [];
-      this.dialogVisible = false
+      this.dialogVisible = false;
     },
     exportAbnormal() {
       window.open(
@@ -2078,6 +2077,6 @@ export default {
   display: none;
 }
 .abnormal ::v-deep .el-dialog__body {
-    padding: 10px 20px;
+  padding: 10px 20px;
 }
 </style>

+ 78 - 69
src/views/statisticAnalysis/payment/index.vue

@@ -28,32 +28,32 @@
             icon="el-icon-download"
             @click="outExport"
             :disabled="dataList.length == 0"
-          >导出</el-button
+            >导出</el-button
           >
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
-<!--        <template slot="dcSearch">-->
-<!--          <el-select-->
-<!--            v-model="search.dc"-->
-<!--            filterable-->
-<!--          >-->
-<!--            <el-option-->
-<!--              label="收"-->
-<!--              value="d"-->
-<!--            />-->
-<!--            <el-option-->
-<!--              label="付"-->
-<!--              value="c"-->
-<!--            />-->
-<!--          </el-select>-->
-<!--        </template>-->
-        <template slot="corpId" slot-scope="{ row, index }">
+        <!--        <template slot="dcSearch">-->
+        <!--          <el-select-->
+        <!--            v-model="search.dc"-->
+        <!--            filterable-->
+        <!--          >-->
+        <!--            <el-option-->
+        <!--              label="收"-->
+        <!--              value="d"-->
+        <!--            />-->
+        <!--            <el-option-->
+        <!--              label="付"-->
+        <!--              value="c"-->
+        <!--            />-->
+        <!--          </el-select>-->
+        <!--        </template>-->
+        <template slot="corpId" slot-scope="{ row }">
           <span>{{ row.corpName }}</span>
         </template>
-        <template slot="dc" slot-scope="{ row, index }">
-          <span>{{ row.dc == 'd'? '收': '付' }}</span>
+        <template slot="dc" slot-scope="{ row }">
+          <span>{{ row.dc == "d" ? "收" : "付" }}</span>
         </template>
       </avue-crud>
     </basic-container>
@@ -65,16 +65,14 @@ import { getToken } from "@/util/auth";
 import { getList, getProfitItem } from "@/api/statisticAnalysis/salesProfit";
 import { micrometerFormat } from "@/util/validate";
 import _ from "lodash";
-import {getAccList, exportAcctList} from "@/api/statisticAnalysis/payment"
-import {getUserInfo} from "@/api/system/user";
-
+import { getAccList, exportAcctList } from "@/api/statisticAnalysis/payment";
 export default {
   name: "index",
   data() {
     return {
       form: {},
       search: {
-        dc: 'd',
+        dc: "d"
       },
       dataList: [],
       loading: false,
@@ -139,16 +137,16 @@ export default {
             showColumn: false,
             search: true,
             width: 100,
-            searchValue: 'c',
-            type: 'select',
+            searchValue: "c",
+            type: "select",
             dicData: [
               {
-                label: '收',
-                value: 'd'
+                label: "收",
+                value: "d"
               },
               {
-                label: '付',
-                value: 'c'
+                label: "付",
+                value: "c"
               }
             ]
           },
@@ -214,7 +212,7 @@ export default {
           }
         ]
       },
-      tradeType: '',
+      tradeType: ""
     };
   },
   filters: {
@@ -222,24 +220,7 @@ export default {
       return num ? Number(num).toFixed(2) : "0.00";
     }
   },
-  created() {
-    getUserInfo().then(res => {
-      const sysType = res.data.data.billType;
-      if (sysType == 6) {
-        this.tradeType = 'JXS'
-      } else if (sysType == 5) {
-        this.tradeType = 'SW'
-      } else if (sysType == 4) {
-        this.tradeType = 'CK'
-      } else if (sysType == 3) {
-        this.tradeType = 'JK'
-      } else if (sysType == 2) {
-        this.tradeType = 'GN'
-      } else if (sysType == 1) {
-        this.tradeType = 'XX'
-      }
-    })
-  },
+  created() {},
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -268,8 +249,8 @@ export default {
     },
     searchReset() {
       this.search = {
-        dc: 'c'
-      }
+        dc: "c"
+      };
       this.onLoad(this.page, this.search);
     },
     currentChange(val) {
@@ -279,14 +260,36 @@ export default {
       this.page.currentPage = 1;
       this.page.pageSize = val;
     },
+    getSysType() {
+      const sysType = localStorage.getItem("sysitemType");
+      if (sysType == 6) {
+        this.tradeType = "JXS";
+      } else if (sysType == 5) {
+        this.tradeType = "SW";
+      } else if (sysType == 4) {
+        this.tradeType = "CK";
+      } else if (sysType == 3) {
+        this.tradeType = "JK";
+      } else if (sysType == 2) {
+        this.tradeType = "GN";
+      } else if (sysType == 1) {
+        this.tradeType = "XX";
+      }
+    },
     onLoad(page, params) {
+      this.getSysType();
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
-      let queryParams = Object.assign({tradeType: 'JK'}, params, this.search, {
-        size: page.pageSize,
-        current: page.currentPage,
-      })
+      let queryParams = Object.assign(
+        { tradeType: this.tradeType },
+        params,
+        this.search,
+        {
+          size: page.pageSize,
+          current: page.currentPage
+        }
+      );
       if (this.search.businesDate && this.search.businesDate.length > 0) {
         queryParams = {
           ...queryParams,
@@ -296,16 +299,18 @@ export default {
       }
       delete queryParams.businesDate;
       this.loading = true;
-      getAccList(queryParams).then(res => {
-        this.dataList = res.data.data.records ? res.data.data.records : [];
-        this.page.total = res.data.data.total;
-        this.option.height = window.innerHeight - 210;
-        this.$nextTick(() => {
-          this.$refs.crud.doLayout()
+      getAccList(queryParams)
+        .then(res => {
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          this.option.height = window.innerHeight - 210;
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
         })
-      }).finally(() => {
-        this.loading = false;
-      })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     editOpen(row) {
       if (row.billType == "BJ") {
@@ -325,13 +330,13 @@ export default {
       }
     },
     outExport() {
-      let accDateStart = '';
-      let accDateEnd = '';
+      let accDateStart = "";
+      let accDateEnd = "";
       if (this.search.businesDate && this.search.businesDate.length > 0) {
-        accDateStart = this.search.businesDate[0]
-        accDateEnd = this.search.businesDate[1]
+        accDateStart = this.search.businesDate[0];
+        accDateEnd = this.search.businesDate[1];
       }
-      let a = {...this.search}
+      let a = { ...this.search };
       // let itemList = JSON.stringify(a)
       // let result = itemList.replace(/""/g, "null");
       // a = JSON.parse(result)
@@ -341,7 +346,11 @@ export default {
       window.open(
         `/api/trade-finance/acc/exportAccMessage?${
           this.website.tokenHeader
-        }=${getToken()}&corpId=${a.corpId}&accDateStart=${accDateStart}&accDateEnd=${accDateEnd}&dc=${a.dc}&accSysNo=${a.accSysNo}&tradeType=JK`
+        }=${getToken()}&corpId=${
+          a.corpId
+        }&accDateStart=${accDateStart}&accDateEnd=${accDateEnd}&dc=${
+          a.dc
+        }&accSysNo=${a.accSysNo}&tradeType=${this.tradeType}`
       );
     },
     summaryMethod({ columns, data }) {

+ 10 - 11
src/views/wel/index.vue

@@ -1,34 +1,33 @@
 <template>
   <div v-if="billType">
     <tongjiSchool v-if="billType == 1"></tongjiSchool>
-    <defaultPage v-else :sysType='billType'></defaultPage>
+    <defaultPage v-else :sysType="billType"></defaultPage>
   </div>
 </template>
 
 <script>
 import defaultPage from "@/views/wel/home/defaultPage";
 import tongjiSchool from "@/views/wel/home/tongjiSchool";
-import {getUserInfo} from "@/api/system/user";
+import { getUserInfo } from "@/api/system/user";
+import { setStore } from "@/util/store";
 export default {
   name: "wel",
   data() {
     return {
-      billType:'',
+      billType: ""
     };
   },
   created() {
-    getUserInfo().then(res=>{
-      this.billType = res.data.data.billType
-    })
+    getUserInfo().then(res => {
+      this.billType = res.data.data.billType;
+      localStorage.setItem('sysitemType',this.billType)
+    });
   },
   components: {
     tongjiSchool,
     defaultPage
   },
-  methods: {
-  }
+  methods: {}
 };
 </script>
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>