Browse Source

财务流程修改 审批

qinbai 3 years ago
parent
commit
ca30c053ee

+ 1 - 1
src/components/check/check.vue

@@ -2,7 +2,7 @@
   <div>
     <avue-form class="trading-form" :option="option" ref="form" v-model="form">
     </avue-form>
-    <div style="margin-left: 60%;padding: 10px">
+    <div style="padding: 10px;display: flex;justify-content: flex-end;">
       <el-button size="small" @click="$emit('choceCheckFun')">关闭</el-button>
       <el-button type="warning" size="small" @click="submit(2)">审批驳回</el-button>
       <el-button type="primary" size="small" @click="submit(1)">审批通过</el-button>

+ 1 - 2
src/components/fee-info/main.vue

@@ -605,7 +605,7 @@ export default {
             item.corpsName = item.corpName
             item.srcFeesId = item.id
             item.costType = item.itemId
-            item.itemType = '采购'
+            item.itemType = this.itemType
             item.optionType = this.optionType
             item.srcType = 2   //费用明细申请
             item.tradeType = this.optionType
@@ -613,7 +613,6 @@ export default {
           let data = {
             billType: type,
             itemsList : this.selectionList,
-            itemType: this.itemType,
           }
           if(type === '申请'){
             this.$confirm("您确定申请付费吗?", "提示", {

+ 74 - 78
src/components/finance/applyPayment.vue

@@ -84,9 +84,6 @@ export default {
       type: Array,
       default: []
     },
-    itemType:{
-      type: String
-    },
     billUrl:{
       type: String
     }
@@ -352,89 +349,88 @@ export default {
       if (result.some(item => item)) {
         const itemsList = this.list.map(item => {
           item.form.corpId = this.corpId;
-          item.tradeType = this.billData.optionType
+          item.form.tradeType = this.billData.optionType
+          item.form.srcType = 1
           return item.form
         })
-
-            const params = {
-              itemType:this.itemType,
-              billType : this.billType,
-              url:this.billUrl,
-              DC : this.billData.itemType === "采购"?"C":"D",     //账单明细会根据D C区分采购 销售搜索
-              itemsList: itemsList
-            }
-            // 采购申请货款   销售申请退款 都会走申请 走审核   => 付款申请
-            if(this.billType === "申请"){
-              applyLoan(params).then(res =>{
-                if(res.data.success){
-                  this.$message.success("操作成功!")
-                  this.$emit("choceFun");
-                  //跳转付款申请页面
-                  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},
-                    });
+        const params = {
+          billType : this.billType,
+          url:this.billUrl,
+          DC : this.billData.itemType === "采购"?"C":"D",     //账单明细会根据D C区分采购 销售搜索
+          itemsList: itemsList
+        }
+        // 采购申请货款   销售申请退款 都会走申请 走审核   => 付款申请
+        if(this.billType === "申请"){
+          applyLoan(params).then(res =>{
+            if(res.data.success){
+              this.$message.success("操作成功!")
+              this.$emit("choceFun");
+              //跳转付款申请页面
+              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},
+                });
+              }
             }
-            //采购退款结算 销售收款结算  不需申请请核 直接结算  => 结算
-            if(this.billType === "收费"){
-              paymentApply(params).then(res=>{
-                if(res.data.success){
-                  this.$message.success("操作成功!")
-                  this.$emit("choceFun");
-                }
-              })
+          })
+        }
+        //采购退款结算 销售收款结算  不需申请请核 直接结算  => 结算
+        if(this.billType === "收费"){
+          paymentApply(params).then(res=>{
+            if(res.data.success){
+              this.$message.success("操作成功!")
+              this.$emit("choceFun");
             }
-          }
-        },
-        /**
-         * @param instance 实例
-         * @param result 校验结果数组
-         * 递归校验每个表格实例
-         */
-        handleValid(instance,result) {
-          if(!instance) {
-            result.push(true)
-          }else if(Array.isArray(instance)) {
-            instance.map(item => this.handleValid(item,result))
-          }else{
-            if(instance.validate) {
-              instance.validate(valid => {
-                result.push(valid)
-                instance.hide && instance.hide()
-              })
-            }else {
-              instance.validateCellForm().then(msg=>{
-                if((msg && !Object.keys(msg).length) || undefined === msg){
-                  result.push(true)
-                }else{
-                  result.push(false)
-                }
-              })
+          })
+        }
+      }
+    },
+    /**
+     * @param instance 实例
+     * @param result 校验结果数组
+     * 递归校验每个表格实例
+     */
+    handleValid(instance,result) {
+      if(!instance) {
+        result.push(true)
+      }else if(Array.isArray(instance)) {
+        instance.map(item => this.handleValid(item,result))
+      }else{
+        if(instance.validate) {
+          instance.validate(valid => {
+            result.push(valid)
+            instance.hide && instance.hide()
+          })
+        }else {
+          instance.validateCellForm().then(msg=>{
+            if((msg && !Object.keys(msg).length) || undefined === msg){
+              result.push(true)
+            }else{
+              result.push(false)
             }
-
-          }
-        },
-        /**
-         * @param resultArr 校验结果数组
-         * 统一校验方法
-         */
-        handleRulesValid(refsList,resultArr) {
-          refsList.map(item => this.handleValid(this.$refs[`${item}`],resultArr))
+          })
         }
+
       }
+    },
+    /**
+     * @param resultArr 校验结果数组
+     * 统一校验方法
+     */
+    handleRulesValid(refsList,resultArr) {
+      refsList.map(item => this.handleValid(this.$refs[`${item}`],resultArr))
+    }
+  }
     }
 </script>
 

+ 1 - 0
src/views/approveData/configuration/mainList.json

@@ -59,6 +59,7 @@
         "value": "dictKey"
       },
       "search": true,
