1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251 |
- <template>
- <div>
- <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="goBack(0)">返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
- @click="$refs.report.openDialog()">报表设计
- </el-button>
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
- v-if="editButton"
- :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
- @click="inEdit">编 辑
- </el-button>
- <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
- :disabled="isSaveBtn || form.businessStatus != '录入'" @click="submit">保 存
- </el-button>
- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success"
- size="small" :disabled="form.businessStatus != '录入'" @click="application">单据请核
- </el-button>
- <el-button v-if="form.businessStatus == '提交审核'" class="el-button--small-yh" style="margin-left: 6px;"
- type="danger" size="small" @click="revokeApplication">撤销单据请核
- </el-button>
- <el-dropdown style="line-height: 0">
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :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="checkScheduleDialog = true, checkId = form.id">审核进度
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- <div style="margin-top: 50px">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- <template slot="corpNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">客户:</span>
- </template>
- <template slot="abroadConsignorCnameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">国外发货人:</span>
- </template>
- <template slot="domesticConsigneeCnameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">国内收货人:</span>
- </template>
- <template slot="fundingPartyLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">资金方:</span>
- </template>
- <template slot="countryOfOriginLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('原产地')">原产地:</span>
- </template>
- <template slot="polCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('港口')">起运港:</span>
- </template>
- <template slot="podCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('港口')">目的港:</span>
- </template>
- <tempalte slot="corpName" slot-scope="{ row }">
- <dic-select v-model="form.corpName" placeholder="客户" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('corpName', $event)" :disabled="editDisabled" :searchShow="true"
- :treeShow="true"></dic-select>
- </tempalte>
- <tempalte slot="contractNo" slot-scope="{ row }">
- <el-input v-model="form.contractNo" placeholder="请输入 合同号"
- :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"></el-input>
- </tempalte>
- <tempalte slot="contractDate" slot-scope="{ row }">
- <el-date-picker v-model="form.contractDate" type="date" placeholder="请选择 合同日期"
- format="yyyy-MM-dd" valueFormat="yyyy-MM-dd 00:00:00"
- :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length">
- </el-date-picker>
- </tempalte>
- <tempalte slot="prepaidAmount" slot-scope="{ row }">
- <el-input v-model="form.prepaidAmount" placeholder="请输入 预付金额"
- :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"></el-input>
- </tempalte>
- <tempalte slot="countryOfOrigin" slot-scope="{ row }">
- <dic-select v-model="form.countryOfOrigin" placeholder="原产地" key="id" label="cnName"
- res="records" url="/blade-los/bcountrys/list" :filterable="true" :remote="true"
- dataName="cnName" :disabled="editDisabled"
- @selectChange="dicChange('countryOfOrigin', $event)" :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="typeOfShipping" slot-scope="{ row }">
- <dic-select v-model="form.typeOfShipping" placeholder="运输方式" key="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=mode_transport" :filterable="true"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="polCnName" slot-scope="{ row }">
- <dic-select v-model="form.polCnName" placeholder="起运港" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('polCnName', $event)" :disabled="editDisabled"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="podCnName" slot-scope="{ row }">
- <dic-select v-model="form.podCnName" placeholder="目的港" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('podCnName', $event)" :disabled="editDisabled"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="currency" slot-scope="{ row }">
- <dic-select v-model="form.currency" placeholder="币别" key="id" label="code" res="records"
- url="/blade-los/bcurrency/page" :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="abroadConsignorCname" slot-scope="{ row }">
- <dic-select v-model="form.abroadConsignorCname" placeholder="国外发货人" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=国外工厂" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="dicChange('abroadConsignorCname', $event)"
- :disabled="editDisabled" :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="abroadBankMnemonicCode" slot-scope="{ row }">
- <dic-select ref="abankCode" v-model="form.abroadBankMnemonicCode" placeholder="银行助记码" key="id"
- label="mnemonicCode" res="corpsBankList" url="/blade-los/bcorps/detail"
- :activateCreated="false" :filterable="true"
- @selectChange="dicChange('abroadBankMnemonicCode', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="abroadCurrency" slot-scope="{ row }">
- <dic-select v-model="form.abroadCurrency" placeholder="币别" key="id" label="code" res="records"
- url="/blade-los/bcurrency/page" :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="domesticConsigneeCname" slot-scope="{ row }">
- <dic-select v-model="form.domesticConsigneeCname" placeholder="国内收货人" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=国内贸易商" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="dicChange('domesticConsigneeCname', $event)"
- :disabled="editDisabled" :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="domesticBankMnemonicCode" slot-scope="{ row }">
- <dic-select ref="dbankCode" v-model="form.domesticBankMnemonicCode" placeholder="银行助记码" key="id"
- label="mnemonicCode" res="corpsBankList" url="/blade-los/bcorps/detail"
- :activateCreated="false" :filterable="true"
- @selectChange="dicChange('domesticBankMnemonicCode', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="domesticCurrency" slot-scope="{ row }">
- <dic-select v-model="form.domesticCurrency" placeholder="币别" key="id" label="code" res="records"
- url="/blade-los/bcurrency/page" :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="documentType" slot-scope="{ row }">
- <dic-select v-model="form.documentType" placeholder="运输方式" key="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=business_type" :filterable="true"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="affiliatedCompanyName" slot-scope="{ row }">
- <dic-select v-model="form.affiliatedCompanyName" placeholder="所属公司" key="id" label="deptName"
- url="/blade-system/dept/lazy-list?parentId=0" :filterable="true"
- @selectChange="dicChange('affiliatedCompanyName', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="fundingParty" slot-scope="{ row }">
- <dic-select v-model="form.fundingParty" placeholder="资金方" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('fundingParty', $event)" :disabled="editDisabled"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="transactionMethod" slot-scope="{ row }">
- <dic-select v-model="form.transactionMethod" placeholder="成交方式" key="id" label="cnName"
- res="records" url="/blade-los/btrademodes/list" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('transactionMethod', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="sourceType" slot-scope="{ row }">
- <div style="display: flex;">
- <dic-select style="margin-right: 4px;" v-model="form.sourceType" placeholder="业务来源"
- key="dictKey" keyValue="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=source_Type" :filterable="true"
- :disabled="editDisabled" @selectChange="dicChange('sourceType', $event)"></dic-select>
- <el-input v-show="!form.sourceType" v-model="form.salesmanName" placeholder="请选择"
- :disabled="true">
- </el-input>
- <dic-select v-show="form.sourceType == 'OWN'" v-model="form.salesmanName" placeholder="所属公司"
- key="id" label="deptName" url="/blade-system/dept/lazy-list?parentId=0"
- :filterable="true" @selectChange="dicChange('salesmanName', $event)"
- :disabled="editDisabled"></dic-select>
- <dic-select v-show="form.sourceType == 'AGENT'" v-model="form.salesmanName" placeholder="代理"
- key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=代理客户" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('salesmanName', $event)"
- :disabled="editDisabled"></dic-select>
- <dic-select v-show="form.sourceType == 'SALES'" v-model="form.salesmanName"
- placeholder="业务员" key="id" label="realName" res="records" url="/blade-user/page"
- :filterable="true" :remote="true" dataName="realName"
- @selectChange="dicChange('salesmanName', $event)" :disabled="editDisabled"></dic-select>
- </div>
- </tempalte>
- </avue-form>
- </trade-card>
- <trade-card title="货物明细">
- <avue-crud :option="option" :data="form.agentItemsList" id="out-table" ref="crud"
- @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
- @resetColumn="resetColumn('crud', 'option', 'optionBack', 376)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 376)">
- <template slot="menuLeft">
- <el-button type="info" plain size="small" :disabled="editDisabled"
- @click="allClick('一键保存')">一键保存</el-button>
- <el-button type="info" plain size="small" :disabled="editDisabled"
- @click="allClick('一键编辑')">一键编辑</el-button>
- <el-button type="success" size="small" :disabled="editDisabled || !form.id"
- @click="allClick('首款账单')">首款账单
- </el-button>
- <el-button type="info" size="small"
- :disabled="editDisabled || selectionList.length == 0 || !form.id"
- @click="allClick('尾款账单')">尾款账单
- </el-button>
- <el-button type="warning" size="small" :disabled="selectionList.length == 0 || !form.id"
- @click="allClick('生成货代')">生成货代
- </el-button>
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
- @click="$refs.print.openDialog()">打印账单
- </el-button>
- <!-- <el-button type="info" size="small" :disabled="editDisabled || !form.id"
- @click="allClick('生成申请收款')">生成货款收款
- </el-button>
- <el-button type="warning" size="small" :disabled="editDisabled || !form.id"
- @click="allClick('生成申请付款')">生成货款付款
- </el-button> -->
- <el-dropdown>
- <el-button type="danger" size="small" :disabled="editDisabled || !form.id">
- 生成应付<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="allClick('生成首款应付')">首款</el-dropdown-item>
- <el-dropdown-item :disabled="selectionList.length == 0"
- @click.native="allClick('生成尾款应付')">尾款</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <!-- <el-dropdown>
- <el-button type="danger" size="small" :disabled="editDisabled">
- 撤销申请付款<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="allClick('首款撤销申请付款')">首款</el-dropdown-item>
- <el-dropdown-item @click.native="allClick('尾款撤销申请付款')">尾款</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- <!-- <el-dropdown>
- <el-button type="primary" size="small" :disabled="!form.id">
- 应收待确认通知<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="allClick('首款应收待确认通知')">首款应收待确认通知</el-dropdown-item>
- <el-dropdown-item @click.native="allClick('尾款应收待确认通知')">尾款应收待确认通知</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- </template>
- <template slot="indexHeader" slot-scope="{row,index}">
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
- @click="addRow()">
- </el-button>
- </template>
- <template slot="hsCodeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="labelProductNameHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="boxTypeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('箱型')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="goodsTypeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('商品类别')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="index" slot-scope="{row,index}">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="billNo" slot-scope="{ row }">
- <!-- <el-input v-if="row.$cellEdit" v-model="row.billNo" placeholder="请输入 提单号"></el-input> -->
- <span v-if="!row.$cellEdit" style="color: #1e9fff" @click="rowJump(row)">{{ row.billNo }}</span>
- </template>
- <template slot="boxTypeForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.boxType" placeholder="箱型" key="id" res="records"
- label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true" :remote="true"
- dataName="cnName"></dic-select>
- <span v-else>{{ row.boxType }}</span>
- </template>
- <template slot="boxNoForm" slot-scope="{ row }">
- <el-input v-if="row.$cellEdit" v-model="row.boxNo" placeholder="请输入 箱号" size="small"
- @change="boxChange(row)"></el-input>
- <span v-else>{{ row.boxNo }}</span>
- </template>
- <tempalte slot="orderReleaseMethodForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.orderReleaseMethod" placeholder="放单方式"
- key="dictKey" label="dictValue" url="/blade-system/dict-biz/dictionary?code=release_method"
- :filterable="true"></dic-select>
- <span v-else>{{ row.orderReleaseMethod }}</span>
- </tempalte>
- <template slot="hsCodeForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id"
- res="records" label="hsCode" url="/blade-los/bcommodity/list" :filterable="true"
- :remote="true" dataName="hsCode"
- @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
- <span v-else>{{ row.hsCode }}</span>
- </template>
- <tempalte slot="goodsTypeForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.goodsType" placeholder="商品类型" key="dictKey"
- label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
- :filterable="true"></dic-select>
- <span v-else>{{ row.goodsType }}</span>
- </tempalte>
- <tempalte slot="netWeightForm" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit" v-model="row.netWeight" @change="countChange(row)"
- :controls="false" placeholder="请输入 净重" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.netWeight }}</span>
- </tempalte>
- <tempalte slot="priceForm" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit" v-model="row.price" @change="countChange(row)"
- :controls="false" placeholder="请输入 单价" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.price }}</span>
- </tempalte>
- <tempalte slot="amountForm" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit" v-model="row.amount" @change="amountChange(row)"
- :controls="false" placeholder="请输入 金额" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.amount }}</span>
- </tempalte>
- <template slot="menu" slot-scope="{ row, index }">
- <!-- <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
- :disabled="editDisabled" @click="rowCell(row, index)">{{ row.$cellEdit ? '保 存' : '编 辑'
- }}</el-button> -->
- <el-button size="small" icon="el-icon-delete" type="text"
- :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"
- @click="rowDel(row, index)">删 除</el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="费用明细">
- <fee-info ref="feeInfo" :form="form" :disabled="editDisabled" @getDetails="getDetails"></fee-info>
- </trade-card>
- <trade-card title="记录信息">
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
- <el-tab-pane label="付汇记录" name="1">
- <avue-crud :data="form.recordRateList" :option="option3">
- <template slot="contractNo" slot-scope="{ row }">
- <span style="color: #1e9fff" @click="rowEdit(row)">{{ row.contractNo }}</span>
- </template>
- <template slot="customsDeclarationNo" slot-scope="{ row }">
- <span style="color: #1e9fff" @click="rowEdit(row)">{{ row.customsDeclarationNo }}</span>
- </template>
- </avue-crud>
- </el-tab-pane>
- <el-tab-pane label="收款记录" name="2">
- <avue-crud :data="form.recordListD" :option="option1">
- <template slot="account" slot-scope="{ row }">
- <span style="color: #1e9fff" @click="rowEdit(row)">{{ row.account }}</span>
- </template>
- </avue-crud>
- </el-tab-pane>
- <el-tab-pane label="付款记录" name="3">
- <avue-crud :data="form.recordListC" :option="option1">
- <template slot="account" slot-scope="{ row }">
- <span style="color: #1e9fff" @click="rowEdit(row)">{{ row.account }}</span>
- </template>
- </avue-crud>
- </el-tab-pane>
- <el-tab-pane label="开票记录" name="4">
- <avue-crud :data="form.recordInvoiceList" :option="option2"></avue-crud>
- </el-tab-pane>
- <el-tab-pane label="合同修改记录" name="5">
- <avue-crud :data="form.recordList" :option="option4"></avue-crud>
- </el-tab-pane>
- </el-tabs>
- </trade-card>
- <containerTitle title="上传附件"></containerTitle>
- <c-upload :data="form.filesCenterList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
- display :disabled="editDisabled"></c-upload>
- </div>
- <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="MYDL"
- :type="true"></business-reports>
- <reports :id="form.id" :assemblyForm="form" businessValue="MYDL" ref="report"></reports>
- <!--审核弹窗-->
- <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="wkDialog" width="50%" top="30vh"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @closed="wkClosed"
- v-dialog-drag>
- <avue-form v-model="wkForm" :option="wkOption"></avue-form>
- <avue-crud :data="wkForm.agentItemsRList" :option="wkOptionList">
- <tempalte slot="thisSettlementAmount" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit" v-model="row.thisSettlementAmount" @change="wkChange(row)"
- :controls="false" placeholder="请输入 本次金额" size="small" style="width: 100%;"></el-input-number>
- </tempalte>
- </avue-crud>
- <span slot="footer" class="dialog-footer">
- <el-button size="mini" @click="wkDialog = false">取 消</el-button>
- <el-button size="mini" type="primary" @click="wkSubmit">提 交</el-button>
- </span>
- </el-dialog>
- <el-dialog append-to-body title="生成货代" class="el-dialogDeep" :visible.sync="hdDialog" width="30%" top="30vh"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @closed="hdClosed"
- v-dialog-drag>
- <avue-form v-model="hdForm" :option="hdOption">
- <tempalte slot="operatorName">
- <div style="display: flex;">
- <dic-select v-model="hdForm.operatorName" placeholder="操作员" key="id" label="realName"
- res="records" url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
- @selectChange="dicChange('operatorName', $event)"></dic-select>
- </div>
- </tempalte>
- </avue-form>
- <span slot="footer" class="dialog-footer">
- <el-button size="mini" @click="hdDialog = false">取 消</el-button>
- <el-button size="mini" type="primary" @click="hdSubmit">提 交</el-button>
- </span>
- </el-dialog>
- <dictbiz-dialog ref="dictbiz" :title="dicTitle" :code="dicCode" :parentId="parentId" @closed="getAllWorkDicts">
- </dictbiz-dialog>
- </div>
- </template>
- <script>
- import { submit, getDetail, removeItem, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, generatePayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder, balancePayment, applyForPaymentList } from "@/api/tradeAgency/tradeAgency";
- import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
- import feeInfo from "@/components/tradeAgency/fee-info";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import businessReports from "@/components/tradeAgency/businessReports.vue";
- import reports from "@/components/tradeAgency/reports.vue";
- import { getDicinit } from "@/api/dicSelect/index";
- import { dateFormat } from "@/util/date";
- import { getBcorpsDetail } from "@/api/iosBasicData/bcorps";
- import { contrastObj, contrastList } from "@/util/contrastData";
- import { getToken } from "@/util/auth";
- import _ from "lodash";
- export default {
- name: "detailsPage",
- data() {
- return {
- hdDialog: false,
- hdForm: {},
- dicTitle: null,
- parentId: null,
- dicCode: null,
- wkType: null,
- wkForm: {
- agentItemsRList: []
- },
- hdOption: {
- menuBtn: false,
- span: 24,
- disabled: false,
- column: [
- {
- label: '操作员',
- prop: 'operatorName',
- disabled: false,
- },
- ]
- },
- wkOption: {
- menuBtn: false,
- span: 8,
- disabled: false,
- column: [
- {
- label: '总货值',
- prop: 'goodsValue',
- disabled: true,
- },
- {
- label: '预付金额',
- prop: 'prepaidAmount',
- disabled: true,
- },
- {
- label: '应收金额',
- prop: 'amountD',
- disabled: true,
- },
- {
- label: '汇率',
- prop: 'exchangeRate'
- }
- ]
- },
- wkOptionList: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '提单号',
- prop: 'billNo',
- overHidden: true
- },
- {
- label: '货值',
- prop: 'amount',
- overHidden: true
- },
- {
- label: '本次金额',
- prop: 'thisSettlementAmount',
- }
- ]
- },
- selectionList: [],
- checkId: '', // 审核需要的id
- batchNo: '',
- checkScheduleDialog: false, // 审核弹窗
- wkDialog: false,//尾款弹窗
- editButton: false,
- editDisabled: false,
- activeName: '1',
- form: {
- typeOfShipping: '海运',
- contractDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
- currency: 'USD',
- documentType: '普通',
- advanceRatio: 'T/T',
- billNoFormat: 'MYDL',
- businessTypeCode: 'MYDL',
- businessType: 'MYDL',
- businessStatus: '录入',
- tradeMode: '一般贸易',
- agentItemsList: [],
- feeCenterListC: [],
- feeCenterListD: [],
- filesCenterList: [],
- recordList: [],
- recordInvoiceList: [],
- recordListC: [],
- recordListD: [],
- recordRateList: []
- },
- oldForm: {
- typeOfShipping: '海运',
- contractDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
- currency: 'USD',
- documentType: '普通',
- advanceRatio: 'T/T',
- billNoFormat: 'MYDL',
- businessTypeCode: 'MYDL',
- businessType: 'MYDL',
- businessStatus: '录入',
- tradeMode: '一般贸易',
- agentItemsList: [],
- feeCenterListC: [],
- feeCenterListD: [],
- filesCenterList: [],
- recordList: [],
- recordInvoiceList: [],
- recordListC: [],
- recordListD: [],
- recordRateList: []
- },
- optionForm: {
- menuBtn: false,
- span: 8,
- disabled: false,
- column: [
- {
- label: '客户',
- prop: "corpName",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '合同号',
- prop: "contractNo",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '合同日期',
- prop: "contractDate",
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '原产地',
- prop: "countryOfOrigin",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '运输方式',
- prop: "typeOfShipping",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '起运港',
- prop: "polCnName",
- disabled: false,
- },
- {
- label: '目的港',
- prop: "podCnName",
- disabled: false,
- },
- {
- label: '币别',
- prop: "currency",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '国外发货人',
- prop: "abroadConsignorCname",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '银行助记码',
- prop: "abroadBankMnemonicCode",
- disabled: false,
- },
- {
- label: '银行',
- prop: "abroadBank",
- disabled: false,
- },
- {
- label: '币别',
- prop: "abroadCurrency",
- disabled: false,
- },
- {
- label: '国内收货人',
- prop: "domesticConsigneeCname",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '银行助记码',
- prop: "domesticBankMnemonicCode",
- disabled: false,
- },
- {
- label: '银行',
- prop: "domesticBank",
- disabled: false,
- },
- {
- label: '币别',
- prop: "domesticCurrency",
- disabled: false,
- },
- {
- label: '资金方',
- prop: "fundingParty",
- disabled: false,
- },
- {
- label: '货值',
- prop: "goodsValue",
- disabled: true,
- },
- {
- label: '付费方式',
- prop: "advanceRatio",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=advance_ratio",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '预付金额',
- prop: "prepaidAmount",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '单据类型',
- prop: "documentType",
- disabled: false,
- },
- {
- label: '贸易方式',
- prop: "tradeMode",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=trade_Mode",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '成交方式',
- prop: "transactionMethod",
- disabled: false
- },
- {
- label: '所属公司',
- prop: "affiliatedCompanyName",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '业务来源',
- prop: "sourceType",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- // {
- // prop: "salesmanName",
- // disabled: false,
- // display:false,
- // rules: [{
- // required: true,
- // message: " ",
- // trigger: "blur"
- // }],
- // },
- {
- label: "审单状态",
- prop: "reviewStatus",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=audit_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- },
- {
- label: '备注',
- prop: "remarks",
- type: 'textarea',
- disabled: false,
- span: 12,
- minRows: 2,
- },
- ]
- },
- option: {},
- optionBack: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 60,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- headerslot: true,
- },
- {
- label: "提单号",
- prop: "billNo",
- width: "140",
- cell: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请输入提单号',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "箱型",
- prop: "boxType",
- width: "80",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请选择箱型',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "140",
- cell: true,
- slot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请输入箱号',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "PI发票号",
- prop: "invoiceNo",
- width: "100",
- cell: true,
- overHidden: true
- },
- {
- label: "订单号",
- prop: "orderNo",
- width: "100",
- cell: true,
- overHidden: true
- },
- {
- label: "厂号",
- prop: "factoryNumber",
- width: "100",
- cell: true,
- overHidden: true
- },
- {
- label: "HSCODE",
- prop: "hsCode",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: '请输入HSCODE',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "标签品名",
- prop: "labelProductName",
- width: "100",
- overHidden: true
- },
- {
- label: "商品类别",
- prop: "goodsType",
- width: "100",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请选择商品类别',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "件数",
- prop: "quantity",
- width: "100",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请输入件数',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "净重(kg)",
- prop: "netWeight",
- width: "100",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请输入净重',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "单价(USD)",
- prop: "price",
- width: "100",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请输入单价',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "毛重(kg)",
- prop: "grossWeight",
- width: "100",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- rules: [
- {
- required: true,
- message: '请输入毛重',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "金额(USD)",
- prop: "amount",
- width: "100",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true
- },
- {
- label: "税率",
- prop: "taxRate",
- width: "80",
- overHidden: true
- },
- {
- label: "铅封号",
- prop: "leadSealNo",
- width: "120",
- cell: true,
- overHidden: true
- },
- {
- label: "放单方式",
- prop: "orderReleaseMethod",
- width: "100",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true
- },
- {
- label: "开船日期",
- prop: "etd",
- width: "120",
- overHidden: true
- },
- {
- label: "预计到港",
- prop: "estimateReachHarbor",
- width: "120",
- overHidden: true
- },
- {
- label: "实际到港",
- prop: "actualReachHarbor",
- width: "120",
- overHidden: true
- },
- {
- label: "报关单号",
- prop: "customsDeclarationNo",
- width: "120",
- overHidden: true
- },
- {
- label: "报关日期",
- prop: "customsDeclarationDate",
- width: "120",
- overHidden: true
- },
- {
- label: "放行日期",
- prop: "releaseDate",
- width: "120",
- overHidden: true
- },
- {
- label: "派车日期",
- prop: "dispatchDate",
- width: "120",
- overHidden: true
- },
- {
- label: "库存件数",
- prop: "inventoryQuantity",
- width: "100",
- overHidden: true
- },
- {
- label: "货代",
- prop: "freightForwarder",
- width: "80",
- type: 'select',
- dicData: [{
- label: '是',
- value: '1'
- }, {
- label: '否',
- value: '0'
- }],
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option1: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '户头',
- prop: 'account'
- },
- {
- label: '账号',
- prop: 'accountNumber'
- },
- {
- label: '银行',
- prop: 'bank'
- },
- {
- label: '金额',
- prop: 'amount'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- option2: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '开票抬头',
- prop: 'invoiceHeader'
- },
- {
- label: '开票金额',
- prop: 'amount'
- },
- {
- label: '税率',
- prop: 'taxRate'
- },
- {
- label: '开票内容',
- prop: 'invoiceContent'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- option3: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '结算单位',
- prop: "corpName",
- },
- {
- label: '合同号',
- prop: "contractNo",
- },
- {
- label: '提单号',
- prop: 'billNo'
- },
- {
- label: '金额',
- prop: 'amount'
- },
- {
- label: '金额(USD)',
- prop: 'amountUsd'
- },
- {
- label: '汇率',
- prop: 'exchangeRate'
- },
- {
- label: '报关单号',
- prop: 'customsDeclarationNo'
- },
- {
- label: '日期',
- prop: 'date'
- },
- {
- label: '状态',
- prop: 'status'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- option4: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '提单号',
- prop: 'billNo'
- },
- {
- label: '日期',
- prop: 'date'
- },
- {
- label: '操作人',
- prop: 'createUserName'
- },
- {
- label: '原金额',
- prop: 'amount'
- },
- {
- label: '修改金额',
- prop: 'amountUsd'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- itemIds: null,
- showLock: false,
- roleName: [],
- saberUserInfo: ''
- }
- },
- components: {
- dicSelect,
- feeInfo,
- checkSchedule,
- businessReports,
- reports
- },
- props: {
- detailData: Object
- },
- async created() {
- this.roleName = localStorage.getItem('roleName').split(',')
- this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content
- this.option = await this.getColumnData(this.getColumnName(376), this.optionBack);
- if (this.detailData.new) {
- getDicinit('get', '/blade-los/bports/list', { cnName: '青岛' }).then(res => {
- res.data.data.records.forEach(e => {
- if (e.cnName == '青岛') {
- this.form.podId = e.id
- this.form.podCode = e.code
- this.form.podEnName = e.enName
- this.form.podCnName = e.cnName
- }
- })
- })
- getDicinit('get', '/blade-system/dept/lazy-list?parentId=0').then(res => {
- res.data.data.forEach(e => {
- if (e.deptName == '君海贸易') {
- this.form.affiliatedCompanyId = e.id
- this.form.affiliatedCompanyName = e.deptName
- }
- })
- })
- }
- if (this.detailData.id) {
- this.showLock = true;
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetails(this.detailData.id)
- }
- if (this.$route.query.params) {
- this.showLock = true;
- this.getDetails(this.$route.query.params)
- }
- if (this.detailData.copyId) {
- this.getCopydate(this.detailData.copyId)
- }
- },
- methods: {
- inLock() {
- const data = {
- moduleName: "MYDL",
- tableName: "MYDL_Detail",
- billId: this.form.id,
- no: localStorage.getItem("browserID"),
- billNo: this.form.contractNo
- };
- this.inDetailsKey(this.$route.name, {
- moduleName: "MYDL",
- tableName: "MYDL_Detail",
- billId: this.form.id,
- billNo: this.form.contractNo
- });
- this.checkLock(data).then(res => {
- if (res.data.code == 200) {
- this.onLock(data).then(res => {
- if (res.data.code == 200) {
- this.showLock = false
- }
- });
- }
- });
- },
- inJump(name) {
- if (name == '客户') {
- this.$router.push({
- path: "/iosBasicData/bcorps/index",
- query: { type: 'new' },
- })
- }
- if (name == '原产地') {
- this.$router.push({
- path: "/iosBasicData/bcountrys/index",
- query: { type: 'new' },
- })
- }
- if (name == '港口') {
- this.$router.push({
- path: "/iosBasicData/bports/index",
- query: { type: 'new' },
- })
- }
- if (name == 'HSCODE') {
- this.$router.push({
- path: "/iosBasicData/bcommodity/index",
- query: { type: 'new' },
- })
- }
- if (name == '箱型') {
- this.$router.push({
- path: "/iosBasicData/bcntrtypes/index",
- query: { type: 'new' },
- })
- }
- if (name == '商品类别') {
- this.$refs.dictbiz.open()
- this.dicTitle = '添加类型'
- this.parentId = '1813125517193330690'
- this.dicCode = 'goods-type'
- }
- },
- dicChange(name, row) {
- if (name == 'corpName') {
- if (row) {
- this.form.corpId = row.id
- this.form.corpName = row.cnName
- this.form.sourceType = row.sourceType
- this.form.salesmanName = row.srcCnName
- this.form.salesmanId = row.srcId
- } else {
- this.form.corpId = null
- this.form.sourceType = null
- this.form.salesmanName = null
- this.form.salesmanId = null
- }
- }
- if (name == 'countryOfOrigin') {
- if (row) {
- this.form.countryOfOrigin = row.cnName
- }
- }
- if (name == 'polCnName') {
- if (row) {
- this.form.polId = row.id
- this.form.polCode = row.code
- this.form.polCnName = row.cnName
- this.form.polEnName = row.enName
- } else {
- this.form.polId = null
- this.form.polCode = null
- this.form.polEnName = null
- }
- }
- if (name == 'podCnName') {
- if (row) {
- this.form.podId = row.id
- this.form.podCode = row.code
- this.form.podCnName = row.cnName
- this.form.podEnName = row.enName
- } else {
- this.form.podId = null
- this.form.podCode = null
- this.form.podEnName = null
- }
- }
- if (name == 'abroadConsignorCname') {
- if (row) {
- this.$refs.abankCode.IdGetDicData({ id: row.id })
- this.form.abroadConsignorId = row.id
- this.form.abroadConsignorCname = row.cnName
- getDicinit('get', '/blade-los/bcorps/detail', { id: row.id }).then(res => {
- res.data.data.corpsBankList.forEach((e, index) => {
- if (index == 0) {
- console.log(e)
- this.form.abroadBankMnemonicCode = e.mnemonicCode
- this.form.abroadBank = e.accountBank
- this.form.abroadCurrency = e.curNo
- }
- })
- })
- } else {
- this.form.abroadConsignorId = null
- this.form.abroadBankMnemonicCode = null
- this.form.abroadBank = null
- this.form.abroadCurrency = null
- }
- }
- if (name == 'domesticConsigneeCname') {
- if (row) {
- this.$refs.dbankCode.IdGetDicData({ id: row.id })
- console.log(this.$refs.abankCode.IdGetDicData({ id: row.id }), 222)
- this.form.domesticConsigneeId = row.id
- this.form.domesticConsigneeCname = row.cnName
- getDicinit('get', '/blade-los/bcorps/detail', { id: row.id }).then(res => {
- res.data.data.corpsBankList.forEach((e, index) => {
- if (index == 0) {
- console.log(e)
- this.form.domesticBankMnemonicCode = e.mnemonicCode
- this.form.domesticBank = e.accountBank
- this.form.domesticCurrency = e.curNo
- }
- })
- })
- } else {
- this.form.domesticConsigneeId = null
- this.form.domesticBankMnemonicCode = null
- this.form.domesticBank = null
- this.form.domesticCurrency = null
- }
- }
- if (name == 'affiliatedCompanyName') {
- if (row) {
- this.form.affiliatedCompanyId = row.id
- } else {
- this.form.affiliatedCompanyId = null
- }
- }
- if (name == 'sourceType') {
- if (!row) {
- this.form.salesmanId = null
- this.form.salesmanName = null
- }
- }
- if (name == 'salesmanName') {
- if (row) {
- this.form.salesmanId = row.id
- } else {
- this.form.salesmanId = null
- }
- }
- if (name == 'abroadBankMnemonicCode') {
- if (row) {
- this.form.abroadBank = row.accountBank
- this.form.abroadCurrency = row.curNo
- } else {
- this.form.abroadBank = null
- this.form.abroadCurrency = null
- }
- }
- if (name == 'domesticBankMnemonicCode') {
- if (row) {
- this.form.domesticBank = row.accountBank
- this.form.domesticCurrency = row.curNo
- } else {
- this.form.domesticBank = null
- this.form.domesticCurrency = null
- }
- }
- if (name == 'fundingParty') {
- if (row) {
- this.form.fundingPartyId = row.id
- this.form.fundingParty = row.cnName
- } else {
- this.form.fundingPartyId = null
- }
- }
- if (name == 'transactionMethod') {
- if (row) {
- this.form.transactionMethodId = row.id
- } else {
- this.form.transactionMethodId = null
- }
- }
- if (name == 'operatorName') {
- if (row) {
- this.hdForm.operatorId = row.id
- } else {
- this.hdForm.operatorId = null
- }
- }
- },
- rowDicChange(name, row, el) {
- if (name == 'hsCode') {
- if (row) {
- el.labelProductName = row.cnName
- el.taxRate = row.taxRate
- } else {
- el.labelProductName = null
- el.taxRate = null
- }
- }
- },
- boxChange(row) {
- getDicinit('get', '/blade-los/agentitems/selectBoxNo', { boxNo: row.boxNo }).then(res => {
- if (res.data.data != 'true') {
- this.$alert(res.data.data, '提示', {
- confirmButtonText: '确定',
- });
- }
- })
- },
- countChange(row) {
- row.amount = _.multiply(Number(row.netWeight ? row.netWeight : 0), Number(row.price ? row.price : 0))
- },
- amountChange(row) {
- if (row.netWeight == 0) return this.$message.error("净重不能为零");
- row.price = _.divide(Number(row.amount ? row.amount : 0), Number(row.netWeight ? row.netWeight : 1))
- },
- wkChange(row) {
- let sum = 0
- this.wkForm.agentItemsRList.forEach(e => {
- sum = _.add(sum, e.thisSettlementAmount)
- })
- if (sum > this.wkForm.unresolvedAmount) {
- setTimeout(() => {
- row.thisSettlementAmount = 0
- this.$message.error("本次金额总数不能超过未结算金额");
- }, 200);
- }
- },
- rowEdit(row) {
- console.log(row.srcType)
- if (row.srcType == 'STL-D-FH') {
- if (this.$store.getters.firstSetStatus) {
- this.$alert("货款收费(T)页面已存在,请关闭货款收费(T)再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: 'warning',
- callback: action => {
- }
- });
- } else {
- this.$router.push({
- path: '/tradeAgency/firstSettlement/index',
- query: {
- billNo: row.srcId
- },
- })
- }
- }
- if (row.srcType == 'STL-C-GH') {
- if (this.$store.getters.exchangePurStatus) {
- this.$alert("货款付费(T)页面已存在,请关闭货款付费(T)再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: 'warning',
- callback: action => {
- }
- });
- } else {
- this.$router.push({
- path: '/tradeAgency/exchangePurchasing/index',
- query: {
- billNo: row.srcId
- },
- })
- }
- }
- if (row.srcType == 'STL-D' || row.srcType == 'STL-C') {
- if (this.$store.getters.SettlementCenterF) {
- this.$alert("结算中心(F)页面已存在,请关闭结算中心(F)再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: 'warning',
- callback: action => {
- }
- });
- } else {
- this.$router.push({
- path: '/iosBasicData/ComputationCenter/index',
- query: {
- billNo: row.srcId
- },
- })
- }
- }
- },
- addRow() {
- if (!this.form.corpId) return this.$message.error("请选择客户名称");
- if (this.form.agentItemsList.length == 0) {
- this.form.agentItemsList.push({ orderReleaseMethod: '正本', freightForwarder: '0', $cellEdit: true })
- } else {
- let obj = {}
- obj = this.deepClone(this.form.agentItemsList[this.form.agentItemsList.length - 1])
- this.form.agentItemsList.push({
- billNo: obj.billNo,
- boxType: obj.boxType,
- leadSealNo: obj.leadSealNo,
- orderReleaseMethod: '正本',
- orderNo: obj.orderNo,
- hsCode: obj.hsCode,
- factoryNumber: obj.factoryNumber,
- labelProductName: obj.labelProductName,
- taxRate: obj.taxRate,
- goodsType: obj.goodsType,
- quantity: obj.quantity,
- netWeight: obj.netWeight,
- price: obj.price,
- grossWeight: obj.grossWeight,
- amount: obj.amount,
- freightForwarder: '0',
- $cellEdit: true
- })
- }
- },
- // rowCell(row, index) {
- // if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
- // this.$refs.crud.rowCell(row, index)
- // return this.$message.error("请完善明细信息");
- // }
- // if (row.$cellEdit == true) {
- // this.$set(row, "$cellEdit", false);
- // } else {
- // this.$set(row, "$cellEdit", true);
- // }
- // },
- rowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- removeItem({ ids: row.id }).then(res => {
- this.form.agentItemsList.splice(index, 1);
- this.$message.success("成功删除");
- })
- } else {
- this.form.agentItemsList.splice(index, 1);
- }
- });
- },
- selectionChange(list) {
- let ids = []
- list.forEach(e => {
- ids.push(e.id)
- })
- if (ids.length) {
- this.itemIds = ids.join(',')
- } else {
- this.itemIds = null
- }
- this.selectionList = list;
- },
- selectHandle(selection, row) {
- // 取消其中一个选中的时候 默认取消同单号的选中
- if (!selection.includes(row)) {
- this.pickUp(false, row.billNo);
- } else {
- this.pickUp(true, row.billNo);
- }
- },
- // 需要默认勾选/取消的数据
- pickUp(bool, billNo) {
- let arr = [];
- this.form.agentItemsList.forEach(e => {
- if (billNo == e.billNo) {
- arr.push(e)
- }
- })
- this.toggleSelection(arr, bool);
- },
- // 默认选择/取消中的行
- toggleSelection(rows, bool) {
- if (rows) {
- this.$nextTick(() => {
- rows.forEach(row => {
- this.$refs.crud.toggleRowSelection(row, bool);
- });
- });
- } else {
- this.$refs.crud.clearSelection();
- }
- },
- getDetails(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- getDetail({ id: id }).then(res => {
- this.form = res.data.data
- this.oldForm = this.deepClone(res.data.data)
- this.inLock()
- if (res.data.data.abroadConsignorId) {
- this.$refs.abankCode.IdGetDicData({ id: res.data.data.abroadConsignorId })
- }
- if (res.data.data.domesticConsigneeId) {
- this.$refs.dbankCode.IdGetDicData({ id: res.data.data.domesticConsigneeId })
- }
- }).finally(() => {
- loading.close()
- })
- },
- getCopydate(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- copyAgent({ id: id }).then(res => {
- this.form = res.data.data
- if (res.data.data.abroadConsignorId) {
- this.$refs.abankCode.IdGetDicData({ id: res.data.data.abroadConsignorId })
- }
- if (res.data.data.domesticConsigneeId) {
- this.$refs.dbankCode.IdGetDicData({ id: res.data.data.domesticConsigneeId })
- }
- }).finally(() => {
- loading.close()
- })
- },
- inEdit() {
- this.editButton = false
- if (this.form.businessStatus == '录入') {
- this.editDisabled = false
- this.optionForm.disabled = false
- }
- },
- rowJump(row) {
- if (row.freightForwarder == 1) {
- if (this.$store.getters.oceanFreightStatus) {
- this.$alert("海运进口(T)页面已存在,请关闭海运出口再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: 'warning',
- callback: action => {
- }
- });
- } else {
- this.$router.push({
- path: '/tradeAgency/oceanFreightImport/index',
- query: {
- billNo: row.billNo
- },
- })
- }
- } else {
- this.$message.error("未生成货代");
- }
- },
- allClick(name) {
- if (name == '一键保存') {
- for (let row of this.form.agentItemsList) {
- if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
- this.$refs.crud.rowCell(row, row.$index)
- return this.$message.error("请完善明细信息");
- }
- this.$set(row, "$cellEdit", false);
- }
- this.submit()
- }
- if (name == '一键编辑') {
- for (let row of this.form.agentItemsList) {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '首款账单') {
- // if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
- bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
- res.data.data.forEach(e => {
- if (this.form.currency == e.code) {
- this.$prompt('账单金额(' + this.form.currency + '):' + this.form.prepaidAmount + '<br/>请输入汇率', '首款账单', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- inputValue: e.exrate,
- dangerouslyUseHTMLString: true,
- closeOnClickModal: false,
- }).then(({ value }) => {
- let obj = {}
- obj = {
- ...this.form,
- exchangeRate: value
- }
- generateDownPaymentBill(obj).then(res => {
- this.$message.success("成功生成首款账单");
- this.getDetails(this.form.id)
- })
- })
- }
- })
- })
- }
- if (name == '尾款账单') {
- // if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
- let obj = {}
- obj = {
- ...this.form,
- agentItemsList: this.selectionList
- }
- balancePayment(obj).then(res => {
- this.wkForm = res.data.data
- this.wkForm.amountD = _.subtract(res.data.data.goodsValue, res.data.data.prepaidAmount)
- res.data.data.agentItemsRList.forEach(e => {
- e.$cellEdit = true
- })
- this.wkForm.agentItemsRList = res.data.data.agentItemsRList
- bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
- res.data.data.forEach(e => {
- if (this.form.currency == e.code) {
- this.wkForm.exchangeRate = e.exrate
- }
- })
- })
- })
- this.findObject(this.wkOption.column, "amountD").label = '应收金额';
- this.wkDialog = true
- this.wkType = name
- }
- if (name == '生成首款应付') {
- // if (this.form.applyForPayment == 1) return this.$message.error("请勿重复生成");
- bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
- res.data.data.forEach(e => {
- if (this.form.currency == e.code) {
- this.$prompt('账单金额(' + this.form.currency + '):' + this.form.prepaidAmount + '<br/>请输入汇率', '生成首款应付', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- inputValue: e.exrate,
- dangerouslyUseHTMLString: true,
- closeOnClickModal: false,
- }).then(({ value }) => {
- let obj = {}
- obj = {
- id: this.form.id,
- exchangeRate: value,
- paidApplication: 'FFSQ-SK'
- }
- generatePayment(obj).then(res => {
- this.$message.success("生成首款应付成功");
- this.getDetails(this.form.id)
- })
- })
- }
- })
- })
- }
- if (name == '生成尾款应付') {
- // if (this.form.applyForPaymentBalance == 1) return this.$message.error("请勿重复生成");
- // let obj = {}
- // obj = {
- // id: this.form.id,
- // // url: '/tradeAgency/tradeAgency/index',
- // // pageStatus: '',
- // // pageLabel: '贸易代理(T)',
- // paidApplication: 'FFSQ-WK'
- // }
- // generatePayment(obj).then(res => {
- // this.$message.success("生成尾款应付成功");
- // this.getDetails(this.form.id)
- // })
- // for (let index in this.selectionList) {
- // if (this.selectionList[index].applyForPaymentBalance == 1) {
- // return this.$message.error("第" + Number(this.selectionList[index].$index + 1) + "行已生成尾款");
- // }
- // }
- let obj = {}
- obj = {
- ...this.form,
- agentItemsList: this.selectionList
- }
- balancePayment(obj).then(res => {
- this.wkForm = res.data.data
- this.wkForm.amountD = _.subtract(res.data.data.goodsValue, res.data.data.prepaidAmount)
- res.data.data.agentItemsRList.forEach(e => {
- e.$cellEdit = true
- })
- this.wkForm.agentItemsRList = res.data.data.agentItemsRList
- bcurrencyGetExrate({ date: this.form.contractDate, dc: 'C' }).then(res => {
- res.data.data.forEach(e => {
- if (this.form.currency == e.code) {
- this.wkForm.exchangeRate = e.exrate
- }
- })
- })
- })
- this.findObject(this.wkOption.column, "amountD").label = '应付金额';
- this.wkDialog = true
- this.wkType = name
- }
- if (name == '首款撤销申请付款') {
- if (this.form.applyForPayment == 0) return this.$message.error("未申请付款");
- let obj = {}
- obj = {
- id: this.form.id,
- paidApplication: 'FFSQ-SK'
- }
- revokeApplyForPayment(obj).then(res => {
- this.$message.success("撤销申请付款成功");
- this.getDetails(this.form.id)
- })
- }
- if (name == '尾款撤销申请付款') {
- if (this.form.applyForPaymentBalance == 0) return this.$message.error("未申请付款");
- let obj = {}
- obj = {
- id: this.form.id,
- paidApplication: 'FFSQ-WK'
- }
- revokeApplyForPayment(obj).then(res => {
- this.$message.success("撤销申请付款成功");
- this.getDetails(this.form.id)
- })
- }
- if (name == '首款应收待确认通知') {
- this.$confirm("确定发起通知?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- paidApplication: 'YSQR-SK'
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmationNotification(obj).then(res => {
- this.$message.success("通知成功");
- }).finally(() => {
- loading.close();
- })
- });
- }
- if (name == '尾款应收待确认通知') {
- this.$confirm("确定发起通知?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- paidApplication: 'YSQR-WK'
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmationNotification(obj).then(res => {
- this.$message.success("通知成功");
- }).finally(() => {
- loading.close();
- })
- });
- }
- if (name == '生成货代') {
- this.hdDialog = true
- }
- if (name == '生成申请付款') {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- applyForPaymentList({ ids: this.form.id, dc: 'C' }).then(res => {
- // this.getDetails(tshis.form.id)
- }).finally(() => {
- loading.close();
- })
- }
- if (name == '生成申请收款') {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- applyForPaymentList({ ids: this.form.id, dc: 'D' }).then(res => {
- // this.getDetails(this.form.id)
- }).finally(() => {
- loading.close();
- })
- }
- },
- submit(type) {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- for (let row of this.form.agentItemsList) {
- if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
- this.$refs.crud.rowCell(row, row.$index)
- return this.$message.error("请完善明细信息");
- }
- }
- if (this.$refs.feeInfo.submitValidate()) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- this.form.businessDate = this.form.contractDate
- submit(this.form).then(res => {
- this.$message.success("保存成功");
- if (type == 'goBack') {
- if (this.form.id) {
- this.unLock({
- moduleName: "MYDL",
- tableName: "MYDL_Detail",
- billId: this.form.id,
- billNo: this.form.contractNo
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- }
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- }
- } else {
- return false;
- }
- });
- },
- hdSubmit() {
- let obj = {
- ...this.form,
- ...this.hdForm,
- agentItemsList: this.selectionList,
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateFreightForwarder(obj).then(res => {
- this.$message.success("生成货代成功");
- this.hdDialog = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close();
- })
- },
- wkSubmit() {
- if (this.wkType == '尾款账单') {
- generateBalancePaymentBill(this.wkForm).then(res => {
- this.$message.success("成功生成尾款账单");
- this.getDetails(this.form.id)
- this.wkDialog = false
- })
- }
- if (this.wkType == '生成尾款应付') {
- let obj = {}
- obj = {
- ...this.wkForm,
- paidApplication: 'FFSQ-WK'
- }
- generatePayment(obj).then(res => {
- this.$message.success("生成尾款应付成功");
- this.getDetails(this.form.id)
- this.wkDialog = false
- })
- }
- },
- wkClosed() {
- this.wkForm = this.$options.data().wkForm
- this.wkType = null
- },
- hdClosed() {
- this.hdForm = this.$options.data().hdForm
- },
- application() {
- // if (this.form.downPayment != 1) return this.$message.error("未申请首款账单");
- // if (this.form.balancePayment != 1) return this.$message.error("未申请尾款账单");
- // if (this.form.applyForPayment != 1) return this.$message.error("未申请首款付款");
- // if (this.form.applyForPaymentBalance != 1) return this.$message.error("未申请尾款付款");
- this.$confirm("确定请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- checkAgent(obj).then(res => {
- this.$message.success("请核成功");
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- });
- },
- revokeApplication() {
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeCheckAgent(obj).then(res => {
- this.$message.success("撤销请核成功");
- this.getDetails(res.data.data.id)
- this.editDisabled = false
- this.optionForm.disabled = false
- }).finally(() => {
- loading.close();
- })
- });
- },
- //请核关闭
- choceScheduleFun() {
- this.checkScheduleDialog = false
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- goBack(type) {
- if (contrastObj(this.form, this.oldForm) || contrastList(this.form.agentItemsList, this.oldForm.agentItemsList) || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) || contrastList(this.form.filesCenterList, this.oldForm.filesCenterList)) {
- this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.submit('goBack')
- })
- .catch(() => {
- if (this.form.id) {
- this.unLock({
- moduleName: "MYDL",
- tableName: "MYDL_Detail",
- billId: this.form.id,
- billNo: this.form.contractNo
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- });
- } else {
- if (this.form.id) {
- this.unLock({
- moduleName: "MYDL",
- tableName: "MYDL_Detail",
- billId: this.form.id,
- billNo: this.form.contractNo
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-table .cell {
- padding: 0 2px !important;
- .el-form-item {
- margin-bottom: 0px !important;
- }
- }
- ::v-deep .avue-crud .el-table .el-form-item__label {
- left: -1px;
- }
- ::v-deep#out-table .back-one {
- background: #ecf5ff !important;
- }
- ::v-deep#out-table .back-two {
- background: #ecf5ff !important;
- }
- ::v-deep .el-table--small td,
- .el-table--small th {
- padding: 2px !important;
- }
- ::v-deep .el-card__body {
- padding: 3px 10px;
- }
- </style>
|