|  | @@ -250,6 +250,7 @@ import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees";
 | 
	
		
			
				|  |  |  import { dateFormat } from "@/util/date";
 | 
	
		
			
				|  |  |  import reportDialog from "@/components/report-dialog/main";
 | 
	
		
			
				|  |  |  import { customerList as storageType } from "@/api/basicData/basicStorageType"
 | 
	
		
			
				|  |  | +import { number } from "echarts";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
		
			
				|  |  |    props: {
 | 
	
	
		
			
				|  | @@ -664,20 +665,20 @@ export default {
 | 
	
		
			
				|  |  |    //初始化查询
 | 
	
		
			
				|  |  |    async created() {
 | 
	
		
			
				|  |  |      //获取时间
 | 
	
		
			
				|  |  | -      let date = new Date();
 | 
	
		
			
				|  |  | -      let year = date.getFullYear();
 | 
	
		
			
				|  |  | -      let month = date.getMonth() + 1;
 | 
	
		
			
				|  |  | -      let day = date.getDate();
 | 
	
		
			
				|  |  | -      if (month < 10) {
 | 
	
		
			
				|  |  | -        month = "0" + month;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (day < 10) {
 | 
	
		
			
				|  |  | -        day = "0" + day;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      let hours = String(date.getHours()).padStart(2, '0');
 | 
	
		
			
				|  |  | -      let minutes = String(date.getMinutes()).padStart(2, '0');
 | 
	
		
			
				|  |  | -      let seconds = String(date.getSeconds()).padStart(2, '0');
 | 
	
		
			
				|  |  | -      let nowDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 | 
	
		
			
				|  |  | +    let date = new Date();
 | 
	
		
			
				|  |  | +    let year = date.getFullYear();
 | 
	
		
			
				|  |  | +    let month = date.getMonth() + 1;
 | 
	
		
			
				|  |  | +    let day = date.getDate();
 | 
	
		
			
				|  |  | +    if (month < 10) {
 | 
	
		
			
				|  |  | +      month = "0" + month;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if (day < 10) {
 | 
	
		
			
				|  |  | +      day = "0" + day;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    let hours = String(date.getHours()).padStart(2, '0');
 | 
	
		
			
				|  |  | +    let minutes = String(date.getMinutes()).padStart(2, '0');
 | 
	
		
			
				|  |  | +    let seconds = String(date.getSeconds()).padStart(2, '0');
 | 
	
		
			
				|  |  | +    let nowDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 | 
	
		
			
				|  |  |      this.rowHeight = (window.innerHeight - 130) + 'px'
 | 
	
		
			
				|  |  |      this.customerContact = await this.getColumnData(this.getColumnName(24), customerContact);
 | 
	
		
			
				|  |  |      this.advantageProject = await this.getColumnData(this.getColumnName(25), advantageProject);
 | 
	
	
		
			
				|  | @@ -737,11 +738,11 @@ export default {
 | 
	
		
			
				|  |  |        // console.log('324',this.form.cntrVolumn);
 | 
	
		
			
				|  |  |        this.$set(this.form, 'orgId', this.form.id);
 | 
	
		
			
				|  |  |        this.$set(this.form, 'srcId', this.form.id);
 | 
	
		
			
				|  |  | -      this.$set(this.form,"purchaseMode",'现金采购');
 | 
	
		
			
				|  |  | -      this.$set(this.form,"warehouseType",'自有库');
 | 
	
		
			
				|  |  | +      this.$set(this.form, "purchaseMode", '现金采购');
 | 
	
		
			
				|  |  | +      this.$set(this.form, "warehouseType", '自有库');
 | 
	
		
			
				|  |  |        // this.$set(this.form,"storageId",'仓库');
 | 
	
		
			
				|  |  | -      this.$set(this.form,"businessDate",nowDate);
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  | +      this.$set(this.form, "businessDate", nowDate);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        delete this.form.createTime
 | 
	
		
			
				|  |  |        delete this.form.id
 | 
	
		
			
				|  |  |        delete this.form.sysNo
 | 
	
	
		
			
				|  | @@ -988,6 +989,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //点击费用明细选择触发
 | 
	
		
			
				|  |  |      choice(row) {
 | 
	
		
			
				|  |  | +      console.log(21321412);
 | 
	
		
			
				|  |  |        this.dialogCost = !this.dialogCost
 | 
	
		
			
				|  |  |        this.choiceData = true
 | 
	
		
			
				|  |  |        // console.log(row)
 | 
	
	
		
			
				|  | @@ -1029,6 +1031,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //费用编辑导入触发
 | 
	
		
			
				|  |  |      choiceCost() {
 | 
	
		
			
				|  |  | +      console.log(2132);
 | 
	
		
			
				|  |  |        if (this.tableDataCost.length === 1) {
 | 
	
		
			
				|  |  |          this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
 | 
	
		
			
				|  |  |          this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
 | 
	
	
		
			
				|  | @@ -1040,6 +1043,7 @@ export default {
 | 
	
		
			
				|  |  |      //费用导入触发
 | 
	
		
			
				|  |  |      importCost() {
 | 
	
		
			
				|  |  |        // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
 | 
	
		
			
				|  |  | +      console.log(232);
 | 
	
		
			
				|  |  |        if (this.tableDataCost.length > 0) {
 | 
	
		
			
				|  |  |          for (let item in this.tableDataCost) {
 | 
	
		
			
				|  |  |            // console.log(this.tableDataCost[item])
 | 
	
	
		
			
				|  | @@ -1190,6 +1194,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //新增费用明细保存触发
 | 
	
		
			
				|  |  |      rowSaveProject(row, done, loading) {
 | 
	
		
			
				|  |  | +      console.log(row);
 | 
	
		
			
				|  |  |        // this.advantageProjectData.push(row)
 | 
	
		
			
				|  |  |        done()
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -1280,12 +1285,12 @@ export default {
 | 
	
		
			
				|  |  |            if (this.contactsData.length == 0) {
 | 
	
		
			
				|  |  |              return this.$message.error('商品信息为空')
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          for(let k=0;k<this.contactsData.length;k++){
 | 
	
		
			
				|  |  | +          for (let k = 0; k < this.contactsData.length; k++) {
 | 
	
		
			
				|  |  |              if (!this.contactsData[k].storageId) {
 | 
	
		
			
				|  |  | -            return this.$message.error('请选择库区')
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +              return this.$message.error('请选择库区')
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |            if (contrastObj(this.form, this.oldForm) ||
 | 
	
		
			
				|  |  |              contrastList(this.contactsData, this.oldGoodsList) ||
 | 
	
		
			
				|  |  |              // contrastList(this.advantageProjectData, this.oldFeesList) ||
 | 
	
	
		
			
				|  | @@ -1352,13 +1357,12 @@ export default {
 | 
	
		
			
				|  |  |      editCustomer(isBack = false, type) {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  | -          this.contactsData.forEach(item=>{
 | 
	
		
			
				|  |  | -            if(!item.storageId){
 | 
	
		
			
				|  |  | +          this.contactsData.forEach(item => {
 | 
	
		
			
				|  |  | +            if (!item.storageId) {
 | 
	
		
			
				|  |  |                this.$message.error('请选择库区')
 | 
	
		
			
				|  |  |                return
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  | -          console.log('4353',this.contactsData.storageId);
 | 
	
		
			
				|  |  |            this.form.deliveryAmount = 0
 | 
	
		
			
				|  |  |            this.form.totalQuantity = 0
 | 
	
		
			
				|  |  |            // this.form.purchaseAmount = 0
 | 
	
	
		
			
				|  | @@ -1375,6 +1379,17 @@ export default {
 | 
	
		
			
				|  |  |            // this.form.deliveryFeesList = this.advantageProjectData
 | 
	
		
			
				|  |  |            this.form.deliveryFeesList = this.$refs.feeInfo.submitData()
 | 
	
		
			
				|  |  |            this.form.deliveryFilesList = this.bankOfDepositData
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          // this.form.deliveryFeesList
 | 
	
		
			
				|  |  | +          // 计算 deliveryFeesList 中 amount 的总和
 | 
	
		
			
				|  |  | +          let totalAmount = 0;
 | 
	
		
			
				|  |  | +          for(i=0;i<this.form.deliveryFeesList.length;i++){ 
 | 
	
		
			
				|  |  | +            totalAmount +=  this.form.deliveryFeesList[i].amount
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          console.log(totalAmount);
 | 
	
		
			
				|  |  | +          //计算费用明细
 | 
	
		
			
				|  |  | +          this.form.number = Number(this.form.purchaseAmount) + totalAmount
 | 
	
		
			
				|  |  | +          console.log(this.form.number);
 | 
	
		
			
				|  |  |            if (typeof this.form.corpsTypeId == 'object') {
 | 
	
		
			
				|  |  |              this.form.corpsTypeId = this.form.corpsTypeId.join(",")
 | 
	
		
			
				|  |  |            }
 | 
	
	
		
			
				|  | @@ -1484,6 +1499,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //费用明细回调
 | 
	
		
			
				|  |  |      beforeFinance(feesData, callback) {
 | 
	
		
			
				|  |  | +      console.log(123214);
 | 
	
		
			
				|  |  |        this.advantageProjectData = feesData;
 | 
	
		
			
				|  |  |        let params = {}
 | 
	
		
			
				|  |  |        //暂时默认通过  之后优化
 |