|  | @@ -21,8 +21,9 @@
 | 
	
		
			
				|  |  |                   @tree-load="treeLoad"
 | 
	
		
			
				|  |  |                   @saveColumn="saveColumn">
 | 
	
		
			
				|  |  |          <template slot="menuLeft" slot-scope="{size}">
 | 
	
		
			
				|  |  | -          <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="success" :size="size" icon="el-icon-copy-document" @click="copyOrder" :disabled="single">复制新单</el-button>
 | 
	
		
			
				|  |  |            <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="warning" :size="size" icon="el-icon-thumb" :disabled="multiple" @click="applyPayment">申请货款</el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="orgOrderNo">
 | 
	
		
			
				|  |  |            <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orgOrderNo }}</span>
 | 
	
	
		
			
				|  | @@ -71,6 +72,27 @@
 | 
	
		
			
				|  |  |        :detailData="detailData"
 | 
	
		
			
				|  |  |        v-else
 | 
	
		
			
				|  |  |      ></detail-page>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <el-dialog
 | 
	
		
			
				|  |  | +      title="账单"
 | 
	
		
			
				|  |  | +      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
 | 
	
		
			
				|  |  | +        v-if="applyPaymentDialog"
 | 
	
		
			
				|  |  | +        :billType="billType"
 | 
	
		
			
				|  |  | +        :billData="billData"
 | 
	
		
			
				|  |  | +        :arrList="applyPaymentList"
 | 
	
		
			
				|  |  | +        @choceFun="choceFun"
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +      </apply-payment>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -79,6 +101,7 @@ import option from "./configuration/mainList.json";
 | 
	
		
			
				|  |  |  import {customerList, deleteDetails} from "@/api/basicData/purchaseOrder"
 | 
	
		
			
				|  |  |  import detailPage from "./detailsPageEdit";
 | 
	
		
			
				|  |  |  import { defaultDate } from "@/util/date";
 | 
	
		
			
				|  |  | +import ApplyPayment from "@/components/finance/applyPayment";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "customerInformation",
 | 
	
	
		
			
				|  | @@ -88,7 +111,8 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  | -    detailPage
 | 
	
		
			
				|  |  | +    detailPage,
 | 
	
		
			
				|  |  | +    ApplyPayment,
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
	
		
			
				|  | @@ -119,6 +143,10 @@ export default {
 | 
	
		
			
				|  |  |        selection: [],
 | 
	
		
			
				|  |  |        isShow: true,
 | 
	
		
			
				|  |  |        detailData: {},
 | 
	
		
			
				|  |  | +      billType:"申请",  //账单类型
 | 
	
		
			
				|  |  | +      billData:{},     //账单需要数据
 | 
	
		
			
				|  |  | +      applyPaymentDialog:false,//生成账单组件
 | 
	
		
			
				|  |  | +      applyPaymentList: [],
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    async created() {
 | 
	
	
		
			
				|  | @@ -257,8 +285,11 @@ export default {
 | 
	
		
			
				|  |  |        console.log('1')
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      selectionChange(list) {
 | 
	
		
			
				|  |  | +      console.log(list)
 | 
	
		
			
				|  |  | +      this.selection = []
 | 
	
		
			
				|  |  |        this.selection = list;
 | 
	
		
			
				|  |  |        this.single = list.length !== 1;
 | 
	
		
			
				|  |  | +      this.multiple = list.length == 0
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      currentChange() {
 | 
	
		
			
				|  |  |        console.log('1')
 | 
	
	
		
			
				|  | @@ -300,6 +331,10 @@ export default {
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      goBack() {
 | 
	
		
			
				|  |  | +      this.selection = []
 | 
	
		
			
				|  |  | +      this.applyPaymentList = []
 | 
	
		
			
				|  |  | +      this.single = true
 | 
	
		
			
				|  |  | +      this.multiple = true
 | 
	
		
			
				|  |  |        this.detailData=this.$options.data().detailData
 | 
	
		
			
				|  |  |        this.isShow = true;
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -320,6 +355,47 @@ export default {
 | 
	
		
			
				|  |  |          this.$refs.crud.$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 申请货款
 | 
	
		
			
				|  |  | +    applyPayment() {
 | 
	
		
			
				|  |  | +      this.applyPaymentList = []
 | 
	
		
			
				|  |  | +      if (this.selection.length > 1) {
 | 
	
		
			
				|  |  | +        for (let item in this.selection) {
 | 
	
		
			
				|  |  | +          if (this.selection[0].corpId !== this.selection[item].corpId) {
 | 
	
		
			
				|  |  | +            return this.$message.error('批量结算供应商必须一致')
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      let a = []
 | 
	
		
			
				|  |  | +      console.log(this.selection)
 | 
	
		
			
				|  |  | +      this.selection.forEach(item => {
 | 
	
		
			
				|  |  | +        let form = {
 | 
	
		
			
				|  |  | +          form: {
 | 
	
		
			
				|  |  | +            srcOrderno:item.orderNo,
 | 
	
		
			
				|  |  | +            itemType:"采购",
 | 
	
		
			
				|  |  | +            corpsName:item.strCorpName,
 | 
	
		
			
				|  |  | +            corpId:item.corpId,
 | 
	
		
			
				|  |  | +            srcParentId: item.id,
 | 
	
		
			
				|  |  | +            currency: 'CNY',
 | 
	
		
			
				|  |  | +            exchangeRate: '1',
 | 
	
		
			
				|  |  | +            taxRate: '0',
 | 
	
		
			
				|  |  | +            accDate: item.businesDate,
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        a.push(form)
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      this.applyPaymentList = [...a]
 | 
	
		
			
				|  |  | +      // this.beforeBillData(true);
 | 
	
		
			
				|  |  | +      this.applyPaymentDialog = true;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    beforeBillData(type) {
 | 
	
		
			
				|  |  | +      if(type){ //申请货款
 | 
	
		
			
				|  |  | +        // this.billData.srcId = -1
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //关闭账单
 | 
	
		
			
				|  |  | +    choceFun(){
 | 
	
		
			
				|  |  | +      this.applyPaymentDialog  = false
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 |