qukaidi 3 anni fa
parent
commit
b0d5be4348

+ 9 - 24
src/components/details-select/main.vue

@@ -1,28 +1,12 @@
 <template>
   <div>
     <div style="display:flex">
-      <el-input
-        v-model="value"
-        placeholder="请点右边按钮"
-        :readonly="true"
-        :disabled="disabled"
-      ></el-input>
-      <el-button
-        icon="el-icon-search"
-        size="mini"
-        :disabled="disabled"
-        @click="openDialog()"
-      ></el-button>
+      <el-input v-model="value" placeholder="请点右边按钮" :readonly="true" type="textarea" :rows="1" :disabled="disabled">
+      </el-input>
+      <el-button icon="el-icon-search" size="mini" :disabled="disabled" @click="openDialog()"></el-button>
     </div>
-    <el-dialog
-      title="详细信息"
-      class="el-dialogDeep"
-      :visible.sync="dialogVisible"
-      append-to-body
-      :close-on-click-modal="false"
-      width="50%"
-      v-dialog-drag
-    >
+    <el-dialog title="详细信息" class="el-dialogDeep" :visible.sync="dialogVisible" append-to-body
+      :close-on-click-modal="false" width="50%" v-dialog-drag>
       <span>
         <avue-form ref="form" v-model="obj" :option="option"></avue-form>
       </span>
@@ -73,8 +57,8 @@ export default {
     prop: "value",
     event: "balabala"
   },
