| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703 | <template>    <div class="borderless" v-loading="pageLoading">        <div class="customer-head">            <div class="customer-back">                <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->                <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"                           @click="backToList">返回列表                </el-button>            </div>            <div class="add-customer-btn">                <el-button size="small" style="margin-right: 8px"                           :loading="saveLoading" @click="previewDialogfun" >预 览                </el-button>                <el-button size="small" type="warning" :disabled="!form.id" v-if="form.status == 1"                           @click.stop="revokeDocumentApproval">撤销单据请核                </el-button>                <el-button size="small" type="success" :disabled="!form.id" v-if="form.status == 0 || form.status == 4"                           @click.stop="DocumentApproval">单据请核                </el-button>                <!--<el-button  size="small" type="primary" style="margin-right: 8px" v-if="detailData.seeDisabled"-->                <!--            :loading="saveLoading" @click="editHandle">编 辑-->                <!--</el-button>-->                <el-button  size="small" type="primary" style="margin-right: 8px"                            :loading="saveLoading" @click="editCustomer">保 存                </el-button>                <el-dropdown style="line-height: 0">                    <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">                        审 批<i class="el-icon-arrow-down el-icon--right"></i>                    </el-button>                    <el-dropdown-menu slot="dropdown">                        <!--<el-dropdown-item @click.native="examineBtn('审批')" :disabled="isExamineBtn && !detailData.check">审批-->                        <!--</el-dropdown-item>-->                        <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度                        </el-dropdown-item>                    </el-dropdown-menu>                </el-dropdown>            </div>        </div>        <div style="margin-top: 65px">            <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">                <el-tab-pane label="委托信息" name="wt">                    <div>                        <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">                            <containerTitle title="基础资料"></containerTitle>                            <basic-container :showBtn="true">                                <el-row :gutter="60">                                    <el-col v-for="(item, index) in basicData.column" :key="index" :span="8">                                        <!--数组-->                                        <div v-if="item instanceof Array" style="display: flex;align-items: center;justify-content: space-between">                                            <el-row>                                                <el-col :span="item[0].span?item[0].span:12">                                                    <el-form-item :label="item[0].label" :prop="item[0].prop" :rules="item[0].rules"                                                                  :label-width="item[0].labelWidth">                                                    <span slot="label" v-if="item[0].label">                                                        <span v-if="item[0].label == 'HB/L NO'"                                                              style="color: #4c9e44;cursor: pointer;text-decoration: underline;"                                                              @click="applyforfun(item[0].label)">{{item[0].label}}                                                        </span>                                                        <span v-else style="color: #1e9fff">{{item[0].label}}</span>                                                    </span>                                                        <span v-if="item[0].type == 'button'"></span>                                                        <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->                                                        <!--           size="mini" type="success" icon="el-icon-circle-plus" circle-->                                                        <!--           @click="applyforfun(item[0].label)" >-->                                                        <!--</el-button>-->                                                        <search-query v-else-if="item[0].type == 'select'"                                                                      :datalist="item[0].dicData"                                                                      :selectValue="form[item[0].prop]"                                                                      :filterable="true"                                                                      :allowCreate="item[0].allowCreate || false"                                                                      :clearable="true"                                                                      :remote="true"                                                                      :disabled="detailData.seeDisabled || item[0].disabled"                                                                      :buttonIf="false"                                                                      :placeholder="`请选择${item[0].text || ''}`"                                                                      :forParameter="item[0].forParameter"                                                                      @remoteMethod="remoteMethod($event,item[0].prop)"                                                                      @corpChange="corpChange($event,item[0].prop)"                                                                      @corpFocus="remoteMethod($event,item[0].prop)" >                                                        </search-query>                                                        <el-input v-else type="age" style="width: 100%;" v-model="form[item[0].prop]"                                                                  size="small" autocomplete="off"                                                                  :disabled="detailData.seeDisabled || item[0].disabled"                                                                  clearable :placeholder="'请输入' + item[0].label" ></el-input>                                                    </el-form-item>                                                </el-col>                                                <el-col v-if="item[1]" :span="item[1].span?item[1].span:12">                                                    <el-form-item :label="item[1].label" :prop="item[1].prop" :rules="item[1].rules"                                                                  :label-width="item[1].labelWidth">                                                    <span slot="label" v-if="item[1].label">                                                        <span style="color: #1e9fff">{{item[1].label}}</span>                                                    </span>                                                        <el-date-picker v-if="item[1].type == 'date'"                                                                        v-model="form[item[1].prop]" clearable style="width: 100%;"                                                                        type="date" size="small" :disabled="detailData.seeDisabled || item[1].disabled"                                                                        value-format="yyyy-MM-dd HH:mm"                                                                        placeholder="选择日期">                                                        </el-date-picker>                                                        <search-query v-else-if="item[1].type == 'select'"                                                                      :datalist="item[1].dicData"                                                                      :selectValue="form[item[1].prop]"                                                                      :filterable="true"                                                                      :clearable="true"                                                                      :remote="true"                                                                      :disabled="detailData.seeDisabled || item[1].disabled"                                                                      :buttonIf="false"                                                                      :placeholder="`请选择${item[1].text || ''}`"                                                                      :forParameter="item[1].forParameter"                                                                      @remoteMethod="remoteMethod($event,item[1].prop)"                                                                      @corpChange="corpChange($event,item[1].prop)"                                                                      @corpFocus="remoteMethod($event,item[1].prop)" >                                                        </search-query>                                                        <tree-select v-else-if="item[1].type == 'tree'"                                                                     v-model="form[item[1].prop]" filterable                                                                     :data="item[1].dicData"                                                                     :props="item[1].forParameter"                                                                     nodeKey="title"                                                                     size="small"                                                                     :disabled="detailData.seeDisabled || item[1].disabled"                                                                     :multiple="false"                                                                     :placeholder="`请选择${item[1].text || ''}`"                                                                     @input="corpChange($event,item[1].prop)">                                                        </tree-select>                                                        <el-input v-else type="age" style="width: 100%;" v-model="form[item[1].prop]"                                                                  size="small" autocomplete="off"                                                                  :disabled="detailData.seeDisabled || item[1].disabled"                                                                  clearable :placeholder="'请输入' + item[1].text || ''" ></el-input>                                                    </el-form-item>                                                </el-col>                                                <el-col v-if="item[2]" :span="item[2].span?item[2].span:12">                                                    <el-form-item :label="item[2].label" :prop="item[2].prop" :rules="item[2].rules"                                                                  :label-width="item[2].labelWidth">                                                    <span slot="label" v-if="item[2].label">                                                        <span style="color: #1e9fff">{{item[2].label}}</span>                                                    </span>                                                        <search-query v-if="item[2].type == 'select'"                                                                      :datalist="item[2].dicData"                                                                      :selectValue="form[item[2].prop]"                                                                      :filterable="true"                                                                      :clearable="true"                                                                      :remote="true"                                                                      :disabled="detailData.seeDisabled || item[2].disabled"                                                                      :buttonIf="false"                                                                      :forParameter="item[2].forParameter"                                                                      :placeholder="`请选择${item[2].text || ''}`"                                                                      @remoteMethod="remoteMethod($event,item[2].prop)"                                                                      @corpChange="corpChange($event,item[2].prop)"                                                                      @corpFocus="remoteMethod($event,item[2].prop)" >                                                        </search-query>                                                        <el-input v-else type="age" style="width: 100%;" v-model="form[item[2].prop]"                                                                  size="small" autocomplete="off"                                                                  :disabled="detailData.seeDisabled || item[1].disabled"                                                                  clearable :placeholder="'请输入' + item[2].text || ''" ></el-input>                                                    </el-form-item>                                                </el-col>                                            </el-row>                                        </div>                                        <!--对象-->                                        <div v-else>                                            <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">                                                    <span slot="label" v-if="item.label">                                                        <span style="color: #1e9fff">{{item.label}}</span>                                                    </span>                                                <search-query v-if="item.type == 'select'"                                                              :datalist="item.dicData"                                                              :selectValue="form[item.prop]"                                                              :filterable="true"                                                              :clearable="true"                                                              :remote="true"                                                              :disabled="detailData.seeDisabled || item.disabled"                                                              :buttonIf="item.buttonIf"                                                              :forParameter="item.forParameter"                                                              :placeholder="`请选择${item.text || ''}`"                                                              @remoteMethod="remoteMethod($event,item.prop)"                                                              @corpChange="corpChange($event,item.prop)"                                                              @corpFocus="remoteMethod($event,item.prop)">                                                    <bcorps v-if="item.slot == 'bcorps'"></bcorps>                                                    <bcorpstypedefine v-if="item.slot == 'bcorpstypedefine'"></bcorpstypedefine>                                                </search-query>                                                <el-input v-else type="age" style="width: 100%;" v-model="form[item.prop]"                                                          size="small" autocomplete="off"                                                          :disabled="detailData.seeDisabled || item.disabled"                                                          clearable :placeholder="'请输入' + item.text || ''" ></el-input>                                            </el-form-item>                                        </div>                                    </el-col>                                </el-row>                            </basic-container>                        </el-form>                    </div>                    <div class="customer-main margintop">                        <containerTitle title="详细"></containerTitle>                        <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"                                                             :generateBillsfalse="generateBillsfalse"                                                             @billsDetailfun="billsDetailfun(form.id)">                                    </entrustment-lnformation>                                </el-tab-pane>                                <el-tab-pane label="MB/L信息" name="third">                                    <mbinformation :assemblyForm="form"                                                   :generateBillsfalse="generateBillsfalse"                                                   :detailData="detailData">                                    </mbinformation>                                </el-tab-pane>                                <el-tab-pane label="报表管理" name="fourth">                                    <reports :id="form.id" :assemblyForm="form" :disabled="detailData.seeDisabled" businessValue="KYCK"></reports>                                </el-tab-pane>                                <el-tab-pane label="文件中心" name="seventh">                                    <filescenter :assemblyForm="form" :detailData="detailData"></filescenter>                                </el-tab-pane>                            </el-tabs>                        </basic-container>                        <!--<basic-container :showBtn="true" v-if="activeName == 'first' || activeName == 'third'">-->                        <!--    <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse" :detailData="detailData"></formbottom>-->                        <!--</basic-container>-->                    </div>                </el-tab-pane>                <el-tab-pane label="费用信息" name="fy">                    <feecenter :assemblyForm="form" :detailData="detailData" :pleasereviewType="pleasereviewType" :pid="form.id" @billsDetailfun="billsDetailfun(form.id)"></feecenter>                </el-tab-pane>                <el-tab-pane label="单证中心" name="dz">                    <document-center ref="documentCenter" :assemblyForm="form" ></document-center>                </el-tab-pane>                <el-tab-pane label="分单列表" name="fd" v-if="form.billType == 'MM'">                    <Split-list :detailData="detailData" :assemblyForm="form"                                :data="billsListAllData"                                @billsListAllfun="billsListAllfun(form.id)"></Split-list>                </el-tab-pane>            </el-tabs>        </div>        <!--审核弹窗-->        <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>            <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>        </el-dialog>        <!--预览报表弹窗-->        <el-dialog append-to-body title="预览报表" class="el-dialogDeep" :visible.sync="previewDialog" width="60%"                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>            <business-reports :id="form.id" :disabled="detailData.seeDisabled"></business-reports>        </el-dialog>    </div></template><script>import EntrustmentLnformation from "@/views/iosBasicData/AirtransportExport/bills/assembly/EntrustmentLnformation.vue";import mbinformation from "@/views/iosBasicData/AirtransportExport/bills/assembly/mbinformation.vue";import reports from "@/views/iosBasicData/AirtransportExport/bills/assembly/reports.vue";import formbottom from "@/views/iosBasicData/AirtransportExport/bills/assembly/formbottom.vue";import edicode from '@/views/iosBasicData/AirtransportExport/bills/assembly/edicode.vue'import filescenter from "@/views/iosBasicData/AirtransportExport/bills/assembly/filescenter.vue";import DistributionBox from "@/views/iosBasicData/AirtransportExport/bills/assembly/DistributionBox.vue";import feecenter from '@/views/iosBasicData/AirtransportExport/bills/assembly/feecenter.vue'import {getList, getList as userGetList} from '@/api/system/user'import SearchQuery from "@/components/iosbasic-data/searchquery.vue";import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";import bcorps from "@/views/iosBasicData/bcorps/index.vue";import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";import SplitList from "@/views/iosBasicData/AirtransportExport/bills/assembly/SplitList.vue";import {getLazylist} from "@/api/basicData/agreement";import {getBcorpsList, getBcorpslistByType} from "@/api/iosBasicData/bcorps";import {getBlocationsList} from "@/api/iosBasicData/blocations";import {getBcorpsattnList} from "@/api/iosBasicData/bcorpsattn";import {getWorkDicts} from "@/api/system/dictbiz";import {getDeptLazyTree, getDeptTree, getLazyList} from "@/api/system/dept";import {    billsCheckBills, billsCopyBills,    billsDetail,    billsGetBillNo,    billsListAll, billsRevokeCheckBills, editypesSendingEdi,    billsSubmit,    deptGetDetailPol,} from '@/api/iosBasicData/bills'import {dateFormat} from "@/util/date";import checkSchedule from "@/components/checkH/checkSchedule.vue";import {getBvesselsList} from "@/api/iosBasicData/bvessels";import DocumentCenter from "@/views/iosBasicData/AirtransportExport/bills/assembly/DocumentCenter.vue";import businessReports from "@/views/iosBasicData/AirtransportExport/bills/assembly/businessReports.vue";import {popupReminder} from "@/util/messageReminder";import editypes from "@/views/iosBasicData/editypes/index.vue";import {editypesList} from "@/api/iosBasicData/editypes";import {    aeabillsCheckBills,    aeabillsCopyBills,    aeabillsDetail,    aeabillsRevokeCheckBills, aeabillsSubmit} from "@/api/iosBasicData/aeabills";    export default {        components:{            checkSchedule,            SearchQuery,            EntrustmentLnformation,            formbottom,            mbinformation,            reports,            edicode,            filescenter,            DistributionBox,            feecenter,            bcorps,            bcorpstypedefine,            SplitList,            TreeSelect,            DocumentCenter,            businessReports,            editypes,        },        props:{            detailData: {                type: Object            }        },        data() {            return {                previewDialog:false, // 预览报表弹窗开启                generateBillsfalse:false, // 如果生成账单就禁用                pleasereviewType:false, // 如果请核就禁用                checkScheduleDialog:false, // 审核弹窗                checkId:'', // 审核需要的id                batchNo:'',                billsListAllData:[], // 分单列表数据                pageLoading:false, // 全屏的动画                saveLoading:false,                // 详情数据                form:{                    billDate:dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 单据日期 默认 当天                    operatorName:JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人                    operatorId:JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人                    businessType:'AE', // 业务类型 默认 海运出口                    billType:'DD', // 单据类型 默认 直单                    issueType:'正本', // 签单方式 默认 正本                    mpaymode:'PP', // 主单付费方式 默认PP                    hpaymode:'PP', // 分单付费方式 默认 PP                    loadType:'FCL', // 装箱方式默认整箱                    srcType:'OWN', // 业务来源默认公司   来源 内容 默认登录人所属公司                    numberOfObl:'THREE', // 正本份数 默认 THREE                    numberOfCopy:'ONE', // 副本份数 默认 ONE                    seaType:'直航', // 进出口 默认出口 E=出口 I=进口"                    marks:'N/M',                    filesList:[], // 文件中心                    feeCenterListD:[], // 收                    feeCenterListC:[], // 付                    preContainersList:[], // 箱                },                // 循环的配置                basicData:{                    column:[                        {                            label: "客户名称", // 调往来单位接口                            prop: "corpCnName",                            text:"客户名称",                            type:'select',                            dicData:[],                            disabled:false,                            buttonIf:true,                            slot:'bcorps',                            forParameter:{                                key:'id',                                label:'cnName',                                value:'cnName',                            },                            rules: [{                                required: true,                                message: " ",                                trigger: "blur"                            }]                        },                        [                            {                                label: "客户OP", // 客户联系人姓名 电话和邮箱带出来,可以修改 往来单位接口 需要传一个客户名称的值过去                                prop: "corpAttnName",                                text:"姓名",                                allowCreate:true,                                type:'select',                                dicData:[],                                span:10,                                disabled:true,                                forParameter:{                                    key:'id',                                    label:'cname',                                    value:'cname',                                },                            },                            {                                label: "", //客户联系人电话                                prop: "corpAttnTel",                                text:"电话",                                labelWidth:'10px',                                disabled:true,                                span:7,                                rules: [{                                    required: true,                                    message: "",                                    trigger: "blur"                                }]                            },                            {                                label: "", // 客户联系人邮箱                                prop: "corpAttnEmail",                                text:"邮箱",                                labelWidth:'10px',                                disabled:true,                                span:7,                                rules: [{                                    required: true,                                    message: " ",                                    trigger: "blur"                                }]                            },                        ],                        [                            {                                label: "业务来源", // OWN=公司  AGENT=代理 SALES=业务员                                prop: "srcType",                                text:"业务来源",                                type:'select',                                disabled:true,                                forParameter:{                                    key:'dictKey',                                    label:'dictValue',                                    value:'dictKey',                                },                                dicData:[],                            },                            {                                label: "",                                prop: "srcCnName", // 来源中文 公司不是下拉写死公司两字 业务员调用户管理列表 代理调往来单位四个代理数据                                text:"来源",                                labelWidth:'30px',                                type:'select',                                disabled:true,                                dicData:[],                                forParameter:{                                    key:'id',                                    label:'cnName',                                    value:'cnName',                                },                            },                        ],                        [                            {                                label: "MB/L NO",                                text:"MB/L NO",                                prop: "mblno",                                span:19,                                disabled:false,                            },                            {                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other                                text:"付款方式",                                prop: "mpaymode",                                type:'select',                                labelWidth:'30px',                                disabled:false,                                span:5,                                dicData:[],                                forParameter:{                                    key:'dictKey',                                    label:'dictValue',                                    value:'dictKey',                                },                            },                        ],                        [                            {                                label: "HB/L NO",  //弹窗点击确认还是取消申请 调后台接口获取到一个编号                                prop: "HB/L NO",                                type:'button',                                span:4,                                disabled:false,                            },                            {                                label: "",                                text:"HB/L NO",                                prop: "hblno",                                labelWidth:'6px',                                span:14,                                disabled:true,                            },                            {                                label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP                                text:"付款方式",                                prop: "hpaymode",                                labelWidth:'30px',                                disabled:false,                                type:'select',                                span:6,                                dicData:[],                                forParameter:{                                    key:'dictKey',                                    label:'dictValue',                                    value:'dictKey',                                },                            },                        ],                        {                            label: "RET MBLNO", // Co-Loader 中文名称  往来单位 类别                            text:"RET MBLNO",                            prop: "refno",                            disabled:false,                        },                        [                            {                                label: "业务编号",                                text:"业务编号",                                prop: "billNo",                                disabled:true,                            },                            {                                label: "创建日期",                                prop: "createTime",                                type:'date',                                disabled:true,                            },                        ],                        {                            label: "制单人",                            text:"制单人",                            prop: "createUserName",                            type:'select',                            dicData:[],                            disabled:false,                            buttonIf:false,                            forParameter:{                                key:'id',                                label:'name',                                value:'name',                            },                        },                        [                            {                                label: "委托人",                                text:"委托人",                                prop: "clientName",                                type:'select',                                dicData:[],                                disabled:false,                                buttonIf:false,                                forParameter:{                                    key:'id',                                    label:'cnName',                                    value:'cnName',                                },                            },                            {                                label: "运输类型", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP                                text:"运输类型",                                prop: "transportType",                                disabled:false,                                type:'select',                                dicData:[],                                forParameter:{                                    key:'dictKey',                                    label:'dictValue',                                    value:'dictKey',                                },                            },                        ]                    ]                },                activeName:'first',                bigtabs:'wt',                saberUserInfo:{}, // 当前登录人信息                // 需要加判断是否必填的数据                messageData:[                    {                        name:'客户',                        value:'corpCnName',                    },                    {                        name:'业务来源',                        value:'srcType',                    },                    {                        name:'MBLNO',                        value:'mblno',                    },                    {                        name:'Reference NO',                        value:'refno',                    },                    {                        name:'航班号',                        value:'voyageNo',                    },                    {                        name:'目的港',                        value:'finalDestinationName',                    },                    {                        name:'包装单位',                        value:'packingUnit',                    },                    {                        name:'航空公司',                        value:'carrierCnName',                    },                    {                        name:'航站',                        value:'cyCnName',                    },                ],            }        },        watch:{            // 监听业务类型 如果不是分单 可以编辑分单号            'form.billType':{                // 执行方法                handler(oldValue,newValue) {                    // if (oldValue == 'MM') {                    //     this.form.hblno = ''                    // }                    // 只要分单不能编辑                    if (oldValue == 'MH') {                        this.columnforfun('hblno').disabled = true                    }else {                        this.columnforfun('hblno').disabled = false                    }                },                deep: true, // 深度监听                immediate: true  // 第一次改变就执行            },            // 监听箱信息数据 箱信息中有温度 自动切换 冻货            'form.preContainersList':{                // 执行方法                handler(oldValue,newValue) {                    // 判断是否是数组                    if (oldValue instanceof Array) {                        // 循环 有温度反 true 没有反 false                        const arr = oldValue.map(item=>{                            if (Number(item.temperature)) {                                return true                            }else {                                return false                            }                        })                        // 判断是否有温度                        if (arr[0]) {                            // 判断之前是否是冻货                            if (this.form.cargoType == 'reefer') return                            this.$message({                                message: '箱信息里有温度已将货描切换为冻柜',                                type: 'warning'                            });                            this.$set(this.form,'cargoType','reefer')                        }                    }                },                deep: true, // 深度监听                immediate: true  // 第一次改变就执行            }        },        created() {            this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content            // 判断是否员id, 有id 就不显示            if (!this.form.id) {                this.deptGetDetailPolfun() // 收货地 起运港 当前登录人的默认                this.userGetListfun(undefined,true) // 获取用户管理数据            }            this.ownDeptLazyTreefun() // 获取公司数据            this.mpaymodeWorkDictsfun() // 获取 付款方式字典            this.srcTypeWorkDictsfun()        },        methods:{            // 报表弹窗            previewDialogfun(){                this.previewDialog = true            },            //请核关闭            choceScheduleFun() {                this.checkScheduleDialog = false            },            // 收货地 起运港 当前登录人的默认            deptGetDetailPolfun(){                deptGetDetailPol(this.saberUserInfo.dept_id).then(res=>{                    // 收货地                    this.form.placeReceiptName = res.data.data.departureEnName                    this.form.placeReceiptId = res.data.data.departureId                    this.form.placeReceiptNamePrint = res.data.data.departureEnName                    // 起运港                    this.form.departureCnName = res.data.data.departureCnName                    this.form.departureEnName = res.data.data.departureEnName                    this.form.departureId = res.data.data.departureId                    this.form.departureNamePrint = res.data.data.departureEnName                    // 签单地点 默认 起运港                    this.$set(this.form,'issueAt',this.form.departureEnName)                    // 主单单付费地点 默认  如果主单付费方式 为PP 取起运港 如果主单付费地点为CC 取卸货港                    if (this.form.mpaymode == 'PP') {                        this.$set(this.form,'mpayplace',this.form.departureEnName)                    }                    // 分单单付费地点 默认  如果分单付费方式 为PP 取起运港 如果分单付费地点为CC 取卸货港                    if (this.form.hpaymode == 'PP') {                        this.$set(this.form,'hpayplace',this.form.departureEnName)                    }                })            },            // 获取运输类型字典数据            transportTypeWorkDictsfun(){                getWorkDicts('transportation_type_los').then(res=>{                    this.columnforfun('transportType').dicData = res.data.data                })            },            // 获取用户管理数据            userGetListfun(account = undefined,type = false,){                userGetList(1,10,{account}).then(res=>{                    this.columnforfun('operatorName').dicData = res.data.data.records                })            },            // 获取付款方式字典数据            mpaymodeWorkDictsfun(){                console.log(787)                getWorkDicts('payment_method_los').then((res) => {                    console.log(res,789)                    this.columnforfun('mpaymode').dicData = res.data.data                    this.columnforfun('hpaymode').dicData = res.data.data                    console.log(this.columnforfun('hpaymode'),792)                })            },            // 获取客户名称数据 往来单位数据            getBcorpsListfun(cnName){                getBcorpsList(1,10,{cnName}).then(res=>{                    this.columnforfun('corpCnName').dicData = res.data.data.records.map(item=>{                        item.cnName = item.cnName + ' - ' + item.shortName                        return item                    })                })            },            // 获取委托人数据 往来单位数据            clientNameBcorpsListfun(cnName){                getBcorpsList(1,10,{cnName}).then(res=>{                    this.columnforfun('clientName').dicData = res.data.data.records                })            },            // 获取客户联系人 客户OP            getBcorpsattnListfun(cnName){                getBcorpsattnList(1,10,{pid:this.form.corpId,cnName}).then(res=>{                    this.columnforfun('corpAttnName').dicData = res.data.data.records                    if(res.data.data.records.length == 0) {                        this.form.corpAttnName = ''                        this.form.corpAttnId = ''                        this.$set(this.form,'corpAttnTel','')                        this.$set(this.form,'corpAttnEmail','')                        return                    }                    this.form.corpAttnName = res.data.data.records[0].cname                    this.form.corpAttnId = res.data.data.records[0].id                    this.$set(this.form,'corpAttnTel',res.data.data.records[0].tel)                    this.$set(this.form,'corpAttnEmail',res.data.data.records[0].email)                })            },            // 获取地点信息            getBlocationsListfun(cnName){                getBlocationsList(1,10,{cnName}).then(res=>{                    this.columnforfun('mPayplace').dicData = res.data.data.records                })            },            // 获取业务来源数据            srcTypeWorkDictsfun(){                getWorkDicts('src_type_los').then(res=>{                    this.columnforfun('srcType').dicData = res.data.data                })            },            // 获取业务来源代理数据            agentBcorpsListfun(cnName){                let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'                getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{                    this.columnforfun('srcCnName').dicData = res.data.data.records                })            },            // 获取业务来源业务员数据            salesUserGetListfun(account){                userGetList(1,10,{account}).then(res=>{                    this.columnforfun('srcCnName').dicData = res.data.data.records                })            },            // 获取制单人数据 用户数据            createUserUserGetListfun(account){                userGetList(1,10,{account}).then(res=>{                    this.columnforfun('createUserName').dicData = res.data.data.records                })            },            // 获取公司名称 用户管理左侧            ownDeptLazyTreefun(){                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)                        }                    }                })            },            // 申请B/L NO            billsGetBillNofun(){                let billNoFormat = 'KYCK'                // if (this.form.cargoType == 'dry') {                //     billNoFormat = 'KYCK-PH'                // }else if (this.form.cargoType == 'danger') {                //     billNoFormat = 'KYCK-WXP'                // }else if (this.form.cargoType == 'reefer') {                //     billNoFormat = 'KYCK-DG'                // }else {}                if (this.form.cargoType) {                    billNoFormat = 'KYCK-WXP'                }                billsGetBillNo({                    businessTypeCode:'KYCK',                    billNoFormat:billNoFormat                }).then(res=>{                    this.columnforfun('hpaymode').disabled = false                    this.$set(this.form,'hblno',res.data.data)                    this.billsSubmitfun()                })            },            /* 远程模糊查询操作用户 */            remoteMethod(value,name) {                if (name == 'operatorName') {                    this.userGetListfun(value)                }else if (name == 'corpCnName') {                    this.getBcorpsListfun(value)                }else if (name == 'mPayplace') {                    this.getBlocationsListfun(value)                }else if (name == 'corpAttnName') {                    this.getBcorpsattnListfun(value)                }else if (name == 'srcType') {                    this.srcTypeWorkDictsfun()                }else if (name == 'srcCnName') {                    if (this.form.srcType == 'SALES') {                        // 业务员                        this.columnforfun('srcCnName').forParameter = { key:'id', label:'name', value:'name'}                        this.salesUserGetListfun(value)                    }else if (this.form.srcType == 'AGENT') {                        // 代理                        this.columnforfun('srcCnName').forParameter = { key:'id', label:'cnName', value:'cnName'}                        this.agentBcorpsListfun(value)                    }else if (this.form.srcType == 'OWN') {                        // 公司                        this.columnforfun('srcCnName').forParameter = { key:'id', label:'title', value:'title'}                        this.ownDeptLazyTreefun()                    }else {}                }else if (name == 'transportType') {                    this.transportTypeWorkDictsfun()                }else if (name == 'clientName') {                    this.clientNameBcorpsListfun(value)                }else if (name == 'createUserName') {                    this.createUserUserGetListfun(value)                } else {                }            },            // 下拉的监听事件            corpChange(value,name){                if (name == 'operatorName') {                    // OP 下拉赋值 用户管理列表                    for(let item of this.columnforfun('operatorName').dicData) {                        if (item.name == value) {                            this.form.operatorName = item.name                            this.form.operatorId = item.id                        }                    }                }                else if (name == 'corpCnName') {                    if (value) {                        this.columnforfun('corpAttnName').disabled = false                        this.columnforfun('corpAttnTel').disabled = false                        this.columnforfun('corpAttnEmail').disabled = false                    }else {                        this.columnforfun('corpAttnName').disabled = true                        this.columnforfun('corpAttnTel').disabled = true                        this.columnforfun('corpAttnEmail').disabled = true                        // 如果点击清空按钮把值赋值为空                        this.form.corpCnName = ''                        this.form.corpEnName = ''                        this.form.corpId = ''                        this.form.corpCode = ''                        // 清空 客户OP                        this.form.corpAttnName = ''                        this.form.corpAttnId = ''                        this.$set(this.form,'corpAttnTel','')                        this.$set(this.form,'corpAttnEmail','')                        // 清空 业务来源和来源详情                        this.$set(this.form,'srcType','')                        this.$set(this.form,'srcId','')                        this.$set(this.form,'srcCnName','')                        this.$set(this.form,'srcEnName','')                    }                    // 往来单位                    for(let item of this.columnforfun('corpCnName').dicData) {                        if (item.cnName == value) {                            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                            // 航线带出往来单位的优势航线                            this.$set(this.form,'lineCnName',item.advantageRoute)                            // 带出发货人数据                            this.$set(this.form,'hshipperId',item.id)                            this.$set(this.form,'hshipperCnName',item.cnName)                            this.$set(this.form,'hshipperEnName',item.enName)                            this.$set(this.form,'hshipperCode',item.code)                            this.$set(this.form,'hshipperDetails',item.details)                            this.$set(this.form,'hshipperCntyName',item.cntyName)                            this.$set(this.form,'hshipperCntyCode',item.cntyCode)                        }                    }                }                else if (name == 'corpAttnName') {                    for(let item of this.columnforfun('corpAttnName').dicData) {                        if (item.cname == value) {                            this.form.corpAttnName = item.cname                            this.form.corpAttnId = item.id                            this.$set(this.form,'corpAttnTel',item.tel)                            this.$set(this.form,'corpAttnEmail',item.email)                        }                    }                }                else if (name == 'srcType') {                    if (!value) {                        this.$set(this.form,'srcType','')                        // 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').forParameter = { key:'id', label:'title', value:'title'}                        this.ownDeptLazyTreefun()                    }else if (value == 'AGENT') {                        // 代理                        this.columnforfun('srcCnName').type = 'select'                        this.columnforfun('srcCnName').forParameter = { key:'id', label:'cnName', value:'cnName'}                        this.columnforfun('srcCnName').disabled = false                        this.agentBcorpsListfun()                    }else if (value == 'SALES') {                        // 业务员                        this.columnforfun('srcCnName').type = 'select'                        this.columnforfun('srcCnName').forParameter = { key:'id', label:'name', value:'name'}                        this.columnforfun('srcCnName').disabled = false                        this.salesUserGetListfun()                    }else {}                }                else if (name == 'srcCnName'){                    for(let item of this.columnforfun('srcCnName').dicData) {                        if (item[this.columnforfun('srcCnName').forParameter.value] == value) {                            if (this.form.srcType == 'SALES') {                                // 业务员                                this.$set(this.form,'srcId',item.id)                                this.$set(this.form,'srcCnName',item.name)                                this.$set(this.form,'srcEnName',item.name)                            }else if (this.form.srcType == 'AGENT') {                                // 代理                                this.$set(this.form,'srcId',item.id)                                this.$set(this.form,'srcCnName',item.cnName)                                this.$set(this.form,'srcEnName',item.enName)                            }else {}                        }                    }                }                else if (name == 'coloaderCnName') {                    for(let item of this.columnforfun('coloaderCnName').dicData) {                        if (item.cnName == value) {                            this.$set(this.form,'coloaderId',item.id)                            this.$set(this.form,'coloaderCnName',item.cnName)                            this.$set(this.form,'coloaderEnName',item.enName)                        }                    }                }                else if (name == 'mpaymode') {                    // 主单付费方式                    this.form[name] = value                }                else if (name == 'hpaymode') {                    // 分单付费方式                    this.form[name] = value                }                else if (name == 'clientName') {                    for(let item of this.columnforfun('clientName').dicData) {                        if (item.cnName == value) {                            this.$set(this.form,'clientName',item.cnName)                            this.$set(this.form,'clientId',item.id)                        }                    }                }                else if (name == 'createUserName') {                    for(let item of this.columnforfun('createUserName').dicData) {                        if (item.cnName == value) {                            this.$set(this.form,'createUserName',item.name)                            this.$set(this.form,'createUserId',item.id)                        }                    }                }                else {                    this.form[name] = value                }            },            // 申请B/L NO            applyforfun(text){                if (!this.form.id) {                    this.$message({                        message: '请先保存数据',                        type: 'warning'                    });                    return                }                // 如果不是分单                if (this.form.billType != 'MH') {                    this.$message({                        message: '只要分单需要申请',                        type: 'warning'                    });                    return                }                if (this.form.hblno) {                    this.$message({                        message: 'B/L NO 只能申请一次',                        type: 'warning'                    });                    return                }                if (!this.form.businessType) {                    this.$message({                        message: '请先选择业务类型',                        type: 'warning'                    });                    return                }                if (!this.form.corpCnName) {                    this.$message({                        message: '请先选择客户名称',                        type: 'warning'                    });                    return                }                this.$confirm(`确定${text}?`, {                    confirmButtonText: "确定",                    cancelButtonText: "取消",                    type: "warning"                }).then(res=>{                    this.billsGetBillNofun()                })            },            // 配置项            columnforfun(value){                for(let item of this.basicData.column) {                    if (item instanceof Array) {                        for(let ite of item) {                            if (value == ite.prop) {                                return ite                            }                        }                    }else {                        if (value == item.prop) {                            return item                        }                    }                }            },            //返回列表            backToList() {                this.$emit('goBack')            },            // 单据请核            DocumentApproval(){                if(this.form.billType == 'MH') {                    this.$message.warning('分单不能提交请核')                    return                }                if (popupReminder(this.form,this.messageData)){                    this.$confirm(popupReminder(this.form,this.messageData), {                        confirmButtonText: "确定",                        cancelButtonText: "取消",                        type: "warning"                    })                }                if (popupReminder(this.form,this.messageData)) {                    return;                }                this.$confirm("确定要请核数据?", {                    confirmButtonText: "确定",                    cancelButtonText: "取消",                    type: "warning"                }).then(()=>{                    this.pageLoading = true                    aeabillsCheckBills({                        id:this.form.id,                        url: '/iosBasicData/AirtransportExport/bills/approvalDetails',                        pageStatus: "this.$store.getters.approvalDetails",                        pageLabel: "审批详情(F)",                    }).then(res=>{                        this.pageLoading = false                        this.$message({                            type: "success",                            message: "操作成功!"                        });                        // 详情                        this.billsDetailfun(this.form.id)                    })                })            },            // 撤销单据请核            revokeDocumentApproval(){                this.$confirm("确定要撤销请核数据?", {                    confirmButtonText: "确定",                    cancelButtonText: "取消",                    type: "warning"                }).then(()=>{                    this.pageLoading = true                    aeabillsRevokeCheckBills({                        id:this.form.id                    }).then(res=>{                        this.pageLoading = false                        this.$message({                            type: "success",                            message: "操作成功!"                        });                        // 详情                        this.billsDetailfun(this.form.id)                    })                })            },            // 编辑按钮            editHandle(){                this.detailData.seeDisabled = false            },            // 大保存按钮            editCustomer(){                this.$refs.form.validate((valid)=>{                    if (valid) {                        // 判断必填项                        let sum = '请填写'                        if (!this.form.length) {                            sum += ` 长度`                        }                        if (!this.form.width) {                            sum += ` 宽度`                        }                        if (!this.form.height) {                            sum += ` 高度`                        }                        if (!this.form.quantity) {                            sum += ` 件数`                        }                        if (!this.form.packingUnit) {                            sum += ` 包装`                        }                        if (!this.form.grossWeight) {                            sum += ` 毛重`                        }                        if (!this.form.measurement) {                            sum += ` 尺码`                        }                        if (!this.form.goodsValue) {                            sum += ` 货物价值`                        }                        if (!this.form.billingWeight) {                            sum += ` 计费重量`                        }                        if (!this.form.unit) {                            sum += ` 计量单位`                        }                        if (!this.form.freightRateGrade) {                            sum += ` 运价等级`                        }                        for (let item of this.form.feeCenterListD) {                            if (!item.corpId) {                                sum += ` 应收序号${item.$index + 1}往来单位`                            }                            if (!item.feeId) {                                sum += ` 应收序号${item.$index + 1}费用简称`                            }                            if (!item.elementsCode) {                                sum += ` 应收序号${item.$index + 1}核算要素`                            }                            if (!item.curCode) {                                sum += ` 应收序号${item.$index + 1}币种`                            }                        }                        for (let item of this.form.feeCenterListC) {                            if (!item.corpId) {                                sum += ` 应付序号${item.$index + 1}往来单位`                            }                            if (!item.feeId) {                                sum += ` 应付序号${item.$index + 1}费用简称`                            }                            if (!item.elementsCode) {                                sum += ` 应付序号${item.$index + 1}核算要素`                            }                            if (!item.curCode) {                                sum += ` 应付序号${item.$index + 1}币种`                            }                        }                        if(sum != '请填写') {                            this.$confirm(sum, {                                confirmButtonText: "确定",                                cancelButtonText: "取消",                                type: "warning"                            })                            return;                        }                        // 赋值 ETD 日期                        this.form.billDate = this.form.etd?this.form.etd.slice(0,10) + ' 00:00:00':null // 单据日期                        // 调用保存接口                        this.billsSubmitfun()                    }                })            },            // 主表保存接口大保存            billsSubmitfun(){                // if (this.form.cargoType = 'dry') {                //     // 普货                //     this.form.billNoFormat = 'KYCK-PH'                // }else if (this.form.cargoType = 'danger'){                //     // 危险品                //     this.form.billNoFormat = 'KYCK-WXP'                // }else if (this.form.cargoType = 'reefer') {                //     // 冻柜                //     this.form.billNoFormat = 'KYCK-DG'                // }else {                //                // }                if (this.form.cargoType) {                    this.form.billNoFormat = 'KYCK-WXP'                }else {                    this.form.billNoFormat = 'KYCK'                }                this.form.businessTypeCode = 'KYCK'                // 把拼接的数据拆开 开始 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒                this.searchSplit()                // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩                // 费用 收 赋值数据                this.form.feeCenterListD.map((row,index)=>{                    row.dc = 'D'                    row.sort = Number(index) + 1                    row.businessType = this.form.businessType // 业务类型                    row.billType = this.form.billType // 单据类型                    row.billNo = this.form.billNo // 单据编号                    row.billDate = this.form.billDate                    row.billCorpId = this.form.corpId // 主表客户 id                    row.billCorpCnName = this.form.corpCnName // 主表客户中文名称                    row.billCorpEnName = this.form.corpEnName // 主表客户英文名称                    row.lineId = this.form.lineId // 航线 id                    row.lineCnName = this.form.lineCnName // 航线中文名称                    row.lineEnName = this.form.lineEnName // 航线英文名称                    row.vesselId = this.form.vesselId // 船名 id                    row.vesselCnName = this.form.vesselCnName // 中文船名                    row.vesselEnName = this.form.vesselEnName // 英文船名                    row.voyageNo = this.form.voyageNo // 航次                    row.mblno = this.form.mblno // MB/L NO                    row.hblno = this.form.hblno // HB/L NO                    row.etd = this.form.etd // 开船日期                    row.eta = this.form.eta // 到港日期                    row.departureId = this.form.departureId // 起运港 id                    row.departureCode = this.form.departureCode // 起运港代码                    row.departureCnName = this.form.departureCnName // 起运港中文名称                    row.departureEnName = this.form.departureEnName // 起运港英文名称                    row.podId = this.form.podId // 卸货港 id                    row.podCode = this.form.podCode // 卸货港代码                    row.podCnName = this.form.podCnName // 卸货港中文名称                    row.corpArgreementNo = this.form.corpArgreementNo // 客户约号                    // 数量 * 单价 = 净额                    // 总税率 = 税率 + 附件税率                    // 税额 = 净额 * 总税率                    // 含税                    if (row.curCode == 'CNY') {                        row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }else {                        row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }                    // 净额                    if (row.curCode == 'CNY') {                        row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }else {                        row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }                })                // 费用 付 赋值数据                this.form.feeCenterListC.map((row,index)=>{                    row.dc = 'C'                    row.sort = Number(index) + 1                    row.businessType = this.form.businessType // 业务类型                    row.billType = this.form.billType // 单据类型                    row.billNo = this.form.billNo // 单据编号                    row.billDate = this.form.billDate // 单据日期                    row.billCorpId = this.form.corpId // 主表客户 id                    row.billCorpCnName = this.form.corpCnName // 主表客户中文名称                    row.billCorpEnName = this.form.corpEnName // 主表客户英文名称                    row.lineId = this.form.lineId // 航线 id                    row.lineCnName = this.form.lineCnName // 航线中文名称                    row.lineEnName = this.form.lineEnName // 航线英文名称                    row.vesselId = this.form.vesselId // 船名 id                    row.vesselCnName = this.form.vesselCnName // 中文船名                    row.vesselEnName = this.form.vesselEnName // 英文船名                    row.voyageNo = this.form.voyageNo // 航次                    row.mblno = this.form.mblno // MB/L NO                    row.hblno = this.form.hblno // HB/L NO                    row.etd = this.form.etd // 开船日期                    row.eta = this.form.eta // 到港日期                    row.departureId = this.form.departureId // 起运港 id                    row.departureCode = this.form.departureCode // 起运港代码                    row.departureCnName = this.form.departureCnName // 起运港中文名称                    row.departureEnName = this.form.departureEnName // 起运港英文名称                    row.podId = this.form.podId // 卸货港 id                    row.podCode = this.form.podCode // 卸货港代码                    row.podCnName = this.form.podCnName // 卸货港中文名称                    row.corpArgreementNo = this.form.corpArgreementNo // 客户约号                    // 数量 * 单价 = 净额                    // 总税率 = 税率 + 附件税率                    // 税额 = 净额 * 总税率                    // 含税                    if (row.curCode == 'CNY') {                        row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }else {                        row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }                    // 净额                    if (row.curCode == 'CNY') {                        row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }else {                        row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)                    }                })                this.pageLoading = true                aeabillsSubmit(this.form).then(res=>{                    this.pageLoading = false                    this.$message({                        type: "success",                        message: "操作成功!"                    });                    // this.detailData.seeDisabled = true                    this.billsDetailfun(res.data.data.id)                }).catch(err=>{                    this.pageLoading = false                })            },            // 复制单据接口            billsCopyBillsfun(id){                aeabillsCopyBills({id}).then(res=>{                    this.form = res.data.data;                    this.pageLoading = false                    this.searchMontage() // 下拉 中文名称和编号拼接                    // 配箱最上面可以编辑                    for(let item of this.form.containersList) {                        item.edit = false                    }                    // 先把状态改成可以编辑,然后判断是否可以编辑                    this.generateBillsfalse = false                    // 应收                    for(let item of this.form.feeCenterListD) {                        // 判断是否生成了账单                        if (item.accStatus == 1) {                            this.columnforfun('corpCnName').disabled = true                            this.columnforfun('srcType').disabled = true                            this.columnforfun('mblno').disabled = true                            this.columnforfun('refno').disabled = true                            this.generateBillsfalse = true                        }                        if (item.curCode == 'CNY') {                            this.$set(item,'rmbAmount',item.amount)                            this.$set(item,'usdAmount','')                            this.$set(item,'rmbAmountNet',item.amountNet)                            this.$set(item,'usdAmountNet','')                        }else {                            this.$set(item,'usdAmount',item.amount)                            this.$set(item,'rmbAmount','')                            this.$set(item,'usdAmountNet',item.amountNet)                            this.$set(item,'rmbAmountNet','')                        }                        item.edit = false                    }                    // 应付                    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('refno').disabled = true                        }                        if (item.curCode == 'CNY') {                            this.$set(item,'rmbAmount',item.amount)                            this.$set(item,'usdAmount','')                            this.$set(item,'rmbAmountNet',item.amountNet)                            this.$set(item,'usdAmountNet','')                        }else {                            this.$set(item,'usdAmount',item.amount)                            this.$set(item,'rmbAmount','')                            this.$set(item,'usdAmountNet',item.amountNet)                            this.$set(item,'rmbAmountNet','')                        }                        item.edit = false                    }                    // 文件中心                    for(let item of this.form.filesList) {                        this.$set(item,'edit',false)                    }                })            },            // 详情接口            async billsDetailfun(id){                const res = await aeabillsDetail(id)                this.form = res.data.data;                // 如果已经请核就禁用按钮                // if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {                //     this.detailData.seeDisabled = true                // }else {                //     this.detailData.seeDisabled = false                // }                if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {                    this.columnforfun('corpCnName').disabled = true                    this.columnforfun('srcType').disabled = true                    this.columnforfun('mblno').disabled = true                    this.columnforfun('refno').disabled = true                    this.generateBillsfalse = true                    this.pleasereviewType = true // 请核禁用                }else {                    // 判断是否可以编辑                    this.columnforfun('corpCnName').disabled = false                    this.columnforfun('srcType').disabled = false                    this.columnforfun('mblno').disabled = false                    this.columnforfun('refno').disabled = false                    this.generateBillsfalse = false                    this.pleasereviewType = false                }                this.pageLoading = false                this.searchMontage() // 下拉 中文名称和编号拼接                // 配箱最上面可以编辑                for(let item of this.form.containersList) {                    item.edit = false                }                // 配箱最下面的                for(let item of this.form.waitingBoxList) {                    this.$set(item,'editQuantity',item.quantity)                    this.$set(item,'editGrossWeight',item.grossWeight)                    this.$set(item,'editMeasurement',item.measurement)                    this.$set(item,'edit',false)                }                // 应收                for(let item of this.form.feeCenterListD) {                    // 判断是否生成了账单                    if (item.accStatus == 1) {                        this.columnforfun('corpCnName').disabled = true                        this.columnforfun('srcType').disabled = true                        this.columnforfun('mblno').disabled = true                        this.columnforfun('refno').disabled = true                        this.generateBillsfalse = true                    }                    if (item.curCode == 'CNY') {                        this.$set(item,'rmbAmount',item.amount)                        this.$set(item,'usdAmount','')                        this.$set(item,'rmbAmountNet',item.amountNet)                        this.$set(item,'usdAmountNet','')                    }else {                        this.$set(item,'usdAmount',item.amount)                        this.$set(item,'rmbAmount','')                        this.$set(item,'usdAmountNet',item.amountNet)                        this.$set(item,'rmbAmountNet','')                    }                    item.edit = false                }                // 应付                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('refno').disabled = true                    }                    if (item.curCode == 'CNY') {                        this.$set(item,'rmbAmount',item.amount)                        this.$set(item,'usdAmount','')                        this.$set(item,'rmbAmountNet',item.amountNet)                        this.$set(item,'usdAmountNet','')                    }else {                        this.$set(item,'usdAmount',item.amount)                        this.$set(item,'rmbAmount','')                        this.$set(item,'usdAmountNet',item.amountNet)                        this.$set(item,'rmbAmountNet','')                    }                    item.edit = false                }                // 文件中心                for(let item of this.form.filesList) {                    this.$set(item,'edit',false)                }            },            // tbas切换            handleClick(tba,event) {            },            // 大tbas切换            bigHandleClick(){                if (this.bigtabs == 'fd') {                    if (this.form.id) {                        this.billsListAllfun(this.form.id)                    }                }                if (this.bigtabs == 'dz') {                    if (this.form.id) {                        this.$refs.documentCenter.reportslogListfun({currentPage:1,pageSize:10})                    }                }            },            // 获取不分页的分单列表            billsListAllfun(masterId){                billsListAll({masterId}).then(res=>{                    this.billsListAllData = res.data.data                })            },            // 下拉 把拼接的拆分            searchSplit(){                // 发货人                if (this.form.hshipperCnName) {                    this.form.hshipperCnName = this.form.hshipperCnName.split(' - ')[0]                }                // 收货人                if (this.form.hconsigneeCnName) {                    this.form.hconsigneeCnName = this.form.hconsigneeCnName.split(' - ')[0]                }                // 通知人                if (this.form.hnotifyCnName) {                    this.form.hnotifyCnName = this.form.hnotifyCnName.split(' - ')[0]                }                // COLOADER                if (this.form.coloaderCnName) {                    this.form.coloaderCnName = this.form.coloaderCnName.split(' - ')[0]                }                // 船公司                if (this.form.carrierCnName) {                    this.form.carrierCnName = this.form.carrierCnName.split(' - ')[0]                }                // 收货地                if (this.form.placeReceiptName) {                    this.form.placeReceiptName = this.form.placeReceiptName.split(' - ')[0]                    this.form.placeReceiptNamePrint = this.form.placeReceiptNamePrint.split(' - ')[0]                }                // 起运港                if (this.form.departureEnName) {                    this.form.departureEnName = this.form.departureEnName.split(' - ')[0]                    this.form.departureNamePrint = this.form.departureNamePrint.split(' - ')[0]                }                // 起运地                if (this.form.departureAddrEnName) {                    this.form.departureAddrEnName = this.form.departureAddrEnName.split(' - ')[0]                    this.form.departureAddrNamePrint = this.form.departureAddrNamePrint.split(' - ')[0]                }                // 目的地                if (this.form.destinationName) {                    this.form.destinationName = this.form.destinationName.split(' - ')[0]                    this.form.destinationNamePrint = this.form.destinationNamePrint.split(' - ')[0]                }                // 目的地                if (this.form.finalDestinationName) {                    this.form.finalDestinationName = this.form.finalDestinationName.split(' - ')[0]                    this.form.finalDestinationNamePrint = this.form.finalDestinationNamePrint.split(' - ')[0]                }                // 中转港                if (this.form.potEnName) {                    this.form.potEnName = this.form.potEnName.split(' - ')[0]                    this.form.potNamePrint = this.form.potNamePrint.split(' - ')[0]                }                // 船名                if (this.form.vesselCnName) {                    this.form.vesselCnName = this.form.vesselCnName.split(' - ')[0]                }                // 客户名称                if (this.form.corpCnName) {                    this.form.corpCnName = this.form.corpCnName.split(' - ')[0]                }            },            // 下拉 中文名称和编号拼接            searchMontage(){                // 发货人                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.hnotifyCnName) {                    this.form.hnotifyCnName = this.form.hnotifyCnName + ' - ' + this.form.hnotifyCode                }                // COLOADER                if (this.form.coloaderCnName) {                    let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'                    getBcorpslistByType(1,10,{cnName:this.form.coloaderCnName,corpType}).then(res=>{                        this.form.coloaderCnName = this.form.coloaderCnName + ' - ' + res.data.data.records[0].code                    })                }                // 船公司                if (this.form.carrierCnName) {                    let corpType = '1712286570540703745'                    getBcorpslistByType(1,10,{cnName:this.form.carrierCnName,corpType}).then(res=>{                        this.form.carrierCnName = this.form.carrierCnName + ' - ' + res.data.data.records[0].code                    })                    // this.form.carrierCnName = this.form.carrierCnName + ' - ' + this.form.carrierCode                }                // 收货地                if (this.form.placeReceiptName) {                    this.form.placeReceiptName = this.form.placeReceiptName + ' - ' + this.form.placeReceiptCode                    this.form.placeReceiptNamePrint = this.form.placeReceiptNamePrint + ' - ' + this.form.placeReceiptCode                }                // 起运港                if (this.form.departureEnName) {                    this.form.departureEnName = this.form.departureEnName + ' - ' + this.form.departureCode                    this.form.departureNamePrint = this.form.departureNamePrint + ' - ' + this.form.departureCode                }                // 起运地                if (this.form.departureAddrEnName) {                    this.form.departureAddrEnName = this.form.departureAddrEnName + ' - ' + this.form.departureAddrCode                    this.form.departureAddrNamePrint = this.form.departureAddrNamePrint + ' - ' + this.form.departureAddrCode                }                // 目的地                if (this.form.destinationName) {                    this.form.destinationName = this.form.destinationName + ' - ' + this.form.destinationCode                    this.form.destinationNamePrint = this.form.destinationNamePrint + ' - ' + this.form.destinationCode                }                // 目的港                if (this.form.finalDestinationName) {                    this.form.finalDestinationName = this.form.finalDestinationName + ' - ' + this.form.finalDestinationCode                    this.form.finalDestinationNamePrint = this.form.finalDestinationNamePrint + ' - ' + this.form.finalDestinationCode                }                // 中转港                if (this.form.potEnName) {                    this.form.potEnName = this.form.potEnName + ' - ' + this.form.potCode                    this.form.potNamePrint = this.form.potNamePrint + ' - ' + this.form.potCode                }                // 船名                if (this.form.vesselCnName) {                    getBvesselsList(1,10,{cnName:this.form.vesselCnName}).then(res=>{                        this.form.vesselCnName = this.form.vesselCnName + ' - ' + res.data.data.records[0].code                    })                }                // 客户名称                if (this.form.corpCnName) {                    getBcorpslistByType(1,10,{cnName:this.form.corpCnName}).then(res=>{                        this.form.corpCnName = this.form.corpCnName + ' - ' + res.data.data.records[0].shortName                    })                }            },        },    }</script><style scoped>.borderless {    height: 100%;    box-sizing: border-box}.customer-main {    margin-bottom: 15px;}.demo-ruleForm {    font-size: 14px;}.margintop {    margin-top: 10px;}::v-deep.el-form-item {    margin-bottom: 0;}.isShow {    display: none;}</style>
 |