Ver Fonte

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

caojunjie há 3 anos atrás
pai
commit
dbf505c3db

+ 8 - 1
src/api/basicData/purchaseOrder.js

@@ -157,4 +157,11 @@ export function genfactory(data) {
         method: 'post',
         data: data
     })
-}
+}
+export function getApplyAmount(query) {
+    return request({
+      url: '/api/trade-finance/settlement/getApplyAmount',
+      method: 'get',
+      params: query
+    })
+  }

+ 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>

+ 506 - 582
src/components/finance/financialAccount.vue

@@ -1,153 +1,89 @@
 <template>
   <div>
     <basic-container>
-      <avue-crud
-        ref="crud"
-        :data="data"
-        :option="option"
-        :table-loading="loading"
-        @row-update="rowUpdate"
-        @row-del="rowDel"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-      >
+      <avue-crud ref="crud" :data="data" :option="option" :table-loading="loading" @row-update="rowUpdate"
+        @row-del="rowDel" @saveColumn="saveColumn" @resetColumn="resetColumn">
         <template slot="menuLeft" slot-scope="{size}">
-          <el-button type="primary"
-                     icon="el-icon-plus"
-                     size="small"
-                     :loading="submitButton"
-                     @click="entering"
-          >录入
+          <el-button type="primary" icon="el-icon-plus" size="small" :loading="submitButton" @click="entering"
+            v-if="addBut">录入
           </el-button>
         </template>
         <template slot-scope="{row,index}" slot="menu">
-          <el-button
-            type="text"
-            size="small"
-            icon="el-icon-edit"
-            @click="rowCell(row,index)"
-          >{{ row.$cellEdit ? '保存' : '修改' }}
+          <el-button type="text" size="small" icon="el-icon-edit" @click="rowCell(row, index)">{{ row.$cellEdit ? '保存' :
+              '修改'
+          }}
           </el-button>
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            @click="rowDel(row,index)"
-          >删除</el-button>
+          <el-button type="text" icon="el-icon-delete" size="small" @click="rowDel(row, index)">删除</el-button>
         </template>
         <template slot-scope="{row,index}" slot="corpId">
-          <span v-if="row.$cellEdit && category != 2" class="required_fields" style="float: left;line-height: 32px">*</span>
+          <span v-if="row.$cellEdit && category != 2" class="required_fields"
+            style="float: left;line-height: 32px">*</span>
           <span v-if="row.$cellEdit && category != 2" style="display: flex">
-            <el-select
-              v-model="corpId"
-              placeholder="请选择"
-              size="small"
-              style="width:60%"
-              filterable
-            >
-              <el-option
-                v-for="item in corpOption"
-                :key="item.id"
-                :label="item.cname"
-                :value="item.id"
-              />
+            <el-select v-model="corpId" placeholder="请选择" size="small" style="width:60%" filterable>
+              <el-option v-for="item in corpOption" :key="item.id" :label="item.cname" :value="item.id" />
             </el-select>
-            <el-button
-              icon="el-icon-search"
-              size="small"
-              @click="openDialog(row, index, 1)"
-            ></el-button>
+            <el-button icon="el-icon-search" size="small" @click="openDialog(row, index, 1)"></el-button>
           </span>
 
-          <span v-else>{{corpsName}}</span>
+          <span v-else>{{ corpsName }}</span>
         </template>
-<!--        <template slot-scope="{row,index}" slot="costType">-->
-<!--          <breakdown-select-->
-<!--            v-if="row.$cellEdit"-->
-<!--            v-model="row.costType"-->
-<!--            style="width: 90%"-->
-<!--            :configuration="configuration"-->
-<!--            @selectValue="(value) => {getFeeValue(row, value)}"-->
-<!--          >-->
-<!--          </breakdown-select>-->
-<!--          <span v-else>{{ row.costName }}</span>-->
-<!--        </template>-->
+        <!--        <template slot-scope="{row,index}" slot="costType">-->
+        <!--          <breakdown-select-->
+        <!--            v-if="row.$cellEdit"-->
+        <!--            v-model="row.costType"-->
+        <!--            style="width: 90%"-->
+        <!--            :configuration="configuration"-->
+        <!--            @selectValue="(value) => {getFeeValue(row, value)}"-->
+        <!--          >-->
+        <!--          </breakdown-select>-->
+        <!--          <span v-else>{{ row.costName }}</span>-->
+        <!--        </template>-->
         <template slot-scope="{row,index}" slot="billNo">
-          <el-select placeholder="请选择"
-                     v-if="row.$cellEdit"
-                     v-model="row.billNo"
-                     size="small"
-                     filterable
-                     allow-create
-                     default-first-option
-                     clearable>
-            <el-option
-              v-for="item in row.billNoList"
-              :key="item"
-              :label="item"
-              :value="item"
-            ></el-option>
+          <el-select placeholder="请选择" v-if="row.$cellEdit" v-model="row.billNo" size="small" filterable allow-create
+            default-first-option clearable>
+            <el-option v-for="item in row.billNoList" :key="item" :label="item" :value="item"></el-option>
           </el-select>
           <span v-else>{{ row.billNo }}</span>
         </template>
         <template slot-scope="{row,index}" slot="taxRate">
-          <el-input
-            v-model="row.taxRate"
-            v-if="row.$cellEdit"
-            size="small"
+          <el-input v-model="row.taxRate" v-if="row.$cellEdit" size="small"
             oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-            autocomplete="off"
-          >
+            autocomplete="off">
             <i slot="suffix" style="margin-right: 10px;top:6px">%</i>
           </el-input>
           <span v-else>{{ row.taxRate }}</span>
         </template>
         <template slot-scope="{row,index}" slot="currency">
           <span v-if="row.$cellEdit" class="required_fields">*</span>
