qinbai 3 سال پیش
والد
کامیت
344c934cb2

+ 10 - 0
src/api/importTrade/purchase.js

@@ -86,3 +86,13 @@ export function getMarketDetailsList(current,size,params) {
     }
   })
 }
+
+//采购列表申请货款
+export function applyPayment(list) {
+  return request({
+    url: '/api/trade-finance/acc/createAcc',
+    method: 'post',
+    data: list
+  })
+}
+

+ 64 - 0
src/components/finance/applicationFee.vue

@@ -0,0 +1,64 @@
+<template>
+  <div>
+    <avue-crud
+      :option="option"
+      v-model="form"
+      :data="data"
+      ref="form"
+      @selection-change="selection"
+      @row-del="rowDel"
+      @saveColumn="saveColumn"
+    >
+     </avue-crud>
+    <div style="float: right;margin-right: 8px">
+      <el-button type="primary" size="small" @click="submit()">请核</el-button>
+      <el-button size="small" @click="">取消</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+    import option from "./config/option.json"
+
+    export default {
+      name: "applicationFee",
+      props:{
+
+      },
+      data(){
+          return{
+            option:{},
+            form:{},
+            data:[],
+            selection:"",
+          }
+      },
+      async created() {
+        this.option = await this.getColumnData(this.getColumnName(46), option);
+      },
+      methods:{
+        rowDel(){
+
+        },
+        submit(){
+
+        },
+        //列保存触发
+        async saveColumn() {
+          const inSave = await this.saveColumnData(
+            this.getColumnName(46),
+            this.option
+          );
+          if (inSave) {
+            this.$message.success("保存成功");
+            //关闭窗口
+            this.$refs.form.$refs.dialogColumn.columnBox = false;
+          }
+        },
+      }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 187 - 0
src/components/finance/applyPayment.vue

@@ -0,0 +1,187 @@
+<template>
+  <div>
+    <div v-for="(item, index) in list" :key="index">
+      <el-row>
+        <el-col :span="20"> <containerTitle title="账单"></containerTitle></el-col>
+        <el-col :span="4"><span class="delete_group" v-if="list.length !== 1"  @click="deleteGroup(index)">删除组</span></el-col>
+      </el-row>
+      <basic-container>
+        <avue-form :option="option" ref="form" v-model="item.form" >
+       <template slot-scope="scope" slot="corpId">
+         <selectComponent v-model="item.form.corpId" :configuration="configuration"/>
+       </template>
+       <template slot-scope="scope" slot="currency">
+         <el-select v-model="item.form.currency" size="small" placeholder="请选择"  clearable filterable>
+           <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+         </el-select>
+       </template>
+     </avue-form>
+      </basic-container>
+    </div>
+    <el-button style="margin-left: 8px" icon="el-icon-plus" size="small" @click="addForm">
+       添加账单
+    </el-button>
+    <div style="float: right;margin-right: 8px">
+      <el-button type="primary" size="small" @click="submit()">请核</el-button>
+      <el-button size="small" @click="">取消</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {applyPayment} from "@/api/importTrade/purchase";
+
+    export default {
+      name: "applyPayment",
+      props:{
+        billType:{
+          type:String
+        },
+        billData:{
+          type:Object
+        }
+      },
+      data(){
+        return{
+          form:{
+          },
+          list:[],
+          currencyDic:[],
+          configuration:{
+            multipleChoices:false,
+            multiple:false,
+            disabled:false,
+            searchShow:true,
+            collapseTags:false,
+            placeholder:'请点击右边按钮选择',
+            dicData:[]
+          },
+          option:{
+            emptyBtn: false,
+            submitBtn: false,
+            labelWidth: 120,
+            menuSpan: 8,
+            column: [
+              {
+                label: '合同号',
+                prop: 'accSysNo',
+                // value:this.billData.accSysNo,
+                span: 12,
+                disabled:true,
+              },
+              {
+                label: '合同日期',
+                // value:this.billData.accDate,
+                type:"date",
+                prop: 'accDate',
+                span: 12,
+              },
+              {
+                label: '客户名称',
+                prop: 'corpId',
+                // value:this.billData.corpId,
+                span: 12,
+              },
+              {
+                label: '费用名称',
+                prop: 'costType',
+                span: 12,
+              },
+              {
+                label: '单价',
+                prop: 'price',
+                span: 12,
+              },
+              {
+                label: '数量',
+                prop: 'quantity',
+                value:1,
+                span: 12,
+              },
+              {
+                label: '计价单位',
+                prop: 'unit',
+                span: 12,
+              },
+              {
+                label: '金额',
+                prop: 'amount',
+                span: 12,
+                rules: [
+                  {
+                    pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                    message: ' ',
+                    trigger: 'blur'
+                  }
+                ]
+              },
+              {
+                label: '币别',
+                prop: 'currency',
+                // value:this.billData.currency,
+                span: 12,
+              },
+              {
+                label: '汇率',
+                prop: 'exchangeRate',
+                // value:this.billData.exchangeRate,
+                span: 12,
+              },
+              {
+                label: '税率',
+                prop: 'taxRate',
+                span: 12,
+              },
+              {
+                label: '备注',
+                prop: 'remarks',
+                span: 24,
+                type: 'textarea',
+                row: true,
+                minRows: 2,
+                isRules: false
+              }
+            ]
+          },
+        }
+      },
+      created() {
+        //币别
+        this.getWorkDicts("currency").then(res =>{
+          this.currencyDic = res.data.data
+        })
+        this.list.map(item=>({form:{...this.billData}}))
+        this.addForm();
+        console.log(this.list)
+        // this.list[0].form = this.billData
+
+      },
+      methods:{
+        addForm(){
+          this.list.push(this.form)
+        },
+        deleteGroup(index){
+          this.list.splice(index, 1);
+        },
+        submit(){
+          const listData = []
+          this.list.forEach(item =>{
+            listData.push(item.form)
+          })
+          applyPayment(listData).then(res =>{
+
+          })
+        }
+      }
+    }
+</script>
+
+<style scoped>
+.delete_group{
+  display: inline-block;
+  line-height: 50px;
+  color: #b80000;
+  margin-right: 20px;
+  float: right;
+}
+</style>

+ 106 - 0
src/components/finance/config/option.json

@@ -0,0 +1,106 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": false,
+  "searchMenuPosition": "right",
+  "searchMenuSpan": 18,
+  "tree": true,
+  "selection": true,
+  "addBtn": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": true,
+  "menuWidth": 80,
+  "searchLabelWidth": 130,
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "accSysNo",
+      "index": 1,
+      "cell": true,
+      "width": 220
+    },
+    {
+      "label": "合同日期",
+      "prop": "accDate",
+      "index": 2,
+      "cell": true,
+      "width": 220
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
+      "index": 3,
+      "cell": true,
+      "width": 220
+    },
+    {
+      "label": "费用名称",
+      "prop": "costType",
+      "index": 4,
+      "cell": true,
+      "width": 220
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "index": 5,
+      "cell": true,
+      "width": 120
+    },
+    {
+      "label": "数量",
+      "prop": "quantity",
+      "value": 1,
+      "index": 6,
+      "cell": true,
+      "width": 150
+    },
+    {
+      "label": "计价单次",
+      "prop": "unit",
+      "index": 7,
+      "cell": true,
+      "width": 120
+    },
+    {
+      "label": "金额",
+      "prop": "amount",
+      "index": 8,
+      "cell": true,
+      "width": 120
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 9,
+      "cell": true,
+      "width": 120
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "index": 10,
+      "cell": true,
+      "width": 120
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 11,
+      "cell": true,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 12,
+      "cell": true,
+      "width": 150
+    }
+  ]
+}

