caojunjie 1 vuosi sitten
vanhempi
commit
b72078ad63

+ 11 - 0
src/api/iosBasicData/bills.js

@@ -107,3 +107,14 @@ export const feecenterTemplateImport = (row) => {
     data: row
   })
 }
+
+export const billsDisembarking = (ids) => {
+  return request({
+    url: '/api/blade-los/bills/disembarking',
+    method: 'post',
+    params: {
+      ids
+    }
+  })
+}
+//

+ 21 - 0
src/util/messageReminder.js

@@ -21,3 +21,24 @@ export const requiredMessage = (form,data)=>{
   }
   return true
 }
+/**
+ * textarea 一行显示35个换行
+ * value 传递需要处理的数据
+ * data 需要判断的数组 [{name:'名称',value:'参数'}]
+ * return
+ */
+export const textareaWrap = (value)=>{
+  //  把输入超出设定字数的字加上 \n
+  let src = value.replace(/(.{35})/g, "$1\n")
+  // 把字符串根据 \n 替换成数组
+  let arr = src.split('\n')
+  let arrs = []
+  for(let item of arr) {
+    // 判断长度,拿取长度不是零的数据 添加到新的数组里
+    if (item.length != 0) {
+      arrs.push(item)
+    }
+  }
+  value = arrs.join('\n')
+  return value
+}

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

@@ -37,7 +37,8 @@
                                 <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hShipperDetails"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="4"
-                                          clearable placeholder="发货人提单描述" ></el-input>
+                                          clearable placeholder="发货人提单描述"
+                                          @blur="textareaBlur('hShipperDetails')" ></el-input>
                             </el-form-item>
                         </div>
                         <el-form-item label="收货人" prop="hConsigneeCnName" >
@@ -64,7 +65,7 @@
                                     <el-input type="age" style="width: 100%;" v-model="assemblyForm.hConsigneeCntyName"
                                               size="small" autocomplete="off"
                                               :disabled="detailData.seeDisabled"
-                                              clearable placeholder="收货人提单描述" ></el-input>
+                                              clearable placeholder="收货人" ></el-input>
                                 </el-col>
                             </div>
                         </el-form-item>
@@ -73,7 +74,8 @@
                                 <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hConsigneeDetails"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="4"
-                                          clearable placeholder="收货人提单描述" ></el-input>
+                                          clearable placeholder="收货人提单描述"
+                                          @blur="textareaBlur('hConsigneeDetails')" ></el-input>
                             </el-form-item>
                         </div>
                         <el-form-item label="通知人" prop="hNotifyCnName" >
@@ -101,7 +103,7 @@
                                             <el-input type="age" style="width: 100%;" v-model="assemblyForm.hNotifyCntyName"
                                                       size="small" autocomplete="off"
                                                       :disabled="detailData.seeDisabled"
-                                                      clearable placeholder="通知人提单描述" ></el-input>
+                                                      clearable placeholder="通知人" ></el-input>
                                         </div>
                                         <div style="flex: 1;margin-left: 10px">
                                             <div class="addbuttonClass" @click="hNotifyClick">+</div>
@@ -115,7 +117,8 @@
                                 <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hNotifyDetails"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="5"
-                                          clearable placeholder="通知人提单描述" ></el-input>
+                                          clearable placeholder="通知人提单描述"
+                                          @blur="textareaBlur('hNotifyDetails')" ></el-input>
                             </el-form-item>
                         </div>
                     </el-row>
@@ -129,7 +132,8 @@
                             <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.marks"
                                       size="small" autocomplete="off"
                                       :disabled="detailData.seeDisabled" rows="5"
-                                      clearable placeholder="备注唛头" ></el-input>
+                                      clearable placeholder="备注唛头"
+                                      @blur="textareaBlur('marks')" ></el-input>
                         </div>
                         <div style="margin-top: 4px">
                             <el-form-item label="HS CODE" prop="commodityCnName" >
@@ -196,7 +200,8 @@
                             <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.commodityDescr"
                                       size="small" autocomplete="off"
                                       :disabled="detailData.seeDisabled" rows="8"