-          <el-select v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择" style="width: 90%" @change="currencyChange(row)" clearable filterable>
-            <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+          <el-select v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择" style="width: 90%"
+            @change="currencyChange(row)" clearable filterable>
+            <el-option v-for="(item, index) in currencyDic" :key="index" :label="item.dictValue"
+              :value="item.dictValue">
+            </el-option>
           </el-select>
           <span v-else>{{ row.currency }}</span>
         </template>
         <template slot-scope="{row,index}" slot="unit">
-          <el-select  v-if="row.$cellEdit" v-model="row.unit" size="small" style="width: 90%" placeholder="请选择" clearable filterable>
-            <el-option v-for="(item,index) in unitDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+          <el-select v-if="row.$cellEdit" v-model="row.unit" size="small" style="width: 90%" placeholder="请选择" clearable
+            filterable>
+            <el-option v-for="(item, index) in unitDic" :key="index" :label="item.dictValue" :value="item.dictValue">
+            </el-option>
           </el-select>
           <span v-else>{{ row.unit }}</span>
         </template>
         <template slot-scope="{row,index}" slot="price">
-          <el-input-number
-            v-if="row.$cellEdit"
-            v-model="row.price"
-            size="small"
-            :controls="false"
-            :precision="2"
-            @input="amountChange(row)"
-            style="width: 100%"
-          />
+          <el-input-number v-if="row.$cellEdit" v-model="row.price" size="small" :controls="false" :precision="2"
+            @input="amountChange(row)" style="width: 100%" />
           <span v-else>{{ Number(row.price).toFixed(2) }}</span>
         </template>
         <template slot-scope="{row,index}" slot="quantity">
-          <el-input-number
-            v-if="row.$cellEdit"
-            v-model="row.quantity"
-            size="small"
-            :controls="false"
-            :precision="0"
-            @input="amountChange(row)"
-            style="width: 100%"
-          />
+          <el-input-number v-if="row.$cellEdit" v-model="row.quantity" size="small" :controls="false" :precision="0"
+            @input="amountChange(row)" style="width: 100%" />
           <span v-else>{{ Number(row.quantity).toFixed(2) }}</span>
         </template>
         <template slot-scope="{row,index}" slot="amount">
-          <el-input-number
-            v-if="row.$cellEdit"
-            v-model="row.amount"
-            size="small"
-            :controls="false"
-            :precision="2"
-            style="width: 100%"
-          />
+          <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" :controls="false" :precision="2"
+            style="width: 100%" />
           <span v-else>{{ Number(row.amount).toFixed(2) }}</span>
         </template>
       </avue-crud>
@@ -158,535 +94,523 @@
     </basic-container>
     <containerTitle v-if="billId" title="历史账单"></containerTitle>
     <basic-container v-if="billId">
-      <avue-crud :option="historyOption"
-                 :data="historyDataList"
-                 ref="historyCrud"
-                 v-model="historyForm"
-                 :page.sync="page"
-                 :table-loading="historyLoading"
-                 @on-load="onLoad">
+      <avue-crud :option="historyOption" :data="historyDataList" ref="historyCrud" v-model="historyForm"
+        :page.sync="page" :table-loading="historyLoading" @on-load="onLoad">
       </avue-crud>
     </basic-container>
 
-    <el-dialog
-      title="客户、供应商"
-      :visible.sync="corpVisible"
-      width="80%"
-      top="5vh"
-      append-to-body
-      @closed="closeCorp"
-      class="el-dialogDeep"
-      v-dialog-drag
-    >
+    <el-dialog title="客户、供应商" :visible.sync="corpVisible" width="80%" top="5vh" append-to-body @closed="closeCorp"
+      class="el-dialogDeep" v-dialog-drag>
       <span>
         <el-row>
           <el-col :span="4">
             <el-scrollbar>
               <basic-container>
-                <avue-tree
-                  :option="corpTreeOption"
-                  :data="treeData"
-                  @node-click="corpNodeClick"
-                  :style="treeStyle"
-                />
+                <avue-tree :option="corpTreeOption" :data="treeData" @node-click="corpNodeClick" :style="treeStyle" />
               </basic-container>
             </el-scrollbar>
           </el-col>
           <el-col :span="20">
-            <avue-crud
-              :option="KHOption"
-              :data="corpData"
-              ref="crud"
-              :page.sync="corpPage"
-              :search.sync="corpSearch"
-              @search-change="corpSearchChange"
-              @search-reset="corpSearchReset"
-              @selection-change="selectionChange"
-              @current-change="corpCurrentChange"
-              @size-change="corpSizeChange"
-              @on-load="corpOnLoad"
-              @tree-load="corpTreeLoad"
-              @saveColumn="saveColumn"
-              @resetColumn="resetColumn"
-              @refresh-change="corpRefreshChange"
-              :table-loading="dialogLoading"
-            >
+            <avue-crud :option="KHOption" :data="corpData" ref="crud" :page.sync="corpPage" :search.sync="corpSearch"
+              @search-change="corpSearchChange" @search-reset="corpSearchReset" @selection-change="selectionChange"
+              @current-change="corpCurrentChange" @size-change="corpSizeChange" @on-load="corpOnLoad"
+              @tree-load="corpTreeLoad" @saveColumn="saveColumn" @resetColumn="resetColumn"
+              @refresh-change="corpRefreshChange" :table-loading="dialogLoading">
             </avue-crud>
           </el-col>
         </el-row>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="corpVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="importCorp"