+ 1 - 1
src/components/procurement/config/purchase.json

@@ -53,7 +53,7 @@
       "width":120
     },{
       "label": "件数",
-      "prop": "purchaseQuantity",
+      "prop": "orderQuantity",
       "index": 6,
       "width":120
     },{

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

@@ -136,6 +136,10 @@ const columnName = [{
 },{
   code: 45,
   name: '进口发货导入销售明细'
+},
+{
+  code: 46,
+  name: '申请费用列表'
 }
 
 

+ 2 - 2
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -539,10 +539,10 @@ export default {
               value: "dictValue"
             },
             change: ({ value }) => {
-              if (value == "人民币") {
+              if (value == "CNY") {
                 this.form.exchangeRate = 1;
               }
-              if (value == "美元") {
+              if (value == "USD") {
                 this.form.exchangeRate = 6.3843;
               }
             }

+ 2 - 2
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -412,10 +412,10 @@ export default {
               value: "dictValue"
             },
             change: ({ value }) => {
-              if (value == "人民币") {
+              if (value == "CNY") {
                 this.form.exchangeRate = 1;
               }
-              if (value == "美元") {
+              if (value == "USD") {
                 this.form.exchangeRate = 6.3843;
               }
             }

+ 2 - 2
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -329,10 +329,10 @@ export default {
               value: "dictValue"
             },
             change: ({ value }) => {
-              if (value == "人民币") {
+              if (value == "CNY") {
                 this.form.exchangeRate = 1;
               }
-              if (value == "美元") {
+              if (value == "USD") {
                 this.form.exchangeRate = 6.3843;
               }
             }

+ 2 - 2
src/views/exportTrade/salesContract/detailsPage.vue

@@ -559,10 +559,10 @@ export default {
               value: "dictValue"
             },
             change: ({ value }) => {
-              if (value == "人民币") {
+              if (value == "CNY") {
                 this.form.exchangeRate = 1;
               }
-              if (value == "美元") {
+              if (value == "USD") {
                 this.form.exchangeRate = 6.3843;
               }
             }

+ 1 - 1
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -170,7 +170,7 @@
                          size="small"
                          :disabled="goodsDisable"
                          @click="marketDialog = true"
-              >入明细
+              >入明细
               </el-button>
             </template>
           </avue-crud>

+ 13 - 5
src/views/importTrade/receipt/config/mainList.json

@@ -19,11 +19,11 @@
   "searchLabelWidth": 120,
   "column":[
     {
-      "label": "系统号",
-      "prop": "sysNo",
+      "label": "供应商",
+      "prop": "corpId",
       "search": true,
-      "index": 1,
-      "width":150
+      "index": 2,
+      "width":120
     },
     {
       "label": "合同号",
@@ -31,7 +31,15 @@
       "search": true,
       "index": 2,
       "width":120
-    },{
+    },
+    {
+      "label": "提单号",
+      "prop": "orderNo",
+      "search": true,
+      "index": 2,
+      "width":120
+    },
+    {
       "label": "收货日期",
       "prop": "businessDate",
       "search": true,

+ 42 - 6
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -146,6 +146,7 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+                @input="actualQuantityChange(row)"
               ></el-input>
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
@@ -171,7 +172,7 @@
                          size="small"
                          :disabled="receiptDisable"
                          @click="commoditySelection"
-              >入明细
+              >入明细
               </el-button>
             </template>
           </avue-crud>
@@ -291,6 +292,7 @@ export default {
       contactsForm: {},
       contactsData: [],
       contractDic:[],
+      singleton:[],
       selectKind:-1,
       configuration:{
         multipleChoices:false,
@@ -484,14 +486,24 @@ export default {
           this.detailData.params.orderItemIds.forEach((e,i) =>{
             if(e ==  index){
               item.srcId =  item.id;
+              item.orgOrderNo =  res.data.data.orgOrderNo;
               item.contractNumber =  res.data.data.orderNo;
               orderNoList.push(item.contractNumber)
               if(item.actualQuantity !== 0){   //如果收过货
-                item.actualQuantity = _.subtract(item.purchaseQuantity, item.actualQuantity); //收货件数 = 采购件数 - 已收件数
+                item.actualQuantity = _.subtract(item.orderQuantity, item.actualQuantity); //收货件数 = 采购件数 - 已收件数
               }else{
-                item.actualQuantity =  item.purchaseQuantity;
+                item.actualQuantity =  item.orderQuantity;
               }
               item.contractAmount =  item.amount;
+              //如果件数 和 码单重量不为 0 或空   算出一件的重量  并记录每一行的
+              if(item.orderQuantity && item.orderQuantity!= "0"
+                && item.billWeight && item.billWeight!= "0"
+                && item.invoiceWeight && item.invoiceWeight!= "0"){
+                this.singleton[index]={
+                  BQ : _.divide(item.billWeight, item.orderQuantity),
+                  IQ : _.divide(item.invoiceWeight, item.orderQuantity)
+                }
+              }
               delete item.id
               this.$refs.crudContact.rowCellAdd(item);
               this.$refs.crudContact.rowCell(item,this.contactsData.length - 1)
@@ -501,6 +513,7 @@ export default {
         this.$set(this.form,'orderNo', Array.from(new Set(orderNoList)).join(","))
         this.$set(this.form,'saleman',res.data.data.salesName)
         this.$set(this.form,'corpId',res.data.data.corpsName[0].id)
+        this.$set(this.form,'orgOrderNo', res.data.data.orgOrderNo)
         this.$set(this.configuration,'dicData', res.data.data.corpsName)
       })
     }
@@ -534,6 +547,17 @@ export default {
         this.selectInventory(row);
       }
     },
+    actualQuantityChange(row){
+      if(row.orderQuantity && row.orderQuantity!= "0"
+        && row.billWeight && row.billWeight!= "0"
+        && row.invoiceWeight && row.invoiceWeight!= "0"){
+        row.billWeight = _.multiply(this.singleton[row.$index].BQ,row.actualQuantity)
+        row.invoiceWeight = _.multiply(this.singleton[row.$index].IQ,row.actualQuantity)
+        this.totalChange()
+        this.priceChange(row)
+        this.invoiceWeightChange(row)
+      }
+    },
     //合计
     totalChange(){
       let invoiceList =  this.contactsData.map(item => {
@@ -722,14 +746,26 @@ export default {
     },
     //导入采购明细
     importProMent(list){
-      list.forEach(item =>{
+      list.forEach((item,index) =>{
         item.contractNumber = item.orderNo;
         item.contractAmount = item.amount;
-        item.actualQuantity = item.purchaseQuantity;
+        item.actualQuantity = item.orderQuantity;
         this.$refs.crudContact.rowCellAdd(item);
         this.selectInventory(item)
       })
-      this.totalChange();  //计算码单 发票
+
+      this.contactsData.forEach((item,index)=>{
+        if(item.orderQuantity && item.orderQuantity!= "0"
+          && item.billWeight && item.billWeight!= "0"
+          && item.invoiceWeight && item.invoiceWeight!= "0"){
+          this.singleton[index]={
+            BQ : _.divide(item.billWeight, item.orderQuantity),
+            IQ : _.divide(item.invoiceWeight, item.orderQuantity)
+          }
+        }
+      })
+
+      this.totalChange()
       this.sumOrderNo();   //合并合同号
       this.procurementDialog = false;
     },

+ 6 - 75
src/views/purchase/contract/config/commodity.json

@@ -18,7 +18,7 @@
       "label": "商品编码",
       "prop": "code",
       "search": true,
-      "width": 100,
+      "width": 120,
       "rules": [
         {
           "required": true,
@@ -31,7 +31,7 @@
       "label": "商品名称",
       "prop": "cname",
       "slot": true,
-      "width": 100,
+      "width": 250,
       "rules": [
         {
           "required": true,
@@ -41,85 +41,16 @@
       ]
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },
-    {
       "label": "规格编码",
       "prop": "typeno",
-      "search": true
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true
-    },
-    {
-      "label": "规格尺寸",
-      "prop": "specs",
-      "slot": true
-    },
-    {
-      "label": "产品类别",
-      "prop": "category",
-      "slot": true
-    },
-    {
-      "label": "产品分类",
-      "prop": "categoryitem",
-      "slot": true
-    },
-    {
-      "label": "供应商",
-      "prop": "providers",
-      "slot": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "slot": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "slot": true
-    },
-    {
-      "label": "商品图片",
-      "prop": "url",
-      "type": "upload",
-      "listType": "picture-img",
-      "dataType": "string",
-      "action": "/api/blade-resource/oss/endpoint/put-file",
-      "propsHttp": {
-        "res": "data",
-        "url": "link"
-      },
-      "hide": true,
-      "span": 24
+      "search": true,
+      "width": 200
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "slot": true,
+      "width": 120
     }
   ]
 }

+ 1 - 1
src/views/purchase/contract/config/customerContact.json

@@ -69,7 +69,7 @@
     },
     {
       "label": "数量",
-      "prop": "purchaseQuantity",
+      "prop": "orderQuantity",
       "index": 4,
       "width":120
     },

+ 71 - 47
src/views/purchase/contract/config/mainList.json

@@ -16,7 +16,7 @@
   "delBtn": false,
   "menuWidth": 220,
   "dialogClickModal": false,
-  "searchLabelWidth": 100,
+  "searchLabelWidth": 120,
   "searchIcon": true,
   "searchIndex": 3,
   "addBtnText": "新单",
@@ -26,102 +26,126 @@
       "label": "合同号",
       "prop": "orderNo",
       "search": true,
-      "searchIndex": 2,
       "index": 1,
       "width":150
     },
     {
-      "label": "合同日期",
-      "prop": "businesDate",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "index": 2,
-      "width":150
-    },
-    {
       "label": "供应商",
       "prop": "strCorpName",
       "search": true,
-      "searchIndex": 1,
-      "index": 3,
+      "index": 2,
       "width":200
     },{
       "label": "采购商",
       "prop": "strPurchaserName",
-      "index": 4,
+      "index": 3,
       "width":200
     },
     {
-      "label": "采购日期",
-      "prop": "createTime",
+      "label": "合同日期",
+      "prop": "businesDate",
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
       "unlinkPanels": true,
       "searchRange": true,
       "search": true,
-      "searchIndex": 3,
-      "index": 5,
-      "width":100
+      "index": 4,
+      "width":150
     },
     {
       "label": "码单重量",
       "prop": "billWeight",
-      "index": 6,
+      "index": 5,
       "width":100
     },{
       "label": "发票净重",
       "prop": "invoiceWeight",
+      "index": 6,
+      "width":100
+    },
+    {
+      "label": "合同金额",
+      "prop": "orderAmount",
+      "search": true,
       "index": 7,
       "width":100
     },
     {
-      "label": "单价",
-      "prop": "salesPrice",
+      "label": "已付金额",
+      "prop": "settlmentAmount",
+      "search": true,
       "index": 8,
       "width":100
     },
-   {
-      "label": "币别",
-      "prop": "currency",
+    {
+      "label": "业务员",
+      "prop": "salesName",
+      "search": true,
       "index": 9,
       "width":100
-    },{
-      "label": "汇率",
-      "prop": "exchangeRate",
+    },
+    {
+      "label": "要求发货日期",
+      "prop": "requiredDeliveryDate",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "search": true,
       "index": 10,
-      "width":100
-    },{
-      "label": "合同金额",
-      "prop": "orderAmount",
+      "width":150
+    },
+    {
+      "label": "要求到货日期",
+      "prop": "requiredArrivalDate",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
       "search": true,
       "index": 11,
-      "width":100
-    },{
-      "label": "合同类型",
-      "prop": "orderType",
-      "index": 12,
-      "width":100
+      "width":150
     },
     {
-      "label": "单据状态",
-      "prop": "status",
-      "index": 13,
-      "width":100
-    }, {
-      "label": "付款日期/开证日期",
+      "label": "到港日期",
+      "prop": "dateOfArrival",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "search": true,
+      "index": 12,
+      "width":150
+    },
+     {
+      "label": "付款/开证日期",
       "prop": "accountsCollectionDate",
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
       "unlinkPanels": true,
       "searchRange": true,
+       "search": true,
+      "index": 13,
+      "width":150
+    },
+    {
+      "label": "信用证到期日",
+      "prop": "creditDate",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "search": true,
       "index": 14,
       "width":150
-    },{
+    },
+    {
       "label": "备注",
       "prop": "orderRemark",
       "index": 15,

+ 94 - 37
src/views/purchase/contract/detailsPage.vue

@@ -7,10 +7,14 @@
         </el-button>
       </div>
       <el-button type="primary"
-                 class="el-button--small-yh add-customer-btn-three"
+                 class="el-button--small-yh add-customer-btn-four"
                  :disabled="true"
                  @click.stop="">请核
       </el-button>
+      <el-button type="warning"
+                 class="el-button--small-yh add-customer-btn-three"
+                 @click.stop="applyPayment()">申请货款
+      </el-button>
       <el-button type="success"
                  class="el-button--small-yh add-customer-btn-two"
                  :disabled="true"
@@ -108,17 +112,17 @@
               </el-select>
               <span v-else>{{ row.itemType }}</span>
             </template>
-            <template slot="purchaseQuantity" slot-scope="{ row }">
+            <template slot="orderQuantity" slot-scope="{ row }">
               <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
-                v-model="row.purchaseQuantity"
+                v-model="row.orderQuantity"
                 placeholder="请输入"
                 size="small"
                 style="width: 93%"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
               ></el-input>
-              <span v-else>{{ row.purchaseQuantity }}</span>
+              <span v-else>{{ row.orderQuantity }}</span>
             </template>
             <template slot="price" slot-scope="{ row }">
               <el-input
@@ -183,13 +187,6 @@
                          @click="beforePage(false)"
               >生成收货单
               </el-button>
-              <el-button type="warning"
-                         icon="el-icon-s-check"
-                         size="small"
-                         :disabled="selectContact.length == 0"
-                         @click="beforePage(true)"
-              >申请付款(开证)
-              </el-button>
               <el-button type="info"
                          size="small"
                          @click="applicationDialog = true,applicationData = contactsData"
@@ -201,6 +198,8 @@
         <fee-info
           ref="feeInfo"
           :orderFeesList="orderFeesList"
+          :billData="billData"
+          :beforeBillData="beforeBillData"
           feeUrl=""
         />
         <upload-file
@@ -278,6 +277,23 @@
           <el-button @click="applicationDialog = false ">关 闭</el-button>
         </span>
     </el-dialog>
+    <el-dialog
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applyPaymentDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <apply-payment
+        :billType="billType"
+        :billData="billData"
+        :choceFun="!applyPaymentDialog"
+      >
+      </apply-payment>
+    </el-dialog>
   </div>
 </template>
 
@@ -298,6 +314,7 @@ import { getList } from "@/api/basicData/commodityType"
 import { contrastObj,contrastList } from "@/util/contrastData";
 import {getSpecification} from "@/api/exportTrade/purchaseContract";
 import option from "./config/mainList.json";
+import ApplyPayment from "../../../components/finance/applyPayment";
 export default {
   name: "detailsPage",
   props: {
@@ -312,12 +329,15 @@ export default {
       customerContact: {},
       contactsForm: {},
       contactsData: [],
+      applyPaymentDialog:false,
       dialogVisible:false,
       commodityData: false,
       tableData: [],
       optionTwo: commodity,
       loading: false,
       data: [],
+      billType:"CG",
+      billData:{},
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -473,9 +493,10 @@ export default {
           },{
             label: '合同号',
             prop: 'orderNo',
+            disabled:false,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -676,7 +697,7 @@ export default {
   async created() {
     this.customerContact = await this.getColumnData(this.getColumnName(37), customerContact);
     //币别
-    this.getWorkDicts("currency").then(res =>{
+    this.getWorkDicts("entrance_currency").then(res =>{
       this.currencyDic = res.data.data
     })
     this.getWorkDicts("contractType").then(res =>{
@@ -706,11 +727,12 @@ export default {
         }
       })
     }else{
-      this.$set(this.form,"currency","美元")
+      this.$set(this.form,"currency","USD")
       this.$set(this.form,"exchangeRate",6.3843)
     }
   },
   components: {
+    ApplyPayment,
     feeInfo,
     uploadFile
   },
@@ -736,15 +758,15 @@ export default {
     //带出人民币
     currencyChange(){
       if(this.form.orderAmount){
-        if(this.form.currency === "人民币"){
+        if(this.form.currency === "CNY"){
           this.form.exchangeRate = 1
-          this.form.rmbAmount = this.form.orderAmount
+          this.$set(this.form,"rmbAmount",this.form.orderAmount)
         }else{
           this.form.exchangeRate = 6.3843
-          this.form.rmbAmount =  _.multiply(this.form.orderAmount, 6.3843)
+          this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, 6.3843).toFixed(2))
         }
       }else{
-        this.form.rmbAmount = ""
+        this.$set(this.form,"rmbAmount","")
       }
     },
     //合计
@@ -766,11 +788,11 @@ export default {
     },
     //件数
     // quantityChange(row) {
-    //   if (!row.purchaseQuantity) {
-    //     row.purchaseQuantity = "";
+    //   if (!row.orderQuantity) {
+    //     row.orderQuantity = "";
     //     row.amount = 0
     //   } else {
-    //     row.amount =_.multiply(row.purchaseQuantity,row.price).toFixed(2);
+    //     row.amount =_.multiply(row.orderQuantity,row.price).toFixed(2);
     //   }
     // },
     //修改提交触发
@@ -797,10 +819,10 @@ export default {
             if (this.contactsData[j].priceCategory === "") {
               return this.$message.error(`请输入采购明细第${j + 1}行的货物品种`);
             }
-            if (this.contactsData[j].purchaseQuantity === "") {
+            if (this.contactsData[j].orderQuantity === "") {
               return this.$message.error(`请输入采购明细第${j + 1}行的件数`);
             }
-            if (this.contactsData[j].purchaseQuantity == 0) {
+            if (this.contactsData[j].orderQuantity == 0) {
               return this.$message.error(`采购明细第${j + 1}行的件数不能为0`);
             }
           }
@@ -873,20 +895,20 @@ export default {
         }else{
           if(type){
             //进入付款管理
-            if(this.$store.getters.payStatus){
-              this.$alert("付款页面已存在,请关闭付款页面再进行操作", "温馨提示", {
-                confirmButtonText: "确定",
-                type: 'warning',
-                callback: action => {
-                }
-              });
-            }else{
-              this.$router.$avueRouter.closeTag('/financialManagement/payment');
-              this.$router.push({
-                path: "/financialManagement/payment",
-                query: {params: params},
-              });
-            }
+            // if(this.$store.getters.payStatus){
+            //   this.$alert("付款页面已存在,请关闭付款页面再进行操作", "温馨提示", {
+            //     confirmButtonText: "确定",
+            //     type: 'warning',
+            //     callback: action => {
+            //     }
+            //   });
+            // }else{
+            //   this.$router.$avueRouter.closeTag('/financialManagement/payment');
+            //   this.$router.push({
+            //     path: "/financialManagement/payment",
+            //     query: {params: params},
+            //   });
+            // }
           }else{
             //进入收货单
             if(this.$store.getters.takeStatus){
@@ -916,6 +938,36 @@ export default {
         })
       }
     },
+    beforeBillData(type){
+      this.billData = {
+        accSysNo:this.form.orderNo,
+        accDate:this.form.businesDate,
+        currency:this.form.currency,
+        exchangeRate:this.form.exchangeRate,
+        billType:"CG",
+        srcParentId:this.form.id,
+      }
+      if(type){ //申请货款
+        this.billData.srcId = -1
+      }
+    },
+    // 付款
+    applyPayment(){
+      if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
+        || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
+      ){
+        this.$confirm("您已改动数据,是否先保存在进行操作!", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.editCustomer();
+        })
+      }else{
+        this.beforeBillData(true);
+        this.applyPaymentDialog = true;
+      }
+    },
     //选择货物品种
     choice(row){
       this.dialogVisible = true;
@@ -1139,6 +1191,11 @@ export default {
   right: 266px;
   top: 115px;
 }
+.add-customer-btn-four {
+  position: fixed;
+  right: 385px;
+  top: 115px;
+}
 .add-customer-btn {
   position: fixed;
   right: 36px;

+ 13 - 22
src/views/salesManagement/salesContract/config/mainList.json

@@ -33,39 +33,30 @@
       "search": true,
       "index": 4,
       "width":150
-    },{
+    },
+    {
+      "label": "合同日期",
+      "prop": "businesDate",
+      "search": false,
+      "index": 6,
+      "width":100
+    },
+    {
       "label": "合同金额",
       "prop": "orderAmount",
       "search": true,
       "index": 5,
       "width":120
-    },{
-      "label": "币别",
-      "prop": "currency",
-      "search": false,
-      "index": 6,
-      "width":100
-    },{
-      "label": "汇率",
-      "prop": "exChangeRate",
-      "search": false,
-      "index": 6,
-      "width":100
-    },{
-      "label": "是否全部发货",
-      "prop": "arrival",
-      "search": false,
-      "index": 7,
-      "width":100
-    },{
+    },
+    {
       "label": "业务员",
       "prop": "salesName",
       "search": true,
       "index": 8,
       "width":120
     },{
-      "label": "单据状态",
-      "prop": "status",
+      "label": "客户首付日期",
+      "prop": "advanceCollectionDate",
       "search": false,
       "index": 8,
       "width":120

+ 5 - 4
src/views/salesManagement/salesContract/detailsPage.vue

@@ -66,6 +66,7 @@
             @row-update="rowUpdateList"
             @row-del="rowDelList"
             @selection-change="productSelection"
+            @saveColumn="saveColumn"
           >
             <template slot-scope="{row}" slot="billNo">
               <span v-if="row.$cellEdit" class="required_fields">*</span>
@@ -536,7 +537,7 @@ export default {
         total: 0
       },
       // 导入库存配置
-      importInventory: importInventory,
+      importInventory: {},
       importInventoryForm: {},
       importInventoryData: [],
       dialogStock: false,
@@ -642,7 +643,7 @@ export default {
   async created() {
     this.importInventory = await this.getColumnData(this.getColumnName(39), importInventory);
     //币别
-    this.getWorkDicts("currency").then(res =>{
+    this.getWorkDicts("entrance_currency").then(res =>{
       this.currencyDic = res.data.data
     })
     if (this.detailData.id) {
@@ -666,7 +667,7 @@ export default {
         }
       })
     }else{
-      this.$set(this.form,"currency","美元")
+      this.$set(this.form,"currency","USD")
       this.$set(this.form,"exchangeRate",6.3843)
     }
   },
@@ -695,7 +696,7 @@ export default {
     //汇率
     currencyChange(value){
       if(this.form.orderAmount){
-        if(value === "人民币"){
+        if(value === "CNY"){
           this.form.exchangeRate = 1
           // this.form.rmbAmount = this.form.orderAmount
         }else{

+ 2 - 0
src/views/system/dictbiz.vue

@@ -237,8 +237,10 @@
 
         const code = this.findObject(this.optionChild.column, "code");
         code.value = row.code;
+        this.$set(this.formChild,"code",row.code)
         const parentId = this.findObject(this.optionChild.column, "parentId");
         parentId.value = row.id;
+        this.$set(this.formChild,"parentId",row.id)
 
         this.box = true;
         this.onLoadChild(this.pageChild);

+ 7 - 1
src/views/workManagement/main-items/configuration/mainList.json

@@ -8,7 +8,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 24,
   "tree": true,
   "selection": true,
   "editBtn": false,
@@ -83,6 +83,12 @@
     {
       "label": "制单日期",
       "prop": "createTime",
+      "search": true,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
       "index": 12,
       "width": 150
     },

+ 0 - 9
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -98,12 +98,6 @@
         <el-form-item label="账户名称"  class="landConFrom-input" prop="accountName" :rules="rules">
           <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable  placeholder="请输入" ></el-input>
         </el-form-item>
-        <el-form-item label="开户银行"  class="landConFrom-input" prop="accountBank" :rules="rules">
-          <el-input v-model="accountFormData.accountBank" style="width: 220px;"  size="small" clearable autocomplete="off" placeholder="请输入" ></el-input>
-        </el-form-item>
-        <el-form-item label="银行账号"  class="landConFrom-input" prop="accountNo"  :rules="rules">
-          <el-input v-model="accountFormData.accountNo" style="width: 220px;" size="small" clearable autocomplete="off" placeholder="请输入" ></el-input>
-        </el-form-item>
         <el-form-item label="结算日期"  class="landConFrom-input" prop="payTime"  :rules="rules">
           <el-date-picker type="date" v-model="accountFormData.payTime" value-format="yyyy-MM-dd HH:mm:ss"  size="small" clearable  placeholder="日期" ></el-date-picker>
         </el-form-item>
@@ -357,7 +351,6 @@
       },
       closeAccount(form){
         this.$refs[form].validate((valid) => {
-          console.log(132)
           if(valid){
             this.$confirm("确认结算此明细?", {
               confirmButtonText: "确定",
@@ -366,8 +359,6 @@
             }).then(() => {
               updateItemStatus(this.aaccount.id,5,
                 this.accountFormData.accountName,
-                this.accountFormData.accountBank,
-                this.accountFormData.accountNo,
                 this.accountFormData.payTime,).then(res =>{
                 if(res.data.success){
                   this.$message({

+ 18 - 1
src/views/workManagement/task/configuration/mainList.json

@@ -7,7 +7,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 18,
   "tree": true,
   "selection": true,
   "addBtn": false,
@@ -32,6 +32,19 @@
     {
       "label": "状态",
       "prop": "strStatus",
+      "type": "select",
+      "dicData": [
+        {
+        "label": "进行中",
+        "value": "进行中"
+       },
+        {
+          "label": "已完成",
+          "value": "已完成"
+        }
+      ],
+      "search": true,
+      "searchOrder": 5,
       "width": 120
     },
     {
@@ -43,6 +56,7 @@
       "label": "服务项目",
       "prop": "pname",
       "search": true,
+      "searchOrder": 1,
       "width": 120
     },
     {
@@ -94,6 +108,7 @@
       },
       "cell": true,
       "slot": true,
+      "searchOrder": 2,
       "width": 150
     },
     {
@@ -108,6 +123,7 @@
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "type": "date",
       "search": true,
+      "searchOrder": 3,
       "width": 150,
       "cell": true
     },
@@ -117,6 +133,7 @@
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "type": "date",
       "search": true,
+      "searchOrder": 4,
       "width": 150,
       "cell": true
     },