+      "searchValue": "S",
       "overHidden": true,
       "width": 200,
       "index": 2

+ 4 - 0
src/views/approveData/index.vue

@@ -129,6 +129,7 @@
             idList.push(this.selectionList[i].id)
           }
         }
+
         this.$confirm('确定进行批量操作吗?', '提示', {
           confirmButtonText: '审核通过',
           cancelButtonText: '取消',
@@ -225,6 +226,9 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
+        if(!params.auditStatus && this.search.auditStatus != ""){
+          params.auditStatus = "S";
+        }
         getList(page.currentPage, page.pageSize,params).then(res=>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total

+ 6 - 24
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -31,16 +31,6 @@
               </el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
-
-<!--          <el-button type="info"-->
-<!--                     size="small"-->
-<!--                     class="el-button&#45;&#45;small-yh"-->
-<!--                     :loading="buttonLoading"-->
-<!--                     :disabled="checkDisabled"-->
-<!--                     @click.stop="paymentCheck">-->
-<!--            {{form.checkStatus == '审核中'?'审核中':'申请'}}-->
-<!--          </el-button>-->
-
           <el-button type="warning"
                      size="small"
                      :loading="buttonLoading"
@@ -72,12 +62,13 @@
       <basic-container>
         <avue-form class="trading-form" ref="form" v-model="form" :option="option">
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              @returnBack="returnBack"
-              :configuration="configuration"
+              corpType="KG"
               :disabled="checkDisabled || auditDisabled"
-            ></select-component>
+              @getCorpData="returnBack"
+              style="width: 100%"
+            ></crop-select>
           </template>
           <template slot="accountNo">
             <el-select v-model="form.accountNo"
@@ -388,15 +379,6 @@
             },
           ],
         },
-        //客户组件配置控制
-        configuration:{
-          multipleChoices:false,
-          multiple:false,
-          searchShow:true,
-          collapseTags:false,
-          placeholder:'请点击右边按钮选择',
-          dicData:[]
-        },
         oldForm:{},
         oldDataList:[],
       }
@@ -434,7 +416,7 @@
     methods: {
       //选择客户
       returnBack(corpValue){
-        getlistBankBy(corpValue).then(res =>{
+        getlistBankBy(corpValue.id).then(res =>{
           this.form.bankList = res.data
         })
       },

+ 1 - 1
src/views/financialManagement/paymentSettle/paymentSettle.vue

@@ -162,7 +162,7 @@
         console.log('1')
       },
       refreshChange() {
-        console.log('1')
+        this.onLoad(this.page)
       },
       onLoad(page, params = {}) {
         params.billType = "付费"

+ 8 - 20
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -28,12 +28,13 @@
       <basic-container>
         <avue-form class="trading-form" ref="form" v-model="form" :option="option">
           <template slot="corpId">
-            <select-component
-              :disabled="!financeDisabled && form.id"
+            <crop-select
               v-model="form.corpId"
-              @returnBack="returnBack"
-              :configuration="configuration"
-            ></select-component>
+              corpType="KG"
+              :disabled="!financeDisabled && form.id"
+              @getCorpData="returnBack"
+              style="width: 100%"
+            ></crop-select>
           </template>
           <template slot="accountNo">
             <el-select v-model="form.accountNo"
@@ -68,7 +69,6 @@
             <el-button type="primary"
                        size="small"
                        icon="el-icon-shopping-cart-2"
-                       :disabled="!financeDisabled"
                        @click="selectPurchase">选择采购合同
             </el-button>
           </template>
@@ -77,14 +77,12 @@
               type="text"
               size="small"
               icon="el-icon-edit"
-              :disabled="!financeDisabled"
               @click.stop="rowCell(scope.row,scope.index)"
             > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
             </el-button>
             <el-button
               type="text"
               size="small"
-              :disabled="!financeDisabled"
               icon="el-icon-delete"
               @click.stop="rowDel(scope.row,scope.index)"
             >删除
@@ -322,16 +320,6 @@
             },
           ],
         },
