caojunjie hai 1 ano
pai
achega
266e366e02

+ 87 - 86
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -4,28 +4,28 @@
             <el-row :gutter="20">
                 <el-col span="8">
                     <el-row>
-                        <el-form-item label="发货人" prop="hShipperCnName" >
+                        <el-form-item label="发货人" prop="hshipperCnName" >
                             <span slot="label">
                                <span style="color: #1e9fff">发货人</span>
                             </span>
                             <div>
                                 <el-col :span="16">
-                                    <search-query :datalist="hShipperData"
-                                                  :selectValue="assemblyForm.hShipperCnName"
+                                    <search-query :datalist="hshipperData"
+                                                  :selectValue="assemblyForm.hshipperCnName"
                                                   :filterable="true"
                                                   :clearable="true"
                                                   :remote="true"
                                                   :disabled="detailData.seeDisabled"
                                                   :buttonIf="false"
                                                   :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                                  @remoteMethod="remoteMethod($event,'hShipper')"
-                                                  @corpChange="corpChange($event,'hShipper')"
-                                                  @corpFocus="remoteMethod($event,'hShipper')">
+                                                  @remoteMethod="remoteMethod($event,'hshipper')"
+                                                  @corpChange="corpChange($event,'hshipper')"
+                                                  @corpFocus="remoteMethod($event,'hshipper')">
                                     </search-query>
                                 </el-col>
                                 <el-col :span="7">
                                     <span style="padding-left: 20px"></span>
-                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.hShipperCntyName"
+                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.hshipperCntyName"
                                               size="small" autocomplete="off"
                                               :disabled="detailData.seeDisabled"
                                               clearable placeholder="国家" ></el-input>
@@ -33,36 +33,36 @@
                             </div>
                         </el-form-item>
                         <div style="margin-top: 4px">
-                            <el-form-item label="" prop="hShipperDetails" >
-                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hShipperDetails"
+                            <el-form-item label="" prop="hshipperDetails" >
+                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hshipperDetails"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="4"
                                           clearable placeholder="发货人提单描述"
-                                          @blur="textareaBlur('hShipperDetails')" ></el-input>
+                                          @blur="textareaBlur('hshipperDetails')" ></el-input>
                             </el-form-item>
                         </div>
-                        <el-form-item label="收货人" prop="hConsigneeCnName" >
+                        <el-form-item label="收货人" prop="hconsigneeCnName" >
                             <span slot="label">
                                <span style="color: #1e9fff">收货人</span>
                             </span>
                             <div>
                                 <el-col :span="16">
-                                    <search-query :datalist="hConsigneeData"
-                                                  :selectValue="assemblyForm.hConsigneeCnName"
+                                    <search-query :datalist="hconsigneeData"
+                                                  :selectValue="assemblyForm.hconsigneeCnName"
                                                   :filterable="true"
                                                   :clearable="true"
                                                   :remote="true"
                                                   :disabled="detailData.seeDisabled"
                                                   :buttonIf="false"
                                                   :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                                  @remoteMethod="remoteMethod($event,'hConsignee')"
-                                                  @corpChange="corpChange($event,'hConsignee')"
-                                                  @corpFocus="remoteMethod($event,'hConsignee')">
+                                                  @remoteMethod="remoteMethod($event,'hconsignee')"
+                                                  @corpChange="corpChange($event,'hconsignee')"
+                                                  @corpFocus="remoteMethod($event,'hconsignee')">
                                     </search-query>
                                 </el-col>
                                 <el-col :span="4">
                                     <span style="padding-left: 10px"></span>
-                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.hConsigneeCntyName"
+                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.hconsigneeCntyName"
                                               size="small" autocomplete="off"
                                               :disabled="detailData.seeDisabled"
                                               clearable placeholder="收货人" ></el-input>
@@ -75,55 +75,55 @@
                             </div>
                         </el-form-item>
                         <div>
-                            <el-form-item label="" prop="hConsigneeDetails" >
-                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hConsigneeDetails"
+                            <el-form-item label="" prop="hconsigneeDetails" >
+                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hconsigneeDetails"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="4"
                                           clearable placeholder="收货人提单描述"
-                                          @blur="textareaBlur('hConsigneeDetails')" ></el-input>
+                                          @blur="textareaBlur('hconsigneeDetails')" ></el-input>
                             </el-form-item>
                         </div>
-                        <el-form-item label="通知人" prop="hNotifyCnName" >
+                        <el-form-item label="通知人" prop="hnotifyCnName" >
                             <span slot="label">
                                <span style="color: #1e9fff">通知人</span>
                             </span>
                             <div>
                                 <el-col :span="16">
-                                    <search-query :datalist="hNotifyData"
-                                                  :selectValue="assemblyForm.hNotifyCnName"
+                                    <search-query :datalist="hnotifyData"
+                                                  :selectValue="assemblyForm.hnotifyCnName"
                                                   :filterable="true"
                                                   :clearable="true"
                                                   :remote="true"
                                                   :disabled="detailData.seeDisabled"
                                                   :buttonIf="false"
                                                   :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                                  @remoteMethod="remoteMethod($event,'hNotify')"
-                                                  @corpChange="corpChange($event,'hNotify')"
-                                                  @corpFocus="remoteMethod($event,'hNotify')">
+                                                  @remoteMethod="remoteMethod($event,'hnotify')"
+                                                  @corpChange="corpChange($event,'hnotify')"
+                                                  @corpFocus="remoteMethod($event,'hnotify')">
                                     </search-query>
                                 </el-col>
                                 <el-col :span="7">
                                     <div style="display: flex;align-items: center;justify-content: space-between;padding-left: 10px">
                                         <div style="flex: 4">
