luobang 2 年之前
父节点
当前提交
c6f7274140
共有 1 个文件被更改,包括 99 次插入99 次删除
  1. 99 99
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue

+ 99 - 99
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue

@@ -168,7 +168,7 @@
 </template>
 
 <script>
-import { getCookie } from "@/utils/util.js";
+import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
@@ -190,18 +190,18 @@ export default {
       damageFee: null,
       //加载
       selectLineLoading: false,
-      input: "",
-      activeName: "first",
+      input: '',
+      activeName: 'first',
       ssoId: null,
       //详单Id
       detailsId: null,
       options1: {
         // first请求数据的地址
-        requestUrl: ""
+        requestUrl: ''
       },
       options2: {
         // second请求数据的地址
-        requestUrl: ""
+        requestUrl: ''
       },
       //是否打开修改详单地址弹出框
       dialogFormVisible: false,
@@ -221,171 +221,171 @@ export default {
       addressDrawer: false,
       //运输单价的表格
       Address: {
-        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio"
+        requestUrl: '/api/v1/ams/getAddressDeliveryAddress?apiId=255',
+        selectionType: 'radio'
       },
       // addressText:null,
       //缓存当前选中的运输单价
       priceMap: {},
-      formLabelWidth: "125px"
-    };
+      formLabelWidth: '125px'
+    }
   },
   created() {
-    this.options1GetRequestUrl();
-    this.options2GetRequestUrl();
+    this.options1GetRequestUrl()
+    this.options2GetRequestUrl()
   },
   methods: {
     //未结算数据
     options1GetRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
-        this.ssoId = getCookie("userId");
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.ssoId = getCookie('userId')
         this.options1.requestUrl =
-          "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
-          getCookie("userId");
+          '/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=' +
+          getCookie('userId')
       } else {
         this.options1.requestUrl =
-          "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
-          this.ssoId;
+          '/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=' +
+          this.ssoId
       }
     },
     //已结算数据
     options2GetRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.options2.requestUrl =