-  created() {},
-  mounted() {},
+  created() { },
+  mounted() { },
   methods: {
     openDialog() {
       this.dialogVisible = true;
@@ -91,4 +75,5 @@ export default {
 };
 </script>
 
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+</style>

+ 42 - 4
src/util/contrastData.js

@@ -2,14 +2,14 @@
 export function contrastObj(newval, oldval) {
   let reg = /^[A-Za-z]+$/;
   for (let key in newval) {
-    if (reg.test(key)&&!(newval[key] instanceof Array) && (newval[key] != oldval[key] && (newval[key] || oldval[key]))) {
+    if (reg.test(key) && !(newval[key] instanceof Array) && (newval[key] != oldval[key] && (newval[key] || oldval[key]))) {
       return true
     }
   }
   return false
 }
 
-//比较数组的值
+//比较数组的值(有序)
 export function contrastList(newlist, oldlist) {
   if (newlist.length != oldlist.length) {
     return true
@@ -25,9 +25,9 @@ export function contrastList(newlist, oldlist) {
           delete oldlist[i].olditem
         }
         if (newitem == olditem) {
-          if(!(newlist[i][newitem] instanceof Array)){
+          if (!(newlist[i][newitem] instanceof Array)) {
             if (newlist[i][newitem] != oldlist[i][olditem]) {
-              console.log(newitem,i,newlist[i][newitem],oldlist[i][olditem])
+              console.log(newitem, i, newlist[i][newitem], oldlist[i][olditem])
               return true
             }
           }
@@ -37,3 +37,41 @@ export function contrastList(newlist, oldlist) {
   }
   return false;
 }
+//比较数组的值(无序)
+export function contrastList2(newlist, oldlist) {
+  if (newlist.length != oldlist.length) {
+    return true
+  }
+  let reg = /^[A-Za-z]+$/;
+  let len = oldlist.length
+  for (var i = 0; i < len; i++) {
+    for (let olditem in oldlist[i]) {
+      for (var j = 0; j < len; j++) {
+        for (let newitem in newlist[j]) {
+          if (oldlist[i].id == newlist[j].id) {
+            if (!reg.test(oldlist[i])) {
+              delete oldlist[i].olditem
+            }
+            if (!reg.test(newitem)) {
+              delete newlist[j].newitem
+            }
+            if (!(newlist[i][newitem] instanceof Array)) {
+              if (oldlist[i][olditem] != newlist[j][newitem]) {
+                return true
+              }
+            }
+          }
+        }
+        // if (newitem == olditem) {
+        //   if(!(newlist[i][newitem] instanceof Array)){
+        //     if (newlist[i][newitem] != oldlist[i][olditem]) {
+        //       console.log(newitem,i,newlist[i][newitem],oldlist[i][olditem])
+        //       return true
+        //     }
+        //   }
+        // }
+      }
+    }
+  }
+  return false;
+}

+ 10 - 5
src/views/businessManagement/salesOrder/configuration/optionPolicy.json

@@ -81,9 +81,14 @@
         }
       ]
     },{
+      "label": "花纹",
+      "prop": "brandItem",
+      "index": 5,
+      "width":100
+    },{
       "label": "供应商",
       "prop": "corpName",
-      "index": 4,
+      "index": 6,
       "width":100,
       "cell": true,
       "rules": [
@@ -96,7 +101,7 @@
     },{
       "label": "销售价(元)",
       "prop": "salesPrice",
-      "index": 6,
+      "index": 7,
       "width":100,
       "cell": true,
       "rules": [
@@ -109,7 +114,7 @@
     },{
       "label": "特价",
       "prop": "specialOffer",
-      "index": 7,
+      "index": 8,
       "width":100,
       "cell": true,
       "rules": [
@@ -122,7 +127,7 @@
     },{
       "label": "操作员",
       "prop": "updateUserName",
-      "index": 8,
+      "index": 9,
       "width":100,
       "cell": true,
       "rules": [
@@ -135,7 +140,7 @@
     },{
       "label": "最后更新时间",
       "prop": "updateTime",
-      "index": 9,
+      "index": 10,
       "width":100,
       "cell": true,
       "rules": [

+ 29 - 28
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -32,10 +32,6 @@
             <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
               :disabled="detailData.status == 1"></crop-select>
           </template>
-          <template slot="corpId2">
-            <details-select :value="form.clientMessage" :obj="form" @detailsDate="detailsDate"
-              :disabled="detailData.status == 1"></details-select>
-          </template>
           <template slot="corpAttn">
             <el-select size="small" v-model="form.corpAttn" placeholder="请选择" @change="corpAttnChange" clearable
               :disabled="detailData.status == 1">
@@ -354,18 +350,7 @@ export default {
               }
             ],
             span: 8,
-            slot: true
-          },
-          {
-            label: "详情信息",
-            prop: "corpId2",
-            span: 8
-          },
-          {
-            label: "系统号",
-            prop: "sysNo",
-            span: 8,
-            disabled: true
+            slot: true,
           },
           {
             label: "联系人",
@@ -375,18 +360,15 @@ export default {
           {
             label: "电话",
             prop: "corpTel",
-            span: 8
+            span: 8,
           },
           {
-            label: "订单状态",
-            prop: "orderStatus",
+            label: "详情信息",
+            prop: "clientMessage",
+            type: "textarea",
+            minRows: 2,
             span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
+            row: true
           },
           {
             label: "公司主体",
@@ -440,7 +422,8 @@ export default {
             props: {
               label: "dictValue",
               value: "dictValue"
-            }
+            },
+            row: true
           },
           {
             label: "价格条款",
@@ -459,7 +442,17 @@ export default {
             type: "textarea",
             minRows: 1,
             span: 12,
-            row: true
+          },
+          {
+            label: "订单状态",
+            prop: "orderStatus",
+            span: 6,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
           },
           {
             label: "收款方式",
@@ -478,9 +471,15 @@ export default {
             type: "textarea",
             minRows: 1,
             span: 12,
-            row: true
           },
           {
+            label: "系统号",
+            prop: "sysNo",
+            span: 6,
+            disabled: true
+          },
+
+          {
             label: "报价日期",
             prop: "businesDate",
             span: 6,
@@ -835,6 +834,8 @@ export default {
       this.form.corpAttn = null;
       this.form.corpTel = null;
       this.form.coefficient = row.coefficient;
+      this.form.clientMessage = (row.cname?row.cname:'') + '\r\n'+(row.addr?row.addr:'')
+      console.log(row)
       if (this.data.length > 0) {
         this.data.forEach(e => {
           e.productPrice = productCal(

+ 26 - 17
src/views/exportTrade/salesContract/detailsPage.vue

@@ -416,15 +416,10 @@ export default {
                 trigger: "blur"
               }
             ],
-            span: 16,
-            slot: true
-          },
-          {
-            label: "系统号",
-            prop: "sysNo",
             span: 8,
-            disabled: true
+            slot: true
           },
+
           {
             label: "联系人",
             prop: "corpAttn",
@@ -436,15 +431,13 @@ export default {
             span: 8
           },
           {
-            label: "订单状态",
-            prop: "orderStatus",
+            label: "详情信息",
+            prop: "clientMessage",
+            type: "textarea",
+            minRows: 2,
             span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
+            row: true
+
           },
           {
             label: "公司主体",
@@ -518,7 +511,12 @@ export default {
             type: "textarea",
             minRows: 1,
             span: 12,
-            row: true
+          },
+          {
+            label: "系统号",
+            prop: "sysNo",
+            span: 6,
+            disabled: true
           },
           {
             label: "收款方式",
@@ -537,7 +535,17 @@ export default {
             type: "textarea",
             minRows: 1,
             span: 12,
-            row: true
+          },
+          {
+            label: "订单状态",
+            prop: "orderStatus",
+            span: 6,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
           },
           {
             label: "订单日期",
@@ -969,6 +977,7 @@ export default {
     },
     getCorpData(row) {
       this.form.coefficient = row.coefficient;
+      this.form.clientMessage = (row.cname?row.cname:'') + '\r\n'+(row.addr?row.addr:'')
       if (this.data.length > 0) {
         this.data.forEach(e => {
           e.productPrice = productCal(

+ 10 - 23
src/views/statisticAnalysis/dataDetail/index.vue

@@ -1,23 +1,10 @@
 <template>
   <div>
     <basic-container class="page-crad">
-      <avue-crud
-        ref="crud"
-        :option="option"
-        :data="dataList"
-        :page.sync="page"
-        :search.sync="search"
-        :cell-style="cellStyle"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        :table-loading="loading"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        @search-criteria-switch="searchCriteriaSwitch"
-      >
+      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+        :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft">
           <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
         </template>
@@ -176,7 +163,7 @@ export default {
     this.option.column.forEach(item => {
       if (item.search) i++
     })
-    if (i % 3 !== 0){
+    if (i % 3 !== 0) {
       const num = 3 - Number(i % 3)
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
@@ -265,7 +252,7 @@ export default {
       }
     },
     outExport() {
-      let params = {...this.search}
+      let params = { ...this.search }
       if (!params.corpName) this.$set(params, 'corpName', '');
       if (!params.orderNo) this.$set(params, 'orderNo', '');
       if (!params.gysName) this.$set(params, 'gysName', '');
@@ -283,16 +270,14 @@ export default {
           endCreateTime: '',
         }
       }
-      return console.log(this.search)
       this.$confirm('是否导出数据明细?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
         window.open(
-          `/api/blade-purchase-sales/orderitems/dateset-export?${
-            this.website.tokenHeader
-          }=${getToken()}&corpName=${params.corpName}&beginCreateTime=${params.beginCreateTime}&endCreateTime=${params.endCreateTime}&orderNo=${params.orderNo}&gysName=${params.gysName}&belongCompany=${params.belongCompany}`
+          `/api/blade-purchase-sales/orderitems/dateset-export?${this.website.tokenHeader
+          }=${getToken()}&corpName=${params.corpName}&beginCreateTime=${params.beginCreateTime}&endCreateTime=${params.endCreateTime}&orderNo=${params.orderNo}&gysName=${params.gysName}&belongCompany=${params.belongCompany}&packageRemarks=${params.packageRemarks}`
         );
       }).catch(() => {
         this.$message({
@@ -342,9 +327,11 @@ export default {
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+
 ::v-deep .el-table__expanded-cell[class*="cell"] {
   padding: 0px;
 }
+
 .itemTable ::v-deep .el-table {
   width: 100%;
 }

+ 103 - 119
src/views/statisticAnalysis/salesReconciliation/index.vue

@@ -18,16 +18,30 @@
         @resetColumn="resetColumn"
         @search-criteria-switch="searchCriteriaSwitch"
       >
-        <template slot="menuLeft">
-          <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
-        </template>
+        <!-- <template slot="menuLeft">
+          <el-button
+            type="info"
+            size="small"
+            @click="outExport"
+            icon="el-icon-download"
+            >导出</el-button
+          >
+        </template> -->
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot="storageNameSearch">
           <warehouse-select
             v-model="search.storageId"
-            :configuration="configurationWarehouse"/>
+            :configuration="configurationWarehouse"
+          />
+        </template>
+        <template slot-scope="{ row }" slot="rankNo">
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="editOpen(row)"
+            >{{ row.rankNo }}
+          </span>
         </template>
       </avue-crud>
     </basic-container>
@@ -36,7 +50,10 @@
 
 <script>
 import { getToken } from "@/util/auth";
-import { getList, exportExcel } from "@/api/statisticAnalysis/salesReconciliation";
+import {
+  getList,
+  exportExcel
+} from "@/api/statisticAnalysis/salesReconciliation";
 import { micrometerFormat } from "@/util/validate";
 import _ from "lodash";
 export default {
@@ -58,6 +75,7 @@ export default {
       defaultOption: {
         searchShow: true,
         align: "center",
+        searchMenuSpan: 16,
         searchSpan: 8,
         border: true,
         index: true,
@@ -71,83 +89,53 @@ export default {
         menu: false,
         column: [
           {
+            label: "系统编号",
+            prop: "rankNo",
+            search: true,
+            overHidden: true
+          },
+          {
             label: "客户名称",
             prop: "corpName",
             search: true,
-            overHidden: true,
+            overHidden: true
           },
           {
-            label: "制单日期",
+            label: "业务日期",
             prop: "businesDate",
             search: true,
-            type: 'date',
+            type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
             unlinkPanels: true,
             searchRange: true,
-            overHidden: true,
-          },
-          {
-            label: "商品名称",
-            prop: "goodName",
-            search: false,
-            overHidden: true,
-          },
-          {
-            label: "规格",
-            prop: "typeno",
-            search: false,
-            overHidden: true,
+            overHidden: true
           },
           {
-            label: "级别",
-            prop: "level",
-            search: false,
-            overHidden: true,
-          },
-          {
-            label: "花纹",
-            prop: "brandItem",
-            search: false,
-            overHidden: true,
-          },
-          {
-            label: "批号",
-            prop: "lotNo",
-            search: false,
-            overHidden: true,
-          },
-          {
-            label: "销售数量",
-            prop: "orderQuantity",
-            search: false,
-            overHidden: true,
+            label: "业务员",
+            prop: "a",
+            search: true,
+            overHidden: true
           },
           {
-            label: "单价",
-            prop: "price",
+            label: "收入",
+            prop: "b",
             search: false,
-            overHidden: true,
+            overHidden: true
           },
           {
-            label: "应收金额",
-            prop: "debitAmount",
+            label: "成本",
+            prop: "c",
             search: false,
-            overHidden: true,
-          },
-          {
-            label: "仓库名称",
-            prop: "storageName", //storageId
-            search: true,
-            overHidden: true,
+            overHidden: true
           },
           {
-            label: "备注",
-            prop: "remarks",
+            label: "利润",
+            prop: "d",
             search: false,
-            overHidden: true,
-          },
-        ],
+            overHidden: true
+          }
+        ]
       },
       // 仓库配置
       configurationWarehouse: {
@@ -155,8 +143,8 @@ export default {
         multiple: false,
         collapseTags: false,
         placeholder: "请点击右边按钮选择",
-        dicData: [],
-      },
+        dicData: []
+      }
     };
   },
   filters: {
@@ -165,13 +153,16 @@ export default {
     }
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(126), this.defaultOption);
+    this.option = await this.getColumnData(
+      this.getColumnName(126),
+      this.defaultOption
+    );
     let i = 0;
     this.option.column.forEach(item => {
-      if (item.search) i++
-    })
-    if (i % 3 !== 0){
-      const num = 3 - Number(i % 3)
+      if (item.search) i++;
+    });
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3);
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
@@ -196,7 +187,7 @@ export default {
     },
     refreshChange() {
       delete this.search.corpName;
-      delete this.search.storageName
+      delete this.search.storageName;
       this.onLoad(this.page, this.search);
     },
     currentChange(val) {
@@ -215,16 +206,12 @@ export default {
       if (queryParams.businesDate && queryParams.businesDate.length > 0) {
         queryParams = {
           ...queryParams,
-          orderStartDate: queryParams.businesDate[0] + ' 00:00:00',
-          orderEndDate: queryParams.businesDate[1] + ' 23:59:59',
-        }
+          orderStartDate: queryParams.businesDate[0] + " 00:00:00",
+          orderEndDate: queryParams.businesDate[1] + " 23:59:59"
+        };
         delete queryParams.businesDate;
       }
-      getList(
-        page.currentPage,
-        page.pageSize,
-        queryParams
-      )
+      getList(page.currentPage, page.pageSize, queryParams)
         .then(res => {
           if (res.data.data.records) {
             res.data.data.records.forEach(e => {
@@ -241,56 +228,50 @@ export default {
           this.loading = false;
         });
     },
-    editOpen(row) {
-      if (row.billType == "BJ") {
-        this.$router.push({
-          path: "/exportTrade/customerInquiry/index",
-          query: {
-            id: row.id
-          }
-        });
-      } else {
-        this.$router.push({
-          path: "/exportTrade/salesContract/index",
-          query: {
-            id: row.id
-          }
-        });
-      }
+    editOpen() {
+      this.$router.push({
+        path: "/statisticAnalysis/salesReconciliationDetails/index",
+      });
     },
     outExport() {
-      if (!this.search.corpId) this.$set(this.search, 'corpId', '');
-      if (!this.search.storageId) this.$set(this.search, 'storageId', '');
+      if (!this.search.corpId) this.$set(this.search, "corpId", "");
+      if (!this.search.storageId) this.$set(this.search, "storageId", "");
       if (this.search.businesDate && this.search.businesDate.length > 0) {
         this.search = {
           ...this.search,
-          orderStartDate: this.search.businesDate[0] + ' 00:00:00',
-          orderEndDate: this.search.businesDate[1] + ' 23:59:59',
-        }
+          orderStartDate: this.search.businesDate[0] + " 00:00:00",
+          orderEndDate: this.search.businesDate[1] + " 23:59:59"
+        };
       } else {
         this.search = {
           ...this.search,
-          orderStartDate: '',
-          orderEndDate: '',
-        }
+          orderStartDate: "",
+          orderEndDate: ""
+        };
       }
       // return console.log(this.search)
-      this.$confirm('是否导出销售对账信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        window.open(
-          `/api/blade-purchase-sales/dealerOrder/orderItemStat/export?${
-            this.website.tokenHeader
-          }=${getToken()}&corpId=${this.search.corpId}&storageId=${this.search.storageId}&orderStartDate=${this.search.orderStartDate}&orderEndDate=${this.search.orderEndDate}`
-        );
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消' //
-        });
+      this.$confirm("是否导出销售对账信息?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
       })
+        .then(() => {
+          window.open(
+            `/api/blade-purchase-sales/dealerOrder/orderItemStat/export?${
+              this.website.tokenHeader
+            }=${getToken()}&corpId=${this.search.corpId}&storageId=${
+              this.search.storageId
+            }&orderStartDate=${this.search.orderStartDate}&orderEndDate=${
+              this.search.orderEndDate
+            }`
+          );
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消" //
+          });
+        });
     },
     //列保存触发
     async saveColumn() {
@@ -309,16 +290,19 @@ export default {
     },
     async resetColumn() {
       this.option = this.defaultOption;
-      const inSave = await this.delColumnData(this.getColumnName(126), this.defaultOption);
+      const inSave = await this.delColumnData(
+        this.getColumnName(126),
+        this.defaultOption
+      );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-        })
+          this.$refs.crud.doLayout();
+        });
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
-    },
+    }
   }
 };
 </script>