|  | @@ -1058,6 +1058,7 @@ import trackPlayback from "@/components/trackPlayback"
 | 
	
		
			
				|  |  |  import {fleetList, telephone} from "@/api/landTransportation";
 | 
	
		
			
				|  |  |  import {getDictionary} from "@/api/system/dictbiz";
 | 
	
		
			
				|  |  |  import {allCropList, customerList} from "@/api/basicData/customerInformation";
 | 
	
		
			
				|  |  | +import {contrastList, contrastObj} from "@/util/contrastData";
 | 
	
		
			
				|  |  |  // goodsOptionFormTwo
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    comments: {
 | 
	
	
		
			
				|  | @@ -1129,7 +1130,7 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1) {
 | 
	
		
			
				|  |  | -          this.findObject(this.goodsOptionForm.column,'freightCollect').display = false
 | 
	
		
			
				|  |  | +          this.findObject(this.goodsOptionForm.column, 'freightCollect').display = false
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -1153,6 +1154,12 @@ export default {
 | 
	
		
			
				|  |  |        salesmanList: [],
 | 
	
		
			
				|  |  |        vehicleList: [],
 | 
	
		
			
				|  |  |        packageType: [],
 | 
	
		
			
				|  |  | +      oldgoodsForm: {},
 | 
	
		
			
				|  |  | +      oldtableData: [],
 | 
	
		
			
				|  |  | +      oldtableDataTwo: [],
 | 
	
		
			
				|  |  | +      oldentrustList: [],
 | 
	
		
			
				|  |  | +      oldvehicleList: [],
 | 
	
		
			
				|  |  | +      oldorderFilesList: [],
 | 
	
		
			
				|  |  |        breakConfiguration: {
 | 
	
		
			
				|  |  |          multipleChoices: false,
 | 
	
		
			
				|  |  |          multiple: false,
 | 
	
	
		
			
				|  | @@ -2235,9 +2242,16 @@ export default {
 | 
	
		
			
				|  |  |            this.tableData = res.data.data.loadingAddressList || []
 | 
	
		
			
				|  |  |            this.tableDataTwo = res.data.data.unloadedAddressList || []
 | 
	
		
			
				|  |  |            this.entrustList = res.data.data.itemList
 | 
	
		
			
				|  |  | -          this.goodsList = res.data.data.itemList
 | 
	
		
			
				|  |  |            this.vehicleList = res.data.data.orderItemList
 | 
	
		
			
				|  |  |            this.orderFilesList = res.data.data.fileList || []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          this.oldgoodsForm = res.data.data
 | 
	
		
			
				|  |  | +          this.oldtableData = this.deepClone(res.data.data.loadingAddressList || [])
 | 
	
		
			
				|  |  | +          this.oldtableDataTwo = this.deepClone(res.data.data.unloadedAddressList || [])
 | 
	
		
			
				|  |  | +          this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +          this.oldvehicleList = this.deepClone(res.data.data.orderItemList)
 | 
	
		
			
				|  |  | +          this.oldorderFilesList = this.deepClone(res.data.data.fileList || [])
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |            this.goodsForm.status = 0
 | 
	
		
			
				|  |  |            if (res.data.data.orderFeeList.length > 0) {
 | 
	
		
			
				|  |  |              res.data.data.orderFeeList.forEach(item => {
 | 
	
	
		
			
				|  | @@ -2283,6 +2297,13 @@ export default {
 | 
	
		
			
				|  |  |            this.goodsList = res.data.data.itemList
 | 
	
		
			
				|  |  |            this.vehicleList = res.data.data.orderItemList
 | 
	
		
			
				|  |  |            this.orderFilesList = res.data.data.fileList || []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          this.oldgoodsForm = res.data.data
 | 
	
		
			
				|  |  | +          this.oldtableData = this.deepClone(res.data.data.loadingAddressList || [])
 | 
	
		
			
				|  |  | +          this.oldtableDataTwo = this.deepClone(res.data.data.unloadedAddressList || [])
 | 
	
		
			
				|  |  | +          this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +          this.oldvehicleList = this.deepClone(res.data.data.orderItemList)
 | 
	
		
			
				|  |  | +          this.oldorderFilesList = this.deepClone(res.data.data.fileList || [])
 | 
	
		
			
				|  |  |            if (res.data.data.orderFeeList.length > 0) {
 | 
	
		
			
				|  |  |              res.data.data.orderFeeList.forEach(item => {
 | 
	
		
			
				|  |  |                if (item.type == 1) {
 | 
	
	
		
			
				|  | @@ -2320,6 +2341,13 @@ export default {
 | 
	
		
			
				|  |  |            this.goodsList = res.data.data.itemList
 | 
	
		
			
				|  |  |            this.vehicleList = res.data.data.orderItemList
 | 
	
		
			
				|  |  |            this.orderFilesList = res.data.data.fileList || []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          this.oldgoodsForm = res.data.data
 | 
	
		
			
				|  |  | +          this.oldtableData = this.deepClone(res.data.data.loadingAddressList || [])
 | 
	
		
			
				|  |  | +          this.oldtableDataTwo = this.deepClone(res.data.data.unloadedAddressList || [])
 | 
	
		
			
				|  |  | +          this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +          this.oldvehicleList = this.deepClone(res.data.data.orderItemList)
 | 
	
		
			
				|  |  | +          this.oldorderFilesList = this.deepClone(res.data.data.fileList || [])
 | 
	
		
			
				|  |  |            if (res.data.data.orderFeeList.length > 0) {
 | 
	
		
			
				|  |  |              res.data.data.orderFeeList.forEach(item => {
 | 
	
		
			
				|  |  |                if (item.type == 1) {
 | 
	
	
		
			
				|  | @@ -2362,6 +2390,13 @@ export default {
 | 
	
		
			
				|  |  |          this.salesmanQuery('', true)
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |        this.entrustList = []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this.oldgoodsForm = this.goodsForm
 | 
	
		
			
				|  |  | +      this.oldtableData = this.deepClone(this.tableData)
 | 
	
		
			
				|  |  | +      this.oldtableDataTwo = this.deepClone(this.tableDataTwo)
 | 
	
		
			
				|  |  | +      this.oldentrustList = this.deepClone(this.entrustList)
 | 
	
		
			
				|  |  | +      this.oldvehicleList = this.deepClone(this.vehicleList)
 | 
	
		
			
				|  |  | +      this.oldorderFilesList = this.deepClone(this.orderFilesList)
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      // 非租户模式默认加载管理组数据
 | 
	
		
			
				|  |  |      if (!website.tenantMode) {
 | 
	
	
		
			
				|  | @@ -2615,6 +2650,12 @@ export default {
 | 
	
		
			
				|  |  |          this.goodsList = res.data.data.itemList
 | 
	
		
			
				|  |  |          this.vehicleList = res.data.data.orderItemList
 | 
	
		
			
				|  |  |          this.orderFilesList = res.data.data.fileList || []
 | 
	
		
			
				|  |  | +        this.oldgoodsForm = res.data.data
 | 
	
		
			
				|  |  | +        this.oldtableData = this.deepClone(res.data.data.loadingAddressList || [])
 | 
	
		
			
				|  |  | +        this.oldtableDataTwo = this.deepClone(res.data.data.unloadedAddressList || [])
 | 
	
		
			
				|  |  | +        this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +        this.oldvehicleList = this.deepClone(res.data.data.orderItemList)
 | 
	
		
			
				|  |  | +        this.oldorderFilesList = this.deepClone(res.data.data.fileList || [])
 | 
	
		
			
				|  |  |          if (res.data.data.orderFeeList) {
 | 
	
		
			
				|  |  |            if (res.data.data.orderFeeList.length > 0) {
 | 
	
		
			
				|  |  |              this.collectionList = []
 | 
	
	
		
			
				|  | @@ -2677,20 +2718,86 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //返回主列表
 | 
	
		
			
				|  |  |      backToList(value) {
 | 
	
		
			
				|  |  | -      if (value === 0) {
 | 
	
		
			
				|  |  | -        this.goodsForm = {}
 | 
	
		
			
				|  |  | -        this.$emit('backToList')
 | 
	
		
			
				|  |  | -      } else if (value === 1) {
 | 
	
		
			
				|  |  | -        this.goodsForm = {}
 | 
	
		
			
				|  |  | -        this.$emit('backToList', true)
 | 
	
		
			
				|  |  | -      } else if (value === 2) {
 | 
	
		
			
				|  |  | -        this.$router.push({
 | 
	
		
			
				|  |  | -          path: '/wel/index'
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -      } else if (value === 3) {
 | 
	
		
			
				|  |  | -        this.$router.push({
 | 
	
		
			
				|  |  | -          path: '/landTransportation/bulkReportAnalysis/index'
 | 
	
		
			
				|  |  | +      console.log(JSON.stringify(this.goodsForm))
 | 
	
		
			
				|  |  | +      console.log(JSON.stringify(this.oldgoodsForm))
 | 
	
		
			
				|  |  | +      console.log(
 | 
	
		
			
				|  |  | +          contrastObj(this.goodsForm, this.oldgoodsForm)
 | 
	
		
			
				|  |  | +          , contrastList(this.tableData, this.oldtableData)
 | 
	
		
			
				|  |  | +          , contrastList(this.tableDataTwo, this.oldtableDataTwo)
 | 
	
		
			
				|  |  | +          , contrastList(this.entrustList, this.oldentrustList)
 | 
	
		
			
				|  |  | +          , contrastList(this.vehicleList, this.oldvehicleList)
 | 
	
		
			
				|  |  | +          , contrastList(this.orderFilesList, this.oldorderFilesList)
 | 
	
		
			
				|  |  | +      )
 | 
	
		
			
				|  |  | +      if (contrastObj(this.goodsForm, this.oldgoodsForm)
 | 
	
		
			
				|  |  | +          || contrastList(this.tableData, this.oldtableData)
 | 
	
		
			
				|  |  | +          || contrastList(this.tableDataTwo, this.oldtableDataTwo)
 | 
	
		
			
				|  |  | +          || contrastList(this.entrustList, this.oldentrustList)
 | 
	
		
			
				|  |  | +          || contrastList(this.vehicleList, this.oldvehicleList)
 | 
	
		
			
				|  |  | +          || contrastList(this.orderFilesList, this.oldorderFilesList)) {
 | 
	
		
			
				|  |  | +        this.$confirm("数据发生变化未有保存记录, 是否保存?", "提示", {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning"
 | 
	
		
			
				|  |  | +        }).then(() => {
 | 
	
		
			
				|  |  | +          this.type = true
 | 
	
		
			
				|  |  | +          saveSaveList({
 | 
	
		
			
				|  |  | +            ...this.goodsForm,
 | 
	
		
			
				|  |  | +            loadingAddressList: this.tableData,
 | 
	
		
			
				|  |  | +            unloadedAddressList: this.tableDataTwo,
 | 
	
		
			
				|  |  | +            fileList: this.orderFilesList,
 | 
	
		
			
				|  |  | +            itemList: this.entrustList,
 | 
	
		
			
				|  |  | +            orderFeeList: this.collectionList.concat(this.paymentList)
 | 
	
		
			
				|  |  | +          }).then(res => {
 | 
	
		
			
				|  |  | +            this.$message.success('保存成功');
 | 
	
		
			
				|  |  | +            if (value === 0) {
 | 
	
		
			
				|  |  | +              this.goodsForm = {}
 | 
	
		
			
				|  |  | +              this.$emit('backToList')
 | 
	
		
			
				|  |  | +            } else if (value === 1) {
 | 
	
		
			
				|  |  | +              this.goodsForm = {}
 | 
	
		
			
				|  |  | +              this.$emit('backToList', true)
 | 
	
		
			
				|  |  | +            } else if (value === 2) {
 | 
	
		
			
				|  |  | +              this.$router.push({
 | 
	
		
			
				|  |  | +                path: '/wel/index'
 | 
	
		
			
				|  |  | +              });
 | 
	
		
			
				|  |  | +            } else if (value === 3) {
 | 
	
		
			
				|  |  | +              this.$router.push({
 | 
	
		
			
				|  |  | +                path: '/landTransportation/bulkReportAnalysis/index'
 | 
	
		
			
				|  |  | +              });
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        }).catch(() => {
 | 
	
		
			
				|  |  | +          if (value === 0) {
 | 
	
		
			
				|  |  | +            this.goodsForm = {}
 | 
	
		
			
				|  |  | +            this.$emit('backToList')
 | 
	
		
			
				|  |  | +          } else if (value === 1) {
 | 
	
		
			
				|  |  | +            this.goodsForm = {}
 | 
	
		
			
				|  |  | +            this.$emit('backToList', true)
 | 
	
		
			
				|  |  | +          } else if (value === 2) {
 | 
	
		
			
				|  |  | +            this.$router.push({
 | 
	
		
			
				|  |  | +              path: '/wel/index'
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          } else if (value === 3) {
 | 
	
		
			
				|  |  | +            this.$router.push({
 | 
	
		
			
				|  |  | +              path: '/landTransportation/bulkReportAnalysis/index'
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        if (value === 0) {
 | 
	
		
			
				|  |  | +          this.goodsForm = {}
 | 
	
		
			
				|  |  | +          this.$emit('backToList')
 | 
	
		
			
				|  |  | +        } else if (value === 1) {
 | 
	
		
			
				|  |  | +          this.goodsForm = {}
 | 
	
		
			
				|  |  | +          this.$emit('backToList', true)
 | 
	
		
			
				|  |  | +        } else if (value === 2) {
 | 
	
		
			
				|  |  | +          this.$router.push({
 | 
	
		
			
				|  |  | +            path: '/wel/index'
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        } else if (value === 3) {
 | 
	
		
			
				|  |  | +          this.$router.push({
 | 
	
		
			
				|  |  | +            path: '/landTransportation/bulkReportAnalysis/index'
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //删除途径地址
 |