123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653 |
- <template>
- <div class="borderless" v-loading="pageLoading">
- <div class="customer-head">
- <div class="customer-back">
- <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" type="success" style="margin-right: 8px"-->
- <!-- :loading="saveLoading" >提取利润及放单-->
- <!--</el-button>-->
- <el-button size="small" style="margin-right: 8px"
- :loading="saveLoading" :disabled="!form.id" @click="previewreportfun" >预 览
- </el-button>
- <el-button size="small" style="margin-right: 8px" v-if="roleName.indexOf('admin') != -1"
- :loading="saveLoading" :disabled="!form.id" @click="DesignreportDialog = true" >报表设计
- </el-button>
- <el-button size="small" type="warning" plain style="margin-right: 8px" :disabled="!form.id" v-if="form.isChecked == 1"
- :loading="saveLoading" @click="finstlbillsRevokeReconciliationfun">撤销对账
- </el-button>
- <el-button size="small" type="success" plain style="margin-right: 8px" :disabled="!form.id" v-else
- :loading="saveLoading" @click="editCustomer('对账')">确认对账
- </el-button>
- <el-button size="small" type="primary" style="margin-right: 8px" v-if="editSave" :disabled="submitType"
- :loading="saveLoading" @click="editHandle">编 辑
- </el-button>
- <el-button size="small" type="primary" style="margin-right: 8px" v-else :disabled="submitType"
- :loading="saveLoading" @click="editCustomer()">保 存
- </el-button>
- </div>
- </div>
- <div style="margin: 55px 5px 0px 5px;'">
- <el-card class="box-card">
- <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
- <el-row>
- <el-row>
- <el-col :span="10">
- <el-form-item label="对账单位" prop="corpCnName">
- <el-col :span="10">
- <search-query :datalist="corpData"
- :selectValue="form.corpCnName"
- :clearable="true"
- :disabled="editSave"
- :filterable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key:'id', label:'cnName', value:'cnName'}"
- @corpChange="corpChange($event,'corpCnName')"
- @remoteMethod="corpBcorpsListfun"
- @corpFocus="corpBcorpsListfun" >
- </search-query>
- </el-col>
- <el-col :span="10">
- <span style="padding-left: 20px"></span>
- <el-input style="width: 100%;" v-model="form.corpEnName"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入" >
- </el-input>
- </el-col>
- <el-col :span="4">
- <el-checkbox style="width: 100%;text-align: right" size="medium"
- :true-label="1" :false-label="0"
- :disabled="editSave"
- v-model="form.corpIsSigned">已签约
- </el-checkbox>
- </el-col>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="船 名" prop="vesselCnName" >
- <el-input style="width: 100%;" v-model="form.vesselCnName"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请选择船名" ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="航 次" prop="voyageNo" >
- <el-input style="width: 100%;" v-model="form.voyageNo"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请选择航次" ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="审核" prop="isApproved" label-width="50px">
- <search-query :datalist="allyesnoData"
- :selectValue="form.isApproved"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"
- @corpChange="corpChange($event,'isApproved')"
- @corpFocus="allyesnoWorkDictsfun" >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="业务编号" prop="businessNo">
- <el-input style="width: 100%;" v-model="form.businessNo"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入JOB NO" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="账单编号" prop="accountNo">
- <el-input style="width: 100%;" v-model="form.accountNo"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入ACCT NO" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="MBL NO" prop="mblno">
- <el-input style="width: 100%;" v-model="form.mblno"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入MBL NO" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="HBL NO" prop="hblno">
- <el-input style="width: 100%;" v-model="form.hblno"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入HBL NO" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="对账" prop="isChecked" label-width="50px">
- <search-query :datalist="isCheckedData"
- :selectValue="form.isChecked"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"
- @corpChange="corpChange($event,'isChecked')"
- @corpFocus="allyesnoWorkDictsfun" >
- </search-query>
- </el-form-item>
- </el-col>
- <!--<el-col :span="4">-->
- <!-- <el-form-item label="对账" prop="isChecked" label-width="50px">-->
- <!-- <search-query :datalist="allyesnoData"-->
- <!-- :selectValue="form.isChecked"-->
- <!-- :clearable="true"-->
- <!-- :disabled="editSave"-->
- <!-- :buttonIf="false"-->
- <!-- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"-->
- <!-- @corpChange="corpChange($event,'isChecked')"-->
- <!-- @corpFocus="allyesnoWorkDictsfun" >-->
- <!-- </search-query>-->
- <!-- </el-form-item>-->
- <!--</el-col>-->
- <el-col :span="4">
- <el-form-item label="业务开始日期" prop="businessDateStart">
- <el-date-picker v-model="form.businessDateStart" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择财务开始日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="业务结束日期" prop="businessDateEnd">
- <el-date-picker v-model="form.businessDateEnd" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择财务结束日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="财务开始日期" prop="accountDateFrom">
- <el-date-picker v-model="form.accountDateFrom" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择财务开始日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="财务结束日期" prop="accountDateTo">
- <el-date-picker v-model="form.accountDateTo" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择财务结束日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="审核开始期间" prop="auditDateFrom">
- <el-date-picker v-model="form.auditDateFrom" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择审核开始日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="审核结束期间" prop="auditDateTo">
- <el-date-picker v-model="form.auditDateTo" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择审核结束日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <expand :showBtn="true" :showSpan="true">
- <el-row>
- <el-col :span="5">
- <el-form-item label="操作员" prop="updateUserName" >
- <search-query :datalist="updateUserData"
- :selectValue="form.updateUserName"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :filterable="true"
- :remote="true"
- :forParameter="{ key:'id', label:'name', value:'name'}"
- @corpChange="corpChange($event,'updateUserName')"
- @remoteMethod="updateUserUserGetListfun"
- @corpFocus="updateUserUserGetListfun" >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="BKNO" prop="bookingNo" >
- <el-input style="width: 100%;" v-model="form.bookingNo"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入BKNO" ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="协议签订人" prop="corpAccRemarks">
- <el-input style="width: 100%;" v-model="form.corpAccRemarks"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入协议签订人" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="业务类型" prop="businessTypes" >
- <search-query :datalist="businessTypesData"
- :selectValue="form.businessTypes"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :multiple="true"
- @corpChange="corpChange($event,'businessTypes')">
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="发票" prop="isChecked" label-width="50px">
- <search-query :datalist="isInvoiceData"
- :selectValue="form.isInvoice"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"
- @corpChange="corpChange($event,'isInvoice')"
- @corpFocus="invoiceWorkDictsfun" >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="收 / 付" prop="dc">
- <search-query :datalist="dcData"
- :selectValue="form.dc"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- @corpChange="corpChange($event,'dc')">
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="币别" prop="curCode">
- <search-query :datalist="curCodeData"
- :selectValue="form.curCode"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :filterable="true"
- :remote="true"
- :forParameter="{ key:'id', label:'code', value:'code'}"
- @corpChange="corpChange($event,'curCode')"
- @remoteMethod="getRateListfun"
- @corpFocus="getRateListfun" >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="10">
- <el-form-item label="业务来源" prop="srcType">
- <el-col :span="10">
- <search-query :datalist="srcTypeData"
- :selectValue="form.srcType"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- @corpChange="corpChange($event,'srcType')">
- </search-query>
- </el-col>
- <el-col :span="13" :offset="1">
- <search-query :datalist="srcData"
- :selectValue="form.srcCnName"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :filterable="true"
- :remote="true"
- :forParameter="srcforParameter"
- @corpChange="corpChange($event,'srcCnName')"
- @remoteMethod="salesuserGetListfun">
- </search-query>
- </el-col>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="签收" prop="isSignfor" label-width="50px">
- <search-query :datalist="allyesnoData"
- :selectValue="form.isSignfor"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"
- @corpChange="corpChange($event,'isSignfor')"
- @corpFocus="allyesnoWorkDictsfun" >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="对账单号" prop="checkNo">
- <el-input style="width: 100%;" v-model="form.billNo"
- size="small" autocomplete="off"
- :disabled="true"
- clearable placeholder="请输入对账单号" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="对账日期" prop="billDate">
- <el-date-picker v-model="form.billDate" clearable
- style="width: 100%;"
- type="date" size="small"
- :disabled="editSave"
- value-format="yyyy-MM-dd HH:mm"
- placeholder="选择对账日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="限定金额" prop="limitedAmount">
- <el-input style="width: 100%;" v-model="form.limitedAmount"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入对账单号" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="备注" prop="remarks" >
- <el-input style="width: 100%;" v-model="form.remarks"
- size="small" autocomplete="off"
- :disabled="editSave"
- clearable placeholder="请输入备注" >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="销账" prop="isCleared" label-width="50px">
- <search-query :datalist="isClearedData"
- :selectValue="form.isCleared"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"
- @corpChange="corpChange($event,'isCleared')"
- @corpFocus="allyesnoWorkDictsfun" >
- </search-query>
- </el-form-item>
- </el-col>
- </el-row>
- </expand>
- <el-row>
- <el-col span="24">
- <div style="text-align: right">
- <!--<el-button size="small" type="" style="margin-right: 8px" :disabled="editSave"-->
- <!-- :loading="saveLoading" @click="ResetFilter">重置条件-->
- <!--</el-button>-->
- <el-button size="small" type="primary" style="margin-right: 8px" :disabled="editSave"
- :loading="saveLoading" @click="retrievalfun" >检 索
- </el-button>
- </div>
- </el-col>
- </el-row>
- </el-row>
- </el-form>
- </el-card>
- <el-card style="margin-top: 10px">
- <el-row>
- <el-col :span="4">
- <div class="bottomFlex" style="color: #81B337">
- <span>应收CNY:</span>
- <span class="weightnum">${{form.amountDr || 0}}元</span>
- </div>
- </el-col>
- <el-col :span="4">
- <div class="bottomFlex" style="color: #6BBCD1">
- <span>应付CNY:</span>
- <span class="weightnum">${{form.amountCr || 0}}元</span>
- </div>
- </el-col>
- <el-col :span="4">
- <div class="bottomFlex" style="color: #81B337">
- <span>应收USD:</span>
- <span class="weightnum">${{form.amountDrUsd || 0}}元</span>
- </div>
- </el-col>
- <el-col :span="4">
- <div class="bottomFlex" style="color: #6BBCD1">
- <span>应付USD:</span>
- <span class="weightnum">${{form.amountCrUsd || 0}}元</span>
- </div>
- </el-col>
- <el-col :span="8">
- <div style="text-align: right">
- <!--<el-button size="small" type="primary" style="margin-right: 8px"-->
- <!-- :loading="saveLoading" >计算合计值-->
- <!--</el-button>-->
- <el-button size="small" type="primary" style="margin-right: 8px" :disabled="!form.id || editSave"
- :loading="saveLoading" @click="ConfirmReceiptfun">批量签收
- </el-button>
- <el-button size="small" type="danger" style="margin-right: 8px" :disabled="!form.id || editSave"
- :loading="saveLoading" @click="RevokeReceiptfun">撤销签收
- </el-button>
- </div>
- </el-col>
- </el-row>
- </el-card>
- <el-card style="margin-top: 10px">
- <div style="margin-bottom: 10px">
- <el-button size="small" type="info" style="margin-right: 8px" :disabled="editSave"
- :loading="saveLoading" @click="SelectedRows">确认选定行
- </el-button>
- <el-button size="small" type="danger" style="margin-left: 10px" :disabled="editSave"
- :loading="saveLoading" @click="batchDeletefun" >一键删除
- </el-button>
- <el-button size="small" type="primary" style="margin-left: 10px"
- :loading="saveLoading" @click="editHandle" >一键编辑
- </el-button>
- <el-button size="small" type="primary" style="margin-right: 8px" :disabled="editSave"
- :loading="saveLoading" @click="Confirminvoicefun">禁止开票
- </el-button>
- <el-button size="small" type="warning" style="margin-right: 8px" :disabled="editSave"
- :loading="saveLoading" @click="Notinvoicingfun">取消禁止开票
- </el-button>
- </div>
- <finstlbillsitems :tableData="tableData"
- :form="form"
- :handleSelectionData="handleSelectionData"
- :brfalse="!editSave"
- @handleSelectionChange="handleSelectionChange">
- </finstlbillsitems>
- </el-card>
- </div>
- <!--选择数据弹窗-->
- <el-dialog
- title="选择数据"
- class="el-dialogDeep"
- :visible.sync="retrievePopupsType"
- append-to-body
- width="70%"
- :close-on-click-modal="false">
- <div>
- <avue-crud
- :option="retrievePopupsOption"
- :data="retrievePopupsData"
- ref="retrievePopupsRef"
- id="out-table">
- <template slot="menu" slot-scope="{ row }">
- <el-button
- type="text"
- icon=""
- size="small"
- @click.stop="retrievePopupsSelect(row)"
- >选择
- </el-button>
- </template>
- </avue-crud>
- </div>
- </el-dialog>
- <!--设计报表弹窗-->
- <el-dialog append-to-body title="设计报表" class="el-dialogDeep" :visible.sync="DesignreportDialog" width="70%"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
- <reports :id="form.id" :assemblyForm="form" businessValue="DZZX"></reports>
- </el-dialog>
- <!--预览-->
- <el-dialog
- title="打印"
- :visible.sync="selectPrintingDialog"
- append-to-body
- width="70%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag>
- <div>
- <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button size="small" @click="selectPrintingDialog = false;">取 消</el-button>
- </span>
- </el-dialog>
- <!--报表组件-->
- <reportContainer ref="reportContainer"></reportContainer>
- </div>
- </template>
- <script>
- import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
- import {getWorkDicts} from "@/api/system/dictbiz";
- import {getRateList} from "@/api/iosBasicData/rateManagement";
- import {getList as userGetList} from '@/api/system/user'
- import {getBvesselsList} from "@/api/iosBasicData/bvessels";
- import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
- import {getDeptLazyTree} from "@/api/system/dept";
- import {
- finstlbillsConfirmReconciliation,
- finstlbillsConfirmSignFor,
- finstlbillsDetail,
- finstlbillslistAccBillV1, finstlbillsRevokeReconciliation, finstlbillsRevokeSignFor,
- finstlbillsSubmit,
- finstlbillsitemsRemove, finstlbillslistAccBillByCorp, finstlbillsConfirmInvoicing, finstlbillsRevokeInvoicing
- } from '@/api/iosBasicData/finstlbills'
- import expand from "@/components/basic-container/expand.vue";
- import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
- import {dateFormat} from "@/util/date";
- import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
- import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
- import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
- import {getList as getreportsList, reportsGetReportData} from "@/api/iosBasicData/reports";
- export default {
- components: {reportContainer, reportformsList, reports, SearchQuery,expand,finstlbillsitems},
- props:{
- // 编辑还是保存
- editSave:{
- type:Boolean,
- default:true
- }
- },
- data(){
- return {
- retrievePopupsType:false, // 弹窗开启关闭
- retrievePopupsData:[], // 选择弹窗数据
- retrievePopupsOption: {
- border: true,
- calcHeight: 30,
- tip: false,
- height: 'auto',
- index: true,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- refreshBtn: false,
- columnBtn: false,
- menuWidth: '60',
- column: [
- {
- label: "客户中文名",
- prop: "cnName",
- overHidden: true,
- },
- {
- label: "客户英文文名",
- prop: "cnName",
- overHidden: true,
- },
- ]
- },
- DesignreportDialog:false, // 设计报表弹窗
- selectPrintingDialog:false, // 预览报表
- statusType:false, // 确认发票
- tableData:[],
- pageLoading:false, // 全屏加载动画
- saveLoading:false, // 按钮动画
- // 绑定的数据
- form:{
- billDate:dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 对账日期 默认 当天
- isApproved:'0',
- isSignfor:'0',
- isCleared:null, // 销账
- isChecked:'0',
- isInvoice:'0',
- accountDate:[],
- approvedDate:[],
- },
- handleSelectionData:[], // 表格选择的数据
- corpData:[], // 对账单位 数据
- allyesnoData:[], // 全部是否字典数据
- isCheckedData:[], // 对账状态字典数据
- isClearedData:[], // 销项
- isInvoiceData:[],// 发票字典
- // 收 / 付
- dcData:[
- {
- label:'收',
- value: 'D'
- },{
- label:'付',
- value: 'C'
- }
- ],
- curCodeData:[],// 币别
- updateUserData:[], // 操作员
- srcTypeData:[
- {
- label:'公司',
- value:'OWN'
- },
- {
- label:'代理',
- value:'AGENT'
- },
- {
- label:'业务员',
- value:'SALES'
- }
- ], // 业务来源
- srcData:[], // 业务来源数据
- srcforParameter:{},
- // 业务类型
- businessTypesData:[
- {
- label:'海运出口',
- value:'SE'
- },{
- label:'海运进口',
- value:'SI'
- }
- ],
- submitType:false, // 是否提交
- roleName:[], // 当前的角色权限
- }
- },
- watch:{
- // 监听 状态
- "form.isChecked":{
- // 执行方法
- handler(oldValue,newValue) {
- if (oldValue == 1) {
- this.statusType = true
- }else {
- this.statusType = false
- }
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行
- },
- },
- created() {
- this.roleName = localStorage.getItem('roleName').split(',')
- this.allyesnoWorkDictsfun() // 获取 字典数据
- this.invoiceWorkDictsfun() // 获取 发票的数据
- },
- methods:{
- // 打印
- reportRadio(val){
- // 获取报表数据
- reportsGetReportData({
- billId:this.form.id,
- reportCode:val.classifyCode,
- groupCode:val.groupCode,
- type:'DZZX'
- }).then(res=>{
- this.handleReportPreview(val.url,res.data.data.data)
- })
- },
- // 报表预览
- previewreportfun(){
- getreportsList(1,10,{
- businessType:'DZZX',
- // classifyCode:'结算中心',
- // groupCode:'付费结算'
- }).then(res=>{
- if (res.data.data.records.length == 1){
- this.reportRadio(res.data.data.records[0])
- }else {
- this.saveLoading = true
- this.selectPrintingDialog = true
- this.saveLoading = false
- let page = {
- pageSize: 10,
- currentPage: 1,
- total: 0
- }
- this.$nextTick(()=>{
- this.$refs.reportformsList.onLoad(page,{
- businessType:'DZZX',
- // classifyCode:'结算中心',
- // groupCode:'付费结算'
- })
- })
- }
- })
- },
- finstlbillsRevokeReconciliation,
- // 下拉回调
- corpChange(value,name){
- // 对账单位
- if (name == 'corpCnName') {
- if (!value) {
- this.$set(this.form,'corpId','')
- this.$set(this.form,'corpCnName','')
- this.$set(this.form,'corpEnName','')
- this.$set(this.form,'corpArgreementNo','')
- }
- for(let item of this.corpData) {
- if (item.cnName == value) {
- this.$set(this.form,'corpId',item.id)
- this.$set(this.form,'corpCnName',item.cnName)
- this.$set(this.form,'corpEnName',item.enName)
- this.$set(this.form,'corpArgreementNo',item.enName)
- }
- }
- }
- // 业务来源
- else if (name == 'srcType') {
- if (!value) {
- this.$set(this.form,'srcType','')
- return;
- }
- this.$set(this.form,name,value)
- if (value == 'OWN') {
- this.srcforParameter = { key:'id', label:'title', value:'title'}
- this.ownDeptLazyTreefun()
- }else if (value == 'AGENT') {
- this.srcforParameter = { key:'id', label:'cnName', value:'cnName'}
- this.srcBcorpsListfun()
- }else if (value == 'SALES') {
- this.srcforParameter = { key:'id', label:'name', value:'name'}
- this.salesuserGetListfun()
- }else {}
- }
- // 业务来源选择
- else if (name == 'srcCnName') {
- if (!value) {
- this.$set(this.form,'srcId','')
- this.$set(this.form,'srcCnName','')
- this.$set(this.form,'srcEnName','')
- return
- }
- for (let item of this.srcData) {
- if (item[this.srcforParameter.value] == value) {
- if (this.form.srcType == 'OWN') {
- // 公司
- this.$set(this.form,'srcId',item.id)
- this.$set(this.form,'srcCnName',item.title)
- this.$set(this.form,'srcEnName',item.title)
- }
- else 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 == 'updateUserName') {
- for (let item of this.updateUserData) {
- if (item.name == value) {
- this.$set(this.form,'updateUser',item.id)
- this.$set(this.form,'updateUserName',item.name)
- }
- }
- }
- else {
- this.$set(this.form,name,value)
- }
- },
- // 编辑
- editHandle(){
- this.editSave = false
- },
- // 保存
- editCustomer(type){
- // 对账单位
- if (!this.form.corpId) {
- this.$message.warning('请选择对账单位');
- return
- }
- if (!this.form.id) {
- // 是否选择从表数据
- if (this.handleSelectionData.length == 0) {
- this.$message.warning('请选择对账数据');
- return;
- }
- }
- for (let item of this.handleSelectionData) {
- if (!item.currentStlCurCode) {
- this.$message.warning('请选择本次结算币种');
- return;
- }
- }
- this.saveLoading = true // 加载动画
- this.pageLoading = true
- this.form.billNoFormat = 'HYDZ'
- this.form.businessTypeCode = 'HYDZ'
- this.form.businessType = 'CHK' // 对账单
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- if (!this.form.id) {
- this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
- item.lineNo = Number(index) + 1
- item.pType = item.businessType
- item.accDate = item.billDate
- if (item.currentStlCurCode == 'CNY') {
- item.currentStlAmount = item.currentStlAmountRMB
- }else {
- item.currentStlAmount = item.currentStlAmountUSD
- }
- delete item.businessType
- if (!this.form.id) {
- delete item.id
- }
- delete item.accountDc
- return item
- })
- }else {
- this.form.finStlBillsItemsList = this.form.finStlBillsItemsList.map((item,index)=>{
- if (item.currentStlCurCode == 'CNY') {
- item.currentStlAmount = item.currentStlAmountRMB
- }else {
- item.currentStlAmount = item.currentStlAmountUSD
- }
- return item
- })
- }
- // 判断是单独点击保存还是点击确认对账
- if (type == '对账') {
- this.$confirm("确定进行对账操作?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- finstlbillsSubmit(this.form).then(res=>{
- this.form = res.data.data
- this.finstlbillsConfirmReconciliationfun()
- })
- }).catch(err=>{
- this.pageLoading = false
- this.saveLoading = false
- })
- }else {
- finstlbillsSubmit(this.form).then(res=>{
- this.saveLoading = false
- this.pageLoading = false
- this.$message.success('操作成功');
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- this.saveLoading = false
- })
- }
- },
- // 详情接口
- finstlbillsDetailfun(id){
- this.pageLoading = true
- finstlbillsDetail(id).then(res=>{
- this.form = res.data.data
- // 判断是否已经提交过了
- if(this.form.isChecked == 1) {
- this.submitType = true
- }else {
- this.submitType = false
- }
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.split(','):'' // 业务类型转换成数组显示
- this.tableData = this.form.finStlBillsItemsList.map(item=>{
- if(item.curCode == 'CNY') {
- this.$set(item,'amountRMB',item.amount)
- this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
- this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
- this.$set(item,'currentStlAmountRMB',item.currentStlAmount)
- }else {
- this.$set(item,'amountUSD',item.amount)
- this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
- this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
- this.$set(item,'currentStlAmountUSD',item.currentStlAmount)
- }
- this.$set(item,'costDate',[])
- return item
- })
- this.form.isSignfor = this.form.isSignfor + ''
- this.form.isApproved = this.form.isApproved + ''
- this.form.isCleared = this.form.isCleared + ''
- this.form.isChecked = this.form.isChecked + ''
- this.form.isInvoice = this.form.isInvoice + ''
- this.pageLoading = false
- })
- },
- // 重置条件
- ResetFilter(){
- this.form = {}
- },
- // 弹窗选择
- retrievePopupsSelect(row){
- // this.form = row
- this.$set(this.form,'corpId',row.id)
- this.$set(this.form,'corpCnName',row.cnName)
- this.$set(this.form,'corpEnName',row.enName)
- this.$set(this.form,'corpArgreementNo',row.enName)
- this.retrievePopupsType = false
- this.finstlbillslistAccBillV1fun()
- },
- // 检索
- retrievalfun(){
- // 判断是否有对账单位
- if (!this.form.corpId && (this.form.businessNo || this.form.accountNo || this.form.hblno || this.form.mblno)) {
- console.log('新接口')
- this.finstlbillslistAccBillByCorpfun()
- }else {
- if (!this.form.corpId) {
- return this.$message.warning('请填写对账单位')
- }
- console.log('原来的接口')
- this.finstlbillslistAccBillV1fun()
- }
- },
- // 检索出的弹窗
- finstlbillslistAccBillByCorpfun(){
- delete this.form.id
- // let obj = JSON.parse(JSON.stringify(this.form))
- let obj = {}
- obj.type = '1'
- obj.auditStatus = this.form.isApproved // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
- obj.corpCnName = this.form.corpId // 对账单位
- obj.isSignfor = this.form.isSignfor // 是否已签收(0 否 1是)
- obj.dc = this.form.dc // 收付 D=收 C=付
- obj.curCode = this.form.curCode // 币别
- obj.srcType = this.form.srcType // 业务来源
- obj.srcCnName = this.form.srcId // 业务员id
- obj.isCleared = this.form.isCleared // 是否销账(0 未销账 3 部分销账 9 销账)
- obj.accBillNo = this.form.accountNo // 账单编号 ACCT NO
- obj.billNo = this.form.businessNo // 单据编号 JOB NO
- obj.mblno = this.form.mblno // MB/L NO
- obj.hblno = this.form.hblno // HB/L NO
- obj.isChecked = this.form.isChecked // 是否对账(0 未对账 1 已对账)
- obj.queryAmount = this.form.queryAmount // 查询金额
- obj.businessType = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- obj.invoiceStatus = this.form.isInvoice // 发票状态 0 = 未开 9=已开 2 待开 3 不开
- obj.vesselCnName = this.form.vesselCnName // 中文船名
- obj.invoiceNo = this.form.invoiceNo // 发票号
- obj.bookingNo = this.form.bookingNo // 订舱号 BKNO
- obj.createUserName = this.form.updateUser?this.form.updateUser:null // 操作员id
- obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
- obj.threeInspectionsNo = this.form.threeInspectionsNo // 三检单号
- obj.voyageNo = this.form.voyageNo // 航次
- obj.businessDateStart = this.form.businessDateStart // 业务开始日期
- obj.businessDateEnd = this.form.businessDateEnd // 业务结束日期
- obj.billDateStart = this.form.accountDateFrom // 财务开始日期
- obj.billDateEnd = this.form.accountDateTo // 财务开始日期
- obj.approveTimeStart = this.form.auditDateFrom // 审核开始日期
- obj.approveTimeEnd = this.form.auditDateTo // 审核结束日期
- finstlbillslistAccBillByCorp(obj).then(res=>{
- this.retrievePopupsType = true
- this.retrievePopupsData = res.data.data
- })
- },
- // 检索接口
- finstlbillslistAccBillV1fun(){
- delete this.form.id
- // let obj = JSON.parse(JSON.stringify(this.form))
- let obj = {}
- obj.type = '1'
- obj.auditStatus = this.form.isApproved // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
- obj.corpCnName = this.form.corpId // 对账单位
- obj.isSignfor = this.form.isSignfor // 是否已签收(0 否 1是)
- obj.dc = this.form.dc // 收付 D=收 C=付
- obj.curCode = this.form.curCode // 币别
- obj.srcType = this.form.srcType // 业务来源
- obj.srcCnName = this.form.srcId // 业务员id
- obj.isCleared = this.form.isCleared // 是否销账(0 未销账 3 部分销账 9 销账)
- obj.accBillNo = this.form.accountNo // 账单编号 ACCT NO
- obj.billNo = this.form.businessNo // 单据编号 JOB NO
- obj.mblno = this.form.mblno // MB/L NO
- obj.hblno = this.form.hblno // HB/L NO
- obj.isChecked = this.form.isChecked // 是否对账(0 未对账 1 已对账)
- obj.queryAmount = this.form.queryAmount // 查询金额
- obj.businessType = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- obj.invoiceStatus = this.form.isInvoice // 发票状态 0 = 未开 9=已开 2 待开 3 不开
- obj.vesselCnName = this.form.vesselCnName // 中文船名
- obj.invoiceNo = this.form.invoiceNo // 发票号
- obj.bookingNo = this.form.bookingNo // 订舱号 BKNO
- obj.createUserName = this.form.updateUser?this.form.updateUser:null // 操作员id
- obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
- obj.threeInspectionsNo = this.form.threeInspectionsNo // 三检单号
- obj.voyageNo = this.form.voyageNo // 航次
- obj.businessDateStart = this.form.businessDateStart // 业务开始日期
- obj.businessDateEnd = this.form.businessDateEnd // 业务结束日期
- obj.billDateStart = this.form.accountDateFrom // 财务开始日期
- obj.billDateEnd = this.form.accountDateTo // 财务开始日期
- obj.approveTimeStart = this.form.auditDateFrom // 审核开始日期
- obj.approveTimeEnd = this.form.auditDateTo // 审核结束日期
- finstlbillslistAccBillV1(obj).then(res=>{
- this.tableData = res.data.data.map((item,index)=>{
- item.accBillId = item.id
- delete item.id
- item.lineNo = Number(index) + 1
- this.$set(item,'currentStlCurCode',item.curCode)
- this.$set(item,'currentStlExrate',item.exrate)
- item.accBillNo = item.billNo
- item.billNo = item.businessBillDivideNo?item.businessBillDivideNo:item.businessBillNo
- item.dc = item.accountDc // 收付
- if(item.curCode == 'CNY') {
- this.$set(item,'amountRMB',item.amount)
- this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
- this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
- this.$set(item,'currentStlAmountRMB',item.reconciliationCurrentAmount)
- }else {
- this.$set(item,'amountUSD',item.amount)
- this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
- this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
- this.$set(item,'currentStlAmountUSD',item.reconciliationCurrentAmount)
- }
- return item
- })
- if (this.tableData.length == 0) {
- this.$message.warning('当前检索暂无数据!')
- }
- })
- },
- // 确认发票
- Confirminvoicefun(){
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据确认开票?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- this.finstlbillsConfirmInvoicingfun()
- })
- },
- // 不开发票
- Notinvoicingfun(){
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据撤销签收?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- this.finstlbillsRevokeInvoicingfun()
- })
- },
- // 确认发票接口
- finstlbillsConfirmInvoicingfun(){
- this.form.billNoFormat = 'HYDZ'
- this.form.businessTypeCode = 'HYDZ'
- this.form.businessType = 'CHK' //对账单
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- // 保留id
- this.form.finStlBillsItemsList = this.handleSelectionData
- this.pageLoading = true
- finstlbillsConfirmInvoicing(this.form).then(res=>{
- this.pageLoading = false
- this.$message.success('操作成功');
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- })
- },
- // 撤销发票接口
- finstlbillsRevokeInvoicingfun(){
- this.form.billNoFormat = 'HYDZ'
- this.form.businessTypeCode = 'HYDZ'
- this.form.businessType = 'CHK' // 对账单
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- this.form.finStlBillsItemsList = this.handleSelectionData
- this.pageLoading = true
- finstlbillsRevokeInvoicing(this.form).then(res=>{
- this.pageLoading = false
- this.$message.success('操作成功');
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- })
- },
- // 对账确认
- finstlbillsConfirmReconciliationfun(){
- this.pageLoading = true
- this.saveLoading = true
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- this.form.url = '/iosBasicData/finstlbills/index',
- this.form.pageStatus = "this.$store.getters.paidapplication"
- this.form.pageLabel = "对账中心(F)"
- finstlbillsConfirmReconciliation(this.form).then(res=>{
- this.pageLoading = false
- this.saveLoading = false
- this.$message.success('操作成功');
- this.editSave = true
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- })
- },
- // 对账撤销
- finstlbillsRevokeReconciliationfun(){
- this.$confirm("确定进行撤销对账操作?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- this.pageLoading = true
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- finstlbillsRevokeReconciliation(this.form).then(res=>{
- this.pageLoading = false
- this.$message.success('操作成功');
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- })
- })
- },
- // 确认签收
- ConfirmReceiptfun(){
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- for (let item of this.handleSelectionData) {
- if (item.isSignfor == 1) {
- this.$message.warning('请选择未签收的数据进行签收');
- return;
- }
- }
- this.$confirm("确定将选择数据签收?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- this.finstlbillsConfirmSignForfun()
- })
- },
- // 撤销签收
- RevokeReceiptfun(){
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- for (let item of this.handleSelectionData) {
- if (item.isSignfor == 0) {
- this.$message.warning('请选择已签收的数据进行撤销');
- return;
- }
- }
- this.$confirm("确定将选择数据撤销签收?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- this.finstlbillsRevokeSignForfun()
- })
- },
- // 确认选定行
- SelectedRows(){
- this.editCustomer()
- },
- // 一键删除
- batchDeletefun(){
- if (this.handleSelectionData.length == 0) {
- return this.$message.warning('请选择要删除的数据')
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(()=>{
- // 获取有id 的数据
- const itemsWithId = this.handleSelectionData.filter(item => item.hasOwnProperty('id'));
- let arrIds = itemsWithId.map(item=>item.id) // 获取id 数据
- // 把选中的删除掉
- this.handleSelectionData.forEach((item)=>{
- for (let index in this.tableData) {
- if (item.accBillNo == this.tableData[index].accBillNo) {
- this.tableData.splice(Number(index),1)
- }
- }
- })
- // 有id 的处理
- if(itemsWithId.length != 0) {
- finstlbillsitemsRemove(arrIds.join(',')).then(res=>{
- this.$message.success('操作成功')
- })
- }
- })
- },
- // 下面表格多选
- handleSelectionChange(arr){
- this.handleSelectionData = arr
- },
- //返回列表
- backToList() {
- this.$emit('goBack')
- },
- // 请求的接口
- // 确认签收接口
- finstlbillsConfirmSignForfun(){
- this.form.billNoFormat = 'HYDZ'
- this.form.businessTypeCode = 'HYDZ'
- this.form.businessType = 'CHK' //对账单
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- // 保留id
- this.form.finStlBillsItemsList = this.handleSelectionData
- this.pageLoading = true
- finstlbillsConfirmSignFor(this.form).then(res=>{
- this.pageLoading = false
- this.$message.success('操作成功');
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- })
- },
- // 撤销签收接口
- finstlbillsRevokeSignForfun(){
- this.form.billNoFormat = 'HYDZ'
- this.form.businessTypeCode = 'HYDZ'
- this.form.businessType = 'CHK' // 对账单
- this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
- this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
- this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
- this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
- this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
- this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
- this.form.finStlBillsItemsList = this.handleSelectionData
- this.pageLoading = true
- finstlbillsRevokeSignFor(this.form).then(res=>{
- this.pageLoading = false
- this.$message.success('操作成功');
- this.finstlbillsDetailfun(res.data.data.id)
- }).catch(err=>{
- this.pageLoading = false
- })
- },
- // 获取 全部是否 接口
- allyesnoWorkDictsfun(){
- // 全部/是/否
- getWorkDicts('all_yes_no').then(res=>{
- this.allyesnoData = res.data.data;
- })
- // 对账字典
- getWorkDicts('los_check_status').then(res=>{
- this.isCheckedData = res.data.data;
- })
- // 销账(F)
- getWorkDicts('write_off_los').then(res=>{
- this.isClearedData = [{dictValue:'全部', dictKey:null},...res.data.data]
- })
- },
- // 获取发票的字典数据
- invoiceWorkDictsfun(){
- getWorkDicts('invoice_los').then(res=>{
- this.isInvoiceData = res.data.data;
- })
- },
- // 获取币别数据
- getRateListfun(cnName){
- getRateList({current:1,size:10,cnName}).then(res=>{
- this.curCodeData = res.data.data.records
- })
- },
- // 获取操作员数据
- updateUserUserGetListfun(account){
- userGetList(1,10,{account}).then(res=>{
- this.updateUserData = res.data.data.records
- })
- },
- // 获取公司名称 用户管理左侧
- ownDeptLazyTreefun(){
- getDeptLazyTree(0).then(res=>{
- this.srcData = res.data.data
- })
- },
- // 获取业务来源代理数据
- srcBcorpsListfun(cnName){
- let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
- getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
- this.srcData = res.data.data.records
- })
- },
- // 获取业务员数据
- salesuserGetListfun(account = undefined,type = false,){
- userGetList(1,10,{account}).then(res=>{
- this.srcData = res.data.data.records
- })
- },
- // 获取对账单位数据
- corpBcorpsListfun(cnName){
- getBcorpslistByType(1,10,{cnName}).then(res=>{
- this.corpData = res.data.data.records
- })
- },
- // 预览报表
- handleReportPreview(url,data){
- console.log(url,1670)
- console.log(data,1671)
- Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
- // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
- Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile( '/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
- Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml' )
- // 工具栏
- var options = new Stimulsoft.Viewer.StiViewerOptions()
- options.height = '100%'
- options.appearance.scrollbarsMode = true // 滚动条模式
- options.toolbar.showDesignButton = false // 显示设计按钮
- options.toolbar.showAboutButton = false // 显示关于按钮
- options.toolbar.showResourcesButton = false // 显示资源按钮
- options.toolbar.showFullScreenButton = false // 显示全屏按钮
- options.toolbar.showOpenButton = false // 显示打开按钮
- options.appearance.showTooltips = false // 显示工具提示
- options.appearance.showDialogsHelp = false // 显示对话框帮助
- options.exports.showExportToDocument = false // 显示导出到文档
- options.toolbar.showParametersButton = true // 显示参数按钮
- options.appearance.bookmarksPrint = true // 书签打印
- // options.toolbar.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
- // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
- // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
- // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
- options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
- // htmlRenderMode html渲染模式
- options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
- // 是创建一个 Stimulsoft 报表查看器的实例的代码
- let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
- // 报表
- console.log("创建一个报表实例");
- console.log()
- let report = new window.Stimulsoft.Report.StiReport();
- // 加载文件
- console.log("从url加载报表");
- // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
- report.load(url)
- data.pageOne = 'Page : 1 of 1'
- // 处理超长数据
- if (data.hshipperDetails) {
- var consignerIndex2 = data.hshipperDetails.indexOf( '\n' )
- for (let i = 0; i < 4; i++) {
- consignerIndex2 = data.hshipperDetails.indexOf( '\n', consignerIndex2 + 1 );
- }
- if (consignerIndex2 != -1) {
- var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length)
- data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + ' *'
- data.commodityDescr += '\n*' + hshipperDetails
- }
- }
- if (data.hconsigneeDetails) {
- var consigneeIndex2 = data.hconsigneeDetails.indexOf( '\n' )
- for (let i = 0; i < 3; i++) {
- consigneeIndex2 = data.hconsigneeDetails.indexOf( '\n', consigneeIndex2 + 1 );
- }
- if (consigneeIndex2 != -1) {
- var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length)
- data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + ' **'
- data.commodityDescr += '\n**' + hconsigneeDetails
- }
- }
- if (data.hnotifyDetails) {
- var notifierIndex2 = data.hnotifyDetails.indexOf( '\n' )
- for (let i = 0; i < 3; i++) {
- notifierIndex2 = data.hnotifyDetails.indexOf( '\n', notifierIndex2 + 1 );
- }
- if (notifierIndex2 != -1) {
- var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length)
- data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + ' ***'
- data.commodityDescr += '\n***' + hnotifyDetails
- }
- }
- // 处理箱号
- if (this.isPrintTheBoxNumber) {
- data.commodityDescr += '\n.\n.\n'
- }
- // PLACE & DATE OF ISSUE
- data.placeAndDateOfIssue = ''
- if (data.issueAt) {
- data.placeAndDateOfIssue += data.issueAt
- }
- if (data.issueDate) {
- let date = new Date(data.issueDate.replace(/-/g,'/'));
- let yyyy = date.getFullYear();
- let mmmm = date.toDateString().split(" ")[1]
- let dd = date.getDate()
- data.placeAndDateOfIssue += ', ' + dd + '-' + mmmm + '-' + yyyy
- }
- // Total number of containers or packages received by the Carriers
- if (data.preContainersList) {
- let boxMap = new Map();
- for (let boxQuantity of data.preContainersList) {
- if (boxMap.get(boxQuantity.cntrTypeCode)) {
- let v = boxMap.get(boxQuantity.cntrTypeCode)
- boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity)
- } else {
- boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity)
- }
- }
- let boxs = ''
- boxMap.forEach(function (value, key, map) {
- boxs += value + 'x' + key + ', '
- })
- boxs = boxs.substring(0, boxs.length - 2)
- data.boxQuantity = boxs + ' CONTAINER(S) ONLY'
- }
- // Number of original B/Ls
- if (data.numberOfObl) {
- data.numberOfObl += ' (' + data.numberOfOblDigit + ')'
- }
- if (data.commodityDescr) {
- var descriptionIndex2 = data.commodityDescr.indexOf( '\n' )
- for (let i = 0; i < 19; i++) {
- descriptionIndex2 = data.commodityDescr.indexOf( '\n', descriptionIndex2 + 1 );
- }
- if (descriptionIndex2 != -1) {
- data.pageOne = 'Page : 1 of 2'
- data.pageTwo = 'Page : 2 of 2'
- var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length)
- data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2)
- data.extraLongTips = '** TO BE CONTINUED ON ATTACHED LIST **'
- data.extraLongText = extraLongText
- }
- }
- // console.log(data.hshipperDetails, 'hshipperDetails2')
- // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
- var dataSet = new Stimulsoft.System.Data.DataSet(
- 'reportData'
- )
- dataSet.readJson(data) // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
- // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
- // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
- report.regData('reportData', 'reportData', dataSet)
- // 从模版和数据加载报表
- // loadReport(report, '', {})
- // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
- viewer.report = report;
- this.$refs.reportContainer.showContainer(
- ()=> {
- setTimeout(() => {
- viewer.renderHtml('reportContainer')
- this.createViewerButtons(viewer)
- }, 50)
- },
- ()=>{
- },
- )
- console.log("加载成功完成!");
- },
- createViewerButtons (viewer){
- viewer.jsObject.collections.images['myClose.png'] =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
- const closeBtn = viewer.jsObject.SmallButton(
- 'closeBtn',
- '关闭',
- 'myClose.png'
- )
- // 增加打印弹窗配置
- const printBtn = viewer.jsObject.SmallButton(
- 'printBtn',
- '打印报表',
- 'myClose.png'
- )
- // console.log(viewer.jsObject.print(),'1013')
- // 获取 关闭按钮的dom元素位置
- const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
- const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
- const userButtonCell = buttonsTable.rows[0].insertCell(0)
- // 获取打印按钮的位置
- const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild // 打印按钮
- const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0] // 打印按钮dom位置
- userButtonPrint.addEventListener("click", (event)=>{
- console.log("打印点击");
- // event.preventDefault()
- });
- userButtonPrint.addEventListener("mouseover", (event) => {
- console.log("移入打印按钮");
- console.log(event,1035)
- });
- userButtonCell.className = 'stiJsViewerClearAllStyles'
- userButtonCell.appendChild(closeBtn) // 添加关闭节点
- // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
- let that=this
- // 关闭按钮的监听点击
- closeBtn.action = function() {
- console.log(that.$refs.ReportContainer,'1022')
- if (that.$refs.reportContainer)
- that.$refs.reportContainer.hideContainer()
- }
- // // // 打印按钮监听
- // printBtn.action = (e)=>{
- // console.log('打印')
- // window.print()
- // }
- },
- }
- }
- </script>
- <style scoped>
- ::v-deep.el-form-item {
- margin-bottom: 0;
- }
- .bottomFlex {
- display: flex;
- align-items: center;
- }
- .weightfont {
- font-size: 20px;
- font-weight: bold;
- }
- .weightnum {
- font-size: 15px;
- font-weight: 500;
- }
- </style>
|