-                                            <el-input type="age" style="width: 100%;" v-model="assemblyForm.hNotifyCntyName"
+                                            <el-input type="age" style="width: 100%;" v-model="assemblyForm.hnotifyCntyName"
                                                       size="small" autocomplete="off"
                                                       :disabled="detailData.seeDisabled"
                                                       clearable placeholder="通知人" ></el-input>
                                         </div>
                                         <div style="flex: 1;margin-left: 10px">
-                                            <div class="addbuttonClass" @click="hNotifyClick">+</div>
+                                            <div class="addbuttonClass" @click="hnotifyClick">+</div>
                                         </div>
                                     </div>
                                 </el-col>
                             </div>
                         </el-form-item>
                         <div>
-                            <el-form-item label="" prop="hNotifyDetails" >
-                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hNotifyDetails"
+                            <el-form-item label="" prop="hnotifyDetails" >
+                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hnotifyDetails"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="5"
                                           clearable placeholder="通知人提单描述"
-                                          @blur="textareaBlur('hNotifyDetails')" ></el-input>
+                                          @blur="textareaBlur('hnotifyDetails')" ></el-input>
                             </el-form-item>
                         </div>
                     </el-row>
@@ -678,44 +678,44 @@
 
         <el-dialog
             title="第二通知人"
-            :visible.sync="hNotify2Visible"
+            :visible.sync="hnotify2Visible"
             width="30%"
             append-to-body
-            :before-close="hNotify2HandleClose">
+            :before-close="hnotify2HandleClose">
             <div>
                 <el-form :model="assemblyForm" ref="form" label-width="60px">
                     <el-row :gutter="20">
                         <el-col :span="12">
-                            <el-form-item label="通知人" prop="hNotify2CnName" >
-                                <search-query :datalist="hNotify2Data"
-                                              :selectValue="assemblyForm.hNotify2CnName"
+                            <el-form-item label="通知人" prop="hnotify2CnName" >
+                                <search-query :datalist="hnotify2Data"
+                                              :selectValue="assemblyForm.hnotify2CnName"
                                               :filterable="true"
                                               :clearable="true"
                                               :remote="true"
                                               :disabled="detailData.seeDisabled"
                                               :buttonIf="false"
                                               :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                              @remoteMethod="remoteMethod($event,'hNotify2')"
-                                              @corpChange="corpChange($event,'hNotify2')"
-                                              @corpFocus="remoteMethod($event,'hNotify2')" >
+                                              @remoteMethod="remoteMethod($event,'hnotify2')"
+                                              @corpChange="corpChange($event,'hnotify2')"
+                                              @corpFocus="remoteMethod($event,'hnotify2')" >
                                 </search-query>
                             </el-form-item>
                         </el-col>
                         <el-col :span="12">
-                            <el-form-item label="国家" prop="hNotify2CntyName" >
-                                <el-input type="age" style="width: 100%;" v-model="assemblyForm.hNotify2CntyName"
+                            <el-form-item label="国家" prop="hnotify2CntyName" >
+                                <el-input type="age" style="width: 100%;" v-model="assemblyForm.hnotify2CntyName"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled"
                                           clearable placeholder="国家" ></el-input>
                             </el-form-item>
                         </el-col>
                         <el-col :span="24">
-                            <el-form-item label="提单描述" prop="hNotify2Details" >
-                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hNotify2Details"
+                            <el-form-item label="提单描述" prop="hnotify2Details" >
+                                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hnotify2Details"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="4"
                                           clearable placeholder="通知人提单描述"
-                                          @blur="textareaBlur('hNotify2Details')" ></el-input>
+                                          @blur="textareaBlur('hnotify2Details')" ></el-input>
                             </el-form-item>
                         </el-col>
 
@@ -724,8 +724,8 @@
                 </el-form>
             </div>
             <span slot="footer" class="dialog-footer">
-                <el-button type="danger" @click="hNotify2Cancellation('清除')">清 除</el-button>
-                <el-button type="primary" @click="hNotify2Visible = false">确 定</el-button>
+                <el-button type="danger" @click="hnotify2Cancellation('清除')">清 除</el-button>
+                <el-button type="primary" @click="hnotify2Visible = false">确 定</el-button>
             </span>
         </el-dialog>
 
@@ -734,7 +734,7 @@
             :visible.sync="dgVisible"
             width="50%"
             append-to-body
-            :before-close="hNotify2HandleClose">
+            :before-close="hnotify2HandleClose">
             <div>
                 <el-form :model="assemblyForm" ref="form" label-width="120px">
                     <el-row :gutter="20">
@@ -841,15 +841,15 @@ import Vue from "vue";
                 // 多选的数据
                 tabsMultipleChoice:[],
                 // 发货人数据
-                hShipperData:[],
+                hshipperData:[],
                 // 收货人数据
-                hConsigneeData:[],
+                hconsigneeData:[],
                 // 通知人
-                hNotifyData:[],
+                hnotifyData:[],
                 // 第二通知人
-                hNotify2Data:[],
+                hnotify2Data:[],
                 // 通知人弹窗开启关闭
-                hNotify2Visible:false,
+                hnotify2Visible:false,
                 // 收货地
                 placeReceiptData:[],
                 // 装货港
