|  | @@ -617,6 +617,7 @@ import website from "@/config/website";
 | 
	
		
			
				|  |  |  import {gaude, location} from "@/api/gaude";
 | 
	
		
			
				|  |  |  //地图回放
 | 
	
		
			
				|  |  |  import trackPlayback from "@/components/trackPlayback"
 | 
	
		
			
				|  |  | +import {contrastList, contrastObj} from "@/util/contrastData";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    comments: {
 | 
	
	
		
			
				|  | @@ -1538,7 +1539,13 @@ export default {
 | 
	
		
			
				|  |  |              value: "dictKey"
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }]
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      oldgoodsForm:{},
 | 
	
		
			
				|  |  | +      oldtableData:{},
 | 
	
		
			
				|  |  | +      oldentrustList:{},
 | 
	
		
			
				|  |  | +      oldgoodsList:{},
 | 
	
		
			
				|  |  | +      oldvehicleList:{},
 | 
	
		
			
				|  |  | +      oldorderFilesList:{},
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    async created() {
 | 
	
	
		
			
				|  | @@ -1560,6 +1567,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.orderAddressList)
 | 
	
		
			
				|  |  | +          this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +          this.oldgoodsList = 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 => {
 | 
	
	
		
			
				|  | @@ -1601,6 +1615,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.orderAddressList)
 | 
	
		
			
				|  |  | +          this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +          this.oldgoodsList = 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) {
 | 
	
	
		
			
				|  | @@ -1633,6 +1654,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.orderAddressList)
 | 
	
		
			
				|  |  | +          this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +          this.oldgoodsList = 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) {
 | 
	
	
		
			
				|  | @@ -1673,6 +1701,12 @@ export default {
 | 
	
		
			
				|  |  |          this.salesmanQuery('', true)
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |        this.entrustList = []
 | 
	
		
			
				|  |  | +      this.oldgoodsForm = this.goodsForm
 | 
	
		
			
				|  |  | +      this.oldtableData = this.deepClone(this.tableData)
 | 
	
		
			
				|  |  | +      this.oldentrustList = this.deepClone(this.entrustList)
 | 
	
		
			
				|  |  | +      this.oldgoodsList = this.deepClone(this.goodsList)
 | 
	
		
			
				|  |  | +      this.oldvehicleList = this.deepClone(this.vehicleList)
 | 
	
		
			
				|  |  | +      this.oldorderFilesList = this.deepClone(this.orderFilesList)
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      // 非租户模式默认加载管理组数据
 | 
	
		
			
				|  |  |      if (!website.tenantMode) {
 | 
	
	
		
			
				|  | @@ -1879,6 +1913,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.orderAddressList)
 | 
	
		
			
				|  |  | +        this.oldentrustList = this.deepClone(res.data.data.itemList)
 | 
	
		
			
				|  |  | +        this.oldgoodsList = 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) {
 | 
	
		
			
				|  |  |            this.collectionList = []
 | 
	
		
			
				|  |  |            this.paymentList = []
 | 
	
	
		
			
				|  | @@ -1930,20 +1971,82 @@ 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/reportAnalysis/index'
 | 
	
		
			
				|  |  | +      if (
 | 
	
		
			
				|  |  | +          contrastObj(this.goodsForm, this.oldgoodsForm)
 | 
	
		
			
				|  |  | +          || contrastList(this.tableData, this.oldtableData)
 | 
	
		
			
				|  |  | +          || contrastList(this.entrustList, this.oldentrustList)
 | 
	
		
			
				|  |  | +          || contrastList(this.goodsList, this.oldgoodsList)
 | 
	
		
			
				|  |  | +          || contrastList(this.vehicleList, this.oldvehicleList)
 | 
	
		
			
				|  |  | +          || contrastList(this.orderFilesList, this.oldorderFilesList)
 | 
	
		
			
				|  |  | +      ) {
 | 
	
		
			
				|  |  | +        this.$confirm("数据发生变化未有保存记录, 是否保存?", "提示", {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning"
 | 
	
		
			
				|  |  | +        }).then(() => {
 | 
	
		
			
				|  |  | +          let data = JSON.parse(JSON.stringify(this.tableData))
 | 
	
		
			
				|  |  | +          data.forEach((item, index) => {
 | 
	
		
			
				|  |  | +            item.sort = index + 1
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          this.type = true
 | 
	
		
			
				|  |  | +          saveSaveList({
 | 
	
		
			
				|  |  | +            ...this.goodsForm,
 | 
	
		
			
				|  |  | +            kind: '1',
 | 
	
		
			
				|  |  | +            orderAddressList: data,
 | 
	
		
			
				|  |  | +            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/reportAnalysis/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/reportAnalysis/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/reportAnalysis/index'
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //删除途径地址
 | 
	
	
		
			
				|  | @@ -1987,11 +2090,6 @@ export default {
 | 
	
		
			
				|  |  |        let data = JSON.parse(JSON.stringify(this.tableData))
 | 
	
		
			
				|  |  |        data.forEach((item, index) => {
 | 
	
		
			
				|  |  |          item.sort = index + 1
 | 
	
		
			
				|  |  | -        // if (item.region !== undefined && item.region.length !== 0) {
 | 
	
		
			
				|  |  | -        //   item.region = item.region.join(',')
 | 
	
		
			
				|  |  | -        // } else {
 | 
	
		
			
				|  |  | -        //   item.region = ''
 | 
	
		
			
				|  |  | -        // }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |        this.type = true
 | 
	
		
			
				|  |  |        saveSaveList({
 |