Browse Source

货代 2023-12-19

caojunjie 1 năm trước cách đây
mục cha
commit
2c99ac8314

BIN
src/file/newNews.mp3


+ 6 - 3
src/util/messageReminder.js

@@ -22,16 +22,19 @@ export const requiredMessage = (form,data)=>{
   return true
 }
 /**
- * 弹窗必填项判断
+ * 弹窗必填项判断全部显示
  * form 需要拿取数据的对象
  * data 需要判断的数组 [{name:'名称',value:'参数'}]
  * return
  */
 export const popupReminder = (form,data)=>{
+  let sum = '请输入'
   for(let item of data) {
-    console.log(item,32)
+    if (!form[item.value]) {
+      sum += ' ' +item.name
+    }
   }
-  return true
+  return sum == '请输入'?false:sum
 }
 /**
  * textarea 一行显示35个换行

+ 69 - 24
src/views/billM/billingCenter/index.vue

@@ -30,26 +30,26 @@
         <!--           v-if="permission.finaccbills_delete"-->
         <!--           @click="handleDelete">删 除-->
         <!--</el-button>-->
-          <el-button type="primary"
-                     size="small"
-                     plain
-                     @click="handleDelete">结 算
-          </el-button>
-          <el-button type="success"
-                     size="small"
-                     plain
-                     @click="handleDelete">发 票
-          </el-button>
-          <el-button type="info"
-                     size="small"
-                     plain
-                     @click="handleDelete">凭 证
-          </el-button>
-          <el-button type="warning"
-                     size="small"
-                     plain
-                     @click="handleDelete">付费申请
-          </el-button>
+        <!--  <el-button type="primary"-->
+        <!--             size="small"-->
+        <!--             plain-->
+        <!--             @click="handleDelete">结 算-->
+        <!--  </el-button>-->
+        <!--  <el-button type="success"-->
+        <!--             size="small"-->
+        <!--             plain-->
+        <!--             @click="handleDelete">发 票-->
+        <!--  </el-button>-->
+        <!--  <el-button type="info"-->
+        <!--             size="small"-->
+        <!--             plain-->
+        <!--             @click="handleDelete">凭 证-->
+        <!--  </el-button>-->
+        <!--  <el-button type="warning"-->
+        <!--             size="small"-->
+        <!--             plain-->
+        <!--             @click="handleDelete">付费申请-->
+        <!--  </el-button>-->
       </template>
       <template slot="billNo" slot-scope="scope" @click="billNoDetails(scope.row)">
         <avue-text-ellipsis :text="scope.row.billNo"
@@ -111,6 +111,9 @@
           selection: true,
           dialogClickModal: false,
             menu:false,
+            searchIcon:true,
+            searchIndex:3,
+            searchLabelWidth:"100",
           column: [
             {
               label: "账单编号",
@@ -140,6 +143,7 @@
               label: "账单属性",
               prop: "accountDc",
               type: 'select',
+              search: true,
               dicData:[{
                 label:'应收',
                 value:'D'
@@ -166,6 +170,22 @@
                 trigger: "blur"
               }]
             },
+              {
+                  label: "财务日期",
+                  prop: "accountDateList",
+                  search: true,
+                  hide: true,
+                  width:"100",
+                  type: 'daterange',
+                  format:'yyyy-MM-dd',
+                  valueFormat:'yyyy-MM-dd',
+                  searchRange: true,
+                  rules: [{
+                      required: true,
+                      message: "请输入财务日期",
+                      trigger: "blur"
+                  }]
+              },
             {
               label: "业务类型",
               prop: "businessType",
@@ -184,17 +204,18 @@
               }]
             },
             {
-              label: "业务单据编号(主单,直单)",
+              label: "业务单据编号",
               prop: "businessBillNo",
+              search: true,
               width:"180",
               rules: [{
                 required: true,
-                message: "请输入业务单据编号(主单,直单)",
+                message: "请输入业务单据编号",
                 trigger: "blur"
               }]
             },
             {
-              label: "业务单据日期(主单,直单)",
+              label: "业务单据日期",
               prop: "businessDate",
               type: "date",
               width:"180",
@@ -202,10 +223,26 @@
               format: 'yyyy-MM-dd',
               rules: [{
                 required: true,
-                message: "请输入业务单据日期(主单,直单)",
+                message: "请输入业务单据日期",
                 trigger: "blur"
               }]
             },
+              {
+                  label: "业务单据日期",
+                  prop: "businessDateList",
+                  search: true,
+                  hide: true,
+                  width:"100",
+                  type: 'daterange',
+                  format:'yyyy-MM-dd',
+                  valueFormat:'yyyy-MM-dd',
+                  searchRange: true,
+                  rules: [{
+                      required: true,
+                      message: "请输入业务单据日期",
+                      trigger: "blur"
+                  }]
+              },
             {
               label: "付款方式",
               prop: "paymode",
@@ -232,6 +269,7 @@
             {
               label: "结算单位",
               prop: "corpCnName",
+              search: true,
               width:"180",
               rules: [{
                 required: true,
@@ -242,6 +280,7 @@
             {
               label: "客户中文名称",
               prop: "billCorpCnName",
+              search: true,
               width:"180",
               rules: [{
                 required: true,
@@ -252,6 +291,7 @@
             {
               label: "MB/L NO",
               prop: "mblno",
+              search: true,
               width:"180",
               rules: [{
                 required: true,
@@ -263,6 +303,7 @@
               label: "HB/L NO",
               prop: "hblno",
               width:"180",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入HB/L NO",
@@ -272,6 +313,7 @@
             {
               label: "Reference NO",
               prop: "refno",
+              search: true,
               width:"180",
               rules: [{
                 required: true,
@@ -639,7 +681,10 @@
         this.onLoad(this.page);
       },
       searchChange(params, done) {
+          console.log(params,651)
+          return
         this.query = params;
+        // if (params.accountDate) {}
         this.page.currentPage = 1;
         this.onLoad(this.page, params);
         done();

+ 13 - 8
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -173,7 +173,7 @@
                                                   :filterable="true"
                                                   :clearable="true"
                                                   :remote="true"
-                                                  :disabled="detailData.seeDisabled"
+                                                  :disabled="detailData.seeDisabled || generateBillsfalse"
                                                   :buttonIf="false"
                                                   :forParameter="{key:'id',label:'enName',value:'enName'}"
                                                   @remoteMethod="remoteMethod($event,'pol')"
@@ -185,7 +185,7 @@
                                     <span style="padding-left: 20px"></span>
                                     <el-input type="age" style="width: 100%;" v-model="assemblyForm.polNamePrint"
                                               size="small" autocomplete="off"
-                                              :disabled="detailData.seeDisabled"
+                                              :disabled="detailData.seeDisabled || generateBillsfalse"
                                               clearable placeholder="装货港" ></el-input>
                                 </el-col>
                             </el-row>
@@ -229,7 +229,7 @@
                                                   :filterable="true"
                                                   :clearable="true"
                                                   :remote="true"
-                                                  :disabled="detailData.seeDisabled"
+                                                  :disabled="detailData.seeDisabled || generateBillsfalse"
                                                   :buttonIf="false"
                                                   :forParameter="{key:'id',label:'enName',value:'enName'}"
                                                   @remoteMethod="remoteMethod($event,'destination')"
@@ -241,7 +241,7 @@
                                     <span style="padding-left: 20px"></span>
                                     <el-input type="age" style="width: 100%;" v-model="assemblyForm.destinationNamePrint"
                                               size="small" autocomplete="off"
-                                              :disabled="detailData.seeDisabled"
+                                              :disabled="detailData.seeDisabled || generateBillsfalse"
                                               clearable placeholder="目的地" ></el-input>
                                 </el-col>
                             </el-row>
@@ -393,7 +393,7 @@
                              <span style="color: #1e9fff">ETD</span>
                         </span>
                             <el-date-picker v-model="assemblyForm.etd" clearable style="width: 100%"
-                                            type="date" size="small" :disabled="detailData.seeDisabled"
+                                            type="date" size="small" :disabled="detailData.seeDisabled || generateBillsfalse"
                                             value-format="yyyy-MM-dd" :picker-options="etdPickerOptions"
                                             placeholder="选择日期">
                             </el-date-picker>
@@ -408,7 +408,7 @@
                                               :filterable="true"
                                               :clearable="true"
                                               :remote="true"
-                                              :disabled="detailData.seeDisabled"
+                                              :disabled="detailData.seeDisabled || generateBillsfalse"
                                               :buttonIf="false"
                                               :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                                               @remoteMethod="remoteMethod($event,'vessel')"
@@ -422,7 +422,7 @@
                             </span>
                                 <el-input type="age" style="width: 100%;" v-model="assemblyForm.voyageNo"
                                           size="small" autocomplete="off"
-                                          :disabled="detailData.seeDisabled"
+                                          :disabled="detailData.seeDisabled || generateBillsfalse"
                                           clearable placeholder="请选择航次" ></el-input>
                             </el-form-item>
                         </div>
@@ -444,7 +444,7 @@
                                           :filterable="true"
                                           :clearable="true"
                                           :remote="true"
-                                          :disabled="detailData.seeDisabled"
+                                          :disabled="detailData.seeDisabled || generateBillsfalse"
                                           :buttonIf="false"
                                           :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                                           @remoteMethod="remoteMethod($event,'carrier')"
@@ -872,6 +872,11 @@ import {NdayDate} from "@/util/date";
             },
             assemblyForm:{
                 type:Object,
+            },
+            // 是否生成账单
+            generateBillsfalse:{
+                type:Boolean,
+                default:false
             }
         },
         components:{bcorps, SearchQuery, precontainers,bcorpstypedefine},

+ 151 - 65
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -82,6 +82,7 @@
                         <el-button type="primary" plain size="small">打印账单</el-button>
                         <el-button type="success" plain size="small" :disabled="!this.assemblyForm.id" @click="templateClick('D')">应收模板</el-button>
                         <el-button type="info" plain size="small" @click="feecenterSubmitListfun">保存账单</el-button>
+                        <el-button type="primary" plain size="small" @click="copyfun('D')">生成应付</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="scope">
                         <el-button type="primary" size="small" icon="el-icon-plus" circle
@@ -96,12 +97,12 @@
                     <template slot="corpCnName" slot-scope="{ row }">
                         <search-query v-if="row.edit"
                                       :datalist="corpCnNameData"
-                                      :selectValue="row.corpId"
+                                      :selectValue="row.corpCnName"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :buttonIf="false"
-                                      :forParameter="{key:'id',label:'cnNamecode',value:'id'}"
+                                      :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                                       @remoteMethod="getBcorpsListfun($event,'corpCnName')"
                                       @corpChange="corpChange($event,'corpCnName',row)"
                                       @corpFocus="getBcorpsListfun($event,'corpCnName')" >
@@ -224,6 +225,7 @@
                         </el-button>
                         <el-button type="success" plain size="small" :disabled="!this.assemblyForm.id" @click="templateClick('C')">应付模板</el-button>
                         <el-button type="info" plain size="small" @click="feecenterSubmitListfun">保存账单</el-button>
+                        <el-button type="primary" plain size="small" @click="copyfun('C')">生成应收</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="scope">
                         <el-button type="primary" size="small" icon="el-icon-plus" circle
@@ -238,12 +240,12 @@
                     <template slot="corpCnName" slot-scope="{ row }">
                         <search-query v-if="row.edit"
                                       :datalist="corpCnNameData"
-                                      :selectValue="row.corpId"
+                                      :selectValue="row.corpCnName"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :buttonIf="false"
-                                      :forParameter="{key:'id',label:'cnNamecode',value:'id'}"
+                                      :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                                       @remoteMethod="getBcorpsListfun($event,'corpCnName')"
                                       @corpChange="corpChange($event,'corpCnName',row)"
                                       @corpFocus="getBcorpsListfun($event,'corpCnName')" >
@@ -443,7 +445,7 @@
                 </el-row>
             </div>
             <span slot="footer" class="dialog-footer">
-                <el-button @click="templateVisible = false">取 消</el-button>
+                <el-button @click="templateVisible = false;feesselectionList = [];templateRightData = []">取 消</el-button>
                 <el-button type="primary" @click="templateExport">导 入</el-button>
             </span>
         </el-dialog>
@@ -489,7 +491,7 @@
     import {getWorkDicts} from "@/api/system/dictbiz";
     import {feecenterTemplateImport, losbfeestemplateGetListTemplate} from "@/api/iosBasicData/bills";
     import {losbfeestemplateDetail} from "@/api/iosBasicData/losbfeestemplate";
-    import {requiredMessage} from "@/util/messageReminder";
+    import {popupReminder, requiredMessage} from "@/util/messageReminder";
 
     export default {
         components: {SearchQuery},
@@ -529,19 +531,21 @@
                             headerslot:true,
                         },
                         {
-                            label: "是否生成账单",
+                            label: "账单",
                             prop: "accStatus",
-                            width: "100",
+                            width: "60",
                         },
                         {
                             label: "往来单位",
                             prop: "corpCnName",
                             width: "160",
+                            overHidden:true,
                         },
                         {
                             label: "费用简称",
                             prop: "feeCnName",
                             width: "120",
+                            overHidden:true,
                         },
                         {
                             label: "预付/到付",
@@ -559,21 +563,11 @@
                             width: "120",
                         },
                         {
-                            label: "税率",
-                            prop: "taxRate",
-                            width: "100",
-                        },
-                        {
-                            label: "附件税率",
-                            prop: "surchargeRate",
+                            label: "对CNY汇率",
+                            prop: "exrate",
                             width: "100",
                         },
                         {
-                            label: "单价是否含税",
-                            prop: "isTax",
-                            width: "120",
-                        },
-                        {
                             label: "单价",
                             prop: "price",
                             width: "120",
@@ -584,6 +578,16 @@
                             width: "120",
                         },
                         {
+                            label: "CNY(含税)",
+                            prop: "rmbAmount",
+                            width: "100",
+                        },
+                        {
+                            label: "USD(含税)",
+                            prop: "usdAmount",
+                            width: "100",
+                        },
+                        {
                             label: "CNY(净额)",
                             prop: "rmbAmountNet",
                             width: "100",
@@ -594,29 +598,29 @@
                             width: "100",
                         },
                         {
-                            label: "CNY(含税)",
-                            prop: "rmbAmount",
+                            label: "预付地址",
+                            prop: "payplace",
                             width: "100",
                         },
                         {
-                            label: "USD(含税)",
-                            prop: "usdAmount",
+                            label: "备注",
+                            prop: "remarks",
                             width: "100",
                         },
                         {
-                            label: "对CNY汇率",
-                            prop: "exrate",
+                            label: "率",
+                            prop: "taxRate",
                             width: "100",
                         },
                         {
-                            label: "预付地址",
-                            prop: "payplace",
+                            label: "附件税率",
+                            prop: "surchargeRate",
                             width: "100",
                         },
                         {
-                            label: "备注",
-                            prop: "remarks",
-                            width: "100",
+                            label: "单价是否含税",
+                            prop: "isTax",
+                            width: "120",
                         },
                     ]
                 },
@@ -646,9 +650,9 @@
                             headerslot:true,
                         },
                         {
-                            label: "是否生成账单",
+                            label: "账单",
                             prop: "accStatus",
-                            width: "100",
+                            width: "60",
                         },
                         {
                             label: "往来单位",
@@ -676,21 +680,11 @@
                             width: "120",
                         },
                         {
-                            label: "税率",
-                            prop: "taxRate",
-                            width: "100",
-                        },
-                        {
-                            label: "附件税率",
-                            prop: "surchargeRate",
+                            label: "对CNY汇率",
+                            prop: "exrate",
                             width: "100",
                         },
                         {
-                            label: "单价是否含税",
-                            prop: "isTax",
-                            width: "120",
-                        },
-                        {
                             label: "单价",
                             prop: "price",
                             width: "120",
@@ -701,6 +695,16 @@
                             width: "120",
                         },
                         {
+                            label: "CNY(含税)",
+                            prop: "rmbAmount",
+                            width: "100",
+                        },
+                        {
+                            label: "USD(含税)",
+                            prop: "usdAmount",
+                            width: "100",
+                        },
+                        {
                             label: "CNY(净额)",
                             prop: "rmbAmountNet",
                             width: "100",
@@ -711,29 +715,29 @@
                             width: "100",
                         },
                         {
-                            label: "CNY(含税)",
-                            prop: "rmbAmount",
+                            label: "预付地址",
+                            prop: "payplace",
                             width: "100",
                         },
                         {
-                            label: "USD(含税)",
-                            prop: "usdAmount",
+                            label: "备注",
+                            prop: "remarks",
                             width: "100",
                         },
                         {
-                            label: "对CNY汇率",
-                            prop: "exrate",
+                            label: "率",
+                            prop: "taxRate",
                             width: "100",
                         },
                         {
-                            label: "预付地址",
-                            prop: "payplace",
+                            label: "附件税率",
+                            prop: "surchargeRate",
                             width: "100",
                         },
                         {
-                            label: "备注",
-                            prop: "remarks",
-                            width: "100",
+                            label: "单价是否含税",
+                            prop: "isTax",
+                            width: "120",
                         },
                     ]
                 },
@@ -889,6 +893,55 @@
             this.getBcorpsListfun()
         },
         methods:{
+            copyfun(dc){
+                let selection = []
+                if (dc == 'D') {
+                    selection = this.selectionDList
+                    if (this.selectionDList.length == 0) {
+                        this.$message.warning('请先选择要复制的数据')
+                        return
+                    }
+                }else {
+                    selection = this.selectionCList
+                    if (this.selectionCList.length == 0) {
+                        this.$message.warning('请先选择要复制的数据')
+                        return
+                    }
+                }
+                let arr = selection.map(item=>{
+                    let obj = {}
+                    obj.corpId = item.corpId
+                    obj.corpCnName = item.corpCnName
+                    obj.corpEnName = item.corpEnName
+                    obj.feeId = item.feeId
+                    obj.feeCnName = item.feeCnName
+                    obj.feeEnName = item.feeEnName
+                    obj.feeCode = item.feeCode
+                    obj.elementsId = item.elementsId
+                    obj.elementsCnName = item.elementsCnName
+                    obj.elementsEnName = item.elementsEnName
+                    obj.elementsCode = item.elementsCode
+                    obj.curCode = item.curCode
+                    obj.taxRate = item.taxRate
+                    obj.paymode = item.paymode
+                    obj.payplace = item.payplace
+                    obj.remarks = item.remarks
+                    obj.amount = item.amount
+                    obj.price = item.price
+                    obj.quantity = item.quantity
+                    obj.rmbAmount = item.rmbAmount
+                    obj.taxRate = item.taxRate
+                    obj.unitNo = item.unitNo
+                    obj.usdAmount = item.usdAmount
+                    obj.edit = item.edit
+                    return obj
+                })
+                if (dc == 'D') {
+                    this.assemblyForm.feeCenterListC = [...this.assemblyForm.feeCenterListC,...arr]
+                }else {
+                    this.assemblyForm.feeCenterListD = [...this.assemblyForm.feeCenterListD,...arr]
+                }
+            },
             // 往来单位弹窗开启
             corpClick(){
                 this.corpVisible = true
@@ -905,6 +958,8 @@
                             type: "success",
                             message: "操作成功!"
                         });
+                        this.feesselectionList = [] // 清空多选
+                        this.templateRightData = [] // 清空数据
                         this.$emit('billsDetailfun')
                         this.templateVisible = false
                     })
@@ -935,8 +990,15 @@
             },
             // 应收新增
             addDfun(){
-                // 判断数据需要的数据是否有
-                if (!requiredMessage(this.assemblyForm,this.messageData)) {
+                // 判断数据需要的数据是否有 有就弹窗
+                if (popupReminder(this.assemblyForm,this.messageData)){
+                    this.$confirm(popupReminder(this.assemblyForm,this.messageData), {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    })
+                }
+                if (popupReminder(this.assemblyForm,this.messageData)) {
                     return;
                 }
                 // 如果是分单 判断是否有分单号
@@ -981,7 +1043,15 @@
             // 应付新增
             addCfun(){
                 // 判断数据需要的数据是否有
-                if (!requiredMessage(this.assemblyForm,this.messageData)) {
+                // 判断数据需要的数据是否有 有就弹窗
+                if (popupReminder(this.assemblyForm,this.messageData)){
+                    this.$confirm(popupReminder(this.assemblyForm,this.messageData), {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    })
+                }
+                if (popupReminder(this.assemblyForm,this.messageData)) {
                     return;
                 }
                 // 如果是分单 判断是否有分单号
@@ -1090,6 +1160,8 @@
                                     message: "当前选择的费用已经生成账单了!"
                                 });
                                 return
+                            }else {
+
                             }
                         }
                         this.finaccbillsGenerateBillfun(this.selectionDList)
@@ -1191,7 +1263,7 @@
             corpChange(value,name,row) {
                 if (name == 'corpCnName') {
                     for(let item of this.corpCnNameData) {
-                        if (item.id == value){
+                        if (item.cnName == value){
                             this.$set(row,'corpCnName',item.cnName)
                             this.$set(row,'corpEnName',item.enName)
                             this.$set(row,'corpId',item.id)
@@ -1225,6 +1297,17 @@
                 }else if (name == 'curCode') {
                     for(let item of this.curCodeData) {
                         if (item.code == value){
+                            if (item.code == 'USD') {
+                                if (Number(item.exrate) <= 1) {
+                                    this.$message.warning('当前选择的币别汇率不能小于零')
+                                    return
+                                }
+                            }else {
+                                if (Number(item.exrate) == 0) {
+                                    this.$message.warning('当前选择的币别汇率不能为零')
+                                    return
+                                }
+                            }
                             this.$set(row,'curCode',item.code)
                             this.$set(row,'exrate',item.exrate)
                             if (row.curCode == 'CNY') {
@@ -1298,11 +1381,12 @@
             // 获取客户数据
             getBcorpsListfun(cnName){
                 getBcorpsList(1,10,{cnName}).then(res=>{
-                    this.corpCnNameData = res.data.data.records.map(item=>{
-                        // 创建自定义参数暂存
-                        item.cnNamecode = item.cnName + ' - ' + item.code + ' - ' + item.shortName
-                        return item
-                    })
+                    this.corpCnNameData = res.data.data.records
+                    // this.corpCnNameData = res.data.data.records.map(item=>{
+                    //     // 创建自定义参数暂存
+                    //     item.cnNamecode = item.cnName + ' - ' + item.code + ' - ' + item.shortName
+                    //     return item
+                    // })
                 })
             },
             // 获取费用数据
@@ -1490,6 +1574,8 @@
             handleClose(done) {
                 this.$confirm('确认关闭?')
                     .then(_ => {
+                        this.feesselectionList = [] // 清空多选
+                        this.templateRightData = [] // 清空数据
                         done();
                     })
                     .catch(_ => {});

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

@@ -13,7 +13,7 @@
                                           :filterable="true"
                                           :clearable="true"
                                           :remote="true"
-                                          :disabled="detailData.seeDisabled"
+                                          :disabled="detailData.seeDisabled || generateBillsfalse"
                                           :buttonIf="false"
                                           :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                                           @remoteMethod="remoteMethod($event,'cy')"
@@ -416,6 +416,11 @@
             },
             detailData:{
                 type:Boolean,
+            },
+            // 是否生成账单
+            generateBillsfalse:{
+                type:Boolean,
+                default:false
             }
         },
         data(){

+ 19 - 13
src/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue

@@ -5,6 +5,7 @@
                :table-loading="loading"
                :data="data"
                :page.sync="page"
+               :search.sync="query"
                :permission="permissionList"
                :before-open="beforeOpen"
                v-model="form"
@@ -89,9 +90,13 @@
         userList: [],
         isPrintTheBoxNumber: false,
         bbDisabled: false,
-        form: {},
+        form: {
+            businessType:'HYCK'
+        },
         formReport: {},
-        query: {},
+        query: {
+            businessType:'HYCK'
+        },
         loading: true,
         page: {
           pageSize: 10,
@@ -115,17 +120,18 @@
             {
               label: "业务类型",
               prop: "businessType",
-              type: 'select',
-              dicData:[],
-              props: {
-                 label: "cnName",
-                 value: "code"
-              },
-              rules: [{
-                required: true,
-                message: "请输入业务类型",
-                trigger: "blur"
-              }]
+              disabled:true,
+              // type: 'select',
+              // dicData:[],
+              // props: {
+              //    label: "cnName",
+              //    value: "code"
+              // },
+              // rules: [{
+              //   required: true,
+              //   message: "请输入业务类型",
+              //   trigger: "blur"
+              // }]
             },
             {
               label: "类别",

+ 32 - 6
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -15,9 +15,9 @@
                 <!--    <div>-->
 
                 <!--    </div>-->
-                <!--    <el-button slot="reference" size="small" style="margin-right: 8px"-->
-                <!--                :loading="saveLoading" >预 览-->
-                <!--    </el-button>-->
+                <el-button slot="reference" size="small" style="margin-right: 8px"
+                           :loading="saveLoading" @click="Preview" >预 览
+                </el-button>
                 <!--</el-popover>-->
                 <!--<el-button  size="small" type="warning" style="margin-right: 8px"-->
                 <!--            :loading="saveLoading" >打 印-->
@@ -207,7 +207,11 @@
                             <basic-container :showBtn="true">
                                 <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
                                     <el-tab-pane label="委托详情" name="first">
-                                        <entrustment-lnformation :assemblyForm="form" :detailData="detailData" @billsDetailfun="billsDetailfun(form.id)"></entrustment-lnformation>
+                                        <entrustment-lnformation :assemblyForm="form"
+                                                                 :detailData="detailData"
+                                                                 :generateBillsfalse="generateBillsfalse"
+                                                                 @billsDetailfun="billsDetailfun(form.id)">
+                                        </entrustment-lnformation>
                                     </el-tab-pane>
                                     <el-tab-pane label="配箱处理" name="second">
                                         <DistributionBox :assemblyForm="form" :detailData="detailData" @billsDetailfun="billsDetailfun(form.id)"></DistributionBox>
@@ -227,9 +231,8 @@
                                 </el-tabs>
                             </basic-container>
                             <basic-container :showBtn="true" v-if="activeName == 'first' || activeName == 'third'">
-                                <formbottom :assemblyForm="form" :detailData="detailData"></formbottom>
+                                <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse" :detailData="detailData"></formbottom>
                             </basic-container>
-
                         </div>
                     </div>
                 </el-tab-pane>
@@ -313,6 +316,7 @@ import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembl
         },
         data() {
             return {
+                generateBillsfalse:false, // 如果生成账单就禁用
                 checkScheduleDialog:false, // 审核弹窗
                 checkId:'', // 审核需要的id
                 batchNo:'',
@@ -1162,6 +1166,17 @@ import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembl
                 }
                 // 应收
                 for(let item of this.form.feeCenterListD) {
+                    // 判断是否生成了账单
+                    if (item.accStatus == 1) {
+                        this.generateBillsfalse = true
+                        this.columnforfun('corpCnName').disabled = true
+                        this.columnforfun('srcType').disabled = true
+                        this.columnforfun('mblno').disabled = true
+                        this.columnforfun('bookingNo').disabled = true
+                        this.columnforfun('refno').disabled = true
+                    }else {
+                        this.generateBillsfalse = false
+                    }
                     if (item.curCode == 'CNY') {
                         this.$set(item,'rmbAmount',item.amount)
                         this.$set(item,'usdAmount','')
@@ -1177,6 +1192,17 @@ import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembl
                 }
                 // 应付
                 for(let item of this.form.feeCenterListC) {
+                    // 判断是否生成了账单
+                    if (item.accStatus == 1) {
+                        this.generateBillsfalse = true
+                        this.columnforfun('corpCnName').disabled = true
+                        this.columnforfun('srcType').disabled = true
+                        this.columnforfun('mblno').disabled = true
+                        this.columnforfun('bookingNo').disabled = true
+                        this.columnforfun('refno').disabled = true
+                    }else {
+                        this.generateBillsfalse = false
+                    }
                     if (item.curCode == 'CNY') {
                         this.$set(item,'rmbAmount',item.amount)
                         this.$set(item,'usdAmount','')

+ 6 - 0
src/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue

@@ -516,6 +516,12 @@ export default {
                     this.$set(this.feestemplateForm,'feeCode',item.code)
                     this.$set(this.feestemplateForm,'feeEnName',item.enName)
                     this.$set(this.feestemplateForm,'feeCnName',item.cnName)
+                    // 核算要素
+                    this.$set(this.feestemplateForm,'elementsId',item.accElementId)
+                    this.$set(this.feestemplateForm,'elementsCnName',item.accElementName)
+                    this.$set(this.feestemplateForm,'elementsCode',item.elementsCode)
+                    this.$set(this.feestemplateForm,'elementsEnName',item.elementsEnName)
+
                 }
             }
         },