-                                      clearable placeholder="提单上货物描述" ></el-input>
+                                      clearable placeholder="提单上货物描述"
+                                      @blur="textareaBlur('commodityDescr')" ></el-input>
                         </div>
                     </el-row>
                 </el-col>
@@ -374,7 +379,7 @@
                                               :remote="true"
                                               :disabled="detailData.seeDisabled"
                                               :buttonIf="false"
-                                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                              :forParameter="{key:'id',label:'enName',value:'enName'}"
                                               @remoteMethod="remoteMethod($event,'placeReceipt')"
                                               @corpChange="corpChange($event,'placeReceipt')"
                                               @corpFocus="remoteMethod($event,'placeReceipt')" >
@@ -396,13 +401,13 @@
                         <el-row>
                             <el-col :span="16">
                                 <search-query :datalist="polData"
-                                              :selectValue="assemblyForm.polCnName"
+                                              :selectValue="assemblyForm.polEnName"
                                               :filterable="true"
                                               :clearable="true"
                                               :remote="true"
                                               :disabled="detailData.seeDisabled"
                                               :buttonIf="false"
-                                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                              :forParameter="{key:'id',label:'enName',value:'enName'}"
                                               @remoteMethod="remoteMethod($event,'pol')"
                                               @corpChange="corpChange($event,'pol')"
                                               @corpFocus="remoteMethod($event,'pol')" >
@@ -424,13 +429,13 @@
                         <el-row>
                             <el-col :span="16">
                                 <search-query :datalist="podData"
-                                              :selectValue="assemblyForm.podCnName"
+                                              :selectValue="assemblyForm.podEnName"
                                               :filterable="true"
                                               :clearable="true"
                                               :remote="true"
                                               :disabled="detailData.seeDisabled"
                                               :buttonIf="false"
-                                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                              :forParameter="{key:'id',label:'enName',value:'enName'}"
                                               @remoteMethod="remoteMethod($event,'pod')"
                                               @corpChange="corpChange($event,'pod')"
                                               @corpFocus="remoteMethod($event,'pod')" >
@@ -458,7 +463,7 @@
                                               :remote="true"
                                               :disabled="detailData.seeDisabled"
                                               :buttonIf="false"
-                                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                              :forParameter="{key:'id',label:'enName',value:'enName'}"
                                               @remoteMethod="remoteMethod($event,'destination')"
                                               @corpChange="corpChange($event,'destination')"
                                               @corpFocus="remoteMethod($event,'destination')" >
@@ -486,7 +491,7 @@
                                               :remote="true"
                                               :disabled="detailData.seeDisabled"
                                               :buttonIf="false"
-                                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                              :forParameter="{key:'id',label:'enName',value:'enName'}"
                                               @remoteMethod="remoteMethod($event,'placeDelivery')"
                                               @corpChange="corpChange($event,'placeDelivery')"
                                               @corpFocus="remoteMethod($event,'placeDelivery')" >
@@ -501,6 +506,35 @@
                             </el-col>
                         </el-row>
                     </el-form-item>
+                    <el-form-item label="中转港" prop="placeDeliveryName" >
+                        <span slot="label">
+                            <span style="color: #1e9fff">中转港</span>
+                        </span>
+                        <el-row>
+                            <el-col :span="16">
+                                <search-query :datalist="potData"
+                                              :selectValue="assemblyForm.potEnName"
+                                              :filterable="true"
+                                              :clearable="true"
+                                              :remote="true"
+                                              :disabled="detailData.seeDisabled"
+                                              :buttonIf="false"
+                                              :forParameter="{key:'id',label:'enName',value:'enName'}"
+                                              @remoteMethod="remoteMethod($event,'pot')"
+                                              @corpChange="corpChange($event,'pot')"
+                                              @corpFocus="remoteMethod($event,'pot')" >
+                                </search-query>
+                            </el-col>
+                            <el-col :span="7">
+                                <span style="padding-left: 20px"></span>
+                                <el-input type="age" style="width: 100%;" v-model="assemblyForm.potNamePrint"
+                                          size="small" autocomplete="off"
+                                          :disabled="detailData.seeDisabled"
+                                          clearable placeholder="中转港" ></el-input>
+                            </el-col>
+                        </el-row>
+                    </el-form-item>
+
                 </el-col>
                 <el-col :span="16">
                     <precontainers :assemblyForm="assemblyForm"