-          "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
-          getCookie("userId");
+          '/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=' +
+          getCookie('userId')
       } else {
         this.options2.requestUrl =
-          "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
-          this.ssoId;
+          '/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=' +
+          this.ssoId
       }
     },
     //收货地址弹出层
     handleSelect1(item) {
-      console.log("获取所有下拉值!");
+      console.log('获取所有下拉值!')
     },
     //查询全国省市县
     selectAddresClick() {
       if (this.addresText) {
         this.Address.requestUrl =
-          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
-          this.addresText;
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' +
+          this.addresText
       } else {
         this.Address.requestUrl =
-          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=' + new Date()
       }
     },
     //以下是收货地址边输边查搜索
     querySearch1(queryString, cb) {
       this.axios
         .post(
-          "/api/v1/ams/getRealAddressByLike?addressId=" +
+          '/api/v1/ams/getRealAddressByLike?addressId=' +
             this.addressId +
-            "&index=" +
+            '&index=' +
             queryString
         )
         .then(res => {
-          if (res.data.code == "200") {
-            var restaurants = res.data.data;
+          if (res.data.code == '200') {
+            var restaurants = res.data.data
             var results = queryString
               ? restaurants.filter(this.createFilter1(queryString))
-              : restaurants;
+              : restaurants
             // 调用 callback 返回建议列表的数据
-            cb(results);
+            cb(results)
           }
-        });
+        })
     },
     createFilter1(queryString) {
       return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
-        );
-      };
+        )
+      }
     },
     //以上是收货地址边输边查搜索
     toInsert() {
-      this.$router.push("/insertCheckInventory");
+      this.$router.push('/insertCheckInventory')
     },
     // getclick(scope){
     //   this.$router.push("/getTransportResult/"+scope.row.orderId)
     // },
     //增加途损
     addDamage(row) {
-      this.detailsId = row.detailsId;
-      this.dialogDamage = true;
+      this.detailsId = row.detailsId
+      this.dialogDamage = true
     },
     makeSureAdd() {
       if (!this.DaDryBasis) {
-        this.$message.error("达钢的干基还未填!");
+        this.$message.error('达钢的干基还未填!')
       } else if (!this.JiuDryBasis) {
-        this.$message.error("九江收货的干基还未填!");
+        this.$message.error('九江收货的干基还未填!')
       } else if (!this.Fee) {
-        this.$message.error("单价还未填!");
+        this.$message.error('单价还未填!')
       } else {
-        this.dialogDamage = false;
+        this.dialogDamage = false
         //计算途损 [(达钢的干基-九江收货的干基)/达钢的干基 - 0.03] * 单价 > 0, 扣除途损
         this.damageFee =
           ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) *
-          this.Fee;
+          this.Fee
         if (this.damageFee > 0) {
           let map = {
             detailsId: this.detailsId,
             lossFees: this.damageFee.toFixed(2)
-          };
+          }
           //是否确定增加途损费!
-          this.$confirm("是否确定增加途损费", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
+          this.$confirm('是否确定增加途损费', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
             center: true
           })
             .then(() => {
               //初始化增加途损费对话框中的信息
-              (this.damageFee = null),
+              ;(this.damageFee = null),
                 this.axios
-                  .post("/api/v1/bms/addLossFeeOfCoke", map)
+                  .post('/api/v1/bms/addLossFeeOfCoke', map)
                   .then(res => {
-                    if (res.data.code == "0") {
-                      this.$message.success("增加途损费成功!");
+                    if (res.data.code == '0') {
+                      this.$message.success('增加途损费成功!')
                       //重置未结算详单表单信息
                       this.options1.requestUrl =
-                        "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
-                        new Date();
+                        '/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=' +
+                        new Date()
                     } else {
-                      this.$message.error("增加途损费失败,请联系管理员!");
+                      this.$message.error('增加途损费失败,请联系管理员!')
                     }
-                  });
+                  })
             })
             .catch(() => {
               this.$message({
-                type: "info",
-                message: "取消修改详单单价!"
-              });
-            });
+                type: 'info',
+                message: '取消修改详单单价!'
+              })
+            })
         }
       }
     },
     onclick() {
-      console.log("查询待定值");
+      console.log('查询待定值')
       // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
     },
     //修改详单单价
     priceValueUpdate(row) {
-      this.originalAddress = row.realAddress;
-      this.originalPriceValue = row.priceValue;
-      this.detailsId = row.detailsId;
-      this.dialogFormVisible = true;
+      this.originalAddress = row.realAddress
+      this.originalPriceValue = row.priceValue
+      this.detailsId = row.detailsId
+      this.dialogFormVisible = true
     },
     //运输订单点击浏览的事件
     select() {
-      this.addressDrawer = true;
+      this.addressDrawer = true
     },
     //运输单价模态窗口的框计算
     selectAddressClick() {
       this.Price.requestUrl =
-        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
-        this.addressText;
+        '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' +
+        this.addressText
     },
     //运输单价模态窗口的点击事件
     addAddressClick() {
@@ -393,28 +393,28 @@ export default {
       let map = {
         place: this.place,
         addressId: this.addressId
-      };
-      this.axios.post("/api/v1/ams/getPriceMap", map).then(res => {
+      }
+      this.axios.post('/api/v1/ams/getPriceMap', map).then(res => {
         if (res.data.data.priceId == -1) {
-          this.newPriceValue = "未录单价!";
-          this.priceId = null;
+          this.newPriceValue = '未录单价!'
+          this.priceId = null
         } else {
           //赋值运输单价和运输单价ID
-          this.newPriceValue = res.data.data.priceValue; //this.priceMap.priceValue
-          this.priceId = res.data.data.priceId; //this.priceMap.priceId
+          this.newPriceValue = res.data.data.priceValue //this.priceMap.priceValue
+          this.priceId = res.data.data.priceId //this.priceMap.priceId
         }
-      });
+      })
       //priceMap
-      this.newAddress = this.address + this.place;
-      this.addressDrawer = false;
+      this.newAddress = this.address + this.place
+      this.addressDrawer = false
     },
     //运输单价模态框单选选中的事件
     currentRadioChange2(val) {
       //若具体地址有值,清空值
       if (this.place != null) {
-        this.place = null;
+        this.place = null
       }
-      (this.address = val.address), (this.addressId = val.addressId);
+      ;(this.address = val.address), (this.addressId = val.addressId)
       // this.priceMap = {};
       // this.priceMap = val;
     },
@@ -422,52 +422,52 @@ export default {
     makeSure() {
       //若没有单价Id
       if (this.priceId == null) {
-        this.$message.error("该区域没有录入单价,不可修改!");
+        this.$message.error('该区域没有录入单价,不可修改!')
       } else {
-        this.dialogFormVisible = false;
+        this.dialogFormVisible = false
         let mapValue = {
           detailsId: this.detailsId,
           priceId: this.priceId
-        };
+        }
         //是否确定修改详单地址!
-        this.$confirm("是否确定修改详单地址", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+        this.$confirm('是否确定修改详单地址', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
           center: true
         })
           .then(() => {
             //初始化修改详单地址对话框的信息
-            (this.newPriceValue = null),
+            ;(this.newPriceValue = null),
               (this.newAddress = null),
               (this.address = null),
               (this.addresText = null),
               (this.addressId = null),
               (this.priceId = null),
               this.axios
-                .post("/api/v1/bms/updateDetailsOrder", mapValue)
+                .post('/api/v1/bms/updateDetailsOrder', mapValue)
                 .then(res => {
-                  if (res.data.code == "0") {
-                    this.$message.success("修改详单单价成功!");
+                  if (res.data.code == '0') {
+                    this.$message.success('修改详单单价成功!')
                     //重置未结算详单表单信息
                     this.options1.requestUrl =
-                      "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
-                      new Date();
+                      '/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=' +
+                      new Date()
                   } else {
-                    this.$message.error("修改详单单价失败,请联系管理员!");
+                    this.$message.error('修改详单单价失败,请联系管理员!')
                   }
-                });
+                })
           })
           .catch(() => {
             this.$message({
-              type: "info",
-              message: "取消修改详单单价!"
-            });
-          });
+              type: 'info',
+              message: '取消修改详单单价!'
+            })
+          })
       }
     }
   }
-};
+}
 </script>
 
 <style lang="scss" scode>