-          :disabled="selectionList.length != 1"
-        >确 定</el-button
-        >
+        <el-button type="primary" @click="importCorp" :disabled="selectionList.length != 1">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-  import {applyLoan, paymentApply} from "@/api/financialManagement/paymentRequest";
-  import option from "./config/option.json"
-  import historyOption from "../bill/config/application.json"
-  import {getUserInfo} from "@/api/system/user";
-  import { getBillList } from "@/api/financialManagement/paymentRequest";
-  import {customerList, getDeptLazyTree} from "@/api/basicData/customerInformation";
-  import { getDeptLazyTree as getFeeLazyTree, customerList as feeList } from "@/api/basicData/basicFeesDesc";
-  import corpOption from './config/corpOption.json'
+import { applyLoan, paymentApply } from "@/api/financialManagement/paymentRequest";
+import { getApplyAmount } from "@/api/basicData/purchaseOrder"
+import option from "./config/option.json"
+import historyOption from "../bill/config/application.json"
+import { getUserInfo } from "@/api/system/user";
+import { getBillList } from "@/api/financialManagement/paymentRequest";
+import { customerList, getDeptLazyTree } from "@/api/basicData/customerInformation";
+import { getDeptLazyTree as getFeeLazyTree, customerList as feeList } from "@/api/basicData/basicFeesDesc";
+import corpOption from './config/corpOption.json'
 
