liyg 2 yıl önce
ebeveyn
işleme
a619cb9bce

+ 20 - 18
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -729,6 +729,7 @@ export default {
   },
   data() {
     return {
+      saleOrderMaterialIds:[],
       batchAddressProvince: '',
       batchAddressDistrict: '',
       batchAddressTown: '',
@@ -1126,6 +1127,13 @@ export default {
         this.amsPriceList.push(mapvalue)
         return e.orderId
       })
+      //车序号和订单ID
+      this.saleOrderMaterialIds = this.$refs.tableRef.selection.map(e => {
+        return {
+            saleOrderMaterialId:e.saleOrderMaterialId,
+            orderId:e.orderId
+          }
+      })
       console.log(this.makeSurePriceOrderList)
       console.log(this.amsPriceList)
       console.log(this.someOnePriceValueList)
@@ -1305,8 +1313,8 @@ export default {
       //若没有单价Id
       console.log("获取数据")
       console.log(this.userId)
-      console.log(this.makeSurePriceOrderList)
-      if (this.makeSurePriceOrderList.length == 0) {
+      console.log(this.saleOrderMaterialIds)
+      if (this.saleOrderMaterialIds.length == 0) {
         this.amsPriceList=[]
         this.$message({
           type: 'success',
@@ -1316,16 +1324,12 @@ export default {
         })
         return
       }
-      let mapList = []
-      this.makeSurePriceOrderList.forEach(e => {
-        let map = {}
-        map.orderId = e
-        map.priceId = this.makeSurePriceId
-        map.placeId = this.makeSurePlaceId
-        mapList.push(map)
+      this.saleOrderMaterialIds.forEach(e => {
+        e.priceId = this.makeSurePriceId
+        e.placeId = this.makeSurePlaceId
       })
       let mapValue = {}
-      mapValue.mapList = mapList
+      mapValue.mapList = this.saleOrderMaterialIds
       mapValue.userId=this.userId
       // //是否确定修改详单地址!
       // this.$confirm('确定修改', '提示', {
@@ -1358,7 +1362,7 @@ export default {
     makeSureAll(){
       console.log("获取数据")
       console.log(this.userId)
-      if (this.makeSurePriceOrderList.length == 0) {
+      if (this.saleOrderMaterialIds.length == 0) {
         this.amsPriceList=[]
         this.$message({
           type: 'success',
@@ -1369,15 +1373,13 @@ export default {
         return
       }
       let mapList = []
-      this.makeSurePriceOrderList.forEach(e => {
-        let map = {}
-        map.orderId = e
-        map.priceId = this.makeSurePriceId
-        map.placeId = this.makeSurePlaceId
-        mapList.push(map)
+      this.saleOrderMaterialIds.forEach(e => {
+        e.priceId = this.makeSurePriceId
+        e.placeId = this.makeSurePlaceId
+        e.updatePlace = 1
       })
       let mapValue = {}
-      mapValue.mapList = mapList
+      mapValue.mapList = this.saleOrderMaterialIds
       mapValue.updatePlace = 1
       mapValue.userId=this.userId
       console.log("要的数据")