浏览代码

Merge remote-tracking branch 'origin/dev' into dev

caojunjie 1 年之前
父节点
当前提交
e35ab87a10

+ 9 - 0
src/api/specialTrade/placeAnOrder/detailPage.js

@@ -0,0 +1,9 @@
+import request from '@/router/axios';
+
+// 根据客户id查询分管员
+export function getAdminProfilesById(id) {
+  return request({
+    url: '/api/blade-client/corpsdesc/admin-profiles/' + id,
+    method: 'get'
+  })
+}

+ 6 - 1
src/components/e-crop-select/main.vue

@@ -7,7 +7,8 @@
         clearable
         allow-create
         default-first-option
-        @change="getKeyId(value)" :disabled="disabled">
+        @change="getKeyId(value)" :disabled="disabled"
+        @clear="clear()">
       <template>
         <el-option v-for="item in corpList" :key="item.id" :label="corpType == 'DD'?item.name:corpType == 'DD-ID'?item.name:item.cname" :value="item.id">
         </el-option>
@@ -138,6 +139,10 @@ export default {
         this.$emit('getCropId', null)
       }
 
+    },
+    // 清空
+    clear() {
+      this.$emit('clear', null)
     }
   },
   watch: {}

+ 31 - 11
src/page/index/top/top-notice.vue

@@ -34,6 +34,7 @@
 <script>
 import { getMsgLogs, getMsgDetail, getMessage } from "@/api/logs";
 import { getToken } from "@/util/auth";