-  export default {
-    name: "financialAccount",
-    props: {
-      billId:{
-        type:String
-      },
-      billType: {
-        type: String
-      },
-      srcType: {
-        type: Number,
-        default: 1,
-      },
-      billData: {
-        type: Object
-      },
-      choceFun: {
-        type: Function
-      },
-      arrList: {
-        type: Array,
-        default: []
-      },
-      checkData: {
-        type: Object,
-        default: {
-          url: null,
-          pageStatus: null,
-          pageLabel: null,
-          checkType: null
-        },
-      },
-      belongCompany: {
-        type: String,
+export default {
+  name: "financialAccount",
+  props: {
+    addBut: {
+      type: Boolean,
+      default: true
+    },
+    billId: {
+      type: String
+    },
+    billType: {
+      type: String
+    },
+    srcType: {
+      type: Number,
+      default: 1,
+    },
+    billData: {
+      type: Object
+    },
+    srcBillId: {
+      type: Object
+    },
+    choceFun: {
+      type: Function
+    },
+    arrList: {
+      type: Array,
+      default: []
+    },
+    checkData: {
+      type: Object,
+      default: {
+        url: null,
+        pageStatus: null,
+        pageLabel: null,
+        checkType: null
       },
-      tradeType: {
-        type: String,
-        default: null
-      }
     },
-    data(){
-      return {
-        data: [],
-        corpId:'',
-        corpsName: '',
-        option:option,
-        loading:false,
-        submitButton:false,
-        currencyDic:[],
-        unitDic:[],
-        configuration: {
-          multipleChoices: false,
-          multiple: false,
-          disabled: true,
-          searchShow: true,
-          collapseTags: false,
-          placeholder: '请点击右边按钮选择',
-          dicData: []
-        },
-        category: '',
+    belongCompany: {
+      type: String,
+    },
+    tradeType: {
+      type: String,
+      default: null
+    }
+  },
+  data() {
+    return {
+      data: [],
+      corpId: '',
+      corpsName: '',
+      option: option,
+      loading: false,
+      submitButton: false,
+      currencyDic: [],
+      unitDic: [],
+      configuration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: true,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      category: '',
 
-        historyLoading:false,
-        historyOption:historyOption,
-        historyDataList:[],
-        historyForm:{},
-        page: {
-          pageSize: 10,
-          pagerCount: 1,
-          total: 0,
-        },
-        corpOption: [], //客户
-        feeOption: [], // 费用
-        rowData: null,
-        corpVisible: false,
-        feeVisible: false,
-        treeStyle:'height:'+(window.innerHeight - 315)+'px',
-        corpTreeOption: {
-          nodeKey: "id",
-          lazy: true,
-          addBtn: false,
-          menu: false,
-          size: "small",
-          props: {
-            labelText: "标题",
-            label: "title",
-            value: "value",
-            children: "children"
+      historyLoading: false,
+      historyOption: historyOption,
+      historyDataList: [],
+      historyForm: {},
+      page: {
+        pageSize: 10,
+        pagerCount: 1,
+        total: 0,
+      },
+      corpOption: [], //客户
+      feeOption: [], // 费用
+      rowData: null,
+      corpVisible: false,
+      feeVisible: false,
+      treeStyle: 'height:' + (window.innerHeight - 315) + 'px',
+      corpTreeOption: {
+        nodeKey: "id",
+        lazy: true,
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "value",
+          children: "children"
+        }
+      },
+      treeCorpId: '',
+      selectionList: [],
+      corpPage: {
+        currentPage: 1,
+        pageSize: 10,
+        total: 0
+      },
+      corpSearch: {},
+      dialogLoading: false,
+      KHOption: corpOption,
+      corpData: [],
+    }
+  },
+  created() {
+    this.option.height = window.innerHeight - 240;
+    this.historyOption.searchShow = false
+    customerList({
+      size: 10000,
+      current: 1
+    }).then(res => {
+      // this.corpOption = res.data.data.records? res.data.data.records: [];
+      if (res.data.data.total > 0) {
+        this.corpOption = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            customerList({ current: i, size: 10 }).then(e => {
+              this.corpOption = this.corpOption.concat(e.data.data.records);
+            });
           }
-        },
-        treeCorpId: '',
-        selectionList: [],
-        corpPage: {
-          currentPage: 1,
-          pageSize: 10,
-          total: 0
-        },
-        corpSearch: {},
-        dialogLoading: false,
-        KHOption: corpOption,
-        corpData: [],
+        }
+      }
+    })
+    this.loading = true;
+    feeList({ size: 10000, current: 1 }).then(res => {
+      this.feeOption = res.data.data.records ? res.data.data.records : [];
+      this.init()
+    }).finally(() => {
+      this.loading = false;
+    })
+    getUserInfo().then(res => {
+      this.category = res.data.data.billType
+      if (this.category == 2) {
+      }
+    })
+    //币别
+    this.getWorkDicts("currency").then(res => {
+      this.currencyDic = res.data.data
+    })
+    this.getWorkDicts("unit").then(res => {
+      this.unitDic = res.data.data
+    })
+  },
+  mounted() {
+    // this.init()
+  },
+  watch: {
+    billId(val, oldVal) {
+      if (val != oldVal) {
+        this.onLoad(this.page)
       }
     },
-    created() {
-      this.option.height = window.innerHeight - 240;
-      this.historyOption.searchShow = false
-      customerList({
-        size: 10000,
-        current: 1
-      }).then(res => {
-        // this.corpOption = res.data.data.records? res.data.data.records: [];
-        if (res.data.data.total > 0) {
-          this.corpOption = res.data.data.records;
-          if (Math.ceil(res.data.data.total / 10) > 1) {
-            for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-              customerList({current: i, size: 10}).then(e => {
-                this.corpOption = this.corpOption.concat(e.data.data.records);
-              });
-            }
+  },
+  methods: {
+    init() {
+      if (this.arrList.length === 0) {
+        this.corpId = this.billData.corpId
+        this.corpsName = this.billData.corpsName[0].cname
+        this.feeOption.forEach(item => {
+          if (this.billData.costType == item.id) {
+            this.$set(this.billData, 'costName', item.cname)
           }
-        }
-      })
-      this.loading = true;
-      feeList({size: 10000, current: 1}).then(res => {
-        this.feeOption = res.data.data.records? res.data.data.records: [];
-        this.init()
-      }).finally(() => {
-        this.loading = false;
+        })
+        this.data.push(this.billData)
+      } else {
+        this.billData = this.arrList[0]
+        this.corpId = this.arrList[0].corpId
+        this.corpsName = this.arrList[0].corpsName[0].cname
+        this.arrList.forEach(item => {
+          this.feeOption.forEach(e => {
+            if (item.costType == e.id) {
+              this.$set(item, 'costName', e.cname)
+            }
+          })
+          this.data.push(item)
+        })
+      }
+      this.$nextTick(() => {
+        this.$refs.crud.doLayout()
       })
-      getUserInfo().then(res=>{
-        this.category = res.data.data.billType
-        if (this.category == 2) {
+
+      //删除 提单号
+      if (this.billData.optionType !== "JK") {
+        this.option.column.forEach(item => {
+          if (item.prop === "billNo") {
+            item.hide = true
+          } else {
+            item.hide = false
+          }
+        })
+      }
+    },
+    currencyChange(row) {
+      this.currencyDic.forEach(item => {
+        if (item.dictValue === row.currency) {
+          row.exchangeRate = item.remark
         }
       })
-      //币别
-      this.getWorkDicts("currency").then(res => {
-        this.currencyDic = res.data.data
-      })
-      this.getWorkDicts("unit").then(res => {
-        this.unitDic = res.data.data
+    },
+    rowCell(row, index) {
+      // this.$refs.crud.rowCell(row, index)
+      if (row.$cellEdit == true) {
+        this.$set(row, '$cellEdit', false)
+      } else {
+        this.$set(row, '$cellEdit', true)
+      }
+    },
+    rowDel(row, index) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.data.splice(index, 1);
       })
     },
-    mounted() {
-      // this.init()
+    rowUpdate(row, index, done, loading) {
+      done(row);
     },
-    watch:{
-      billId(val, oldVal) {
-        if(val != oldVal){
-          this.onLoad(this.page)
+    entering() {
+      if (this.data.length !== 0) {
+        //取第一条数据的 合同号 以及客户
+        let params = {
+          ...this.billData,
+          srcOrderno: this.data[0].srcOrderno,
+          corpId: this.data[0].corpId
         }
-      },
+        this.$refs.crud.rowCellAdd(params);
+      } else {
+        this.$refs.crud.rowCellAdd(this.billData);
+      }
     },
-    methods:{
-      init(){
-        if(this.arrList.length === 0){
-          this.corpId = this.billData.corpId
-          this.corpsName = this.billData.corpsName[0].cname
-          this.feeOption.forEach(item => {
-            if (this.billData.costType == item.id) {
-              this.$set(this.billData, 'costName', item.cname)
-            }
-          })
-          this.data.push(this.billData)
-        }else{
-          this.billData = this.arrList[0]
-          this.corpId = this.arrList[0].corpId
-          this.corpsName = this.arrList[0].corpsName[0].cname
-          this.arrList.forEach(item=>{
-            this.feeOption.forEach(e => {
-              if (item.costType == e.id) {
-                this.$set(item, 'costName', e.cname)
-              }
-            })
-            this.data.push(item)
-          })
-        }
-        this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-        })
+    onLoad(page, params = {}) {
+      this.historyLoading = true;
+      params.srcParentId = this.billId
+      params.flag = 1
 
-        //删除 提单号
-        if(this.billData.optionType !== "JK"){
-          this.option.column.forEach(item =>{
-            if(item.prop === "billNo"){
-              item.hide = true
-            }else{
-              item.hide = false
-            }
-          })
+      getBillList(page.currentPage, page.pageSize, params).then(res => {
+        this.historyDataList = res.data.data.records
+      }).finally(() => {
+        this.historyLoading = false;
+      })
+    },
+    async forData() {
+      let sum = 0
+      for (let item in this.data) {
+        sum += this.data[item].amount
+      }
+      let res = await getApplyAmount({ srcBillId: this.srcBillId, billType: "申请" })
+      if (sum >= res.data.data) {
+        return true
+      }
+    },
+    async submit() {
+      for (let i = 0; i < this.data.length; i++) {
+        if (this.corpId === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的客户`);
         }
-      },
-      currencyChange(row){
-        this.currencyDic.forEach(item =>{
-          if(item.dictValue === row.currency){
-            row.exchangeRate = item.remark
-          }
-        })
-      },
-      rowCell(row,index){
-        // this.$refs.crud.rowCell(row, index)
-        if (row.$cellEdit == true) {
-          this.$set(row, '$cellEdit', false)
-        } else {
-          this.$set(row, '$cellEdit', true)
+        if (this.data[i].costType === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的费用名称`);
         }
-      },
-      rowDel(row,index){
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-            this.data.splice(index, 1);
-         })
-      },
-      rowUpdate(row, index, done, loading) {
-        done(row);
-      },
-      entering(){
-        if(this.data.length !== 0){
-          //取第一条数据的 合同号 以及客户
-          let params = {
-            ...this.billData,
-            srcOrderno:this.data[0].srcOrderno,
-            corpId:this.data[0].corpId
-          }
-          this.$refs.crud.rowCellAdd(params);
-        }else{
-          this.$refs.crud.rowCellAdd(this.billData);
+        if (this.data[i].accDate === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的合同日期`);
         }
-      },
-      onLoad(page,params = {}) {
-        this.historyLoading = true;
-        params.srcParentId = this.billId
-        params.flag = 1
-
-        getBillList(page.currentPage, page.pageSize,params).then(res=>{
-          this.historyDataList = res.data.data.records
-        }).finally(()=>{
-          this.historyLoading = false;
-        })
-      },
-      submit(){
-        for(let i = 0;i<this.data.length;i++){
-          if (this.corpId === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的客户`);
-          }
-          if (this.data[i].costType === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的费用名称`);
-          }
-          if (this.data[i].accDate === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的合同日期`);
-          }
-          if (this.data[i].amount === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的金额`);
-          }
-          if (this.data[i].currency === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的币别`);
-          }
-          if (this.data[i].exchangeRate === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的汇率`);
-          }
-          if (this.data[i].taxRate === (null || "")) {
-            return this.$message.error(`请输入第${i + 1}行的税率`);
-          }
+        if (this.data[i].amount === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的金额`);
         }
-
-        this.submitButton = true
-        const itemsList = this.data.map(item => {
-          item.corpId = this.corpId;
-          item.tradeType = this.billData.optionType?this.billData.optionType: item.tradeType;
-          item.srcType = item.srcType? item.srcType: this.srcType;
-          return item;
-        })
-        const params = {
-          url: this.checkData.url,
-          pageStatus: this.checkData.pageStatus,
-          pageLabel: this.checkData.pageLabel,
-          checkType: this.checkData.checkType,
-          billType : this.billType,
-          tradeType: this.tradeType,
-          DC : this.billData.itemType === "采购"?"C":"D",     //账单明细会根据D C区分采购 销售搜索
-          itemsList: itemsList,
-          belongCompany: this.belongCompany // 所属公司
+        if (this.data[i].currency === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的币别`);
         }
-        // 采购申请货款   销售申请退款 都会走申请 走审核   => 付款申请
-        if(this.billType === "申请"){
-          applyLoan(params).then(res =>{
-            if(res.data.success){
-              this.$message.success("操作成功!")
-              this.$emit("choceFun");
-              this.$emit("submit")
-              //跳转付款申请页面
-
-              // if(this.$store.getters.pqStatus){
-              //   this.$alert("无法自动跳,因为付费申请页面已存在!", "温馨提示", {
-              //     confirmButtonText: "确定",
-              //     type: 'warning',
-              //     callback: action => {
-              //     }
-              //   });
-              // }else{
-              //   //关闭一下存在的列表页  跳转
-              //   this.$router.$avueRouter.closeTag('/financialManagement/paymentRequest/index');
-              //   this.$router.push({
-              //     path: "/financialManagement/paymentRequest/index",
-              //     query: {params: res.data.data.id},
-              //   });
-              // }
-            }
-          }).finally(()=>{
-            this.submitButton = false
-          })
+        if (this.data[i].exchangeRate === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的汇率`);
         }
-        //采购退款结算 销售收款结算  不需申请请核 直接结算  => 结算
-        if(this.billType === "收费"){
-          paymentApply(params).then(res=>{
-            if(res.data.success){
-              this.$message.success("操作成功!")
-              this.$emit("choceFun");
-              this.$emit("submit")
-            }
-          }).finally(()=>{
-            this.submitButton = false
-          })
+        if (this.data[i].taxRate === (null || "")) {
+          return this.$message.error(`请输入第${i + 1}行的税率`);
         }
-      },
-      saveColumn(){
+      }
+      if (this.addBut) {
+        let forData = await this.forData()
+        if (forData) {
+          return this.$message.error('货款余额不足')
+        }
+      }
 
-      },
-      resetColumn(){
+      this.submitButton = true
+      const itemsList = this.data.map(item => {
+        item.corpId = this.corpId;
+        item.tradeType = this.billData.optionType ? this.billData.optionType : item.tradeType;
+        item.srcType = item.srcType ? item.srcType : this.srcType;
+        return item;
+      })
+      const params = {
+        url: this.checkData.url,
+        pageStatus: this.checkData.pageStatus,
+        pageLabel: this.checkData.pageLabel,
+        checkType: this.checkData.checkType,
+        billType: this.billType,
+        tradeType: this.tradeType,
+        DC: this.billData.itemType === "采购" ? "C" : "D",     //账单明细会根据D C区分采购 销售搜索
+        itemsList: itemsList,
+        belongCompany: this.belongCompany // 所属公司
+      }
+      // 采购申请货款   销售申请退款 都会走申请 走审核   => 付款申请
+      if (this.billType === "申请") {
+        applyLoan(params).then(res => {
+          if (res.data.success) {
+            this.$message.success("操作成功!")
+            this.$emit("choceFun");
+            this.$emit("submit")
+            //跳转付款申请页面
 
-      },
-      amountChange(row) {
-        if (!row.quantity) {
-          row.quantity = 0;
-        }
-        if (!row.price) {
-          row.price = 0;
-        }
-        row.amount = Number(row.price) * Number(row.quantity)
-      },
-      // 客户、费用弹窗
-      openDialog(row, index, type) {
-        this.rowData = {
-          ...row,
-          index
-        }
-        // 1客户 2费用
-        if (type == 1) {
-          this.corpTreeOption.treeLoad = function(node, resolve) {
-            const parentId = node.level === 0 ? 0 : node.data.id;
-            getDeptLazyTree({
-              parentId: parentId,
-              corpType: "KG"
-            }).then(res => {
-              resolve(
-                res.data.data.map(item => {
-                  return {
-                    ...item,
-                    leaf: !item.hasChildren
-                  };
-                })
-              );
-            });
-          };
-          this.corpVisible = !this.corpVisible;
-        } else if (type == 2) {
-          this.feeVisible = !this.feeVisible;
-        }
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      closeCorp() {
-        this.selectionList = [];
-        this.treeCorpId = "";
-        this.reData = null;
-      },
-      corpNodeClick(data) {
-        this.treeCorpId = data.id;
-        this.corpPage.currentPage = 1;
-        this.corpOnLoad(this.corpPage);
-      },
-      //列表内展开树节点
-      corpTreeLoad(tree, treeNode, resolve) {
-        const parentId = tree.id;
-        customerList({ parentId: parentId }).then(res => {
-          resolve(res.data.data.records);
-        });
-      },
-      //点击搜索按钮触发
-      corpSearchChange(params, done) {
-        this.corpPage.currentPage = 1;
-        this.corpOnLoad(this.corpPage, params);
-        done();
-      },
-      corpSearchReset() {
-        this.treeCorpId = null;
-      },
-      corpSizeChange(val) {
-        this.corpPage.pageSize = val;
-        this.corpOnLoad();
-      },
-      corpCurrentChange(val) {
-        this.corpPage.currentPage = val;
-        this.corpOnLoad();
-      },
-      corpRefreshChange() {
-        this.corpOnLoad(this.corpPage, this.corpSearch);
-      },
-      corpOnLoad(page, params = { parentId: 0 }) {
-        let queryParams = Object.assign({}, params, {
-          size: page.pageSize,
-          current: page.currentPage,
-          corpsTypeId: this.treeDeptId,
-          corpType: 'KG'
-        });
-        this.dialogLoading = true;
-        customerList(queryParams).then(res => {
-            this.corpData = res.data.data.records;
-            this.corpPage.total = res.data.data.total;
-            if (this.corpPage.total) {
-              this.KHOption.height = window.innerHeight - 350;
-            }
-          })
-          .finally(() => {
-            this.dialogLoading = false;
-          });
-      },
-      importCorp() {
-        // item.srcFeesId = item.id
-        this.corpData.forEach((item, index) => {
-          if (index == this.rowData.index) {
-            item.corpId = this.selectionList[0].id;
+            // if(this.$store.getters.pqStatus){
+            //   this.$alert("无法自动跳,因为付费申请页面已存在!", "温馨提示", {
+            //     confirmButtonText: "确定",
+            //     type: 'warning',
+            //     callback: action => {
+            //     }
+            //   });
+            // }else{
+            //   //关闭一下存在的列表页  跳转
+            //   this.$router.$avueRouter.closeTag('/financialManagement/paymentRequest/index');
+            //   this.$router.push({
+            //     path: "/financialManagement/paymentRequest/index",
+            //     query: {params: res.data.data.id},
+            //   });
+            // }
           }
+        }).finally(() => {
+          this.submitButton = false
         })
-        this.corpVisible = false;
-      },
-      getFeeValue(row, value) {
-        this.$set(row, 'costName', value.cname)
       }
+      //采购退款结算 销售收款结算  不需申请请核 直接结算  => 结算
+      if (this.billType === "收费") {
+        paymentApply(params).then(res => {
+          if (res.data.success) {
+            this.$message.success("操作成功!")
+            this.$emit("choceFun");
+            this.$emit("submit")
+          }
+        }).finally(() => {
+          this.submitButton = false
+        })
+      }
+    },
+    saveColumn() {
+
+    },
+    resetColumn() {
+
+    },
+    amountChange(row) {
+      if (!row.quantity) {
+        row.quantity = 0;
+      }
+      if (!row.price) {
+        row.price = 0;
+      }
+      row.amount = Number(row.price) * Number(row.quantity)
+    },
+    // 客户、费用弹窗
+    openDialog(row, index, type) {
+      this.rowData = {
+        ...row,
+        index
+      }
+      // 1客户 2费用
+      if (type == 1) {
+        this.corpTreeOption.treeLoad = function (node, resolve) {
+          const parentId = node.level === 0 ? 0 : node.data.id;
+          getDeptLazyTree({
+            parentId: parentId,
+            corpType: "KG"
+          }).then(res => {
+            resolve(
+              res.data.data.map(item => {
+                return {
+                  ...item,
+                  leaf: !item.hasChildren
+                };
+              })
+            );
+          });
+        };
+        this.corpVisible = !this.corpVisible;
+      } else if (type == 2) {
+        this.feeVisible = !this.feeVisible;
+      }
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    closeCorp() {
+      this.selectionList = [];
+      this.treeCorpId = "";
+      this.reData = null;
+    },
+    corpNodeClick(data) {
+      this.treeCorpId = data.id;
+      this.corpPage.currentPage = 1;
+      this.corpOnLoad(this.corpPage);
+    },
+    //列表内展开树节点
+    corpTreeLoad(tree, treeNode, resolve) {
+      const parentId = tree.id;
+      customerList({ parentId: parentId }).then(res => {
+        resolve(res.data.data.records);
+      });
+    },
+    //点击搜索按钮触发
+    corpSearchChange(params, done) {
+      this.corpPage.currentPage = 1;
+      this.corpOnLoad(this.corpPage, params);
+      done();
+    },
+    corpSearchReset() {
+      this.treeCorpId = null;
+    },
+    corpSizeChange(val) {
+      this.corpPage.pageSize = val;
+      this.corpOnLoad();
+    },
+    corpCurrentChange(val) {
+      this.corpPage.currentPage = val;
+      this.corpOnLoad();
+    },
+    corpRefreshChange() {
+      this.corpOnLoad(this.corpPage, this.corpSearch);
+    },
+    corpOnLoad(page, params = { parentId: 0 }) {
+      let queryParams = Object.assign({}, params, {
+        size: page.pageSize,
+        current: page.currentPage,
+        corpsTypeId: this.treeDeptId,
+        corpType: 'KG'
+      });
+      this.dialogLoading = true;
+      customerList(queryParams).then(res => {
+        this.corpData = res.data.data.records;
+        this.corpPage.total = res.data.data.total;
+        if (this.corpPage.total) {
+          this.KHOption.height = window.innerHeight - 350;
+        }
+      })
+        .finally(() => {
+          this.dialogLoading = false;
+        });
+    },
+    importCorp() {
+      // item.srcFeesId = item.id
+      this.corpData.forEach((item, index) => {
+        if (index == this.rowData.index) {
+          item.corpId = this.selectionList[0].id;
+        }
+      })
+      this.corpVisible = false;
+    },
+    getFeeValue(row, value) {
+      this.$set(row, 'costName', value.cname)
     }
   }
+}
 </script>
 
 <style scoped lang="scss">
-  .required_fields{
-    color: #F56C6C;
-    display:inline-block;
-    width: 7%
-  }
+.required_fields {
+  color: #F56C6C;
+  display: inline-block;
+  width: 7%
+}
 </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;
+}

+ 2 - 2
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -106,7 +106,7 @@
                 </el-select>
                 <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
                                  :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled || arrivalDisabled || deliverDisabled"/>
-                <el-select v-else-if="item.prop === 'chargeMember'"
+                <el-select v-else-if="item.prop === 'saleman'"
                            v-model="form[item.prop]" placeholder="请选择"
                            filterable
                            size="small"
@@ -726,7 +726,7 @@ export default {
             ]
           },{
             label: '业务员',
-            prop: 'chargeMember',
+            prop: 'saleman',
             rules: [
               {
                 required: false,

+ 1 - 0
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -384,6 +384,7 @@
     >
       <financial-account
         v-if="financialAccountDialog"
+        :srcBillId="form.id"
         :billType="billType"
         :billData="billData"
         :arrList="applyPaymentList"

+ 22 - 15
src/views/businessManagement/purchaseOrder/index.vue

@@ -39,12 +39,8 @@
           {{ scope.row.createFreight == 1 ? '是' : '否' }}
         </template>
         <template slot-scope="scope" slot="menu">
-          <el-button
-              type="text"
-              icon="el-icon-delete"
-              size="small"
-              @click.stop="createPlant(scope.row, scope.index)"
-              :disabled="scope.row.status > 0 || scope.row.createFreight == 1">生成工厂发货
+          <el-button type="text" icon="el-icon-delete" size="small" @click.stop="createPlant(scope.row, scope.index)"
+            :disabled="scope.row.status > 0 || scope.row.createFreight == 1">生成工厂发货
           </el-button>
           <!--          <el-button-->
           <!--            type="text"-->
@@ -71,7 +67,7 @@
     <el-dialog append-to-body title="账单" class="el-dialogDeep" :visible.sync="financialAccountDialog" width="70%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
       <financial-account v-if="financialAccountDialog" :billType="billType" :billData="billData"
-        :checkData="financeData" :arrList="applyPaymentList" @choceFun="choceFun" tradeType="GN" @submit="feeSubmit">
+        :checkData="financeData" :arrList="applyPaymentList" @choceFun="choceFun" tradeType="GN" @submit="feeSubmit" :addBut="false">
       </financial-account>
     </el-dialog>
   </div>
@@ -79,7 +75,7 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import { customerList, deleteDetails, generateShipment, genfactory } from "@/api/basicData/purchaseOrder"
+import { customerList, deleteDetails, generateShipment, genfactory, getApplyAmount } from "@/api/basicData/purchaseOrder"
 import detailPage from "./detailsPageEdit";
 import { defaultDate } from "@/util/date";
 import ApplyPayment from "@/components/finance/applyPayment";
@@ -148,7 +144,7 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(17), option);
     this.getWorkDicts("payment_term").then(res => {
       this.findObject(this.option.column, "paymentType").dicData =
-          res.data.data;
+        res.data.data;
     });
     gainUser().then(res => {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
@@ -196,7 +192,6 @@ export default {
         }
       }
     })
-    console.log(this.option.column.length)
   },
   activated() {
     if (this.$route.query.check) {
@@ -452,7 +447,7 @@ export default {
       }
     },
     // 申请货款
-    applyPayment() {
+    async applyPayment() {
       this.applyPaymentList = []
       if (this.selection.length > 1) {
         for (let item in this.selection) {
@@ -461,6 +456,10 @@ export default {
           }
         }
       }
+      let forData = await this.forData()
+      if (forData) {
+        return this.$message.error('订单号:' + forData + '货款余额不足')
+      }
       let a = []
       this.selection.forEach(item => {
         item.itemsList = item.itemsList ? item.itemsList : [];
@@ -523,6 +522,14 @@ export default {
       // this.beforeBillData(true);
       this.financialAccountDialog = true;
     },
+    async forData() {
+      for (let item in this.selection) {
+        let res = await getApplyAmount({ srcBillId: this.selection[item].id, billType: "申请" })
+        if (this.selection[item].orderAmount >= res.data.data) {
+          return this.selection[item].orderNo
+        }
+      }
+    },
     beforeBillData(type) {
       if (type) { //申请货款
         // this.billData.srcId = -1
@@ -572,13 +579,13 @@ export default {
             res.data.data.deliveryAmount = Number(res.data.data.deliveryAmount) + Number(item.deliveryAmount)
             res.data.data.totalQuantity = Number(res.data.data.totalQuantity) + Number(item.actualQuantity)
             res.data.data.purchaseAmount = Number(res.data.data.purchaseAmount) + Number(item.deliveryAmount)
-            res.data.data.deliveryAmount = Number(res.data.data.deliveryAmount?res.data.data.deliveryAmount:0).toFixed(2)
-            res.data.data.purchaseAmount = Number(res.data.data.purchaseAmount?res.data.data.purchaseAmount:0).toFixed(2)
+            res.data.data.deliveryAmount = Number(res.data.data.deliveryAmount ? res.data.data.deliveryAmount : 0).toFixed(2)
+            res.data.data.purchaseAmount = Number(res.data.data.purchaseAmount ? res.data.data.purchaseAmount : 0).toFixed(2)
             delete item.id
             delete item.pid
           })
           res.data.data.deliveryItemsList = res.data.data.orderItemsList
-          res.data.data.businessDate=getCurrentDate()
+          res.data.data.businessDate = getCurrentDate()
           delete res.data.data.createTime
           delete res.data.data.id
           delete res.data.data.sysNo
@@ -588,7 +595,7 @@ export default {
           res.data.data.deliveryAmount = res.data.data.debitAmount
           res.data.data.srcOrderNo = res.data.data.orgOrderNo
           delete res.data.data.debitAmount
-          res.data.data.deliveryItemsList.forEach(item=>item.deliveryAmount = item.amount)
+          res.data.data.deliveryItemsList.forEach(item => item.deliveryAmount = item.amount)
           genfactory(res.data.data).then(() => {
             this.$message.success('生成工厂发货成功')
             this.onLoad(this.page, this.search);

+ 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": [

+ 1 - 0
src/views/businessManagement/salesOrder/index.vue

@@ -650,6 +650,7 @@ export default {
               res.data.data.totalQuantity = 0
               res.data.data.totalCost = 0
               res.data.data.billType = 'FH'
+              res.data.data.saleman=res.data.data.chargeMember
               res.data.data.orderItemsList.forEach(item => {
                 item.containerVolume = item.cntrVolumn
                 item.actualWeight = item.cartonWeight

+ 30 - 29
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",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
+            label: "详情信息",
+            prop: "clientMessage",
+            type: "textarea",
+            minRows: 2,
+            span: 12,
+            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(

+ 27 - 18
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",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
+            label: "详情信息",
+            prop: "clientMessage",
+            type: "textarea",
+            minRows: 2,
+            span: 12,
+            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(

+ 0 - 7
src/views/financialManagement/paymentRequest/configuration/detailsPage.json

@@ -51,13 +51,6 @@
       "overHidden": true
     },
     {
-      "label": "销售单号",
-      "prop": "srcOrderno",
-      "index": 2,
-      "width":150,
-      "overHidden": true
-    },
-    {
       "label": "费用名称",
       "prop": "costType",
       "index": 3,

+ 10 - 0
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -158,6 +158,13 @@
             >删除
             </el-button>
           </template>
+          <template slot="srcOrderno" slot-scope="{ row }">
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="editOpen(row, 1)"
+            >{{ row.srcOrderno }}
+          </span>
+          </template>
           <template slot="costType" slot-scope="{ row }">
             <breakdown-select
               v-if="row.$cellEdit"
@@ -764,6 +771,9 @@
           this.$refs.crud.$refs.dialogColumn.columnBox = false;
         }
       },
+      editOpen(){
+        
+      },
       cellStyle() {
         return "padding:0;height:40px;";
       },

+ 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%;
 }

+ 101 - 117
src/views/statisticAnalysis/salesReconciliation/index.vue

@@ -19,7 +19,13 @@
         @search-criteria-switch="searchCriteriaSwitch"
       >
         <template slot="menuLeft">
-          <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+          <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>
@@ -27,7 +33,15 @@
         <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: "a",
+            search: true,
+            overHidden: true
           },
           {
-            label: "销售数量",
-            prop: "orderQuantity",
+            label: "收入",
+            prop: "b",
             search: false,
-            overHidden: true,
+            overHidden: true
           },
           {
-            label: "单价",
-            prop: "price",
+            label: "成本",
+            prop: "c",
             search: false,
-            overHidden: true,
+            overHidden: true
           },
           {
-            label: "应收金额",
-            prop: "debitAmount",
+            label: "利润",
+            prop: "d",
             search: false,
-            overHidden: true,
-          },
-          {
-            label: "仓库名称",
-            prop: "storageName", //storageId
-            search: true,
-            overHidden: true,
-          },
-          {
-            label: "备注",
-            prop: "remarks",
-            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>

+ 7 - 7
src/views/statisticAnalysis/salesReconciliationDetails/index.vue

@@ -113,7 +113,7 @@ export default {
           {
             label: "商品名称",
             prop: "goodName",
-            search: false,
+            search: true,
             overHidden: true
           },
           {
@@ -134,12 +134,12 @@ export default {
             search: false,
             overHidden: true
           },
-          {
-            label: "批号",
-            prop: "lotNo",
-            search: false,
-            overHidden: true
-          },
+          // {
+          //   label: "批号",
+          //   prop: "lotNo",
+          //   search: false,
+          //   overHidden: true
+          // },
           {
             label: "销售数量",
             prop: "orderQuantity",