瀏覽代碼

提交代码

zengyf 2 年之前
父節點
當前提交
9b83c88206

+ 2 - 2
build/utils.js

@@ -16,9 +16,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
-let devModules = ['all']
+//let devModules = ['all']
 //let devModules=['index']
-//let devModules = ['index', 'statisticalReport','sale','TMS','RMS']
+let devModules = ['index', 'statisticalReport','sale','TMS','RMS','systemConfig','appoint']
 // let devModules = ['index', 'ADMINISTRATORS']
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 7 - 0
src/views/RMS/components/addPersonnel.vue

@@ -148,6 +148,13 @@ export default {
 
      //确定人员新增
      makeSure() {
+      //验证是否有电话
+      var regex = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
+      if (!regex.test(this.form1.ConcatTelephone)) {
+        this.$message.error('电话号码不符合规则')
+        loading.close()
+        return
+      }
       //初始化用户信息
       let userInfo = {
         orgCode : '',

+ 100 - 1
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;

+ 7 - 2
src/views/sale/components/dilNotice/carrierNotice.vue

@@ -31,12 +31,14 @@
               type="text"
               size="small"
               @click="updateNotice(scope)"
+              v-if="orgcode!='chengyunshang'"
             >
               修改
             </el-button>
             <el-button
               type="text"
               size="small"
+              v-if="orgcode!='chengyunshang'"
               @click="releaseNotice(scope)"
             >
               发布
@@ -44,6 +46,7 @@
             <el-button
               type="text"
               size="mini"
+              v-if="orgcode!='chengyunshang'"
               @click="deleteNotice(scope)"
             >
               删除
@@ -79,6 +82,7 @@ export default {
       },
       userId:"",
       dialogVisible:false,
+      orgcode:'',
       detailOptions:{
         requestUrl: "/api/v1/ams/getNoticeUser?apiId=520",
         requestQuery:{
@@ -179,9 +183,10 @@ export default {
         });
     },
   },
- /* created() {
+ created() {
     this.userId= getCookie('userId')
-  }*/
+    this.orgcode=getCookie('orgCode')
+  }
 }
 
 </script>

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

@@ -1368,7 +1368,7 @@ export default {
       let endPageNum=(this.currentPage)*this.currentPageSize
       if (this.addresText) {
         if (!this.notRoutList.includes('capacityNo')) {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&con=' +
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?con=' +
             this.addresText,this.steelMap).then(
               (res)=>{
                 if(res.data.code){
@@ -1378,10 +1378,8 @@ export default {
               }
             )    
         } else {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&con=' +
-            this.addresText +
-            '&userId=' +
-            this.userId,this.steelMap).then(
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?con=' +
+            this.addresText ,this.steelMap).then(
               (res)=>{
                 if(res.data.code){
                   this.priceAllList=res.data.data
@@ -1392,7 +1390,7 @@ export default {
         }
       } else {
         if (!this.notRoutList.includes('capacityNo')) {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&i=' +
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?i=' +
             new Date(),this.steelMap).then(
               (res)=>{
                 if(res.data.code){
@@ -1402,10 +1400,8 @@ export default {
               }
             )
         } else {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&i=' +
-            new Date() +
-            '&userId=' +
-            this.userId,this.steelMap).then(
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?i=' +
+            new Date() ,this.steelMap).then(
               (res)=>{
                 if(res.data.code){
                   this.priceAllList=res.data.data
@@ -1437,7 +1433,7 @@ export default {
           typeof this.steelMap.addressTown != 'undefined' &&
           this.steelMap.addressTown != null
         ) {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&i=' +
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?i=' +
             new Date() +'&con=' +this.steelMap.addressTown,this.steelMap).then(
               (res)=>{
                 if(res.data.code){
@@ -1447,7 +1443,7 @@ export default {
               }
             )  
         } else {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&i=' +
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?i=' +
             new Date(),this.steelMap).then(
               (res)=>{
                 if(res.data.code){
@@ -1458,18 +1454,14 @@ export default {
             )  
         }
       } else {
-        console.log('进入了2')
-        console.log(this.userId)
         if (
           typeof this.steelMap.addressTown != 'undefined' &&
           this.steelMap.addressTown != null
         ) {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&i=' +
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?i=' +
             new Date() +
             '&con=' +
-            this.steelMap.addressTown+
-            '&userId=' +
-            this.userId,this.steelMap).then(
+            this.steelMap.addressTown,this.steelMap).then(
               (res)=>{
                 if(res.data.code){
                   this.priceAllList=res.data.data
@@ -1478,10 +1470,8 @@ export default {
               }
             )
         } else {
-          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?apiId=519&i=' +
-            new Date() +
-            '&userId=' +
-            this.userId,this.steelMap).then(
+          await this.axios.post('/api/v1/ams/getAmsContractTransportPriceForDetail?i=' +
+            new Date(),this.steelMap).then(
               (res)=>{
                 if(res.data.code){
                   this.priceAllList=res.data.data