@@ -899,10 +899,10 @@ import Vue from "vue";
         },
         created() {
             // // 往来单位
-            // this.hShipperBcorpsListfun()
-            // this.hConsigneeBcorpsListfun()
-            // this.hNotifyBcorpsListfun()
-            // this.hNotify2BcorpsListfun()
+            // this.hshipperBcorpsListfun()
+            // this.hconsigneeBcorpsListfun()
+            // this.hnotifyBcorpsListfun()
+            // this.hnotify2BcorpsListfun()
             // this.bookingAgentBcorpsListfun()
             // // 港口接口
             // this.placeReceiptBportsListfun()
@@ -928,7 +928,7 @@ import Vue from "vue";
             },
             // 远程搜索
             remoteMethod(value,name){
-                let arr = ['hShipper','hConsignee','hNotify','hNotify2','bookingAgent']
+                let arr = ['hshipper','hconsignee','hnotify','hnotify2','bookingAgent']
                 let portArr = ['placeReceipt','pol','pod','destination','placeDelivery','pot']
                 if (arr.indexOf(name) != -1) {
                     this[name + 'BcorpsListfun'](value)
@@ -965,7 +965,7 @@ import Vue from "vue";
             },
             // 选择框的回调
             corpChange(value,name) {
-                let arr = ['hShipper','hConsignee','hNotify','hNotify2']
+                let arr = ['hshipper','hconsignee','hnotify','hnotify2']
                 let portArr = ['placeReceipt','destination','placeDelivery']
                 let cnPorArr = ['pol','pod','pot']
                 if (arr.indexOf(name) != -1) {
@@ -1094,30 +1094,30 @@ import Vue from "vue";
                 }
             },
             // 通知人添加第二个通知人弹窗
-            hNotifyClick(){
-                this.hNotify2Visible = true
+            hnotifyClick(){
+                this.hnotify2Visible = true
             },
             // 第二通知人弹窗的清除
-            hNotify2Cancellation(name){
+            hnotify2Cancellation(name){
                 let title = ''
                 if (name == '清除') {
                     title = '确认清除吗?'
                 }
                 this.$confirm(title)
                     .then(_ => {
-                        this.$set(this.assemblyForm,'hNotify2Id','')
-                        this.$set(this.assemblyForm,'hNotify2CnName','')
-                        this.$set(this.assemblyForm,'hNotify2EnName','')
-                        this.$set(this.assemblyForm,'hNotify2Code','')
-                        this.$set(this.assemblyForm,'hNotify2Details','')
-                        this.$set(this.assemblyForm,'hNotify2CntyName','')
-                        this.$set(this.assemblyForm,'hNotify2CntyCode','')
-                        this.hNotify2Visible = false
+                        this.$set(this.assemblyForm,'hnotify2Id','')
+                        this.$set(this.assemblyForm,'hnotify2CnName','')
+                        this.$set(this.assemblyForm,'hnotify2EnName','')
+                        this.$set(this.assemblyForm,'hnotify2Code','')
+                        this.$set(this.assemblyForm,'hnotify2Details','')
+                        this.$set(this.assemblyForm,'hnotify2CntyName','')
+                        this.$set(this.assemblyForm,'hnotify2CntyCode','')
+                        this.hnotify2Visible = false
                     })
                     .catch(_ => {});
             },
             // 通知人
-            hNotify2HandleClose(done){
+            hnotify2HandleClose(done){
                 this.$confirm('确认关闭?')
                     .then(_ => {
                         done();
@@ -1157,13 +1157,14 @@ import Vue from "vue";
             },
             // text文本框input
             textareaBlur(name){
+                console.log(name,1160)
                 if (this.assemblyForm[name].length > (35 * 5)) {
                     this.$message({
                         message: '输入的字体已经超出五行',
                         type: 'warning'
                     });
                 }
-                let arr = ['hShipperDetails','hConsigneeDetails','hNotifyDetails','marks','commodityDescr','hNotify2Details']
+                let arr = ['hshipperDetails','hconsigneeDetails','hnotifyDetails','marks','commodityDescr','hnotify2Details']
                 if (arr.indexOf(name) != -1) {
                     console.log(this.assemblyForm[name],1133)
                     this.assemblyForm[name] = this.assemblyForm[name].toUpperCase()
@@ -1172,50 +1173,50 @@ import Vue from "vue";
             },
             // 同通知人
             notifybyfun(){
-                this.$set(this.assemblyForm,'hNotifyId',this.assemblyForm.hConsigneeId)
-                this.$set(this.assemblyForm,'hNotifyCnName',this.assemblyForm.hConsigneeCnName)
-                this.$set(this.assemblyForm,'hNotifyEnName',this.assemblyForm.hConsigneeEnName)
-                this.$set(this.assemblyForm,'hNotifyCode',this.assemblyForm.hConsigneeCode)
-                this.$set(this.assemblyForm,'hNotifyDetails',this.assemblyForm.hConsigneeDetails)
-                this.$set(this.assemblyForm,'hNotifyCntyName',this.assemblyForm.hConsigneeCntyName)
-                this.$set(this.assemblyForm,'hNotifyCntyCode',this.assemblyForm.hConsigneeCntyCode)
+                this.$set(this.assemblyForm,'hnotifyId',this.assemblyForm.hconsigneeId)
+                this.$set(this.assemblyForm,'hnotifyCnName',this.assemblyForm.hconsigneeCnName)
+                this.$set(this.assemblyForm,'hnotifyEnName',this.assemblyForm.hconsigneeEnName)
+                this.$set(this.assemblyForm,'hnotifyCode',this.assemblyForm.hconsigneeCode)
+                this.$set(this.assemblyForm,'hnotifyDetails',this.assemblyForm.hconsigneeDetails)
+                this.$set(this.assemblyForm,'hnotifyCntyName',this.assemblyForm.hconsigneeCntyName)
+                this.$set(this.assemblyForm,'hnotifyCntyCode',this.assemblyForm.hconsigneeCntyCode)
             },
             // 接口数据请求🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
             // 获取发货人数据 (往来单位 前四个代理)
-            hShipperBcorpsListfun(cnName){
+            hshipperBcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.hShipperData = res.data.data.records.map(item=>{
+                    this.hshipperData = res.data.data.records.map(item=>{
                         item.cnName = item.cnName + ' - ' + item.code
                         return item
                     })
                 })
             },
             // 获取收货人数据 (往来单位 前四个代理)
-            hConsigneeBcorpsListfun(cnName){
+            hconsigneeBcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.hConsigneeData = res.data.data.records.map(item=>{
+                    this.hconsigneeData = res.data.data.records.map(item=>{
                         item.cnName = item.cnName + ' - ' + item.code
                         return item
                     })
                 })
             },
             // 获取通知人数据 (往来单位 前四个代理)
-            hNotifyBcorpsListfun(cnName){
+            hnotifyBcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.hNotifyData = res.data.data.records.map(item=>{
+                    this.hnotifyData = res.data.data.records.map(item=>{
                         item.cnName = item.cnName + ' - ' + item.code
                         return item
                     })
                 })
             },
             // 获取第二通知人数据 (往来单位 前四个代理)
-            hNotify2BcorpsListfun(cnName){
+            hnotify2BcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.hNotify2Data = res.data.data.records
+                    this.hnotify2Data = res.data.data.recordsx
                 })
             },
             // 收货地数据 (港口表)

+ 32 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -28,7 +28,7 @@
                    :disabled="seeDisabled"
                    @click.stop="handleDelete">删 除
         </el-button>
-        <el-button type="success" size="small" plain>均分箱量</el-button>
+        <el-button type="success" size="small" plain @click.stop="equalDistribution">均分箱量</el-button>
       </template>
         <template slot-scope="scope" slot="menu">
             <el-button
@@ -70,6 +70,7 @@
   import {mapGetters} from "vuex";
   import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
   import {bcntrtypesList} from "@/api/iosBasicData/bcntrtypes";
+  import {containersEqualDistribution} from "@/api/iosBasicData/containers";
 
   export default {
       components: {SearchQuery},
@@ -273,6 +274,36 @@
           }
       },
       methods: {
+        // 平均箱量
+        equalDistribution(){
+            if(this.assemblyForm.waitingBoxList.length <= 0) {
+                this.$message({
+                    type: "warning",
+                    message: "请先添加集装箱数据!"
+                });
+                return
+            }
+            this.$confirm("确定平均分配?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(()=>{
+                this.containersEqualDistributionfun()
+            })
+        },
+          // 平均分配接口
+          containersEqualDistributionfun(){
+              containersEqualDistribution({
+                  pid:this.assemblyForm.id,
+                  waitingBox:this.assemblyForm.waitingBoxList[0]
+              }).then(res=>{
+                  this.$message({
+                      type: "success",
+                      message: "操作成功!"
+                  })
+                  this.billsDetailfun()
+              })
+          },
         // 选择框的回调
         corpChange(value,row) {
             for (let item of this.cntrTypeCodeData) {

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue

@@ -189,11 +189,11 @@
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
-                    <el-form-item label="HB/L付款地点" prop="hPayplace" >
+                    <el-form-item label="HB/L付款地点" prop="hpayplace" >
                         <span slot="label">
                             <span style="color: #1e9fff">HB/L付款地点</span>
                         </span>
-                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.hPayplace"
+                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.hpayplace"
                                   size="small" autocomplete="off"
                                   :disabled="detailData.seeDisabled"
                                   clearable placeholder="请输入HB/L付款地点" ></el-input>

+ 46 - 46
src/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue

@@ -189,26 +189,26 @@
 
             <el-row>
                 <el-col :span="6">
-                    <el-form-item label="MB/L 发货人" prop="mShipperCnName" >
+                    <el-form-item label="MB/L 发货人" prop="mshipperCnName" >
                         <span slot="label">
                             <span style="color: #1e9fff">MB/L 发货人</span>
                         </span>
-                        <search-query :datalist="mShipperData"
-                                      :selectValue="assemblyForm.mShipperCnName"
+                        <search-query :datalist="mshipperData"
+                                      :selectValue="assemblyForm.mshipperCnName"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :disabled="detailData.seeDisabled"
                                       :buttonIf="false"
                                       :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                      @remoteMethod="remoteMethod($event,'mShipper')"
-                                      @corpChange="corpChange($event,'mShipper')"
-                                      @corpFocus="remoteMethod($event,'mShipper')" >
+                                      @remoteMethod="remoteMethod($event,'mshipper')"
+                                      @corpChange="corpChange($event,'mshipper')"
+                                      @corpFocus="remoteMethod($event,'mshipper')" >
                         </search-query>
                     </el-form-item>
                     <div style="margin-top: 10px">
-                        <el-form-item label="" prop="mShipperDetails" >
-                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mShipperDetails"
+                        <el-form-item label="" prop="mshipperDetails" >
+                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mshipperDetails"
                                       size="small" autocomplete="off"
                                       :disabled="detailData.seeDisabled" rows="4"
                                       clearable placeholder="发货人提单描述" ></el-input>
@@ -216,26 +216,26 @@
                     </div>
                 </el-col>
                 <el-col :span="6">
-                    <el-form-item label="MB/L 收货人" prop="mConsigneeCnName" >
+                    <el-form-item label="MB/L 收货人" prop="mconsigneeCnName" >
                         <span slot="label">
                             <span style="color: #1e9fff">MB/L 收货人</span>
                         </span>
-                        <search-query :datalist="mConsigneeData"
-                                      :selectValue="assemblyForm.mConsigneeCnName"
+                        <search-query :datalist="mconsigneeData"
+                                      :selectValue="assemblyForm.mconsigneeCnName"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :disabled="detailData.seeDisabled"
                                       :buttonIf="false"
                                       :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                      @remoteMethod="remoteMethod($event,'mConsignee')"
-                                      @corpChange="corpChange($event,'mConsignee')"
-                                      @corpFocus="remoteMethod($event,'mConsignee')" >
+                                      @remoteMethod="remoteMethod($event,'mconsignee')"
+                                      @corpChange="corpChange($event,'mconsignee')"
+                                      @corpFocus="remoteMethod($event,'mconsignee')" >
                         </search-query>
                     </el-form-item>
                     <div style="margin-top: 10px">
-                        <el-form-item label="" prop="mConsigneeCntyName" >
-                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mConsigneeCntyName"
+                        <el-form-item label="" prop="mconsigneeCntyName" >
+                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mconsigneeCntyName"
                                       size="small" autocomplete="off"
                                       :disabled="detailData.seeDisabled" rows="4"
                                       clearable placeholder="发货人提单描述" ></el-input>
@@ -243,26 +243,26 @@
                     </div>
                 </el-col>
                 <el-col :span="6">
-                    <el-form-item label="MB/L 通知人" prop="mNotifyCnName" >
+                    <el-form-item label="MB/L 通知人" prop="mnotifyCnName" >
                         <span slot="label">
                             <span style="color: #1e9fff">MB/L 通知人</span>
                         </span>
-                        <search-query :datalist="mNotifyData"
-                                      :selectValue="assemblyForm.mNotifyCnName"
+                        <search-query :datalist="mnotifyData"
+                                      :selectValue="assemblyForm.mnotifyCnName"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :disabled="detailData.seeDisabled"
                                       :buttonIf="false"
                                       :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                      @remoteMethod="remoteMethod($event,'mNotify')"
-                                      @corpChange="corpChange($event,'mNotify')"
-                                      @corpFocus="remoteMethod($event,'mNotify')" >
+                                      @remoteMethod="remoteMethod($event,'mnotify')"
+                                      @corpChange="corpChange($event,'mnotify')"
+                                      @corpFocus="remoteMethod($event,'mnotify')" >
                         </search-query>
                     </el-form-item>
                     <div style="margin-top: 10px">
-                        <el-form-item label="" prop="mNotifyCntyName" >
-                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mNotifyCntyName"
+                        <el-form-item label="" prop="mnotifyCntyName" >
+                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mnotifyCntyName"
                                       size="small" autocomplete="off"
                                       :disabled="detailData.seeDisabled" rows="4"
                                       clearable placeholder="通知人提单描述" ></el-input>
@@ -270,26 +270,26 @@
                     </div>
                 </el-col>
                 <el-col :span="6">
-                    <el-form-item label="第二通知人" prop="mNotify2CnName" >
+                    <el-form-item label="第二通知人" prop="mnotify2CnName" >
                         <span slot="label">
                             <span style="color: #1e9fff">第二通知人</span>
                         </span>
-                        <search-query :datalist="mNotify2Data"
-                                      :selectValue="assemblyForm.mNotify2CnName"
+                        <search-query :datalist="mnotify2Data"
+                                      :selectValue="assemblyForm.mnotify2CnName"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :disabled="detailData.seeDisabled"
                                       :buttonIf="false"
                                       :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                      @remoteMethod="remoteMethod($event,'mNotify2')"
-                                      @corpChange="corpChange($event,'mNotify2')"
-                                      @corpFocus="remoteMethod($event,'mNotify2')" >
+                                      @remoteMethod="remoteMethod($event,'mnotify2')"
+                                      @corpChange="corpChange($event,'mnotify2')"
+                                      @corpFocus="remoteMethod($event,'mnotify2')" >
                         </search-query>
                     </el-form-item>
                     <div style="margin-top: 10px">
-                        <el-form-item label="" prop="mNotify2Details" >
-                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mNotify2Details"
+                        <el-form-item label="" prop="mnotify2Details" >
+                            <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.mnotify2Details"
                                       size="small" autocomplete="off"
                                       :disabled="detailData.seeDisabled" rows="4"
                                       clearable placeholder="第二通知人提单描述" ></el-input>
@@ -333,13 +333,13 @@
                 bookingAgentData:[], // 订舱代理
 
                 // MB/L 发货人
-                mShipperData:[],
+                mshipperData:[],
                 // MB/L 收货人
-                mConsigneeData:[],
+                mconsigneeData:[],
                 // MB/L 通知人
-                mNotifyData:[],
+                mnotifyData:[],
                 // MB/L 第二通知人
-                mNotify2Data:[],
+                mnotify2Data:[],
             }
         },
         created() {
@@ -348,7 +348,7 @@
         methods:{
             /* 远程模糊查询操作用户 */
             remoteMethod(value,name){
-                let arr = ['mShipper','mConsignee','mNotify','mNotify2']
+                let arr = ['mshipper','mconsignee','mnotify','mnotify2']
                 if (name == 'vessel'){
                     this.vesselBvesselsListfun(value)
                 }
@@ -369,7 +369,7 @@
             },
             // 下拉的监听事件
             corpChange(value,name){
-                let arr = ['mShipper','mConsignee','mNotify','mNotify2']
+                let arr = ['mshipper','mconsignee','mnotify','mnotify2']
                 if (name == 'vessel') {
                     for(let item of this[name + 'Data']) {
                         if (item.cnName == value) {
@@ -459,31 +459,31 @@
                 })
             },
             // 获取MB/L 发货人数据 (往来单位 前四个代理)
-            mShipperBcorpsListfun(cnName){
+            mshipperBcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.mShipperData = res.data.data.records
+                    this.mshipperData = res.data.data.records
                 })
             },
             // 获取收货人数据 (往来单位 前四个代理)
-            mConsigneeBcorpsListfun(cnName){
+            mconsigneeBcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.mConsigneeData = res.data.data.records
+                    this.mconsigneeData = res.data.data.records
                 })
             },
             // 获取通知人数据 (往来单位 前四个代理)
-            mNotifyBcorpsListfun(cnName){
+            mnotifyBcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.mNotifyData = res.data.data.records
+                    this.mnotifyData = res.data.data.records
                 })
             },
             // 获取第二通知人数据 (往来单位 前四个代理)
-            mNotify2BcorpsListfun(cnName){
+            mnotify2BcorpsListfun(cnName){
                 let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
                 getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
-                    this.mNotify2Data = res.data.data.records
+                    this.mnotify2Data = res.data.data.records
                 })
             },
 