-        //客户组件配置控制
-        configuration:{
-          multipleChoices:false,
-          multiple:false,
-          disabled:false,
-          searchShow:true,
-          collapseTags:false,
-          placeholder:'请点击右边按钮选择',
-          dicData:[]
-        },
         financeStatusDic:[{
           label:'正常',
           value:0
@@ -382,8 +370,8 @@
     methods: {
       //选择客户
       returnBack(corpValue){
-        this.corpId = corpValue
-        getlistBankBy(corpValue).then(res =>{
+        this.corpId = corpValue.id
+        getlistBankBy(corpValue.id).then(res =>{
           this.$set(this.form,"bankList",res.data)
         })
       },

+ 8 - 17
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -28,12 +28,13 @@
       <basic-container>
         <avue-form class="trading-form" ref="form" v-model="form" :option="option">
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              @returnBack="returnBack"
+              corpType="KG"
               :disabled="!financeDisabled"
-              :configuration="configuration"
-            ></select-component>
+              @getCorpData="returnBack"
+              style="width: 100%"
+            ></crop-select>
           </template>
           <template slot="accountNo">
             <el-select v-model="form.accountNo"
@@ -225,7 +226,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '人民币金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -321,16 +322,6 @@
         //新旧数据对比
         oldForm:{},
         oldDataList:[],
-        //客户组件配置控制
-        configuration:{
-          multipleChoices:false,
-          multiple:false,
-          disabled:false,
-          searchShow:true,
-          collapseTags:false,
-          placeholder:'请点击右边按钮选择',
-          dicData:[]
-        },
         financeStatusDic:[{
           value: '正常',
           label: '正常'
@@ -374,8 +365,8 @@
     methods: {
       //选择客户
       returnBack(corpValue){
-        this.corpId = corpValue
-        getlistBankBy(corpValue).then(res =>{
+        this.corpId = corpValue.id
+        getlistBankBy(corpValue.id).then(res =>{
           this.$set(this.form,"bankList",res.data)
         })
       },

+ 46 - 58
src/views/purchase/contract/detailsPage.vue

@@ -290,6 +290,7 @@
           ref="feeInfo"
           :orderFeesList="orderFeesList"
           :disabled="viewDisabled"
+          :itemType="'采购'"
           :optionType="'JK'"
           @beforeFinance="beforeFinance"
           feeUrl=""
@@ -297,7 +298,6 @@
         <upload-file
           ref="uploadFile"
           title="合同附件"
-          :optionType="'JK'"
           :disabled="viewDisabled"
           :orderFilesList="orderFilesList"
           delUrl=""
@@ -335,7 +335,6 @@
       <apply-payment
         :billUrl="billUrl"
         :billType="billType"
-        :itemType="'采购'"
         :billData="billData"
         @choceFun="choceFun"
       >
@@ -505,14 +504,15 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '采购商',
-            prop: 'purchaserId',
+          },
+          {
+            label: '所属公司',
+            prop: 'belongToCorpId',
             span: 16,
             dicData: [],
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -530,19 +530,6 @@ export default {
               }
             ]
           },
-          {
-            label: '所属公司',
-            prop: 'belongToCorpId',
-            span: 16,
-            dicData: [],
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
-          },
          {
             label: '合同金额',
             prop: 'orderAmount',
@@ -579,18 +566,6 @@ export default {
             ]
           },
           {
-            label: '业务员',
-            prop: 'salesName',
-            dicData: [],
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
             label: '要求发货日期',
             prop: 'requiredDeliveryDate',
             type:'date',
@@ -629,7 +604,8 @@ export default {
           }, {
             label: '汇率',
             prop: 'exchangeRate',
-          }, {
+          },
+          {
             label: '人民币金额',
             prop: 'rmbAmount',
             rules: [
@@ -639,22 +615,23 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '付款方式',
-            prop: 'paymentType',
           },
           {
-            label: '到港日期',
-            prop: 'dateOfArrival',
-            type:'date',
+            label: '预付(保证)金额',
+            prop: 'advancePayment',
             rules: [
               {
-                required: false,
+                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
                 message: ' ',
                 trigger: 'blur'
               }
             ]
-          }, {
+          },
+          {
+            label: '付款方式',
+            prop: 'paymentType',
+          },
+          {
             label: '付款/开证日期',
             prop: 'accountsCollectionDate',
             type:'date',
@@ -691,35 +668,44 @@ export default {
             ]
           },
           {
-            label: '预付(保证)金额',
-            prop: 'advancePayment',
-            rules: [
-              {
-                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
             label: '已付人民币金额',
             prop: 'settlmentAmount',
             disabled: true,
+          },
+          {
+            label: '已付外币金额',
+            prop: 'foreignSettlmentAmount',
+            disabled: true,
+          },
+          {
+            label: '到港日期',
+            prop: 'dateOfArrival',
+            type:'date',
             rules: [
               {
-                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
             ]
           },
           {
-            label: '已付外币金额',
-            prop: 'foreignSettlmentAmount',
+            label: '已退人民币金额',
+            prop: 'refundSettlmentAmount',
+            disabled: true,
+          },
+          {
+            label: '已退外币金额',
+            prop: 'refundForeignSettlmentAmount',
             disabled: true,
+          },
+          {
+            label: '业务员',
+            prop: 'salesName',
+            dicData: [],
             rules: [
               {
-                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -826,6 +812,9 @@ export default {
           this.$set(this.form,"exchangeRate",item.remark)
         }
       })
+      if(this.form.orderAmount && this.form.orderAmount){
+        this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, this.form.exchangeRate).toFixed(2))
+      }
     },
     //计算人民币金额
     RMBChange(value){
@@ -1066,8 +1055,8 @@ export default {
       //采购明细提单号 list
       this.billData = {
         srcOrderno:this.form.orderNo,
-        itemType:"采购",
-        optionType:'JK',
+        itemType:"采购",    //区分采购还是销售
+        optionType:'JK',   //区分贸易类型
         billNoList: this.contactsData.map(item =>{return item.billNo}),
         price:this.form.salesPrice,
         corpsName:this.form.corpsName,
@@ -1076,7 +1065,6 @@ export default {
         currency:this.form.currency,
         exchangeRate:this.form.exchangeRate,
         srcParentId:this.form.id,
-        srcType:1
       }
       if(bool){ //申请货款
         this.billData.srcId = -1

+ 18 - 58
src/views/salesManagement/salesContract/detailsPage.vue

@@ -303,6 +303,8 @@
           @beforeFinance="beforeFinance"
           :disabled=" viewDisabled"
           :orderFeesList="orderFeesList"
+          :itemType="'采购'"
+          :optionType="'JK'"
           feeUrl=""
         />
         <upload-file
@@ -349,7 +351,6 @@
     >
       <apply-payment
         :billUrl="billUrl"
-        :itemType="'销售'"
         :billType="billType"
         :billData="billData"
         @choceFun="choceFun"
@@ -598,83 +599,41 @@ export default {
             label: '已收人民币金额',
             prop: 'settlmentAmount',
             disabled: true,
-            rules: [
-              {
-                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                message: ' ',
-                trigger: 'blur'
-              },
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },
           {
             label: '已收外币金额',
             prop: 'foreignSettlmentAmount',
             disabled: true,
-            rules: [
-              {
-                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                message: ' ',
-                trigger: 'blur'
-              },
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },
           {
             label: '计划交期',
             prop: 'plannedDeliveryDate',
             type: 'datetime',
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },
           {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+            label: '已退人民币金额',
+            prop: 'refundSettlmentAmount',
             disabled: true,
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },
           {
-            label: '码单重量',
-            prop: 'billWeight',
+            label: '已退外币金额',
+            prop: 'refundForeignSettlmentAmount',
             disabled: true,
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },
           {
             label: '业务员',
             prop: 'salesName',
             dicData: [],
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
+          },
+          {
+            label: '发票重量',
+            prop: 'invoiceWeight',
+            disabled: true,
+          },
+          {
+            label: '码单重量',
+            prop: 'billWeight',
+            disabled: true,
           },
           {
             label: '包装要求',
@@ -1155,7 +1114,8 @@ export default {
     //商品明细导入
     newDetails(){
       const params = {
-        price:this.form.salesPrice
+        price:this.form.salesPrice,
+        exRate:this.form.exchangeRate
       }
       this.$refs.importInventory.rowCellAdd(params);
     },