123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487 |
- <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.print.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.status != 0" @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.status != 0 && form.status != 4)" @click="application">单据请核
- </el-button>
- <el-button v-if="form.status == 1" 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="corpCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">客户:</span>
- </template>
- <template slot="hshipperCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">发货人:</span>
- </template>
- <template slot="hconsigneeCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">收货人:</span>
- </template>
- <template slot="mnotifyCntyCodeLabel">
- <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>
- <template slot="vesselCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('船名')">船名:</span>
- </template>
- <template slot="carrierCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">船公司:</span>
- </template>
- <template slot="bookingAgentCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">船代:</span>
- </template>
- <template slot="hscodeLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">HSCODE:</span>
- </template>
- <template slot="packingUnitLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('包装')">包装:</span>
- </template>
- <tempalte slot="corpCnName">
- <dic-select v-model="form.corpCnName" placeholder="客户" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('corpCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="polCnName">
- <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 || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="podCnName">
- <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 || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <!-- <tempalte slot="srcCnName">
- <dic-select v-model="form.srcCnName" placeholder="业务员" key="id" label="realName" res="records"
- url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
- @selectChange="dicChange('srcCnName', $event)" :disabled="editDisabled"></dic-select>
- </tempalte> -->
- <tempalte slot="srcType" slot-scope="{ row }">
- <div style="display: flex;">
- <dic-select style="margin-right: 4px;" v-model="form.srcType" placeholder="业务来源" key="dictKey"
- keyValue="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=source_Type" :filterable="true"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- @selectChange="dicChange('srcType', $event)"></dic-select>
- <el-input v-show="!form.srcType" v-model="form.srcCnName" placeholder="请选择" :disabled="true">
- </el-input>
- <dic-select v-show="form.srcType == 'OWN'" v-model="form.srcCnName" placeholder="所属公司" key="id"
- label="deptName" url="/blade-system/dept/lazy-list?parentId=0" :filterable="true"
- @selectChange="dicChange('srcCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- <dic-select v-show="form.srcType == 'AGENT'" v-model="form.srcCnName" placeholder="代理" key="id"
- label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=代理客户"
- :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('srcCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- <dic-select v-show="form.srcType == 'SALES'" v-model="form.srcCnName" placeholder="业务员" key="id"
- label="realName" res="records" url="/blade-user/page" :filterable="true" :remote="true"
- dataName="realName" @selectChange="dicChange('srcCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- </div>
- </tempalte>
- <tempalte slot="hshipperCnName">
- <dic-select v-model="form.hshipperCnName" placeholder="发货人" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=国外工厂" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('hshipperCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="hconsigneeCnName">
- <dic-select v-model="form.hconsigneeCnName" placeholder="收货人" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=国内贸易商" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('hconsigneeCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="carrierCnName">
- <dic-select v-model="form.carrierCnName" placeholder="船公司" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=船公司" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('carrierCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- </tempalte>
- <tempalte slot="bookingAgentCnName">
- <dic-select v-model="form.bookingAgentCnName" placeholder="船代" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=船代" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('bookingAgentCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <!-- <template slot="hscode">
- <div style="display:flex;">
- <dic-select v-model="form.hscode" placeholder="品名" key="id" res="records" label="hsCode"
- url="/blade-los/bcommodity/list" :filterable="true" :remote="true" dataName="hsCode"
- @selectChange="dicChange('hscode', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- <el-input style="margin-left: 10px;" v-model="form.commodityCnName" placeholder="请输入品名"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></el-input>
- </div>
- </template> -->
- <tempalte slot="mnotifyCntyCode" slot-scope="{ row }">
- <dic-select v-model="form.mnotifyCntyCode" placeholder="原产地" key="id" label="cnName" res="records"
- url="/blade-los/bcountrys/list" :filterable="true" :remote="true" dataName="cnName"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- @selectChange="dicChange('mnotifyCntyCode', $event)" :searchShow="true"></dic-select>
- </tempalte>
- </avue-form>
- </trade-card>
- <trade-card title="箱信息">
- <avue-crud :option="option" :data="form.preContainersList" id="out-table" ref="crud"
- @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 388)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 388)">
- <template slot="indexHeader" slot-scope="{row,index}">
- <el-button type="primary" size="mini" icon="el-icon-plus"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- circle @click="addRow()">
- </el-button>
- </template>
- <template slot="cntrTypeCodeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('箱型')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="goodsNameHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="hsCodeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (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="cntrTypeCode" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.cntrTypeCode" placeholder="箱型" key="id"
- res="records" label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true" :remote="true"
- dataName="cnName"></dic-select>
- <span v-else>{{ row.cntrTypeCode }}</span>
- </template>
- <template slot="boxNo" slot-scope="{ row }">
- <el-input v-if="row.$cellEdit && !row.srcId" v-model="row.boxNo" placeholder="请输入内容"
- size="small"></el-input>
- <span v-else>{{ row.boxNo }}</span>
- </template>
- <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>
- <template slot="goodsName" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsName" placeholder="品名" key="id"
- res="records" label="cnName" url="/blade-los/bcommodity/list" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="rowDicChange('goodsName', $event, row)"></dic-select>
- <span v-else>{{ row.goodsName }}</span>
- </template>
- <tempalte slot="goodsType" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit && !row.srcId" 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="number" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.number" :controls="false"
- placeholder="请输入 件数" size="small" style="width: 100%;"
- @change="amountChange(row)"></el-input-number>
- <span v-else>{{ row.number }}</span>
- </tempalte>
- <tempalte slot="netWeight" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.netWeight" :controls="false"
- placeholder="请输入 净重" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.netWeight }}</span>
- </tempalte>
- <tempalte slot="amount" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.amount" :controls="false"
- placeholder="请输入 总金额" size="small" style="width: 100%;"
- @change="amountChange(row)"></el-input-number>
- <span v-else>{{ row.amount }}</span>
- </tempalte>
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
- @click="rowCell('箱编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.type == 2"
- @click="rowCell('派车', row, index)">{{ row.type == 1 ? '撤销派车' : '派车' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.type == 1"
- @click="rowCell('自提', row, index)">{{ row.type == 2 ? '撤销自提' : '自 提' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
- @click="rowCell('箱删除', row, index)">删 除</el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="派车">
- <avue-crud :option="option2" :data="form.dispatchVehiclesList" id="out-table" ref="crud2"
- @selection-change="selectionChange" @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 389)"
- @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 389)">
- <tempalte slot="fleetName" slot-scope="{ row, index }">
- <dic-select v-if="row.$cellEdit" v-model="row.fleetName" placeholder="承运车队" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=车队" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="rowDicChange('fleetName', $event, row)"
- :disabled="editDisabled"></dic-select>
- <span v-else>{{ row.fleetName }}</span>
- </tempalte>
- <tempalte slot="pickupAddressName" slot-scope="{ row, index }">
- <dic-select v-if="row.$cellEdit" v-model="row.pickupAddressName" placeholder="提箱地点" key="id"
- label="cnName" res="records" url="/blade-los/blocations/list" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="rowDicChange('pickupAddressName', $event, row)"
- :disabled="editDisabled"></dic-select>
- <span v-else>{{ row.pickupAddressName }}</span>
- </tempalte>
- <tempalte slot="deliveryAddressName" slot-scope="{ row, index }">
- <dic-select v-if="row.$cellEdit" v-model="row.deliveryAddressName" placeholder="送货地点" key="id"
- label="cnName" res="records" url="/blade-los/blocations/list" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="rowDicChange('deliveryAddressName', $event, row)"
- :disabled="editDisabled"></dic-select>
- <span v-else>{{ row.deliveryAddressName }}</span>
- </tempalte>
- <!-- <template slot="returnCyName" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.returnCyName" placeholder="返空场站" key="id"
- label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=场站"
- :filterable="true" :remote="true" dataName="cnName"
- @selectChange="rowDicChange('returnCyName', $event, row)"></dic-select>
- <span v-else>{{ row.returnCyName }}</span>
- </template> -->
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
- @click="rowCell('派车编辑', row, index)">
- {{ row.$cellEdit ? '保 存' : '编 辑' }}
- </el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
- @click="rowCell('还箱', row, index)">{{ row.whetherReturn == 1 ? '撤销还箱' : '确认还箱' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
- @click="rowCell('查验/倒柜派车', row, index)">{{ row.whetherInspection == 1 ? '撤销查验/倒柜派车' : '查验/倒柜派车'
- }}</el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherWarehouseEntry == 1 || row.$cellEdit"
- @click="rowCell('入库派车', row, index)">
- {{ row.whetherDispatchVehicles == 1 ? '撤销入库派车' : '入库派车' }}
- </el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
- @click="rowCell('生成入库', row, index)">{{ row.whetherWarehouseEntry == 1 ? '撤销入库' : '入 库'
- }}</el-button>
- <!-- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
- @click="rowCell('派车删除', row, index)">删 除</el-button> -->
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="入库">
- <avue-crud :option="option3" :data="form.inStorageList" id="out-table" ref="crud3"
- @selection-change="selectionChange" @resetColumn="resetColumn('crud3', 'option3', 'optionBack3', 390)"
- @saveColumn="saveColumn('crud3', 'option3', 'optionBack3', 390)">
- <template slot="storageUnitHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('入库单位')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="warehouseName" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.warehouseName" placeholder="入库" key="id" label="cname"
- url="/blade-los/storage/list" res="records" :filterable="true" :remote="true" dataName="cname"
- @selectChange="rowDicChange('warehouseName', $event, row)"></dic-select>
- <span v-else>{{ row.warehouseName }}</span>
- </template>
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
- @click="rowCell('入库编辑', row, index)">
- {{ row.$cellEdit ? '保 存' : '编 辑' }}
- </el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherInOutStorage == 1 || row.$cellEdit"
- @click="rowCell('入库确认', row, index)">
- {{ row.confirmDispatchVehicles == 1 ? '撤销确认' : '入库确认' }}
- </el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
- @click="rowCell('生成出库', row, index)">
- 出 库
- </el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
- @click="rowCell('撤销出库', row, index)">
- 撤销出库
- </el-button>
- <!-- <el-button size="small" type="text"
- :disabled="editDisabled || row.confirmDispatchVehicles == 1 || row.whetherInOutStorage == 1"
- @click="rowCell('入库删除', row, index)">删 除</el-button> -->
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="出库">
- <avue-crud :option="option4" :data="form.outStorageList" id="out-table" ref="crud4"
- @selection-change="selectionChange" @resetColumn="resetColumn('crud4', 'option4', 'optionBack4', 391)"
- @saveColumn="saveColumn('crud4', 'option4', 'optionBack4', 391)">
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
- @click="rowCell('出库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled" @click="rowCell('出库确认', row, index)">{{
- row.confirmDispatchVehicles ==
- 1 ? '撤销确认' : '出库确认' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled" @click="rowCell('开票', row, index)">开
- 票</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
- @click="rowCell('出库删除', 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>
- <containerTitle title="上传附件"></containerTitle>
- <c-upload :data="form.filesList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove" display
- :disabled="editDisabled"></c-upload>
- </div>
- <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务" groupCode="销售报告"
- :type="1"></business-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="查验/倒柜派车" :visible.sync="carVisible" width="40%" :close-on-click-modal="false"
- v-dialog-drag @closed="carClosed">
- <span>
- <avue-form :option="carOption" v-model="carForm">
- <tempalte slot="inspectionFleetName">
- <dic-select v-model="carForm.inspectionFleetName" placeholder="承运车队" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=车队" :filterable="true"
- :remote="true" dataName="cnName"
- @selectChange="dicChange('inspectionFleetName', $event)"></dic-select>
- </tempalte>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="carVisible = false">取 消</el-button>
- <el-button type="primary" @click="carSubmit(carForm)">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog append-to-body title="还箱" :visible.sync="boxVisible" width="40%" :close-on-click-modal="false"
- v-dialog-drag @closed="boxClosed()">
- <span>
- <avue-form :option="boxOption" v-model="boxForm">
- <template slot="returnCyName">
- <dic-select v-model="boxForm.returnCyName" placeholder="返空场站" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=场站" :filterable="true" :remote="true"
- dataName="cnName"></dic-select>
- </template>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="boxVisible = false">取 消</el-button>
- <el-button type="primary" @click="boxSubmit(boxForm)">确 定</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, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox } from "@/api/tradeAgency/oceanFreightImport";
- import { contrastObj, contrastList } from "@/util/contrastData";
- import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import businessReports from "@/components/tradeAgency/businessReportsJK.vue";
- import { precontainersRemove } from "@/api/iosBasicData/ReceivingOrders/precontainers";
- import _ from "lodash";
- export default {
- name: "detailsPage",
- data() {
- return {
- dicTitle: null,
- parentId: null,
- dicCode: null,
- carForm: {
- // id: null,
- // inspectionFleetId: null,
- // inspectionFleetName: null,
- // inspectionLicenseNumber: null,
- // inspectionFullName: null,
- // inspectionContactInformation: null
- },
- boxForm: {
- // id: null,
- // returnDate: null,
- // returnCyName: null,
- },
- boxVisible: false,
- carVisible: false,
- checkId: '', // 审核需要的id
- batchNo: '',
- checkScheduleDialog: false, // 审核弹窗
- editButton: false,
- editDisabled: false,
- form: {
- billNoFormat: 'HYJK',
- businessTypeCode: 'HYJK',
- businessType: 'SI',
- status: 0,
- seaType: 'I',
- billingStatus: 0,
- mshipperCntyName: '一般贸易',
- feeCenterListC: [],
- feeCenterListD: [],
- filesList: [],
- inStorageList: [],//入库
- outStorageList: [],//出库
- dispatchVehiclesList: [],//派车
- preContainersList: []//箱信息
- },
- oldForm: {
- billNoFormat: 'HYJK',
- businessTypeCode: 'HYJK',
- businessType: 'SI',
- status: 0,
- seaType: 'I',
- billingStatus: 0,
- mshipperCntyName: '一般贸易',
- feeCenterListC: [],
- feeCenterListD: [],
- filesList: [],
- inStorageList: [],//入库
- outStorageList: [],//出库
- dispatchVehiclesList: [],//派车
- preContainersList: []//箱信息
- },
- optionForm: {
- menuBtn: false,
- span: 8,
- disabled: false,
- column: [
- {
- label: '客户',
- prop: "corpCnName",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: "委托编号",
- prop: "billNo",
- disabled: true,
- },
- {
- label: "提单号",
- prop: "mblno",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '合同号',
- prop: "bookingNo",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '原产地',
- prop: "mnotifyCntyCode",
- type: 'select',
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bcountrys/list",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- disabled: false,
- },
- {
- label: '运输方式',
- prop: "mnotifyCntyName",
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: "发货人",
- prop: "hshipperCnName",
- disabled: false,
- },
- {
- label: "收货人",
- prop: "hconsigneeCnName",
- disabled: false,
- },
- {
- label: "船名",
- prop: "vesselCnName",
- type: 'select',
- filterable: true,
- remote: true,
- allowCreate: true,
- dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- disabled: false,
- },
- {
- label: "航次",
- prop: "voyageNo",
- overHidden: true,
- },
- {
- label: '起运港',
- prop: "polCnName",
- disabled: false,
- },
- {
- label: '目的港',
- prop: "podCnName",
- disabled: false,
- },
- {
- label: "开船日期",
- prop: "etd",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "预计到港",
- prop: "bookingDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "实际到港",
- prop: "eta",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: "船公司",
- prop: "carrierCnName",
- disabled: false,
- },
- {
- label: "船代",
- prop: "bookingAgentCnName",
- disabled: false,
- },
- {
- label: '装箱方式',
- prop: "loadType",
- type: 'select',
- dicData: [{
- label: '整箱',
- value: 'FCL'
- }, {
- label: '拼箱',
- value: 'LCL'
- }],
- disabled: false,
- },
- // {
- // label: "HSCODE",
- // prop: "hscode",
- // disabled: false,
- // },
- {
- label: "件数",
- prop: "quantity",
- disabled: false,
- },
- {
- label: "包装",
- prop: "packingUnit",
- type: 'select',
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bpackages/list?cnName={{key}}",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- disabled: false,
- },
- {
- label: "尺码",
- prop: "measurement",
- disabled: false,
- },
- {
- label: "毛重",
- prop: "grossWeight",
- disabled: false,
- },
- {
- label: "净重",
- prop: "netWeight",
- disabled: false,
- },
- {
- label: "是否退押",
- prop: "billingStatus",
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- disabled: false,
- },
- {
- label: "放单方式",
- prop: "mconsigneeCntyCode",
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=release_method",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- disabled: false,
- },
- {
- label: "免箱期",
- prop: "iqNo",
- disabled: false,
- },
- {
- label: '报关单号',
- prop: "mnotify2CntyName",
- width: "100",
- overHidden: true
- },
- {
- label: "报关日期",
- prop: "issueDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "放行日期",
- prop: "cyReturnTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "提箱码头",
- prop: "charData",
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=container_terminal",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- disabled: false,
- },
- {
- label: '业务来源',
- prop: "srcType",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '贸易方式',
- prop: "mshipperCntyName",
- 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: "srcCnName",
- // disabled: false,
- // rules: [{
- // required: true,
- // message: " ",
- // trigger: "blur"
- // }]
- // },
- {
- label: '备注',
- prop: "remarks",
- type: 'textarea',
- disabled: false,
- span: 18,
- minRows: 2,
- },
- ]
- },
- carOption: {
- labelWidth: 120,
- menuBtn: false,
- span: 12,
- disabled: false,
- column: [
- {
- label: '查验/倒柜承运车队',
- prop: "inspectionFleetName",
- disabled: false,
- },
- {
- label: '查验/倒柜车号',
- prop: "inspectionLicenseNumber",
- disabled: false,
- },
- {
- label: '查验/倒柜姓名',
- prop: "inspectionFullName",
- disabled: false,
- },
- {
- label: '查验/倒柜联系方式',
- prop: "inspectionContactInformation",
- disabled: false,
- }
- ]
- },
- boxOption: {
- // labelWidth: 120,
- menuBtn: false,
- span: 12,
- disabled: false,
- column: [
- {
- label: "返空时间",
- prop: "returnDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- },
- {
- label: "返空场站",
- prop: "returnCyName",
- },
- ]
- },
- option: {},
- optionBack: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 180,
- 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: "cntrTypeCode",
- width: "100",
- overHidden: true,
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "100",
- 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: "goodsName",
- width: "100",
- overHidden: true
- },
- {
- label: "类型",
- prop: "goodsType",
- width: "80",
- overHidden: true
- },
- {
- label: "件数",
- prop: "number",
- width: "100",
- overHidden: true
- },
- {
- label: "净重",
- prop: "netWeight",
- width: "100",
- overHidden: true
- },
- {
- label: "总金额",
- prop: "amount",
- width: "100",
- overHidden: true
- },
- {
- label: '币别',
- prop: 'curCode',
- type: 'select',
- cell: true,
- filterable: true,
- dicData: [
- { label: 'CNY', value: 'CNY' },
- { label: 'USD', value: 'USD' }
- ],
- overHidden: true,
- },
- {
- label: "查验类型",
- prop: "inspectionType",
- cell: true,
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=inspection_type",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- width: "120",
- overHidden: true
- },
- {
- label: "查验时间",
- prop: "inspectionDate",
- width: "100",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "是否机检",
- prop: "whetherMachineInspection",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- {
- label: "是否取样",
- prop: "whetherSampling",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- {
- label: "是否入库",
- prop: "whetherWarehousing",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- {
- label: "是否返场",
- prop: "whetherReturnSite",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- // {
- // label: "是否还箱",
- // prop: "whetherReturn",
- // cell: true,
- // type: 'select',
- // dicData: [{
- // label: '是',
- // value: 1
- // }, {
- // label: '否',
- // value: 0
- // }],
- // width: "90",
- // overHidden: true
- // },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option2: {},
- optionBack2: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 360,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "承运车队",
- prop: "fleetName",
- width: "120",
- overHidden: true,
- },
- {
- label: "车号",
- prop: "licenseNumber",
- cell: true,
- width: "120",
- overHidden: true
- },
- {
- label: "姓名",
- prop: "fullName",
- cell: true,
- width: "120",
- overHidden: true
- },
- {
- label: "联系方式",
- prop: "contactInformation",
- cell: true,
- width: "120",
- overHidden: true
- },
- {
- label: "是否入库",
- prop: "whetherWarehousing",
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "120",
- overHidden: true
- },
- {
- label: "提箱时间",
- prop: "pickupDate",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- width: "120",
- overHidden: true
- },
- {
- label: "提箱地点",
- prop: "pickupAddressName",
- width: "120",
- overHidden: true
- },
- {
- label: "送货时间",
- prop: "deliveryDate",
- width: "120",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "送货地点",
- prop: "deliveryAddressName",
- width: "120",
- overHidden: true
- },
- {
- label: "是否打冷",
- prop: "whetherChill",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "120",
- overHidden: true
- },
- {
- label: "运费价格",
- prop: "freightPrice",
- cell: true,
- type: 'number',
- controls: false,
- width: "120",
- overHidden: true
- },
- {
- label: "返空时间",
- prop: "returnDate",
- // cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- width: "120",
- overHidden: true
- },
- {
- label: "返空场站",
- prop: "returnCyName",
- width: "120",
- overHidden: true
- },
- {
- label: "查验/倒柜承运车队",
- prop: "inspectionFleetName",
- width: "120",
- overHidden: true
- },
- {
- label: "查验/倒柜车号",
- prop: "inspectionLicenseNumber",
- width: "120",
- overHidden: true
- },
- {
- label: "查验/倒柜姓名",
- prop: "inspectionFullName",
- width: "120",
- overHidden: true
- },
- {
- label: "查验/倒柜联系方式",
- prop: "inspectionContactInformation",
- width: "120",
- overHidden: true
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option3: {},
- optionBack3: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 200,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "仓库",
- prop: "warehouseName",
- width: "120",
- overHidden: true,
- },
- {
- label: "品名",
- prop: "goodsName",
- width: "120",
- overHidden: true
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- overHidden: true
- },
- {
- label: "入库单位",
- prop: "storageUnit",
- width: "120",
- cell: true,
- type: 'select',
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bunits/list",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- overHidden: true
- },
- {
- label: "入库时间",
- prop: "storageDate",
- width: "120",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- width: "120",
- overHidden: true
- },
- {
- label: "净重",
- prop: "grossWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "是否保税",
- prop: "whetherBonded",
- cell: true,
- width: "120",
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- overHidden: true
- },
- {
- label: "是否分拣",
- prop: "whetherSorting",
- width: "120",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- overHidden: true
- },
- {
- label: "平均单价",
- prop: "warehouseUnitPrice",
- cell: true,
- type: 'number',
- controls: false,
- width: "120",
- overHidden: true
- },
- {
- label: "车号",
- prop: "licenseNumber",
- width: "120",
- overHidden: true
- },
- {
- label: "姓名",
- prop: "fullName",
- width: "120",
- overHidden: true
- },
- {
- label: "联系方式",
- prop: "tel",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option4: {},
- optionBack4: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 180,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "品名",
- prop: "goodsName",
- width: "120",
- overHidden: true
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- overHidden: true
- },
- {
- label: "出库时间",
- prop: "outStorageDate",
- width: "120",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "出库件数",
- prop: "outQuantity",
- width: "120",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true
- },
- {
- label: "出库净重",
- prop: "outWeight",
- width: "120",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- width: "120",
- overHidden: true
- },
- {
- label: "毛重",
- prop: "grossWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "存储天数",
- prop: "storageDays",
- width: "120",
- overHidden: true
- },
- {
- label: "仓储费",
- prop: "storageFeesAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "剩余件数",
- prop: "surplusQuantity",
- width: "120",
- overHidden: true
- },
- {
- label: "剩余重量",
- prop: "surplusWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "剩余货值",
- prop: "surplusGoodsAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- showLock: false,
- roleName: [],
- saberUserInfo: ''
- }
- },
- components: {
- dicSelect,
- feeInfo,
- checkSchedule,
- businessReports
- },
- 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(388), this.optionBack);
- this.option2 = await this.getColumnData(this.getColumnName(389), this.optionBack2);
- this.option3 = await this.getColumnData(this.getColumnName(390), this.optionBack3);
- this.option4 = await this.getColumnData(this.getColumnName(391), this.optionBack4);
- 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.billNo) {
- this.showLock = true
- this.getDetaiByMblno(this.$route.query.billNo)
- }
- if (this.detailData.copyId) {
- this.getCopydate(this.detailData.copyId)
- }
- },
- methods: {
- inLock() {
- const data = {
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- no: localStorage.getItem("browserID"),
- billNo: this.form.mblno
- };
- this.inDetailsKey(this.$route.name, {
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- 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/bvessels/index",
- query: { type: 'new' },
- })
- }
- if (name == '包装') {
- this.$router.push({
- path: "/iosBasicData/bpackages/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'
- }
- if (name == '入库单位') {
- this.$router.push({
- path: "/iosBasicData/bunits/index",
- query: { type: 'new' },
- })
- }
- },
- getAllWorkDicts() {
- this.dicTitle = null
- this.parentId = null
- this.dicCode = null
- },
- getDetaiByMblno(billNo) {
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- detailTradeByMblno({ mblno: this.$route.query.billNo }).then(res => {
- this.form = res.data.data
- this.$refs.crud.dicInit();
- this.$refs.crud3.dicInit();
- }).finally(() => {
- loading.close()
- })
- },
- addRow() {
- if (!this.form.corpId) return this.$message.error("请选择客户名称");
- this.form.preContainersList.push({
- whetherMachineInspection: 0,
- whetherSampling: 0,
- whetherWarehousing: 0,
- whetherReturnSite: 0,
- curCode: 'CNY',
- $cellEdit: true
- })
- this.$nextTick(() => {
- this.$refs.crud.doLayout();
- this.$refs.crud.dicInit();
- });
- },
- amountChange(row) {
- if (!row.number) row.number = 1
- row.price = _.round(_.divide(row.amount, row.number ? row.number : 1), 2)
- },
- boxClosed() {
- this.boxForm = {
- // id: null,
- // returnDate: null,
- // returnCyName: null,
- }
- },
- carClosed() {
- this.carForm = {
- // id: null,
- // inspectionFleetId: null,
- // inspectionFleetName: null,
- // inspectionLicenseNumber: null,
- // inspectionFullName: null,
- // inspectionContactInformation: null
- }
- },
- carSubmit(row) {
- this.form.dispatchVehiclesList.forEach(e => {
- if (e.id == row.id) {
- this.$set(e, 'inspectionFleetId', row.inspectionFleetId)
- this.$set(e, 'inspectionFleetName', row.inspectionFleetName)
- this.$set(e, 'inspectionLicenseNumber', row.inspectionLicenseNumber)
- this.$set(e, 'inspectionFullName', row.inspectionFullName)
- this.$set(e, 'inspectionContactInformation', row.inspectionContactInformation)
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmInspection(row).then(res => {
- this.$message.success("查验/倒柜派车成功");
- this.carVisible = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- })
- },
- boxSubmit(row) {
- this.form.dispatchVehiclesList.forEach(e => {
- if (e.id == row.id) {
- this.$set(e, 'returnDate', row.returnDate)
- this.$set(e, 'returnCyName', row.returnCyName)
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmReturnBox(row).then(res => {
- this.$message.success("还箱成功");
- this.boxVisible = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- })
- },
- dicChange(name, row) {
- if (name == 'inspectionFleetName') {
- if (row) {
- this.carForm.inspectionFleetId = row.id
- this.carForm.inspectionFullName = row.mgrName
- this.carForm.inspectionContactInformation = row.tel
- } else {
- this.carForm.inspectionFleetId = null
- this.carForm.inspectionFullName = null
- this.carForm.inspectionContactInformation = null
- }
- }
- if (name == 'corpCnName') {
- if (row) {
- this.form.corpId = row.id
- this.form.corpCnName = row.cnName
- this.form.srcType = row.sourceType
- this.form.srcCnName = row.srcCnName
- this.form.srcId = row.srcId
- } else {
- this.form.corpId = null
- this.form.srcType = null
- this.form.srcCnName = null
- this.form.srcId = null
- }
- }
- if (name == 'polCnName') {
- console.log(row)
- 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.polId = row.id
- this.form.polCode = row.code
- this.form.podCnName = row.cnName
- this.form.polEnName = row.enName
- } else {
- this.form.polId = null
- this.form.polCode = null
- this.form.polEnName = null
- }
- }
- if (name == 'srcType') {
- if (!row) {
- this.form.srcId = null
- this.form.srcCnName = null
- }
- }
- if (name == 'srcCnName') {
- if (row) {
- this.form.srcId = row.id
- } else {
- this.form.srcId = null
- }
- }
- if (name == 'hshipperCnName') {
- if (row) {
- this.form.hshipperId = row.id
- this.form.hshipperCnName = row.cnName
- } else {
- this.form.hshipperId = null
- }
- }
- if (name == 'hconsigneeCnName') {
- if (row) {
- this.form.hconsigneeId = row.id
- this.form.hconsigneeCnName = row.cnName
- } else {
- this.form.hconsigneeId = null
- }
- }
- if (name == 'carrierCnName') {
- if (row) {
- this.form.carrierId = row.id
- } else {
- this.form.carrierId = null
- }
- }
- // if (name == 'hscode') {
- // if (row) {
- // this.form.commodityCnName = row.cnName
- // } else {
- // this.form.commodityCnName = null
- // }
- // }
- if (name == 'bookingAgentCnName') {
- if (row) {
- this.form.bookingAgentId = row.id
- this.form.bookingAgentCnName = row.cnName
- } else {
- this.form.bookingAgentId = null
- }
- }
- if (name == 'mnotifyCntyCode') {
- if (row) {
- this.form.mnotifyCntyCode = row.cnName
- }
- }
- },
- rowDicChange(name, row, el) {
- if (name == 'hsCode') {
- if (row) {
- el.goodsName = row.cnName
- } else {
- el.goodsName = null
- }
- }
- // if (name == 'goodsName') {
- // if (row) {
- // el.hsCode = row.hsCode
- // } else {
- // el.hsCode = null
- // }
- // }
- if (name == 'fleetName') {
- if (row) {
- el.fleetId = row.id
- el.fullName = row.mgrName
- el.contactInformation = row.tel
- } else {
- el.fleetId = null
- el.fullName = null
- el.contactInformation = null
- }
- }
- if (name == 'pickupAddressName') {
- if (row) {
- el.pickupAddressId = row.id
- } else {
- el.pickupAddressId = null
- }
- }
- if (name == 'deliveryAddressName') {
- if (row) {
- el.deliveryAddressId = row.id
- } else {
- el.deliveryAddressId = null
- }
- }
- if (name == 'warehouseName') {
- if (row) {
- el.warehouseId = row.id
- } else {
- el.warehouseId = null
- }
- }
- },
- rowCell(name, row, index) {
- if (name == '箱编辑') {
- if (row.$cellEdit == true) {
- if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
- return this.$message.error((!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
- }
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '箱删除') {
- if (row.id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- precontainersRemove(row.id).then(res => {
- this.$message.success("删除成功");
- this.form.preContainersList.splice(index, 1);
- }).finally(() => {
- loading.close()
- })
- } else {
- this.$message.success("删除成功");
- this.form.preContainersList.splice(index, 1);
- }
- }
- if (name == '派车编辑') {
- if (row.$cellEdit == true) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submitList1(this.form.dispatchVehiclesList).then(res => {
- this.form.dispatchVehiclesList = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close()
- })
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '入库编辑') {
- if (row.$cellEdit == true) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submitList2(this.form.inStorageList).then(res => {
- this.form.inStorageList = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close()
- })
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '出库编辑') {
- if (row.$cellEdit == true) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submitList2(this.form.outStorageList).then(res => {
- this.form.outStorageList = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close()
- })
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '派车') {
- if (!row.id) {
- return this.$message.error('请保存数据');
- }
- if (row.whetherMachineInspection == 1) {
- if (!row.inspectionType || !row.inspectionDate) {
- return this.$message.error((!row.inspectionType ? "查验类型," : '') + (!row.inspectionDate ? "查验时间" : '') + "不能为空");
- }
- }
- let obj = {
- ...row,
- type: 1,
- }
- if (row.whetherDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokePrecontainers(obj).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateDispatchVehicles(obj).then(res => {
- this.$message.success("派车成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '自提') {
- if (!row.id) {
- return this.$message.error('请保存数据');
- }
- let obj = {
- ...row,
- type: 2,
- }
- if (row.whetherDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokePrecontainers(obj).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateDispatchVehicles(obj).then(res => {
- this.$message.success("自提成功");
- this.getDetails(this.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)'
- // });
- // dispatchvehiclesRemove({ ids: row.id }).then(res => {
- // this.$message.success("删除成功");
- // this.form.dispatchVehiclesList.splice(index, 1);
- // }).finally(() => {
- // loading.close()
- // })
- // }
- if (name == '还箱') {
- if (row.whetherReturn == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeReturnBox(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- this.boxForm = row
- this.boxVisible = true
- }
- }
- if (name == '查验/倒柜派车') {
- if (row.whetherInspection == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeInspection(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- this.carForm = row
- this.carVisible = true
- }
- }
- if (name == '入库派车') {
- if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation || !row.deliveryDate || !row.deliveryAddressName) {
- return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式," : '') + (!row.deliveryDate ? "送货时间," : null) + (!row.deliveryAddressName ? "送货地点" : null) + "不能为空");
- }
- if (row.whetherDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeDispatchVehicles(row).then(res => {
- this.$message.success("撤销成功");
- this.optionForm.disabled = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- console.log(row)
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmDispatchVehicles(row).then(res => {
- this.$message.success("派车成功");
- this.optionForm.disabled = true
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '生成入库') {
- if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation || !row.deliveryDate || !row.deliveryAddressName) {
- return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式," : '') + (!row.deliveryDate ? "送货时间," : null) + (!row.deliveryAddressName ? "送货地点" : null) + "不能为空");
- }
- if (row.whetherWarehouseEntry == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeWarehouseEntry(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateWarehouseEntry(row).then(res => {
- this.$message.success("生成入库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '入库确认') {
- if (!this.form.eta || !row.storageDate || !row.warehouseName) {
- return this.$message.error((!this.form.eta ? "基础信息的实际到港," : '') + (!row.storageDate ? "入库时间," : '') + (!row.warehouseName ? "仓库" : '') + "不能为空");
- }
- if (row.confirmDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeInoutstorage(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- calculationWarehouseUnitPrice(row).then(res => {
- this.$confirm(res.data.data, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- dangerouslyUseHTMLString: true,
- }).then(() => {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmWarehouseEntry(row).then(res => {
- this.$message.success("入库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- })
- })
- }
- }
- if (name == '生成出库') {
- if (!row.warehouseName || !row.warehouseUnitPrice) {
- return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateOutbound(row).then(res => {
- this.$message.success("生成出库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- if (name == '撤销出库') {
- if (!row.warehouseName || !row.warehouseUnitPrice) {
- return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeOutbound(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- if (name == '出库确认') {
- if (!row.outStorageDate || !row.outQuantity || !row.outWeight) {
- return this.$message.error((!row.outStorageDate ? "出库时间," : '') + (!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
- }
- if (row.confirmDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeInoutstorage(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmWarehouseEntry(row).then(res => {
- this.$message.success("出库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '开票') {
- this.$message.error("待开发");
- }
- if (name == '出库删除') {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- inoutstorageRemove({ ids: row.id }).then(res => {
- this.$message.success("删除成功");
- this.form.outStorageList.splice(index, 1);
- }).finally(() => {
- loading.close()
- })
- }
- },
- 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()
- this.$refs.crud.dicInit();
- this.$refs.crud3.dicInit();
- }).finally(() => {
- loading.close()
- })
- },
- getCopydate(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- billsCopyBills({ id: id }).then(res => {
- console.log(res.data.data, 33333333333333)
- res.data.data.billNoFormat = 'HYJK'
- res.data.data.businessTypeCode = 'HYJK'
- this.form = res.data.data
- }).finally(() => {
- loading.close()
- })
- },
- inEdit() {
- this.editButton = false
- if (this.form.status == 0 || this.form.status == 4) {
- if (this.form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') == -1) {
- this.optionForm.disabled = false
- }
- this.editDisabled = false
- }
- },
- allClick(name) {
- },
- submit(type) {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- for (let row of this.form.preContainersList) {
- console.log(row)
- if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
- return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
- }
- }
- if (this.$refs.feeInfo.submitValidate()) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submit(this.form).then(res => {
- this.$message.success("保存成功");
- if (type == 'goBack') {
- if (this.form.id) {
- this.unLock({
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- }
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- }
- } else {
- return false;
- }
- });
- },
- application() {
- if (this.form.feeCenterListD.length == 0 && this.form.feeCenterListC.length == 0) return this.$message.error("费用不能为空");
- if (this.$refs.feeInfo.submitValidate()) {
- this.$confirm("确定请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/oceanFreightImport/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.editDisabled = true
- this.optionForm.disabled = true
- 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.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) || contrastList(this.form.filesList, this.oldForm.filesList)) {
- this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.submit('goBack')
- })
- .catch(() => {
- if (this.form.id) {
- this.unLock({
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- });
- } else {
- if (this.form.id) {
- this.unLock({
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- }
- 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>
|