zhongtianhaoyuan 3 years ago
parent
commit
c3254521f7

+ 2 - 0
src/layout/index/top/index.vue

@@ -395,12 +395,14 @@ export default {
         localStorage.removeItem('ws-pf_organMonetaryValue')
         localStorage.removeItem('ws-pf_vessels')
         localStorage.removeItem('ws-pf_isLandBasedFlag')
+        debugger
         await this.$store.dispatch('user/logout')
         this.$router.push(
           process.env.VUE_APP_PACKAGE_ENV === 'ship' ? '/ship_login' : '/login'
         )
       })
     },
+    
   },
 }
 </script>

+ 26 - 0
src/views/contractManagement/purchaseContractAdd.vue

@@ -90,6 +90,12 @@
               :value="item.customerName" />
           </ws-select>
         </ws-form-item>
+           <!-- 发货反馈负责人 -->
+          <ws-form-item label="发货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType == '2'">
+            <ws-select v-model="deptBudgetList.feedbackLeader" placeholder="请输入收货反馈负责人" class="typeselect" @change="feedbackLeaderChange">
+              <ws-option v-for="(item,index1) in feedbackLeaders" :key="item.staffId" :label="item.staffName" :value="index1" />
+            </ws-select>
+          </ws-form-item>
         <!--包装方式-->
         <ws-form-item label="包装方式" span="1" prop="packingMethod">
           <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect" :value="value1"
@@ -373,6 +379,9 @@
     getRelationContractNo,
     getcustomerinfo
   } from '@/model/contarct/index'
+  import {
+    getstaff,
+  } from '@/model/warehouse/index'
   import {
     regionData,
     CodeToText,
@@ -499,6 +508,7 @@
         },
         selectIntendedShip: {},
         interviewTypeList: {},