@@ -517,7 +551,8 @@
                 <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.remarks"
                           size="small" autocomplete="off"
                           :disabled="detailData.seeDisabled" rows="3"
-                          clearable placeholder="备注" ></el-input>
+                          clearable placeholder="备注"
+                          @blur="textareaBlur('remarks')" ></el-input>
             </el-form-item>
 
             <el-row :gutter="20">
@@ -572,7 +607,8 @@
                         <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.bookingRemarks"
                                   size="small" autocomplete="off"
                                   :disabled="detailData.seeDisabled" rows="3"
-                                  clearable placeholder="订舱备注" ></el-input>
+                                  clearable placeholder="订舱备注"
+                                  @blur="textareaBlur('bookingRemarks')" ></el-input>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
@@ -604,7 +640,8 @@
                         <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.siRemarks"
                                   size="small" autocomplete="off"
                                   :disabled="detailData.seeDisabled" rows="3"
-                                  clearable placeholder="SI备注" ></el-input>
+                                  clearable placeholder="SI备注"
+                                  @blur="textareaBlur('siRemarks')" ></el-input>
                     </el-form-item>
                 </el-col>
             </el-row>
@@ -649,7 +686,8 @@
                                 <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.hNotify2Details"
                                           size="small" autocomplete="off"
                                           :disabled="detailData.seeDisabled" rows="4"
-                                          clearable placeholder="通知人提单描述" ></el-input>
+                                          clearable placeholder="通知人提单描述"
+                                          @blur="textareaBlur('hNotify2Details')" ></el-input>
                             </el-form-item>
                         </el-col>
 
@@ -757,6 +795,8 @@ import {getBvesselsList} from "@/api/iosBasicData/bvessels";
 import {blinesList} from "@/api/iosBasicData/blines";
 import {bcorpstypedefineList} from "@/api/iosBasicData/bcorpstypedefine";
 import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
