|  | @@ -1466,6 +1466,7 @@ export default {
 | 
	
		
			
				|  |  |      this.$set(this.form, 'predictOceanFreight', 0)
 | 
	
		
			
				|  |  |      this.$set(this.form, 'presenterIntegral' , 0)
 | 
	
		
			
				|  |  |      this.$set(this.form, 'convertIntegral' , 0)
 | 
	
		
			
				|  |  | +    this.$set(this.form, 'paymentType', '预付')
 | 
	
		
			
				|  |  |      let date = new Date();
 | 
	
		
			
				|  |  |      let year = date.getFullYear();
 | 
	
		
			
				|  |  |      let month = date.getMonth() + 1;
 | 
	
	
		
			
				|  | @@ -1872,7 +1873,8 @@ export default {
 | 
	
		
			
				|  |  |          taxRate: '0',
 | 
	
		
			
				|  |  |          accDate: this.form.businesDate,
 | 
	
		
			
				|  |  |          srcType: 1,
 | 
	
		
			
				|  |  | -        tradeType: 'GN'
 | 
	
		
			
				|  |  | +        tradeType: 'GN',
 | 
	
		
			
				|  |  | +        optionType: 'GN'
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if(bool){ //申请货款
 | 
	
		
			
				|  |  |          this.billData.srcId = -1
 | 
	
	
		
			
				|  | @@ -2062,6 +2064,7 @@ export default {
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              this.$set(this.goodsListSave[item], 'price', '0')
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | +          this.priceChange(this.goodsListSave[item])
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
 | 
	
		
			
				|  |  |            if (res.data.data.length > 0) {
 | 
	
	
		
			
				|  | @@ -2125,6 +2128,7 @@ export default {
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              this.$set(this.tableData[item], 'price', '0')
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | +          this.priceChange(this.tableData[item])
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          getPurchasePrice({code: this.tableData[item].code}).then(res => {
 | 
	
		
			
				|  |  |            if (res.data.data.length > 0) {
 | 
	
	
		
			
				|  | @@ -2191,7 +2195,6 @@ export default {
 | 
	
		
			
				|  |  |      closePolicy() {
 | 
	
		
			
				|  |  |        this.treePolicyId = '';
 | 
	
		
			
				|  |  |        this.dataPolicy = [];
 | 
	
		
			
				|  |  | -      this.policyForm = {};
 | 
	
		
			
				|  |  |        this.contactsDataBuyFree = [];
 | 
	
		
			
				|  |  |        this.policyData = []
 | 
	
		
			
				|  |  |        this.policyDataTwo = []
 | 
	
	
		
			
				|  | @@ -2314,6 +2317,9 @@ export default {
 | 
	
		
			
				|  |  |            this.$set(list[item], 'cname', list[item].productCategory)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'sort', this.maxGoodsNum + 1)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'purchaseAmount', list[item].purchasePrice)
 | 
	
		
			
				|  |  | +          // 积分
 | 
	
		
			
				|  |  | +          this.$set(list[item], 'integralMultiples', 0)
 | 
	
		
			
				|  |  | +          this.$set(list[item], 'integral', 0)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            if (listLength != 0) {
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'actualQuantity', 0)
 | 
	
	
		
			
				|  | @@ -2324,6 +2330,9 @@ export default {
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'cname', list[item].productCategory)
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'sort', this.maxGoodsNum + 2)
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'purchaseAmount', list[item].purchasePrice)
 | 
	
		
			
				|  |  | +            // 积分
 | 
	
		
			
				|  |  | +            this.$set(buyFree[item], 'integralMultiples', 0)
 | 
	
		
			
				|  |  | +            this.$set(buyFree[item], 'integral', 0)
 | 
	
		
			
				|  |  |              this.maxGoodsNum++
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            delete list[item].id
 | 
	
	
		
			
				|  | @@ -2418,6 +2427,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      policyOnLoad(params = {}) {
 | 
	
		
			
				|  |  |        // this.policyLoading = true;
 | 
	
		
			
				|  |  | +      this.policyForm = {};
 | 
	
		
			
				|  |  |        detailList(this.treePolicyId).then(res => {
 | 
	
		
			
				|  |  |          this.policyForm = res.data.data
 | 
	
		
			
				|  |  |          //特价促销
 | 
	
	
		
			
				|  | @@ -2563,16 +2573,6 @@ export default {
 | 
	
		
			
				|  |  |            this.$set(this.form, 'orderAmount', 0)
 | 
	
		
			
				|  |  |            // 成本价
 | 
	
		
			
				|  |  |            let purchaseAmount = 0
 | 
	
		
			
				|  |  | -          // 销售金额
 | 
	
		
			
				|  |  | -          this.form.orderAmount = 0;
 | 
	
		
			
				|  |  | -          // 计算销售金额
 | 
	
		
			
				|  |  | -          this.contactsData.forEach(item => {
 | 
	
		
			
				|  |  | -            if (item.purchaseAmount) {
 | 
	
		
			
				|  |  | -              purchaseAmount += (Number(item.purchaseAmount) * Number(item.orderQuantity)).toFixed(2)
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | -          this.computedCost()
 | 
	
		
			
				|  |  |            if (this.form.orderAmount && this.form.settlmentAmount) {
 | 
	
		
			
				|  |  |              this.$set(this.form, "balanceAmount", (Number(this.form.orderAmount) - Number(this.form.settlmentAmount)).toFixed(2));
 | 
	
		
			
				|  |  |            }
 | 
	
	
		
			
				|  | @@ -2582,6 +2582,18 @@ export default {
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              this.form.orderItemsList = this.goodsShowData.concat(this.giftData)
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | +          // 销售金额
 | 
	
		
			
				|  |  | +          this.form.orderAmount = 0;
 | 
	
		
			
				|  |  | +          // 计算销售金额
 | 
	
		
			
				|  |  | +          this.goodsShowData.forEach(item => {
 | 
	
		
			
				|  |  | +            if (item.goodType == 0) {
 | 
	
		
			
				|  |  | +              if (item.purchaseAmount) {
 | 
	
		
			
				|  |  | +                purchaseAmount += (Number(item.purchaseAmount) * Number(item.orderQuantity)).toFixed(2)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +              this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          this.computedCost()
 | 
	
		
			
				|  |  |            // 判断订货数量不能小于等于0
 | 
	
		
			
				|  |  |            for (let item in this.form.orderItemsList) {
 | 
	
		
			
				|  |  |              if (Number(this.form.orderItemsList[item].orderQuantity) <= 0) {
 | 
	
	
		
			
				|  | @@ -2667,7 +2679,6 @@ export default {
 | 
	
		
			
				|  |  |        this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(caseOverPayment)).toFixed(2)))
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      quantityChange(row) {
 | 
	
		
			
				|  |  | -      console.log(row)
 | 
	
		
			
				|  |  |        if (!row.orderQuantity) {
 | 
	
		
			
				|  |  |          row.orderQuantity = 0;
 | 
	
		
			
				|  |  |        } else {
 | 
	
	
		
			
				|  | @@ -2680,9 +2691,12 @@ export default {
 | 
	
		
			
				|  |  |        row.integral = (Number(row.orderQuantity) * Number(row.integralMultiples)).toFixed(2)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        if (this.goodsActives == 'goods') {
 | 
	
		
			
				|  |  | -        // this.$set(this.form, 'presenterIntegral' , 0)
 | 
	
		
			
				|  |  | +        // 计算销售金额
 | 
	
		
			
				|  |  | +        this.form.orderAmount = 0
 | 
	
		
			
				|  |  | +        // 计算赠送积分
 | 
	
		
			
				|  |  |          this.form.presenterIntegral = 0;
 | 
	
		
			
				|  |  |          this.goodsShowData.forEach(item => {
 | 
	
		
			
				|  |  | +          this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
 | 
	
		
			
				|  |  |            this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |        } else {
 | 
	
	
		
			
				|  | @@ -2693,12 +2707,18 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      priceChange(row) {
 | 
	
		
			
				|  |  | -      console.log(row.price)
 | 
	
		
			
				|  |  |        if (!row.price) {
 | 
	
		
			
				|  |  |          row.price = 0;
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          row.amount = (row.price * row.orderQuantity).toFixed(2)
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      if (this.goodsActives == 'goods') {
 | 
	
		
			
				|  |  | +        // 计算销售金额
 | 
	
		
			
				|  |  | +        this.form.orderAmount = 0
 | 
	
		
			
				|  |  | +        this.goodsShowData.forEach(item => {
 | 
	
		
			
				|  |  | +          this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //返回列表
 | 
	
		
			
				|  |  |      backToList() {
 | 
	
	
		
			
				|  | @@ -2749,6 +2769,18 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    async resetColumn() {
 | 
	
		
			
				|  |  | +      const inSave = await this.delColumnData(
 | 
	
		
			
				|  |  | +        this.getColumnName(15),
 | 
	
		
			
				|  |  | +        customerContact
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +      if (inSave) {
 | 
	
		
			
				|  |  | +        this.$message.success("重置成功");
 | 
	
		
			
				|  |  | +        this.option = option;
 | 
	
		
			
				|  |  | +        //关闭窗口
 | 
	
		
			
				|  |  | +        this.$refs.crud.$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      returnBack(row) {
 | 
	
		
			
				|  |  |        getlistBankBy(row.id).then(res =>{
 | 
	
		
			
				|  |  |          this.$set(this.form, 'banks', null)
 |