+ 49 - 42
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -275,7 +275,7 @@ import {dateFormat} from "@/util/date";
                     mpaymode:'PP', // 主单付费方式 默认PP
                     hpaymode:'PP', // 分单付费方式 默认 PP
                     loadType:'FCL', // 装箱方式默认整箱
-                    srcType:'OWN', // 业务来源默认公司   来源 内容 默认登录人所属公司
+                    // srcType:'OWN', // 业务来源默认公司   来源 内容 默认登录人所属公司
                     numberOfObl:'THREE', // 正本份数 默认 THREE
                     numberOfCopy:'ONE', // 副本份数 默认 ONE
                     seaType:'E', // 进出口 默认出口 E=出口 I=进口"
@@ -346,7 +346,7 @@ import {dateFormat} from "@/util/date";
                                 label: "业务来源", // OWN=公司  AGENT=代理 SALES=业务员
                                 prop: "srcType",
                                 type:'select',
-                                disabled:false,
+                                disabled:true,
                                 dicData:[
                                     {
                                         label:'公司',
@@ -685,7 +685,7 @@ import {dateFormat} from "@/util/date";
                     }
                     // 分单单付费地点 默认  如果分单付费方式 为PP 取装货港 如果分单付费地点为CC 取卸货港
                     if (this.form.hpaymode == 'PP') {
-                        this.$set(this.form,'hPayplace',this.form.polCnName)
+                        this.$set(this.form,'hpayplace',this.form.polCnName)
                     }
                 })
             },