+        feedbackLeaders:[],//发货反馈负责人
       }
     },
     activated() {
@@ -536,6 +546,10 @@
       if (!this.restaurants4) this.restaurants4 = [];
     },
     methods: {
+      feedbackLeaderChange(e){
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+      },
       querySearch1(queryString, cb) {
         var restaurants1 = this.restaurants1;
         var results = queryString ? restaurants1.filter(this.createFilter(queryString)) : restaurants1;
@@ -709,6 +723,18 @@
           .then((response) => {
             this.ChapterTwoList = response
           })
+            // 发货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          })
+          .toPromise()
+          .then((response) => {
+            this.feedbackLeaders = response
+            let _obj = []   //发货反馈负责人下拉列表第一个添加  "无需发货反馈(默认)"
+            _obj.staffName = "无需发货反馈(默认)"
+            _obj.staffMobilePhone = "(默认)"
+            this.feedbackLeaders.unshift(_obj)
+          })
         //关联合同
         getRelationContractNo({
             agreementType: '采购合同',

+ 25 - 0
src/views/contractManagement/purchaseContractEdit.vue

@@ -57,6 +57,12 @@
         <ws-form-item label="买方电话" span="1" prop="buyerPhone">
           <ws-input v-model="deptBudgetList.buyerPhone" maxlength="100" size="small" />
         </ws-form-item>
+        <!-- 发货反馈负责人 -->
+          <ws-form-item label="发货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.settlementMethod == '对方送货'">
+            <ws-select v-model="deptBudgetList.feedbackLeader" placeholder="请输入收货反馈负责人" class="typeselect" @change="feedbackLeaderChange">
+              <ws-option v-for="(item,index1) in feedbackLeaders" :key="item.staffId" :label="item.staffName" :value="index1" />
+            </ws-select>
+          </ws-form-item>
         <!-- 包装方式 -->
         <ws-form-item label="包装方式" span="1" prop="packingMethod">
           <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect"
@@ -299,6 +305,9 @@
     getstafffind
   } from '@/model/contarct/index'
   import WsUpload from '@/components/WsUpload'
+  import {
+    getstaff,
+  } from '@/model/warehouse/index'
   import {
     EventBus,
     dayjs
@@ -370,6 +379,7 @@
         },
         acceptanceCheck: {},
         compId: localStorage.getItem('ws-pf_compId'),
+        feedbackLeaders:[],//发货反馈负责人
       }
     },
 
@@ -386,6 +396,10 @@
       this.showType = this.isShow
     },
     methods: {
+       feedbackLeaderChange(e){
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+      },
       getAddress(data) {
         if (data[4] == 'source') {
           this.newSelectedOptions = data[0] + '/' + data[1] + '/' + data[2]
@@ -537,6 +551,17 @@
           .then((response) => {
             this.ChapterTwoList = response
           })
+             // 发货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          }).toPromise()
+          .then((response) => {
+            this.feedbackLeaders = response
+              let _obj = []   //发货反馈负责人下拉列表第一个添加  "无需发货反馈(默认)"
+            _obj.staffName = "无需发货反馈(默认)"
+            _obj.staffMobilePhone = "(默认)"
+            this.feedbackLeaders.unshift(_obj)
+          })
       },
       addClick() {
         this.unitList.push({

+ 32 - 0
src/views/contractManagement/salesContractAdd.vue

@@ -91,6 +91,12 @@
             <el-autocomplete class="inline-input" v-model="deptBudgetList.sellerPhone" :fetch-suggestions="querySearch4"
               placeholder="请输入卖方电话" @select="handleSelect"></el-autocomplete>
           </ws-form-item>
+          <!-- 收货反馈负责人 -->
+          <ws-form-item label="收货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType == '2'">
+            <ws-select v-model="deptBudgetList.feedbackLeader" placeholder="请输入收货反馈负责人" class="typeselect" @change="feedbackLeaderChange">
+              <ws-option v-for="(item,index ) in feedbackLeaders" :key="item.staffId" :label="item.staffName" :value="index" />
+            </ws-select>
+          </ws-form-item>
           <!--包装方式-->
           <ws-form-item label="包装方式" span="1" prop="packingMethod">
             <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect"
@@ -371,6 +377,9 @@
     getRelationContractNo,
      getcustomerinfo
   } from '@/model/contarct/index'
+   import {
+    getstaff,
+  } from '@/model/warehouse/index'
   import WsUpload from '@/components/WsUpload'
   import {
     regionData,
@@ -473,6 +482,7 @@
         fileList: [],
         priceTypeList: ['定价销售', '随行就市'],
         contractNoList: [],
+        feedbackLeaders:[],//收货反馈负责人
       }
     },
     activated() {
@@ -503,6 +513,10 @@
       if (!this.restaurants4) this.restaurants4 = [];
     },
     methods: {
+      feedbackLeaderChange(e){
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+      },
       buyerSelect(item) {
         console.log(item)
         for (let i = 0; i < this.customerinfo.length; i++) {
@@ -637,6 +651,14 @@
           .then((response) => {
             this.ChapterTwoList = response
           })
+          // 收货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          })
+          .toPromise()
+          .then((response) => {
+            this.feedbackLeaders = response
+          })
         //关联合同
         getRelationContractNo({
             agreementType: '销售合同',
@@ -816,6 +838,16 @@
           })
           return
         }
+        if(this.deptBudgetList.deliverType == '2'){
+           if (!this.deptBudgetList.feedbackLeader){
+          this.$message({
+            message: '请选择收货反馈负责人',
+            type: 'warning',
+          })
+          return
+         }
+        }
+         
         if (!this.deptBudgetList.acceptanceMethod) {
           this.$message({
             message: '请选择验收方式',

+ 32 - 0
src/views/contractManagement/salesContractEdit.vue

@@ -89,6 +89,13 @@
           <ws-form-item label="买方电话" span="1" prop="contractNo">
             <ws-input v-model="deptBudgetList.buyerPhone" placeholder="请输入买方电话" maxlength="100" size="small" />
           </ws-form-item>
+          <!-- 收货反馈负责人 -->
+          <ws-form-item label="收货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType == '2'">
+            <ws-select v-model="deptBudgetList.feedbackLeader" placeholder="请输入收货反馈负责人" class="typeselect" @change="feedbackLeaderChange">
+              <ws-option v-for="(item,index ) in feedbackLeaders" :key="item.staffId" :label="item.staffName" :value="index" />
+            </ws-select>
+          </ws-form-item>
+          
           <!--包装方式-->
           <ws-form-item label="包装方式" span="1" prop="packingMethod">
             <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect"
@@ -375,6 +382,7 @@
     delxiala,
     getRelationContractNo,
   } from '@/model/contarct/index'
+  import { getstaff, } from '@/model/warehouse/index'
   export default {
     name: 'viewSpareMoney',
     components: {
@@ -451,6 +459,7 @@
         ChapterTwoList: {},
         selectIntendedShip: {},
         interviewTypeList: {},
+        feedbackLeaders:[],//收货反馈负责人
       }
     },
     activated() {
@@ -464,6 +473,11 @@
       this.showType = this.isShow
     },
     methods: {
+       feedbackLeaderChange(e){
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+        console.log(  this.deptBudgetList.feedbackLeader,this.deptBudgetList.feedbackLeaderPhone)
+      },
       marker(item) {
         this.deptBudgetList.warehousePositioning =
           item.lnglat.lat + ',' + item.lnglat.lng
@@ -603,6 +617,14 @@
           .then((response) => {
             this.ChapterTwoList = response
           })
+            // 收货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          })
+          .toPromise()
+          .then((response) => {
+            this.feedbackLeaders = response
+          })
       },
 
       getUnitList() {
@@ -816,6 +838,16 @@
           })
           return
         }
+        if(this.deptBudgetList.deliverType == '2'){
+          if (!this.deptBudgetList.feedbackLeader){
+          this.$message({
+            message: '请选择收货反馈负责人',
+            type: 'warning',
+          })
+          return
+        }
+        }
+         
         if (!this.deptBudgetList.acceptanceMethod) {
           this.$message({
             message: '请选择验收方式',

+ 3 - 1
src/views/tradeServicesManagement/inOutRecord.vue

@@ -76,7 +76,9 @@
         </template>
       </el-table-column>
       <el-table-column prop="goodsName" label="货名"> </el-table-column>
-      <el-table-column prop="grossWeight" label="毛重(吨)"> </el-table-column>
+      <el-table-column prop="grossWeight" label="毛重(吨)"> 
+        <template slot-scope="scope">{{scope.grossWeight.toF}}</template>
+      </el-table-column>
       <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
       <el-table-column prop="weight" label="扣重(吨)"> </el-table-column>
       <el-table-column prop="netWeight" label="净重(吨)"> </el-table-column>

+ 2 - 2
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -234,8 +234,8 @@
           if (_data[i].id == val) {
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
-             this.deptBudgetList.nowWeight = _data[i].storage
-             this.deptBudgetList.useWeight =  _data[i].useStorage
+            this.deptBudgetList.nowWeight = _data[i].storage
+            this.deptBudgetList.useWeight =  _data[i].useStorag
             return
           }
         }

+ 21 - 2
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -295,6 +295,9 @@ export default {
           if (_data[i].id == val) {
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
+            this.deptBudgetList.nowWeight = _data[i].storage
+             this.deptBudgetList.useWeight =  _data[i].useStorage
+             return
           }
         }
       },
@@ -307,7 +310,7 @@ export default {
             this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
             this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
             this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
-            this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
+            // this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
             this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage : ''
             this.deptBudgetList.useWeight =  _data[i].goodsNameInfos[0].useStorage
             this.deptBudgetList.warehouseId = _data[i].id
@@ -327,6 +330,21 @@ export default {
             this.deptBudgetList.baseId = _data.baseId
           }
         }
+        this.goodsList = []
+        for(let j = 0 ; j < this.warehouseList.length ; j++){
+          if(this.deptBudgetList.warehouseName == this.warehouseList[j].warehouseName){
+            for(let _num = 0 ; _num < this.warehouseList[j].goodsNameInfos.length; _num++ ){
+              if( this.deptBudgetList.warehouseNo == this.warehouseList[j].goodsNameInfos[_num].binNumber){
+                this.goodsList.push(this.warehouseList[j].goodsNameInfos[_num])
+              }
+            }
+          }
+        }
+        if(this.goodsList.length == 0){
+          this.deptBudgetList.goodsName = ""
+        }else{
+           this.deptBudgetList.goodsName = this.goodsList[0].goodsName
+        }
       },
     getcompList(){
       //公司名下拉
@@ -334,7 +352,8 @@ export default {
           .toPromise()
           .then((res) => {
             this.compOptionList = res
-            this.deptBudgetList.renown = res[0].compName
+            // this.deptBudgetList.renown = res[0].compName
+              this.changeCompOptionList(res[0].compId)
           })
           .catch((err) => {})
     },

+ 1 - 1
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -306,7 +306,7 @@ export default {
   },
   activated() {
     this.getList(this.$route.query.id)
-    this.getcompList()
+    // this.getcompList()
   },
   methods: {
     //返回

+ 3 - 1
src/views/warehouse/warehouseManagementTare.vue

@@ -966,6 +966,8 @@
           .then(() => {
             this.$refs.deptBudgetList.validate((valid) => {
               if (valid) {
+                debugger
+              
                 this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
                 this.deptBudgetList.skinInspector = localStorage.getItem('ws-pf_staffName')
                 this.deptBudgetList.inOutFlag = 1
@@ -973,7 +975,7 @@
                 this.deptBudgetList.statusFlag = 1
                 this.deptBudgetList.grossWeight /= 1000
                 this.deptBudgetList.tare /= 1000
-                this.deptBudgetList.netWeight = this.deptBudgetList.netWeight.toFixed(2)
+                this.deptBudgetList.netWeight = Number(this.deptBudgetList.netWeight).toFixed(2)
                 this.deptBudgetList.pureWeight /= 1000
                 addstorageputList(this.deptBudgetList)
                   .toPromise()