luobang il y a 2 ans
Parent
commit
549c59b93e

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   '/api/v1': {
     target: 'http://172.16.33.166:80',
-    // target: 'http://localhost:8080',
+    //target: 'http://localhost:8080',
     // target: 'http://192.168.1.104:8080',
     ws: true,
     pathRewrite: {

+ 1 - 1
src/components/main.vue

@@ -339,7 +339,7 @@
               :hidden="badgeshow"
             >
               <el-button type="text" size="small" @click="goMyTaskPage"
-                > <i class="el-icon-message-solid" style="width:30px;height: 30px;"></i></el-button
+                > <i class="el-icon-message-solid" style="font-size:25px"></i></el-button
               >
             </el-badge>
             <div

+ 6 - 6
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -510,12 +510,12 @@ export default {
       }
     },
     makeSure() {
-      if (this.haulDistance=="" || this.haulDistance==null){
-        this.$message({
-          type: "warning",
-          message: "请输入运输距离!",});
-        return;
-      }
+      // if (this.haulDistance=="" || this.haulDistance==null){
+      //   this.$message({
+      //     type: "warning",
+      //     message: "请输入运输距离!",});
+      //   return;
+      // }
       for (let i = 0; i < this.selectionList.length; i++) {
         this.carrierIdArray.push(this.selectionList[i].carrierId)
       }

+ 7 - 6
src/views/appoint/components/saleContract/addTransportPriceNew.vue

@@ -456,12 +456,12 @@ export default {
       }
     },
     makeSure() {
-      if (this.haulDistance=="" || this.haulDistance==null){
-        this.$message({
-          type: "warning",
-          message: "请输入运输距离!",});
-        return;
-      }
+      // if (this.haulDistance=="" || this.haulDistance==null){
+      //   this.$message({
+      //     type: "warning",
+      //     message: "请输入运输距离!",});
+      //   return;
+      // }
       for (let i = 0; i < this.selectionList.length; i++) {
         this.carrierIdArray.push(this.selectionList[i].carrierId)
       }
@@ -512,6 +512,7 @@ export default {
         return
       }
       console.log("进入了修改单价的方法")
+      this.form1.haulDistance=this.haulDistance
       console.log(this.form1)
       this.axios.post("/api/v1/ams/updatePriceValue",this.form1).
       then(res=>{

+ 108 - 2
src/views/appoint/components/saleContract/transportPrice.vue

@@ -9,7 +9,7 @@
       <el-button type="primary" @click="btnclick(0)">
         <i class="el-icon-plus"></i>新增
       </el-button>
-       <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+       <el-button type="primary" @click="exportAllExcel()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
 
 <el-tabs v-model="activeName">
@@ -163,6 +163,105 @@ export default {
     };
   },
   methods: {
+    exportAllExcel() {
+      if (this.activeName == 'first') {
+        this.tableTitle = '正在启用的运输单价'
+        this.loading = true;
+      this.isKuang = true;
+      if(this.input){
+        this.axios
+                .post(
+                  "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0&con=" +this.input+"&i="+new Date()
+                )
+                .then(res => {
+                  console.log(res.data.data)
+                  this.exportAllList = res.data.data.list
+                  this.noSettleDetailsColumn=res.data.data.columnData
+                  this.exportAllReportToExcel(
+                    this.tableTitle,
+                    this.exportAllList,
+                    this.noSettleDetailsColumn
+                  )
+                })
+      }else{
+        this.axios
+                .post(
+                  "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0&i="+new Date()
+                )
+                .then(res => {
+                  console.log(res.data.data)
+                  this.exportAllList = res.data.data.list
+                  this.noSettleDetailsColumn=res.data.data.columnData
+                  this.exportAllReportToExcel(
+                    this.tableTitle,
+                    this.exportAllList,
+                    this.noSettleDetailsColumn
+                  )
+                })
+      }
+       }else if (this.activeName == 'second') {
+        this.tableTitle = '历史启用的运输单价'
+        this.loading = true;
+        this.isKuang = true;
+      if(this.input){
+        this.axios
+                .post(
+                  "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=1&con=" +this.input+"&i="+new Date()
+                )
+                .then(res => {
+                  console.log(res.data.data)
+                  this.exportAllList = res.data.data.list
+                  this.noSettleDetailsColumn=res.data.data.columnData
+                  this.exportAllReportToExcel(
+                    this.tableTitle,
+                    this.exportAllList,
+                    this.noSettleDetailsColumn
+                  )
+                })
+      }else{
+        this.axios
+                .post(
+                  "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=1&con=" +this.input+"&i="+new Date()
+                )
+                .then(res => {
+                  console.log(res.data.data)
+                  this.exportAllList = res.data.data.list
+                  this.noSettleDetailsColumn=res.data.data.columnData
+                  this.exportAllReportToExcel(
+                    this.tableTitle,
+                    this.exportAllList,
+                    this.noSettleDetailsColumn
+                  )
+                })
+      }
+        } else {
+        }
+        this.loading=false
+      },
+    //导出excel
+    exportAllReportToExcel(tableTitle, dataArr, columnData) {
+      var title = tableTitle
+      let tHeader = []
+      let filterVal = []
+      columnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label)
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop)
+        }
+      })
+      //导出为excel
+      this.downloadLoading = true
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = dataArr.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+    },
     func(){
       this.loading = false;
       this.isKuang = false;
@@ -199,7 +298,12 @@ export default {
     //修改运价
     //删除运价
     deletePrice(row){
-      let mapValue={
+      this.$confirm('您确定要删除吗?','提示',{
+        confirmButtonText:'确定',
+        cancelButtonText:'取消',
+        type:'warning'
+      }).then(()=>{
+        let mapValue={
         addressProvince:row.addressProvince,
         addressDistrict:row.addressDistrict,
         addressTown:row.addressTown,
@@ -214,6 +318,8 @@ export default {
         }
       })
       this.onclick()
+      }).catch({
+      })
     },
     //修改
     async updatePrice(row){

+ 11 - 11
src/views/index/components/printScan1.vue

@@ -188,17 +188,17 @@ export default {
           this.orderNumber.startsWith('WYSDD') == true ||
           this.orderNumber.startsWith('wysdd') == true
         ) {
-          let promise = await this.querynumber(this.orderNumber)
-          console.log(promise)
-          if (promise == 1) {
-            this.backgroundImgURL=this.backgroundImgURLList[1]
-            this.orderNumber = null
-            setTimeout(()=>{
-              this.backgroundImgURL=this.backgroundImgURLList[0]
-              console.log("进入该方法了")
-            },4000)
-            return
-          }
+          // let promise = await this.querynumber(this.orderNumber)
+          // console.log(promise)
+          // if (promise == 1) {
+          //   this.backgroundImgURL=this.backgroundImgURLList[1]
+          //   this.orderNumber = null
+          //   setTimeout(()=>{
+          //     this.backgroundImgURL=this.backgroundImgURLList[0]
+          //     console.log("进入该方法了")
+          //   },4000)
+          //   return
+          // }
           this.$router.push({
             path: '/printReceipt1?orderNumber=' + this.orderNumber
           })

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

@@ -1114,11 +1114,11 @@ export default {
         orderId:""
       }
       let mapValue1={
-        priceValue:""
+        detailsAmount:""
       }
       this.makeSurePriceOrderList = this.$refs.tableRef.selection.map(e => {
         //运价判断
-        mapValue1.priceValue=e.priceValue
+        mapValue1.detailsAmount=e.detailsAmount
         this.someOnePriceValueList.push(mapValue1)
         mapvalue.placeId=e.placeId
         mapvalue.priceValue=e.priceValue
@@ -1140,7 +1140,7 @@ export default {
       console.log(map)
       let flag=0;
       this.someOnePriceValueList.forEach((e)=>{
-        if(e.priceValue==null){
+        if(e.detailsAmount==null){
           console.log("进入了flag++")
           flag++
         }
@@ -1148,7 +1148,7 @@ export default {
       if(flag!=0){
         this.$message({
               type: 'error',
-              message: '没有单价',
+              message: '没有最终运费',
               duration: 2000,
               offset: '250'
             })