|  | @@ -507,7 +507,7 @@
 | 
	
		
			
				|  |  |              width="180"
 | 
	
		
			
				|  |  |              label="货物体积">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <el-input-number :controls="false" v-model="scope.row.volume" size="small" :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2"></el-input-number>
 | 
	
		
			
				|  |  | +            <el-input-number :controls="false" v-model="scope.row.volume" size="small" :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2" @change="calculateFreight()"></el-input-number>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column
 | 
	
	
		
			
				|  | @@ -533,7 +533,7 @@
 | 
	
		
			
				|  |  |              label="重量">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |              <el-input v-model="scope.row.weight" :disabled="goodsForm.status !== 0" size="small"
 | 
	
		
			
				|  |  | -                      placeholder="请输入内容"></el-input>
 | 
	
		
			
				|  |  | +                      placeholder="请输入内容" @input="calculateFreight()"></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column
 | 
	
	
		
			
				|  | @@ -543,7 +543,7 @@
 | 
	
		
			
				|  |  |              label="件数">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |              <el-input v-model="scope.row.quantity" :disabled="goodsForm.status !== 0" size="small"
 | 
	
		
			
				|  |  | -                      placeholder="请输入内容"></el-input>
 | 
	
		
			
				|  |  | +                      placeholder="请输入内容" @input="calculateFreight()"></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column
 | 
	
	
		
			
				|  | @@ -733,7 +733,7 @@
 | 
	
		
			
				|  |  |              width="180"
 | 
	
		
			
				|  |  |              label="货物体积">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <el-input-number :controls="false" v-model="scope.row.volume" size="small" :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2"></el-input-number>
 | 
	
		
			
				|  |  | +            <el-input-number :controls="false" v-model="scope.row.volume" size="small" :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2" @change="calculateFreight()"></el-input-number>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column
 | 
	
	
		
			
				|  | @@ -762,6 +762,7 @@
 | 
	
		
			
				|  |  |                  v-model="scope.row.weight"
 | 
	
		
			
				|  |  |                  :disabled="goodsForm.status !== 0"
 | 
	
		
			
				|  |  |                  size="small"
 | 
	
		
			
				|  |  | +                @input="calculateFreight()"
 | 
	
		
			
				|  |  |                  placeholder="请输入内容"></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
	
		
			
				|  | @@ -775,6 +776,7 @@
 | 
	
		
			
				|  |  |                  v-model="scope.row.quantity"
 | 
	
		
			
				|  |  |                  :disabled="goodsForm.status !== 0"
 | 
	
		
			
				|  |  |                  size="small"
 | 
	
		
			
				|  |  | +                @input="calculateFreight()"
 | 
	
		
			
				|  |  |                  placeholder="请输入内容"></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
	
		
			
				|  | @@ -1630,8 +1632,51 @@ export default {
 | 
	
		
			
				|  |  |              trigger: "blur"
 | 
	
		
			
				|  |  |            }],
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  | +          label: '计价单位',
 | 
	
		
			
				|  |  | +          span: 6,
 | 
	
		
			
				|  |  | +          type: "select",
 | 
	
		
			
				|  |  | +          dicUrl: "/api/blade-system/dict-biz/dictionary?code=count_unit",
 | 
	
		
			
				|  |  | +          props: {
 | 
	
		
			
				|  |  | +            label: "dictValue",
 | 
	
		
			
				|  |  | +            value: "dictKey"
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          prop: 'pricingUnit',
 | 
	
		
			
				|  |  | +          change:(data)=>{
 | 
	
		
			
				|  |  | +            this.goodsForm.pricingUnit = data.value
 | 
	
		
			
				|  |  | +            this.calculateFreight(data)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '装卸货',
 | 
	
		
			
				|  |  | +          span: 6,
 | 
	
		
			
				|  |  | +          type: "select",
 | 
	
		
			
				|  |  | +          prop: 'loadingUnloading',
 | 
	
		
			
				|  |  | +          props: {
 | 
	
		
			
				|  |  | +            label: "dictValue",
 | 
	
		
			
				|  |  | +            value: "dictValue"
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          dicData:[{
 | 
	
		
			
				|  |  | +            dictValue:'装货'
 | 
	
		
			
				|  |  | +          },{
 | 
	
		
			
				|  |  | +            dictValue:'卸货'
 | 
	
		
			
				|  |  | +          }],
 | 
	
		
			
				|  |  | +          change:(data)=>{
 | 
	
		
			
				|  |  | +            this.goodsForm.loadingUnloading = data.value
 | 
	
		
			
				|  |  | +            this.calculateFreight(data)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '单价',
 | 
	
		
			
				|  |  | +          span: 6,
 | 
	
		
			
				|  |  | +          prop: 'unitPrice',
 | 
	
		
			
				|  |  | +          change:(data)=>{
 | 
	
		
			
				|  |  | +            this.goodsForm.unitPrice = data.value
 | 
	
		
			
				|  |  | +            this.calculateFreight(data)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            label: '单车运费',
 | 
	
		
			
				|  |  |            span: 6,
 | 
	
		
			
				|  |  | +          type: 'number',
 | 
	
		
			
				|  |  | +          controls:false,
 | 
	
		
			
				|  |  | +          precision:2,
 | 
	
		
			
				|  |  |            prop: 'freightCollect'
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |            // , {
 | 
	
	
		
			
				|  | @@ -2315,6 +2360,59 @@ export default {
 | 
	
		
			
				|  |  |      this.$refs.other.show = false
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    //单车运费计算
 | 
	
		
			
				|  |  | +    calculateFreight(data){
 | 
	
		
			
				|  |  | +      if (this.goodsForm.pricingUnit && this.goodsForm.loadingUnloading && this.goodsForm.unitPrice){
 | 
	
		
			
				|  |  | +        if (this.goodsForm.loadingUnloading == '装货'){
 | 
	
		
			
				|  |  | +          if (this.goodsForm.pricingUnit == '体积'){
 | 
	
		
			
				|  |  | +            this.goodsForm.freightCollect = 0
 | 
	
		
			
				|  |  | +            this.tableData.forEach(item=>{
 | 
	
		
			
				|  |  | +              if (item.volume){
 | 
	
		
			
				|  |  | +                this.goodsForm.freightCollect += Number(item.volume) * Number(this.goodsForm.unitPrice)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +            // unitPrice
 | 
	
		
			
				|  |  | +          }else if (this.goodsForm.pricingUnit == '重量'){
 | 
	
		
			
				|  |  | +            this.goodsForm.freightCollect = 0
 | 
	
		
			
				|  |  | +            this.tableData.forEach(item=>{
 | 
	
		
			
				|  |  | +              if (item.weight){
 | 
	
		
			
				|  |  | +                this.goodsForm.freightCollect += Number(item.weight) * Number(this.goodsForm.unitPrice)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }else if (this.goodsForm.pricingUnit == '件数'){
 | 
	
		
			
				|  |  | +            this.goodsForm.freightCollect = 0
 | 
	
		
			
				|  |  | +            this.tableData.forEach(item=>{
 | 
	
		
			
				|  |  | +              if (item.quantity){
 | 
	
		
			
				|  |  | +                this.goodsForm.freightCollect += Number(item.quantity) * Number(this.goodsForm.unitPrice)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }else {
 | 
	
		
			
				|  |  | +          if (this.goodsForm.pricingUnit == '体积'){
 | 
	
		
			
				|  |  | +            this.goodsForm.freightCollect = 0
 | 
	
		
			
				|  |  | +            this.tableDataTwo.forEach(item=>{
 | 
	
		
			
				|  |  | +              if (item.volume){
 | 
	
		
			
				|  |  | +                this.goodsForm.freightCollect += Number(item.volume) * Number(this.goodsForm.unitPrice)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }else if (this.goodsForm.pricingUnit == '重量'){
 | 
	
		
			
				|  |  | +            this.goodsForm.freightCollect = 0
 | 
	
		
			
				|  |  | +            this.tableDataTwo.forEach(item=>{
 | 
	
		
			
				|  |  | +              if (item.weight){
 | 
	
		
			
				|  |  | +                this.goodsForm.freightCollect += Number(item.weight) * Number(this.goodsForm.unitPrice)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }else if (this.goodsForm.pricingUnit == '件数'){
 | 
	
		
			
				|  |  | +            this.goodsForm.freightCollect = 0
 | 
	
		
			
				|  |  | +            this.tableDataTwo.forEach(item=>{
 | 
	
		
			
				|  |  | +              if (item.quantity){
 | 
	
		
			
				|  |  | +                this.goodsForm.freightCollect += Number(item.quantity) * Number(this.goodsForm.unitPrice)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      openTrack(row) {
 | 
	
		
			
				|  |  |        gaude({itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
 | 
	
		
			
				|  |  |          this.lineArr = res.data.data.trackArray
 | 
	
	
		
			
				|  | @@ -2474,7 +2572,7 @@ export default {
 | 
	
		
			
				|  |  |        if (id) {
 | 
	
		
			
				|  |  |          ids = id
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -        ids = this.id
 | 
	
		
			
				|  |  | +        ids = this.goodsForm.id
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        detailDelegationList({id: ids}).then(res => {
 | 
	
		
			
				|  |  |          this.goodsForm = res.data.data
 | 
	
	
		
			
				|  | @@ -2566,9 +2664,11 @@ export default {
 | 
	
		
			
				|  |  |        if (scope.row.id) {
 | 
	
		
			
				|  |  |          tRemove({ids: scope.row.id}).then(res => {
 | 
	
		
			
				|  |  |            this.tableData.splice(scope.$index, 1);
 | 
	
		
			
				|  |  | +          this.calculateFreight()
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          this.tableData.splice(scope.$index, 1);
 | 
	
		
			
				|  |  | +        this.calculateFreight()
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //删除途径地址
 |