+import {textareaWrap} from "@/util/messageReminder";
+import Vue from "vue";
 
     export default {
         props:{
@@ -792,6 +832,8 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
                 destinationData:[],
                 // 交货地
                 placeDeliveryData:[],
+                // 中转港
+                potData:[],
                 // 商品 HS-CODE
                 commodityData:[],
                 // 货物类别
@@ -823,6 +865,8 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
                 lineData:[],
                 // COLOADER
                 coloaderCnNameData:[],
+
+                marksIndex:1
             }
         },
         created() {
@@ -857,7 +901,7 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
             // 远程搜索
             remoteMethod(value,name){
                 let arr = ['hShipper','hConsignee','hNotify','hNotify2','bookingAgent']
-                let portArr = ['placeReceipt','pol','pod','destination','placeDelivery']
+                let portArr = ['placeReceipt','pol','pod','destination','placeDelivery','pot']
                 if (arr.indexOf(name) != -1) {
                     this[name + 'BcorpsListfun'](value)
                 }
@@ -895,7 +939,7 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
             corpChange(value,name) {
                 let arr = ['hShipper','hConsignee','hNotify','hNotify2']
                 let portArr = ['placeReceipt','destination','placeDelivery']
-                let cnPorArr = ['pol','pod']
+                let cnPorArr = ['pol','pod','pot']
                 if (arr.indexOf(name) != -1) {
                     for(let item of this[name + 'Data']) {
                         if (item.cnName == value) {
@@ -914,7 +958,7 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
                 // 有中文名称的港口
                 else if (cnPorArr.indexOf(name) != -1) {
                     for(let item of this[name + 'Data']) {
-                        if (item.cnName == value) {
+                        if (item.enName == value) {
                             this.$set(this.assemblyForm,name + 'Id',item.id)
                             this.$set(this.assemblyForm,name + 'CnName',item.cnName)
                             this.$set(this.assemblyForm,name + 'EnName',item.enName)
@@ -931,9 +975,9 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
                 // 没有中文名的港口
                 else if (portArr.indexOf(name) != -1) {
                     for(let item of this[name + 'Data']) {
-                        if (item.cnName == value) {
+                        if (item.enName == value) {
                             this.$set(this.assemblyForm,name + 'Id',item.id)
-                            this.$set(this.assemblyForm,name + 'Name',item.cnName)
+                            this.$set(this.assemblyForm,name + 'Name',item.enName)
                             this.$set(this.assemblyForm,name + 'Code',item.code)
                             this.$set(this.assemblyForm,name + 'NamePrint',item.enName)
                         }
@@ -1076,8 +1120,20 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
                     })
                     .catch(_ => {});
             },
-
-
+            // text文本框input
+            textareaBlur(name){
+                if (this.assemblyForm[name].length > (35 * 5)) {
+                    this.$message({
+                        message: '输入的字体已经超出五行',
+                        type: 'warning'
+                    });
+                }
+                let arr = ['hShipperDetails','hConsigneeDetails','hNotifyDetails','marks','commodityDescr','hNotify2Details']
+                if (arr.indexOf(name) != -1) {
+                    this.assemblyForm[name] = this.assemblyForm[name].toUpperCase()
+                }
+                this.assemblyForm[name] = textareaWrap(this.assemblyForm[name])
+            },
             // 接口数据请求🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
             // 获取发货人数据 (往来单位 前四个代理)
             hShipperBcorpsListfun(cnName){
@@ -1137,6 +1193,12 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
                     this.placeDeliveryData = res.data.data.records
                 })
             },
+            // 交货地
+            potBportsListfun(enName){
+                bportsList(1,10,{enName}).then(res=>{
+                    this.potData = res.data.data.records
+                })
+            },
             // 获取类别 COLOADER 数据
             bcorpstypedefineListfun(cnName){
                 bcorpstypedefineList(1,10,{cnName}).then(res=>{

+ 5 - 4
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -271,8 +271,8 @@ import {dateFormat} from "@/util/date";
                     srcType:'OWN', // 业务来源默认公司   来源 内容 默认登录人所属公司
                     numberOfObl:'THREE', // 正本份数 默认 THREE
                     numberOfCopy:'ONE', // 副本份数 默认 ONE
-                    seaType:'E' // 进出口 默认出口 E=出口 I=进口"
-
+                    seaType:'E', // 进出口 默认出口 E=出口 I=进口"
+                    cargoType:'dry', // 货物类型默认普货
                 },
                 basicData:{
                     column:[
@@ -630,12 +630,13 @@ import {dateFormat} from "@/util/date";
             deptGetDetailPolfun(){
                 deptGetDetailPol(this.saberUserInfo.dept_id).then(res=>{
                     // 收货地
-                    this.form.placeReceiptName = res.data.data.polCnName
+                    this.form.placeReceiptName = res.data.data.polEnName
                     this.form.placeReceiptId = res.data.data.polId
                     this.form.placeReceiptNamePrint = res.data.data.polEnName
                     // 装货港
                     this.form.polCnName = res.data.data.polCnName
-                    this.form.placeReceiptId = res.data.data.polId
+                    this.form.polEnName = res.data.data.polEnName
+                    this.form.polId = res.data.data.polId
                     this.form.polNamePrint = res.data.data.polEnName
                     // 签单地点 默认 装货港
                     this.$set(this.form,'issueAt',this.form.polCnName)

+ 59 - 11
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -233,6 +233,12 @@
                              plain
                              @click="increaseMawb">添加到主单
                   </el-button>
+                  <el-button type="danger"
+                             size="small"
+                             icon="el-icon-delete"
+                             plain
+                             @click="Disembarkingfun">退 舱
+                  </el-button>
                   <div style="margin-top: 10px">
                       <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
                           <el-tab-pane label="接单" name="0">
@@ -241,9 +247,6 @@
                           <el-tab-pane label="退舱" name="1">
                               <span slot="label" style="color: #d86363">退舱</span>
                           </el-tab-pane>
-                          <el-tab-pane label="暂停" name="2">
-                              <span slot="label" style="color: #d2983c">暂停</span>
-                          </el-tab-pane>
                           <el-tab-pane label="完成" name="3"></el-tab-pane>
                       </el-tabs>
                   </div>
@@ -268,6 +271,11 @@
                       <small slot="more">...</small>
                   </avue-text-ellipsis>
               </template>
+              <template slot-scope="scope" slot="marks">
+                  <avue-text-ellipsis :text="scope.row.marks" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
               <template slot="expand" slot-scope="{row}" >
                   <SplitList :typeMenu="true" :data="row.billsListAllData" :loading="SplitLoading" ></SplitList>
               </template>
@@ -330,7 +338,7 @@ import {
     billsDetail,
     billsSubmit,
     billsRemove,
-    billsIncreaseReinsurancePolicy, billsListAll
+    billsIncreaseReinsurancePolicy, billsListAll, billsDisembarking
 } from "@/api/iosBasicData/bills";
   import {mapGetters} from "vuex";
   import billsDetails from "@/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue";
@@ -417,10 +425,10 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
         dialogRadio:null,
         option:{},
         optionBack: {
-            selectable:(row,index)=>{
-                // 禁用主单
-                return row.billType != 'MM'
-            },
+            // selectable:(row,index)=>{
+            //     // 禁用主单
+            //     return row.billType != 'MM'
+            // },
             expand: true,
             expandRowKeys:[],
             rowKey:'id',
@@ -550,7 +558,6 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
             {
               label: "唛头",
               prop: "marks",
-                // ----------
             },
             {
               label: "件数",
@@ -703,6 +710,27 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
               prop: "invoiceCrStatusDescr",
                 width:"160"
             },
+              {
+                  label: "创建人",
+                  prop: "createUserName",
+                  rules: [{
+                      required: true,
+                      message: "请输入创建人",
+                      trigger: "blur"
+                  }]
+              },
+              {
+                  label: "创建时间",
+                  prop: "createTime",
+              },
+              {
+                  label: "更新人",
+                  prop: "updateUserName",
+              },
+              {
+                  label: "更新时间",
+                  prop: "updateTime",
+              },
             {
               label: "业务状态",
               prop: "billStatus",
@@ -920,6 +948,10 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
             }
             const obj = this.selectionList[0]
             for (let item of this.selectionList) {
+                if (item.billType == 'MM') {
+                    this.$message.warning("请不要选择主单数据");
+                    return;
+                }
                 if (obj.placeReceiptId != item.placeReceiptId) {
                     // 收货地
                     this.$message.warning("请选择收货地相同的");
@@ -933,11 +965,28 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
             }
             this.mawbQuery.placeReceiptName = obj.placeReceiptName
             this.mawbQuery.polCnName = obj.polCnName
-            console.log(obj)
             this.$nextTick(()=>{
                 this.dialogVisible = true
             })
         },
+        // 退舱
+        Disembarkingfun(){
+            if (this.selectionList.length === 0) {
+                this.$message.warning("请选择至少一条数据");
+                return;
+            }
+            this.billsDisembarkingfun(this.ids)
+        },
+        // 退舱接口
+        billsDisembarkingfun(ids){
+            billsDisembarking(ids).then(res=>{
+                this.$message({
+                    type: "success",
+                    message: "操作成功!"
+                });
+                this.onLoad(this.page)
+            })
+        },
         // 下拉显示数据
         async expandChange(row){
             if (row.billType == 'MM') {
@@ -956,7 +1005,6 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
         },
         // 弹窗确认
         AddToMainOrder(){
-            console.log(this.dialogRadio,2140)
             if (!this.dialogRadio) {
                 this.$message.warning("请选择一条数据");
                 return