@@ -747,14 +747,13 @@ import {dateFormat} from "@/util/date";
                 getDeptLazyTree(0).then(res=>{
                     this.columnforfun('srcCnName').dicData = res.data.data
                     // 来源 内容 默认登录人所属公司
-                    for(let item of this.columnforfun('srcCnName').dicData) {
-                        if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
-                            this.$set(this.form,'srcId',item.id)
-                            this.$set(this.form,'srcCnName',item.title)
-                            this.$set(this.form,'srcEnName',item.title)
-                        }
-                    }
-
+                    // for(let item of this.columnforfun('srcCnName').dicData) {
+                    //     if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
+                    //         this.$set(this.form,'srcId',item.id)
+                    //         this.$set(this.form,'srcCnName',item.title)
+                    //         this.$set(this.form,'srcEnName',item.title)
+                    //     }
+                    // }
                 })
             },
             // 申请B/L NO
@@ -788,7 +787,10 @@ import {dateFormat} from "@/util/date";
                     }else if (this.form.srcType == 'AGENT') {
                         // 代理
                         this.agentBcorpsListfun(value)
-                    }
+                    }else if (this.form.srcType == 'OWN') {
+                        // 公司
+                        this.ownDeptLazyTreefun()
+                    }else {}
                 }else {
 
                 }