+import { getUserInfo } from "@/api/system/user"
 export default {
   name: "top-notice",
   data() {
@@ -131,19 +132,38 @@ export default {
       let audio = new Audio(require("@/file/newNews.mp3"));
       audio.play();
     },
-    goUrl(row) {
-      if (row.url) {
-        this.$router.push({
-          path: row.url,
-          query: { params: row.parameter }
+    async goUrl(row) {
+      // 获取当前用户
+      let user = sessionStorage.getItem("user");
+      if (user == '[object Object]' || user == null) {
+        await getUserInfo().then(res => {
+          sessionStorage.setItem("user", res.data.data);
+          user = res.data.data;
+        })
+      }
+      let postName = user.postName;
+      let postNameList = postName.split(",");
+      let isGd = false;
+      for (const iterator of postNameList) {
+        if (iterator == '跟单' && row.url == '/exportTrade/purchaseContract/index') {
+          isGd = true;
+        }
+      }
+      // 不允许跟单进入采购
+      if (!isGd) {
+        if (row.url) {
+          this.$router.push({
+            path: row.url,
+            query: { params: row.parameter }
+          });
+          // this.$router.push({name:'委托',params:row.parameter})
+        }
+        getMsgDetail(row.id).then(res => {
+          this.$set(row, "isRead", res.data.data.isRead);
+          this.afterData(this.data);
+          this.assistMessage();
         });
-        // this.$router.push({name:'委托',params:row.parameter})
       }
-      getMsgDetail(row.id).then(res => {
-        this.$set(row, "isRead", res.data.data.isRead);
-        this.afterData(this.data);
-        this.assistMessage();
-      });
     },
     allRead() {
       this.data.forEach(e => {

+ 100 - 32
src/views/SpecialTrade/dispatchingCars/detailPage.vue

@@ -80,6 +80,16 @@
                         :disabled="goodsForm.status >= 1"
                     />
                 </template>
+                <template slot-scope="scope" slot="pickUpGoodsUserId">
+                  <el-select v-model="goodsForm.pickUpGoodsUserId" placeholder="请选择揽货员" :disabled="goodsForm.status !== 0">
+                    <el-option
+                      v-for="item in adminProfilesList"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id">
+                    </el-option>
+                  </el-select>
+                </template>
             </avue-form>
         </basic-container>
         <containerTitle title="其他信息"></containerTitle>
@@ -438,9 +448,9 @@
                     ></crop-select>
                     <span v-else>{{ row.corpName }}</span>
                 </template>
-                <template slot="plateNoHeader" slot-scope="{column}">
-                    {{ column.label }}<span style="color:#F56C6C">*</span>
-                </template>
+<!--                <template slot="plateNoHeader" slot-scope="{column}">-->
+<!--                    {{ column.label }}<span style="color:#F56C6C">*</span>-->
+<!--                </template>-->
                 <template slot="feeIdHeader" slot-scope="{column}">
                     {{ column.label }}<span style="color:#F56C6C">*</span>
                 </template>
@@ -495,15 +505,16 @@
                 @row-update="rowSave"
                 @row-del="feeDel"
             >
-                <template slot-scope="{row}" slot="corpId">
+                <template slot-scope="{row}" slot="fleetId">
                     <crop-select
                         v-if="row.$cellEdit"
                         v-model="row.corpId"
+                        corpType="CD"
                         @getCorpData="(data)=>{getfleetId(data,row)}"
                     ></crop-select>
                     <span v-else>{{ row.corpName }}</span>
                 </template>
-                <template slot-scope="{ row }" slot="fleetId">
+                <!-- <template slot-scope="{ row }" slot="fleetId">
                     <el-select v-if="row.$cellEdit" v-model="row.fleetId" size="small" placeholder="请选择"
                                @blur="fleetblur(row)">
                         <el-option
@@ -514,10 +525,10 @@
                         </el-option>
                     </el-select>
                     <span v-else>{{row.fleetName}}</span>
-                </template>
-                <template slot="plateNoHeader" slot-scope="{column}">
-                    {{ column.label }}<span style="color:#F56C6C">*</span>
-                </template>
+                </template> -->
+<!--                <template slot="plateNoHeader" slot-scope="{column}">-->
+<!--                    {{ column.label }}<span style="color:#F56C6C">*</span>-->
+<!--                </template>-->
                 <template slot="feeIdHeader" slot-scope="{column}">
                     {{ column.label }}<span style="color:#F56C6C">*</span>
                 </template>
@@ -680,6 +691,8 @@ import {customerList, corpsdesclist} from "@/api/basicData/basicFeesDesc";
 import {gaude, location} from "@/api/gaude";
 import reportDialog from "@/components/report-dialog/main.vue";
 
+import { getAdminProfilesById } from "@/api/specialTrade/placeAnOrder/detailPage";
+
 export default {
     components: {reportDialog},
     props: {
@@ -692,6 +705,8 @@ export default {
     },
     data() {
         return {
+            // 揽货员list
+            adminProfilesList: [],
             // 车队数据
             fleetdata:[],
             // 打印组件
@@ -1326,12 +1341,21 @@ export default {
                         }
                     }, {
                         label: '货物',
-                        span: 24,
+                        span: 16,
                         minRows: 2,
                         prop: 'goods',
                         type: 'textarea'
-                    },
-                    {
+                    }, {
+                        label: '揽货员',
+                        span: 8,
+                        prop: 'pickUpGoodsUserId',
+                        disabled: true,
+                        rules: [{
+                          required: true,
+                          message: " ",
+                          trigger: "blur"
+                        }]
+                    }, {
                         label: '备注',
                         span: 24,
                         minRows: 2,
@@ -1734,19 +1758,35 @@ export default {
         this.KeyBoxTwo++
         if (this.id) {
             detailDelegationList({id: this.id, kind: '2'}).then(res => {
+              console.log(res.data.data)
                 this.goodsForm = res.data.data
                 this.tableData = res.data.data.orderAddressList
                 this.entrustList = res.data.data.orderItemList
                 this.goodsList = res.data.data.orderItemList
                 this.orderFilesList = res.data.data.fileList
                 if (res.data.data.orderFeeList.length > 0) {
-                    res.data.data.orderFeeList.forEach(item => {
-                        if (item.type == 1) {
-                            this.collectionList.push(item)
+                  let orderFeeList = res.data.data.orderFeeList;
+                  let collectionList = [];
+                  let paymentList = [];
+
+                  for (const orderFee of orderFeeList) {
+                        if (orderFee.type == 1) {
+                            collectionList.push(orderFee)
                         } else {
-                            this.paymentList.push(item)
+                            paymentList.push(orderFee)
                         }
-                    })
+                  }
+
+                  this.collectionList = collectionList;
+                  this.paymentList = paymentList;
+
+                    // res.data.data.orderFeeList.forEach(item => {
+                    //     if (item.type == 1) {
+                    //         this.collectionList.push(item)
+                    //     } else {
+                    //         this.paymentList.push(item)
+                    //     }
+                    // })
                 }
                 delete this.goodsForm.orderAddressList
                 delete this.goodsForm.orderItemList
@@ -1760,6 +1800,10 @@ export default {
                     this.collectionOption.menu = false
                     this.paymentOption.menu = false
                 }
+
+                getAdminProfilesById(this.goodsForm.corpId).then(res => {
+                  this.adminProfilesList = res.data.data;
+                })
             })
         }
         this.KeyBoxTwo++
@@ -2087,13 +2131,29 @@ export default {
                 })
                 this.yugudata = res.data.data.orderEstimateList?res.data.data.orderEstimateList:[]
                 if (res.data.data.orderFeeList.length > 0) {
-                    res.data.data.orderFeeList.forEach(item => {
-                        if (item.type == 1) {
-                            this.collectionList.push(item)
-                        } else {
-                            this.paymentList.push(item)
-                        }
-                    })
+
+                  let orderFeeList = res.data.data.orderFeeList;
+                  let collectionList = [];
+                  let paymentList = [];
+
+                  for (const orderFee of orderFeeList) {
+                    if (orderFee.type == 1) {
+                      collectionList.push(orderFee)
+                    } else {
+                      paymentList.push(orderFee)
+                    }
+                  }
+
+                  this.collectionList = collectionList;
+                  this.paymentList = paymentList;
+
+                    // res.data.data.orderFeeList.forEach(item => {
+                    //     if (item.type == 1) {
+                    //         this.collectionList.push(item)
+                    //     } else {
+                    //         this.paymentList.push(item)
+                    //     }
+                    // })
                 }
                 delete this.goodsForm.orderAddressList
                 delete this.goodsForm.orderItemList
@@ -2101,6 +2161,10 @@ export default {
                 // this.tableData.forEach(item => {
                 //   if (item.region) item.region = item.region.split(',')
                 // })
+
+                getAdminProfilesById(this.goodsForm.corpId).then(res => {
+                  this.adminProfilesList = res.data.data;
+                })
             })
         },
         //切换收付费
@@ -2252,7 +2316,7 @@ export default {
         },
         rowCell(row, index) {
             if (row.$cellEdit) {
-                if (row.plateNo) {
+                // if (row.plateNo) {
                     if (row.feeId) {
                         incidentalSubmit(row).then(res => {
                             this.$refs.collection.rowCell(row, index)
@@ -2262,16 +2326,17 @@ export default {
                     } else {
                         this.$message.error("请选择费用名称");
                     }
-                } else {
-                    this.$message.error("请选择车号");
-                }
+                // } else {
+                //     this.$message.error("请选择车号");
+                // }
             } else {
                 this.$refs.collection.rowCell(row, index)
             }
         },
         paymentRowCell(row, index) {
+          console.log(row)
             if (row.$cellEdit) {
-                if (row.plateNo) {
+                // if (row.plateNo) {
                     if (row.feeId) {
                         incidentalSubmit(row).then(res => {
                             row = {
@@ -2284,9 +2349,9 @@ export default {
                     } else {
                         this.$message.error("请选择费用名称");
                     }
-                } else {
-                    this.$message.error("请选择车号");
-                }
+                // } else {
+                //     this.$message.error("请选择车号");
+                // }
             } else {
                 this.$refs.payment.rowCell(row, index)
             }
@@ -2409,7 +2474,10 @@ export default {
         },
         //选择客户信息触发
         getfleetId(data, row) {
+          console.log(data)
+            this.$set(row, 'corpShortName', data.corpId)
             this.$set(row, 'corpName', data.cname)
+            this.$set(row, 'corpShortName', data.shortName)
         },
         //收款信息移除
         makeDel(row, index) {

+ 7 - 0
src/views/SpecialTrade/dispatchingCars/index.vue

@@ -184,6 +184,13 @@ export default {
                             value: "id"
                         }
                     }, {
+                      label: '揽货员',
+                      prop: 'pickUpGoodsUserName',
+                      overHidden: true,
+                      search: true,
+                      index: 2,
+                      width: 74,
+                    }, {
                         label: '运输调度',
                         prop: 'dispatcherName',
                         overHidden: true,

+ 98 - 2
src/views/SpecialTrade/placeAnOrder/detailPage.vue

@@ -111,6 +111,7 @@
               corp-type="KH"
               :disabled="goodsForm.status !== 0"
               @getCropId="getCropId"
+              @clear="cropClear"
           />
         </template>
         <template slot-scope="{}" slot="stationLabel">
@@ -157,6 +158,16 @@
               :disabled="goodsForm.status !== 0"
           />
         </template>
+        <template slot-scope="scope" slot="pickUpGoodsUserId">
+          <el-select v-model="goodsForm.pickUpGoodsUserId" placeholder="请选择揽货员" :disabled="goodsForm.status !== 0">
+            <el-option
+              v-for="item in adminProfilesList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </template>
       </avue-form>
     </trade-card>
     <trade-card title="其他信息" ref="other">
@@ -627,6 +638,8 @@ import {gaude, location} from "@/api/gaude";
 import trackPlayback from "@/components/trackPlayback"
 import {contrastList, contrastObj} from "@/util/contrastData";
 
+import { getAdminProfilesById } from "@/api/specialTrade/placeAnOrder/detailPage";
+
 export default {
   comments: {
     trackPlayback
@@ -649,6 +662,8 @@ export default {
   },
   data() {
     return {
+      // 揽货员list
+      adminProfilesList: [],
       returnButton: Boolean,
       dialogVisible: false,
       lineArr: [],
@@ -1182,10 +1197,20 @@ export default {
             }
         }, {
             label: '货物',
-            span: 24,
+            span: 16,
             minRows: 2,
             prop: 'goods',
             type: 'textarea'
+        },{
+            label: '揽货员',
+            span: 8,
+            prop: 'pickUpGoodsUserId',
+            disabled: true,
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }]
         }
           // , {
           //   label: '货运日期',
@@ -1651,6 +1676,11 @@ export default {
               this.goodsForm.status = 2
             }
           }
+          if (this.goodsForm.corpId != null && this.goodsForm.corpId != '') {
+            getAdminProfilesById(this.goodsForm.corpId).then(res => {
+              this.adminProfilesList = res.data.data;
+            })
+          }
         })
       } else if (this.id.slice(0, 2) === '首页' || this.id.slice(0, 2) === '台账') {
         if (this.id.slice(0, 2) === '首页') {
@@ -1693,6 +1723,11 @@ export default {
               this.goodsForm.status = 2
             }
           }
+          if (this.goodsForm.corpId != null && this.goodsForm.corpId != '') {
+            getAdminProfilesById(this.goodsForm.corpId).then(res => {
+              this.adminProfilesList = res.data.data;
+            })
+          }
         })
       } else {
         detailDelegationList({id: this.id, kind: '1'}).then(res => {
@@ -1730,6 +1765,11 @@ export default {
               this.goodsForm.status = 2
             }
           }
+          if (this.goodsForm.corpId != null && this.goodsForm.corpId != '') {
+            getAdminProfilesById(this.goodsForm.corpId).then(res => {
+              this.adminProfilesList = res.data.data;
+            })
+          }
         })
       }
     } else {
@@ -1791,8 +1831,22 @@ export default {
         this.goodsForm.salesman = ''
         //查询业务员
         this.salesmanQuery()
+        // 查询揽货员
+        getAdminProfilesById(row.id).then(res => {
+          this.adminProfilesList = res.data.data;
+          if (this.adminProfilesList != []) {
+            this.goodsForm.pickUpGoodsUserId = this.adminProfilesList[0].id;
+          } else {
+            this.goodsForm.pickUpGoodsUserId = null;
+          }
+        })
       }
     },
+    // 公司清空
+    cropClear(row) {
+      this.goodsForm.pickUpGoodsUserId = null;
+      this.adminProfilesList = null;
+    },
     changeSelect(val) {
       for (let item of this.salesmanList) {
         if (item.id == val) {
@@ -1979,7 +2033,6 @@ export default {
           })
         }
 
-
         this.goodsOptionFormC.disabled = true
         this.goodsOptionForm.disabled = true
         this.goodsOptionFormTwo.disabled = true
@@ -1991,6 +2044,12 @@ export default {
         //   if (item.region) item.region = item.region.split(',')
         // })
         this.type = false
+
+        if (this.goodsForm.corpId != null && this.goodsForm.corpId != '') {
+          getAdminProfilesById(this.goodsForm.corpId).then(res => {
+            this.adminProfilesList = res.data.data;
+          })
+        }
       })
     },
     //切换收付费
@@ -2133,6 +2192,28 @@ export default {
     },
     //保存
     editCustomer() {
+
+      // 运输信息
+      if (this.entrustList.length == 0) {
+        return this.$message.error('请选添加运输信息');
+      }
+      for (let item in this.entrustList) {
+        if (!this.entrustList[item].ctnType) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行车型');
+        if (!this.entrustList[item].ctnQuantity) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行车辆数');
+        if (!this.entrustList[item].arrivalTime) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行货运日期');
+        // if (!this.entrustList[item].landAmountD) return this.$message.error('请输入第' + Number(Number(item) + 1) + '运费');
+      }
+
+
+      for (let item in this.tableData) {
+        if (item < Number(this.tableData.length) - 1) {
+          if (!this.tableData[item].corpId) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行货运地点');
+          // if (!this.tableData[item].address) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行详细地址');
+          // if (!this.tableData[item].contacts) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行联系人');
+          // if (!this.tableData[item].tel) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行电话');
+        }
+      }
+
       let data = JSON.parse(JSON.stringify(this.tableData))
       data.forEach((item, index) => {
         item.sort = index + 1
@@ -2200,6 +2281,9 @@ export default {
                   // if (!this.tableData[item].tel) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行电话');
                 }
               }
+              if (this.entrustList.length == 0) {
+                return this.$message.error('请选添加运输信息');
+              }
               for (let item in this.entrustList) {
                 if (!this.entrustList[item].ctnType) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行车型');
                 if (!this.entrustList[item].ctnQuantity) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行车辆数');
@@ -2260,6 +2344,18 @@ export default {
           if (!this.entrustList[item].arrivalTime) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行货运日期');
           // if (!this.entrustList[item].landAmountD) return this.$message.error('请输入第' + Number(Number(item) + 1) + '运费');
         }
+
+        // 运输信息
+        if (this.entrustList.length == 0) {
+          return this.$message.error('请选添加运输信息');
+        }
+        for (let item in this.entrustList) {
+          if (!this.entrustList[item].ctnType) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行车型');
+          if (!this.entrustList[item].ctnQuantity) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行车辆数');
+          if (!this.entrustList[item].arrivalTime) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行货运日期');
+          // if (!this.entrustList[item].landAmountD) return this.$message.error('请输入第' + Number(Number(item) + 1) + '运费');
+        }
+
         if (this.entrustList.length === 0) return this.$message.error('箱信息不能为空')
         this.$refs['goodsFormE'].validate((valid, doneE) => {
           doneE()

+ 7 - 0
src/views/SpecialTrade/placeAnOrder/index.vue

@@ -264,6 +264,13 @@ export default {
               value: "id"
             }
           }, {
+            label: '揽货员',
+            prop: 'pickUpGoodsUserName',
+            overHidden: true,
+            search: true,
+            index: 2,
+            width: 76,
+          }, {
             label: '物流运输',
             prop: 'dispatchDept',
             search: true,

+ 7 - 0
src/views/SpecialTrade/reportAnalysis/index.vue

@@ -754,6 +754,13 @@ export default {
             index: 2,
             width: 70,
           }, {
+            label: '揽货员',
+            prop: 'pickUpGoodsUserName',
+            search: true,
+            overHidden: true,
+            index: 2,
+            width: 70,
+          }, {
             label: '应付杂费',
             overHidden: true,
             index: 15,

+ 16 - 2
src/views/exportTrade/salesContract/detailsPage.vue

@@ -130,8 +130,8 @@
                                      :disabled="detailData.status == 1"></crop-select>
                     </template>
                     <template slot="belongToCorpId">
-                        <crop-select v-model="form.belongToCorpId" corpType="GS"
-                                     :disabled="detailData.status == 1"></crop-select>
+                        <crop-select v-model="form.belongToCorpId" @getCorpsBank="getCorpsBank" corpType="GS"
+                                     :disabled="detailData.status == 1"  source="销售"></crop-select>
                     </template>
                     <template slot="corpAttn">
                         <el-select size="small" v-model="form.corpAttn" placeholder="请选择" @change="corpAttnChange"
@@ -559,6 +559,10 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      // 开户银行list
+      corpsBankList: [
+        {id: 1, accountName: "a"},{id: 2, accountName: "b"}
+      ],
       goodsEditForm: {},
       billData: {}, //账单需要数据
       corpsattns: [],
@@ -988,6 +992,11 @@ export default {
             label: "提单号",
             prop: "billLadingNo",
             span: 6,
+          }, {
+            label: "账户",
+            prop: "corpsBank",
+            span: 6,
+            disabled: true,
             row: true
           },
           {
@@ -1430,6 +1439,11 @@ export default {
         });
       }
     },
+
+    getCorpsBank(row) {
+        this.form.corpsBankId = row.corpsBankId;
+        this.form.corpsBank = row.corpsBankName;
+    },
     // cnameData() {
     //   this.goodsoptions = []
     //   getGoods(1, 10).then(res => {

+ 6 - 0
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -594,6 +594,12 @@ export default {
             width: 60,
             overHidden: true,
           }, {
+          label: '揽货员',
+          prop: 'pickUpGoodsUserName',
+          index: 2,
+          width: 60,
+          overHidden: true,
+          }, {
             label: '运输调度',
             prop: 'dispatcherName',
             overHidden: true,