|  | @@ -30,7 +30,7 @@
 | 
	
		
			
				|  |  |            </el-dropdown-menu>
 | 
	
		
			
				|  |  |          </el-dropdown>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        <el-dropdown style="padding: 0 6px;line-height: 0">
 | 
	
		
			
				|  |  | +        <el-dropdown style="padding: 0 6px;line-height: 0" v-if="false">
 | 
	
		
			
				|  |  |            <el-button
 | 
	
		
			
				|  |  |              type="warning"
 | 
	
		
			
				|  |  |              :loading="buttonLoading"
 | 
	
	
		
			
				|  | @@ -324,8 +324,10 @@
 | 
	
		
			
				|  |  |            :optionType="'JK'"
 | 
	
		
			
				|  |  |            @beforeFinance="beforeFinance"
 | 
	
		
			
				|  |  |            @afterFinance="afterFinance"
 | 
	
		
			
				|  |  | +          @getBillNo="getBillNo"
 | 
	
		
			
				|  |  |            feeUrl=""
 | 
	
		
			
				|  |  |            :corpId="form.corpId"
 | 
	
		
			
				|  |  | +          :billNoList="billNoList"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |          <upload-file
 | 
	
		
			
				|  |  |            ref="uploadFile"
 | 
	
	
		
			
				|  | @@ -477,10 +479,11 @@ export default {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        form: {},
 | 
	
		
			
				|  |  |        disabled: false,
 | 
	
		
			
				|  |  | -      customerContact: {},
 | 
	
		
			
				|  |  | +      customerContact: customerContact,
 | 
	
		
			
				|  |  |        contactsForm: {},
 | 
	
		
			
				|  |  |        contactsData: [],
 | 
	
		
			
				|  |  |        itemTypeList:[],
 | 
	
		
			
				|  |  | +      billNoList:[],
 | 
	
		
			
				|  |  |        buttonLoading:false,
 | 
	
		
			
				|  |  |        buttonDisabled:false,
 | 
	
		
			
				|  |  |        applyPaymentDialog:false,
 | 
	
	
		
			
				|  | @@ -804,7 +807,7 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    async created() {
 | 
	
		
			
				|  |  | -    this.customerContact = await this.getColumnData(this.getColumnName(37), customerContact);
 | 
	
		
			
				|  |  | +    // this.customerContact = await this.getColumnData(this.getColumnName(37), customerContact);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      //币别
 | 
	
		
			
				|  |  |      this.getWorkDicts("currency").then(res =>{
 | 
	
	
		
			
				|  | @@ -910,6 +913,13 @@ export default {
 | 
	
		
			
				|  |  |        this.$set(this.form,"billWeight",billList.reduce((n,m) => n + m))
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    //获取明细列表提单号list
 | 
	
		
			
				|  |  | +    getBillNo(){
 | 
	
		
			
				|  |  | +      this.contactsData.forEach(item =>{
 | 
	
		
			
				|  |  | +        this.billNoList.push(item.billNo)
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      this.billNoList = Array.from(new Set(this.billNoList))
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //费用明细回调
 | 
	
		
			
				|  |  |      beforeFinance(feesData,callback){
 | 
	
		
			
				|  |  |        let params = {}
 | 
	
	
		
			
				|  | @@ -966,6 +976,9 @@ export default {
 | 
	
		
			
				|  |  |              if (this.contactsData[j].orderQuantity === (null || "")) {
 | 
	
		
			
				|  |  |                return this.$message.error(`请输入采购明细第${j + 1}行的件数`);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            if (this.contactsData[j].cntrNum === (null || 0)) {
 | 
	
		
			
				|  |  | +              return this.$message.error(`采购明细第${j + 1}行的箱量不能为空`);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (this.contactsData[j].invoiceWeight === (null || "")) {
 | 
	
		
			
				|  |  |                return this.$message.error(`请输入采购明细第${j + 1}行的发票重量`);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -1024,6 +1037,7 @@ export default {
 | 
	
		
			
				|  |  |              item.disabled = this.takeDisabled
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | +        this.getBillNo()
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if(form.orderFeesList){
 | 
	
		
			
				|  |  |          this.orderFeesList = form.orderFeesList
 | 
	
	
		
			
				|  | @@ -1100,31 +1114,117 @@ export default {
 | 
	
		
			
				|  |  |      //请核
 | 
	
		
			
				|  |  |      auditCheck(){
 | 
	
		
			
				|  |  |        if(this.verificationData()){
 | 
	
		
			
				|  |  | -        this.$confirm("确定审核此订单?", {
 | 
	
		
			
				|  |  | -          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | -          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | -          type: "warning"
 | 
	
		
			
				|  |  | -        }).then(()=>{
 | 
	
		
			
				|  |  | -          this.buttonLoading = true
 | 
	
		
			
				|  |  | -          const data = {
 | 
	
		
			
				|  |  | -            id : this.form.id,
 | 
	
		
			
				|  |  | -            checkType: 'cgqh',
 | 
	
		
			
				|  |  | -            url: '/purchase/contract/index',
 | 
	
		
			
				|  |  | -            pageStatus:"this.$store.getters.entranceCgStatus",
 | 
	
		
			
				|  |  | -            pageLabel:"采购订单",
 | 
	
		
			
				|  |  | -            checkFlag: 1,
 | 
	
		
			
				|  |  | +        let orderFeesList = this.$refs.feeInfo.submitData();
 | 
	
		
			
				|  |  | +        let receivableList = []; //应收
 | 
	
		
			
				|  |  | +        let copeWithList = []; //应付
 | 
	
		
			
				|  |  | +        orderFeesList.forEach(item =>{
 | 
	
		
			
				|  |  | +          if(item.isCheck == "0" && item.feesType == "1"){
 | 
	
		
			
				|  |  | +            receivableList.push(item)
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          pleaseCheck(data).then(res=>{
 | 
	
		
			
				|  |  | -            if(res.data.success){
 | 
	
		
			
				|  |  | -              this.$message.success("操作成功!")
 | 
	
		
			
				|  |  | -              this.viewDisabled = true
 | 
	
		
			
				|  |  | -              this.approverDisabled = true
 | 
	
		
			
				|  |  | +          if(item.isCheck == "0" && item.feesType == "2"){
 | 
	
		
			
				|  |  | +            copeWithList.push(item)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        // if(receivableList.length!=0 || copeWithList.length!=0 ){
 | 
	
		
			
				|  |  | +        //   this.$confirm("有未提交的费用,系统将自动提交,确定要提交吗??", {
 | 
	
		
			
				|  |  | +        //     confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        //     cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        //     type: "warning"
 | 
	
		
			
				|  |  | +        //   }).then(()=>{
 | 
	
		
			
				|  |  | +        //     for(let i=0;i<receivableList.length;i++){
 | 
	
		
			
				|  |  | +        //       if(receivableList[i].corpId != this.selectionList[0].corpId){
 | 
	
		
			
				|  |  | +        //         return this.$message.error('批量操作结算单位必须一致')
 | 
	
		
			
				|  |  | +        //       }
 | 
	
		
			
				|  |  | +        //     }
 | 
	
		
			
				|  |  | +        //     for(let i=0;i<copeWithList.length;i++){
 | 
	
		
			
				|  |  | +        //       if(copeWithList[i].corpId != this.selectionList[0].corpId){
 | 
	
		
			
				|  |  | +        //         return this.$message.error('批量操作结算单位必须一致')
 | 
	
		
			
				|  |  | +        //       }
 | 
	
		
			
				|  |  | +        //     }
 | 
	
		
			
				|  |  | +        //
 | 
	
		
			
				|  |  | +        //     this.selectionList.map(item =>{
 | 
	
		
			
				|  |  | +        //       // item.url = this.billUrl
 | 
	
		
			
				|  |  | +        //       item.srcOrderno = params.srcOrderno
 | 
	
		
			
				|  |  | +        //       item.srcParentId = params.parentId
 | 
	
		
			
				|  |  | +        //       item.corpsName = item.corpName
 | 
	
		
			
				|  |  | +        //       item.srcFeesId = item.id
 | 
	
		
			
				|  |  | +        //       item.costType = item.itemId
 | 
	
		
			
				|  |  | +        //       item.itemType = this.itemType
 | 
	
		
			
				|  |  | +        //       item.optionType = this.optionType
 | 
	
		
			
				|  |  | +        //       item.srcType = this.srcType   //费用明细申请
 | 
	
		
			
				|  |  | +        //       item.tradeType = this.optionType
 | 
	
		
			
				|  |  | +        //     })
 | 
	
		
			
				|  |  | +        //     let data = {
 | 
	
		
			
				|  |  | +        //       billType: type,
 | 
	
		
			
				|  |  | +        //       itemsList : this.selectionList,
 | 
	
		
			
				|  |  | +        //     }
 | 
	
		
			
				|  |  | +        //     if(type === '申请'){
 | 
	
		
			
				|  |  | +        //       this.$confirm("您确定申请付费吗?", "提示", {
 | 
	
		
			
				|  |  | +        //         confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        //         cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        //         type: "warning",
 | 
	
		
			
				|  |  | +        //       }).then(()=>{
 | 
	
		
			
				|  |  | +        //         this.buttonLoading = true
 | 
	
		
			
				|  |  | +        //
 | 
	
		
			
				|  |  | +        //         data.checkType = 'ffsq'
 | 
	
		
			
				|  |  | +        //         data.url = '/financialManagement/paymentRequest/index'
 | 
	
		
			
				|  |  | +        //         data.pageStatus = 'this.$store.getters.pqStatus'
 | 
	
		
			
				|  |  | +        //         data.pageLabel = '付费申请'
 | 
	
		
			
				|  |  | +        //
 | 
	
		
			
				|  |  | +        //         applyLoan(data).then(res=>{
 | 
	
		
			
				|  |  | +        //           if(res.data.success){
 | 
	
		
			
				|  |  | +        //             this.$message.success("操作成功!")
 | 
	
		
			
				|  |  | +        //             this.$emit("afterFinance")
 | 
	
		
			
				|  |  | +        //           }
 | 
	
		
			
				|  |  | +        //         }).finally(()=>{
 | 
	
		
			
				|  |  | +        //           this.buttonLoading = false
 | 
	
		
			
				|  |  | +        //         })
 | 
	
		
			
				|  |  | +        //       })
 | 
	
		
			
				|  |  | +        //     }else{
 | 
	
		
			
				|  |  | +        //       this.$confirm("您确定生成账单吗?", "提示", {
 | 
	
		
			
				|  |  | +        //         confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        //         cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        //         type: "warning",
 | 
	
		
			
				|  |  | +        //       }).then(()=>{
 | 
	
		
			
				|  |  | +        //         this.buttonLoading = true
 | 
	
		
			
				|  |  | +        //         paymentApply(data).then(res=>{
 | 
	
		
			
				|  |  | +        //           if(res.data.success){
 | 
	
		
			
				|  |  | +        //             this.$message.success("操作成功!")
 | 
	
		
			
				|  |  | +        //             this.$emit("afterFinance")
 | 
	
		
			
				|  |  | +        //           }
 | 
	
		
			
				|  |  | +        //         }).finally(()=>{
 | 
	
		
			
				|  |  | +        //           this.buttonLoading = false
 | 
	
		
			
				|  |  | +        //         })
 | 
	
		
			
				|  |  | +        //       })
 | 
	
		
			
				|  |  | +        //     }
 | 
	
		
			
				|  |  | +        //   })
 | 
	
		
			
				|  |  | +        // }else{
 | 
	
		
			
				|  |  | +          this.$confirm("确定审核此订单?", {
 | 
	
		
			
				|  |  | +            confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +            cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +            type: "warning"
 | 
	
		
			
				|  |  | +          }).then(()=>{
 | 
	
		
			
				|  |  | +            this.buttonLoading = true
 | 
	
		
			
				|  |  | +            const data = {
 | 
	
		
			
				|  |  | +              id : this.form.id,
 | 
	
		
			
				|  |  | +              checkType: 'cgqh',
 | 
	
		
			
				|  |  | +              url: '/purchase/contract/index',
 | 
	
		
			
				|  |  | +              pageStatus:"this.$store.getters.entranceCgStatus",
 | 
	
		
			
				|  |  | +              pageLabel:"采购订单",
 | 
	
		
			
				|  |  | +              checkFlag: 1,
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            pleaseCheck(data).then(res=>{
 | 
	
		
			
				|  |  | +              if(res.data.success){
 | 
	
		
			
				|  |  | +                this.$message.success("操作成功!")
 | 
	
		
			
				|  |  | +                this.viewDisabled = true
 | 
	
		
			
				|  |  | +                this.approverDisabled = true
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }).finally(()=>{
 | 
	
		
			
				|  |  | +            this.buttonLoading = false
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  | -        }).finally(()=>{
 | 
	
		
			
				|  |  | -          this.buttonLoading = false
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +        // }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //新增商品明细保存触发
 | 
	
	
		
			
				|  | @@ -1182,7 +1282,8 @@ export default {
 | 
	
		
			
				|  |  |      //录入明细
 | 
	
		
			
				|  |  |      commoditySelection() {
 | 
	
		
			
				|  |  |        const params = {
 | 
	
		
			
				|  |  | -        price:this.form.salesPrice
 | 
	
		
			
				|  |  | +        price:this.form.salesPrice,
 | 
	
		
			
				|  |  | +        cntrNum:1,
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.$refs.crudContact.rowCellAdd(params);
 | 
	
		
			
				|  |  |      },
 |