@@ -832,12 +834,19 @@ import {dateFormat} from "@/util/date";
                     // 往来单位
                     for(let item of this.columnforfun('corpCnName').dicData) {
                         if (item.cnName == value) {
-                            console.log(item,677)
                             this.form.corpCnName = item.cnName
                             this.form.corpEnName = item.enName
                             this.form.corpId = item.id
                             this.form.corpCode = item.code
+                            // 获取 客户op数据
                             this.getBcorpsattnListfun()
+                            // 业务来源参数带出
+                            this.$set(this.form,'srcType',item.sourceType)
+                            this.$set(this.form,'srcId',item.srcId)
+                            this.$set(this.form,'srcCnName',item.srcCnName)
+                            this.$set(this.form,'srcEnName',item.srcEnName)
+                            this.columnforfun('srcType').disabled = false
+                            this.columnforfun('srcCnName').disabled = false
                         }
                     }
                 }
@@ -854,25 +863,26 @@ import {dateFormat} from "@/util/date";
                 else if (name == 'srcType') {
                     if (!value) {
                         this.$set(this.form,'srcType','')
-                        this.$set(this.form,'srcId','')
-                        this.$set(this.form,'srcCnName','')
-                        this.$set(this.form,'srcEnName','')
-                        this.columnforfun('srcCnName').disabled = true
+                        // this.columnforfun('srcCnName').disabled = true
                         return
                     }
+                    this.$set(this.form,'srcId','')
+                    this.$set(this.form,'srcCnName','')
+                    this.$set(this.form,'srcEnName','')
                     this.form[name] = value
                     if (value == 'OWN') {
                         // 公司
-                        this.columnforfun('srcCnName').type = ''
-                        for(let item of this.columnforfun('srcCnName').dicData) {
-                            if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
-                                console.log(item,847)
-                                this.$set(this.form,'srcId',item.id)
-                                this.$set(this.form,'srcCnName',item.title)
-                                this.$set(this.form,'srcEnName',item.title)
-                            }
-                        }
-                        this.columnforfun('srcCnName').disabled = true
+                        // this.columnforfun('srcCnName').type = ''
+                        this.columnforfun('srcCnName').forParameter = { key:'id', label:'title', value:'title'}
+                        this.ownDeptLazyTreefun()
+                        // for(let item of this.columnforfun('srcCnName').dicData) {
+                        //     if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
+                        //         this.$set(this.form,'srcId',item.id)
+                        //         this.$set(this.form,'srcCnName',item.title)
+                        //         this.$set(this.form,'srcEnName',item.title)
+                        //     }
+                        // }
+                        // this.columnforfun('srcCnName').disabled = true
                     }else if (value == 'AGENT') {
                         // 代理
                         this.columnforfun('srcCnName').type = 'select'
@@ -1045,19 +1055,16 @@ import {dateFormat} from "@/util/date";
             // 下拉 把拼接的拆分
             searchSplit(){
                 // 发货人
-                if (this.form.hShipperCnName) {
-                    this.form.hShipperCnName = this.form.hShipperCnName.split(' - ')[0]
-                    this.form.hshipperCnName = this.form.hShipperCnName
+                if (this.form.hshipperCnName) {
+                    this.form.hshipperCnName = this.form.hshipperCnName.split(' - ')[0]
                 }
                 // 收货人
-                if (this.form.hConsigneeCnName) {
-                    this.form.hConsigneeCnName = this.form.hConsigneeCnName.split(' - ')[0]
-                    this.form.hconsigneeCnName = this.form.hConsigneeCnName
+                if (this.form.hconsigneeCnName) {
+                    this.form.hconsigneeCnName = this.form.hconsigneeCnName.split(' - ')[0]
                 }
                 // 通知人
-                if (this.form.hNotifyCnName) {
-                    this.form.hNotifyCnName = this.form.hNotifyCnName.split(' - ')[0]
-                    this.form.hnotifyCnName = this.form.hNotifyCnName
+                if (this.form.hnotifyCnName) {
+                    this.form.hnotifyCnName = this.form.hnotifyCnName.split(' - ')[0]
                 }
                 // 船公司
                 if (this.form.carrierCnName) {
@@ -1067,16 +1074,16 @@ import {dateFormat} from "@/util/date";
             // 下拉 中文名称和编号拼接
             searchMontage(){
                 // 发货人
-                if (this.form.hShipperCnName) {
-                    this.form.hShipperCnName = this.form.hShipperCnName + ' - ' + this.form.hShipperCode
+                if (this.form.hshipperCnName) {
+                    this.form.hshipperCnName = this.form.hshipperCnName + ' - ' + this.form.hShipperCode
                 }
                 // 收货人
-                if (this.form.hConsigneeCnName) {
-                    this.form.hConsigneeCnName = this.form.hConsigneeCnName + ' - ' + this.form.hConsigneeCode
+                if (this.form.hconsigneeCnName) {
+                    this.form.hconsigneeCnName = this.form.hconsigneeCnName + ' - ' + this.form.hConsigneeCode
                 }
                 // 通知人
-                if (this.form.hNotifyCnName) {
-                    this.form.hNotifyCnName = this.form.hNotifyCnName + ' - ' + this.form.hNotifyCode
+                if (this.form.hnotifyCnName) {
+                    this.form.hnotifyCnName = this.form.hnotifyCnName + ' - ' + this.form.hNotifyCode
                 }
                 // 船公司
                 if (this.form.carrierCnName) {

+ 134 - 2
src/views/iosBasicData/bcorps/detailsPage.vue

@@ -123,8 +123,37 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="客户来源" prop="sourceType">
-                  <el-input v-model="formData.sourceType" placeholder="请输入客户来源" clearable :style="{ width: '100%' }">
-                  </el-input>
+                    <el-row :gutter="10">
+                        <el-col :span="10">
+                            <search-query
+                                          :datalist="sourceTypeData"
+                                          :selectValue="formData.sourceType"
+                                          :filterable="true"
+                                          :clearable="true"
+                                          :remote="true"
+                                          :buttonIf="false"
+                                          @corpChange="sourceCorp($event,'sourceType')">
+                            </search-query>
+                        </el-col>
+                        <el-col :span="13">
+                            <search-query
+                                          :datalist="srcData"
+                                          :selectValue="formData.srcCnName"
+                                          :filterable="true"
+                                          :clearable="true"
+                                          :remote="true"
+                                          :disabled="!formData.sourceType"
+                                          :buttonIf="false"
+                                          :forParameter="sourceforParameter"
+                                          @remoteMethod="sourceRemote($event,'srcCnName')"
+                                          @corpChange="sourceCorp($event,'srcCnName')"
+                                          @corpFocus="sourceRemote($event,'srcCnName')" >
+                            </search-query>
+                        </el-col>
+                    </el-row>
+                  <!--<el-input v-model="formData.sourceType" placeholder="请输入客户来源" clearable :style="{ width: '100%' }">-->
+                  <!--</el-input>-->
+
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -801,6 +830,9 @@ import bcountrys from '@/views/iosBasicData/bcountrys/index.vue'
 import user from '@/views/system/user.vue'
 import rateManagement from '@/views/iosBasicData/rateManagement/index.vue'
 import SearchQuery from '@/components/iosbasic-data/searchquery.vue'
+import {getList as userGetList} from '@/api/system/user'
+import {getDeptLazyTree} from "@/api/system/dept";
+import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
 export default {
   components: {
     SearchQuery, bcountrys, user, rateManagement
@@ -815,6 +847,25 @@ export default {
   },
   data() {
     return {
+        // 客户来源
+        sourceTypeData:[
+            {
+                label:'公司',
+                value:'OWN'
+            },
+            {
+                label:'代理',
+                value:'AGENT'
+            },
+            {
+                label:'业务员',
+                value:'SALES'
+            }
+        ],
+        // 客户来源下级配置
+        sourceforParameter:{},
+        // 客户来源下级
+        srcData:[],
       // tab标签
       activeName: 'kgxq',
       // 远程搜索
@@ -1036,6 +1087,87 @@ export default {
   },
   mounted() { },
   methods: {
+      // 客户来源下拉
+      sourceCorp(value,name){
+          if (name == 'srcCnName') {
+              for (let item of this.srcData) {
+                  if (item[this.sourceforParameter.value] == value) {
+                      if (this.formData.sourceType == 'OWN') {
+                          // 国家
+                          this.$set(this.formData,'srcId',item.id)
+                          this.$set(this.formData,'srcCnName',item.title)
+                          this.$set(this.formData,'srcEnName',item.title)
+                      }else if (this.formData.sourceType == 'AGENT') {
+                          // 代理
+                          this.$set(this.formData,'srcId',item.id)
+                          this.$set(this.formData,'srcCnName',item.cnName)
+                          this.$set(this.formData,'srcEnName',item.cnName)
+                      }else if (this.formData.sourceType == 'SALES') {
+                          // 业务员
+                          this.$set(this.formData,'srcId',item.id)
+                          this.$set(this.formData,'srcCnName',item.name)
+                          this.$set(this.formData,'srcEnName',item.name)
+                      }else {}
+                  }
+              }
+          }else if (name == 'sourceType') {
+              this.$set(this.formData,'sourceType',value)
+              this.$set(this.formData,'srcId','')
+              this.$set(this.formData,'srcCnName','')
+              this.$set(this.formData,'srcEnName','')
+              if (this.formData.sourceType == 'OWN') {
+                  this.sourceforParameter = { key:'id', label:'title', value:'title'}
+                  this.ownDeptLazyTreefun()
+              }else if (this.formData.sourceType == 'AGENT') {
+                  this.sourceforParameter = { key:'id', label:'cnName', value:'cnName'}
+                  this.agentBcorpsListfun()
+              }else if (this.formData.sourceType == 'SALES') {
+                  this.sourceforParameter = { key:'id', label:'name', value:'name'}
+                  this.salesUserGetListfun()
+              }else {}
+          }else {}
+      },
+      // 客户来源接口
+      sourceRemote(value,name){
+          if (name == 'srcCnName') {
+              if (this.formData.sourceType == 'OWN') {
+                  this.ownDeptLazyTreefun()
+              }else if (this.formData.sourceType == 'AGENT') {
+                  this.agentBcorpsListfun(value)
+              }else if (this.formData.sourceType == 'SALES') {
+                  this.salesUserGetListfun(value)
+              }else {}
+          }else {}
+      },
+      // 获取业务来源代理数据
+      agentBcorpsListfun(cnName){
+          let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
+          getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
+              this.srcData = res.data.data.records
+          })
+      },
+      // 获取业务来源业务员数据
+      salesUserGetListfun(account){
+          userGetList(1,10,{account}).then(res=>{
+              this.srcData = res.data.data.records
+          })
+      },
+      // 获取公司名称 用户管理左侧
+      ownDeptLazyTreefun(){
+          getDeptLazyTree(0).then(res=>{
+              this.srcData = res.data.data
+              // 来源 内容 默认登录人所属公司
+              for(let item of this.srcData) {
+                  if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
+                      this.$set(this.formData,'srcId',item.id)
+                      this.$set(this.formData,'srcCnName',item.title)
+                      this.$set(this.formData,'srcEnName',item.title)
+                  }
+              }
+
+          })
+      },
+
     corpTypeChange(ids) {
       // console.log(ids);
       this.formData.corpType = ids.join(",")