AddOrUpdate.vue 136 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846
  1. <template>
  2. <div>
  3. <div style="display: flex; justify-content: space-between">
  4. <div style="display: flex; align-items: center">
  5. <el-breadcrumb separator="/">
  6. <el-breadcrumb-item><span style="font-weight: 700">通关</span></el-breadcrumb-item>
  7. <el-breadcrumb-item><span style="font-weight: 700">通关详情页</span></el-breadcrumb-item>
  8. </el-breadcrumb>
  9. <el-button style="margin-left: 10px" size="mini" icon="el-icon-arrow-left" @click="goBack">返回列表</el-button>
  10. </div>
  11. <div v-if="showApproval == 0">
  12. <el-button type="info" size="small" @click="addOrUpdateHandle(form, 'warehouse_status')"
  13. v-if="form.warehouseStatus > 3">查看接单审批
  14. </el-button>
  15. <el-button type="info" size="small" @click="addOrUpdateHand(form, 'warehouse_status')"
  16. v-if="form.warehouseStatus > 3 && approVal == true">接单审批
  17. </el-button>
  18. <el-button type="info" :disabled="form.warehouseStatus >= 4" size="small" @click="verifyForm"
  19. v-if="form.fBillstatus">接单请核
  20. </el-button>
  21. <el-button type="info" :disabled="browseStatus" size="small" @click="ordersRevoke"
  22. v-if="form.warehouseStatus == 6">撤销接单请核
  23. </el-button>
  24. <el-button type="info" :disabled="browseStatus" size="small" @click="revokeTwo('warehouse_status')"
  25. v-if="form.warehouseStatus == 4">撤销接单审批
  26. </el-button>
  27. </div>
  28. </div>
  29. <br />
  30. <el-form ref="form" :model="form" :rules="rules" label-width="130px">
  31. <el-row>
  32. <el-col :span="8">
  33. <el-form-item label="客户" prop="fCorpid">
  34. <el-select v-model="form.fCorpid" clearable filterable placeholder="请输入关键词" style="width: 80%"
  35. :disabled="detailList.length > 0">
  36. <!-- @change="changefStltype"-->
  37. <el-option v-for="(item, index) in fMblnoOptions" :key="index.fId" :label="item.fName" :value="item.fId">
  38. </el-option>
  39. </el-select>
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="8">
  43. <el-form-item label="结算方式" prop="fStltypeid" v-if="dataShowcar == '1'">
  44. <el-select v-model="form.fStltypeid" placeholder="请选择结算方式" clearable :disabled="browseStatus"
  45. style="width: 80%">
  46. <el-option v-for="(item, index) in fStltypeOptions" :key="index.dictValue" :label="item.dictLabel"
  47. :value="item.dictValue" />
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item label="作业类型" prop="fBusinessType" v-if="dataShowcar == '0'">
  51. <el-select style="width: 80%" v-model="form.fBusinessType" filterable @change="educationChange" :disabled="
  52. contrOl ||
  53. browseStatus ||
  54. warehouseDrList.length > 0 ||
  55. warehouseCrList.length > 0
  56. ">
  57. <el-option v-for="(item, index) in businessTypeOption" :key="index.dictValue" :label="item.dictLabel"
  58. :value="item.dictValue"></el-option>
  59. </el-select>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="8">
  63. <el-form-item label="提单号" prop="fMblno">
  64. <el-input v-model="form.fMblno" style="width: 80%" placeholder="请输入提单号"
  65. :disabled="detailList.length != 0" />
  66. </el-form-item>
  67. </el-col>
  68. </el-row>
  69. <el-row>
  70. <el-col :span="8">
  71. <el-form-item label="业务日期" prop="fBsdate">
  72. <el-date-picker v-model="form.fBsdate" style="width: 80%" type="date" :disabled="browseStatus"
  73. value-format="timestamp" placeholder="业务日期" @change="changeDate" format="yyyy-MM-dd">
  74. </el-date-picker>
  75. </el-form-item>
  76. </el-col>
  77. <el-col :span="8">
  78. <el-form-item label="业务时间" prop="fBstime">
  79. <el-time-picker style="width: 80%" :disabled="browseStatus" v-model="form.fBstime" :picker-options="{
  80. selectableRange: '00:00:00 - 23:59:59',
  81. }" value-format="timestamp" placeholder="任意时间点">
  82. </el-time-picker>
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="8">
  86. <el-form-item label="仓管员" prop="fStorekeeper">
  87. <el-select v-model="form.fStorekeeper" filterable clearable :disabled="browseStatus" style="width: 80%"
  88. placeholder="请输入模糊查找">
  89. <el-option v-for="(item, index) in userOptions" :key="index.userName" :label="item.nickName"
  90. :value="item.userName"></el-option>
  91. </el-select>
  92. </el-form-item>
  93. </el-col>
  94. </el-row>
  95. <el-row>
  96. <el-col :span="8">
  97. <el-form-item label="原仓库" prop="fInwarehouseid">
  98. <el-select v-model="form.fInwarehouseid" filterable :disabled="browseStatus || detailList.length > 0"
  99. style="width: 80%" placeholder="请选择" @change="fInwarehouseChange">
  100. <el-option v-for="(item, index) in warehouseOptions" :key="index.fId" :label="item.fName"
  101. :value="item.fId"></el-option>
  102. </el-select>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="8">
  106. <el-form-item label="新仓库" prop="fWarehouseid">
  107. <el-select v-model="form.fWarehouseid" filterable :disabled="browseStatus || detailList.length > 0"
  108. style="width: 80%" placeholder="请选择">
  109. <el-option v-for="(item, index) in warehouseOptions" :key="index.fId" :label="item.fName"
  110. :value="item.fId"></el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="8">
  115. <el-form-item label="单据编号" prop="fBillno">
  116. <el-input v-model="form.fBillno" style="width: 80%" disabled placeholder="单据编号" />
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. <el-row>
  121. <el-col :span="8">
  122. <el-form-item label="计划通关件数" prop="fPlanqty">
  123. <el-input v-model="form.fPlanqty" v-input-limit="2" style="width: 80%" maxlength="9" laceholder="计划件数"
  124. :disabled="browseStatus || current !== before" />
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="8">
  128. <el-form-item label="计划通关净重(kg)" prop="fPlannetweight">
  129. <el-input v-model="form.fPlannetweight" style="width: 80%" maxlength="16" v-input-limit="2"
  130. laceholder="计划净重" :disabled="browseStatus || current !== before" @change="tfNetweight">
  131. <template slot="append">{{ tfNetweightnum }}吨</template>
  132. </el-input>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="8">
  136. <el-form-item label="计划通关毛重(kg)" prop="fPlangrossweight">
  137. <el-input v-model="form.fPlangrossweight" v-input-limit="2" style="width: 80%" laceholder="计划毛重"
  138. maxlength="16" :disabled="browseStatus || current !== before" @change="tfGrossweight">
  139. <template slot="append">{{ tfGrossweightnum }}吨</template>
  140. </el-input>
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. <el-row v-if="detailsHidden2">
  145. <el-col :span="8">
  146. <el-form-item label="作业类型" prop="fBusinessType" v-if="dataShowcar == '1'">
  147. <el-select style="width: 80%" v-model="form.fBusinessType" filterable @change="educationChange" :disabled="
  148. contrOl ||
  149. browseStatus ||
  150. warehouseDrList.length > 0 ||
  151. warehouseCrList.length > 0
  152. ">
  153. <el-option v-for="(item, index) in businessTypeOption" :key="index.dictValue" :label="item.dictLabel"
  154. :value="item.dictValue"></el-option>
  155. </el-select>
  156. </el-form-item>
  157. <el-form-item label="结算方式" prop="fStltypeid" v-if="dataShowcar == '0'">
  158. <el-select v-model="form.fStltypeid" placeholder="请选择结算方式" clearable :disabled="browseStatus"
  159. style="width: 80%">
  160. <el-option v-for="(item, index) in fStltypeOptions" :key="index.dictValue" :label="item.dictLabel"
  161. :value="item.dictValue" />
  162. </el-select>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :span="8">
  166. <el-form-item label="劳务公司" prop="fLabour">
  167. <el-select style="width: 80%" v-model="form.fLabour" clearable filterable placeholder="请输入关键词"
  168. :disabled="contrOl || browseStatus">
  169. <el-option v-for="(item, index) in fCompanyOptIons" :key="index.fId" :label="item.fName"
  170. :value="item.fId"></el-option>
  171. </el-select>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="8">
  175. <el-form-item label="车队" prop="fFleet" :rules="{
  176. required: isrequired === 1 ? true : false,
  177. message: '请选择',
  178. trigger: ['blur', 'change'],
  179. }">
  180. <el-select style="width: 80%" v-model="form.fFleet" clearable filterable placeholder="请输入关键词"
  181. :disabled="contrOl || browseStatus">
  182. <el-option v-for="(item, index) in fleetOptions" :key="index.fId" :label="item.fName" :value="item.fId">
  183. </el-option>
  184. </el-select>
  185. </el-form-item>
  186. </el-col>
  187. </el-row>
  188. <el-row v-if="detailsHidden2">
  189. <el-col :span="8">
  190. <el-form-item label="车号" prop="fTruckno" :rules="{
  191. required: isrequired2 === 1 ? true : false,
  192. message: '请选择',
  193. trigger: ['blur', 'change'],
  194. }">
  195. <el-input v-model="form.fTruckno" style="width: 80%" :disabled="browseStatus" placeholder="车号" />
  196. </el-form-item>
  197. </el-col>
  198. <el-col :span="8">
  199. <el-form-item label="司机姓名" prop="fDriverName" :rules="{
  200. required: isrequired2 === 1 ? true : false,
  201. message: '请选择',
  202. trigger: ['blur', 'change'],
  203. }">
  204. <el-input v-model="form.fDriverName" style="width: 80%" :disabled="browseStatus" placeholder="司机姓名" />
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="8">
  208. <el-form-item label="司机电话" prop="fDriverTel" :rules="{
  209. required: isrequired2 === 1 ? true : false,
  210. message: '请选择',
  211. trigger: ['blur', 'change'],
  212. }">
  213. <el-input v-model="form.fDriverTel" style="width: 80%" :disabled="browseStatus" placeholder="司机电话" />
  214. </el-form-item>
  215. </el-col>
  216. </el-row>
  217. <el-row>
  218. <el-col :span="8" v-if="detailsHidden2">
  219. <el-form-item label="司机身份证" prop="fDriverIdCar" :rules="{
  220. required: isrequired2 === 1 ? true : false,
  221. message: '请选择',
  222. trigger: ['blur', 'change'],
  223. }">
  224. <el-input v-model="form.fDriverIdCar" style="width: 80%" :disabled="browseStatus" placeholder="司机身份证" />
  225. </el-form-item>
  226. </el-col>
  227. <el-col :span="8">
  228. <el-form-item label="原贸易方式" prop="fTrademodeid">
  229. <el-select v-model="form.fTrademodeid" placeholder="请选择原贸易方式"
  230. :disabled="browseStatus || detailList.length > 0" clearable style="width: 80%">
  231. <el-option v-for="dict in fTrademodeidOptions" :key="dict.dictValue" :label="dict.dictLabel"
  232. :value="dict.dictValue" />
  233. </el-select>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="8">
  237. <el-form-item label="新贸易方式" prop="fNewTrademodeid">
  238. <el-select v-model="form.fNewTrademodeid" placeholder="请选择新贸易方式"
  239. :disabled="browseStatus || clearanceDisabled" clearable style="width: 80%">
  240. <el-option v-for="dict in fTrademodeidOptions" :key="dict.dictValue" :label="dict.dictLabel"
  241. :value="dict.dictValue" />
  242. </el-select>
  243. </el-form-item>
  244. </el-col>
  245. </el-row>
  246. <el-row>
  247. <el-col :span="8">
  248. <el-form-item label="备注" prop="remark">
  249. <el-input style="width: 80%" v-model="form.remark" type="textarea" :disabled="browseStatus"
  250. placeholder="请输入内容" />
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="8">
  254. <el-form-item>
  255. <div style="display: flex; align-items: center">
  256. <el-table :data="CntrTable" style="width: 80%" :header-cell-style="{ lineHeight: '16px' }">
  257. <el-table-column prop="fCntrid " label="箱型" header-align="center" align="center">
  258. <template slot-scope="scope">
  259. <el-select placeholder="请选择箱型" v-model="scope.row.fCntrid" size="mini">
  260. <el-option v-for="(item, index) in cntrList" :key="index.fId" :label="item.fName"
  261. :value="item.fId">
  262. </el-option>
  263. </el-select>
  264. </template>
  265. </el-table-column>
  266. <el-table-column prop="fCntrcount" label="箱量" header-align="center" align="center">
  267. <template slot-scope="scope">
  268. <el-input placeholder="请输入箱量" v-model="scope.row.fCntrcount" size="mini">
  269. </el-input>
  270. </template>
  271. </el-table-column>
  272. <el-table-column prop="fCntrcount" label="操作" header-align="center" align="center" width="50">
  273. <template slot-scope="scope">
  274. <el-button size="mini" type="text" @click.native.prevent="deleteRow(scope.$index, CntrTable)"
  275. icon="el-icon-delete"></el-button>
  276. </template>
  277. </el-table-column>
  278. </el-table>
  279. <el-tag class="tag-hover" @click="addRow"><i class="el-icon-plus"></i></el-tag>
  280. </div>
  281. </el-form-item>
  282. </el-col>
  283. <el-col :span="8">
  284. <el-form-item>
  285. <el-button @click="
  286. detailsHidden2
  287. ? (detailsHidden2 = false)
  288. : (detailsHidden2 = true)
  289. " v-if="dataShowcar == '0'">{{ detailsHidden2 ? "隐藏" : "更多" }}
  290. </el-button>
  291. <el-button @click="
  292. detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
  293. ">{{ detailsHidden ? "隐藏" : "展开" }}
  294. </el-button>
  295. </el-form-item>
  296. </el-col>
  297. </el-row>
  298. <div v-if="detailsHidden">
  299. <el-row style="margin-top: 30px">
  300. <el-col :span="8">
  301. <el-form-item label="仓库联系人" prop="fContacts">
  302. <el-input v-model="form.fContacts" style="width: 80%" :disabled="browseStatus" placeholder="仓库联系人" />
  303. </el-form-item>
  304. </el-col>
  305. <el-col :span="8">
  306. <el-form-item label="仓库电话" prop="fTel">
  307. <el-input v-model="form.fTel" :disabled="browseStatus" style="width: 80%" placeholder="请输仓库入电话" />
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. <el-row>
  312. <el-col :span="8">
  313. <el-form-item label="制单人" prop="createBy">
  314. <el-input disabled v-model="form.createBy" style="width: 80%" placeholder="制单人" />
  315. </el-form-item>
  316. </el-col>
  317. <el-col :span="8">
  318. <el-form-item label="制单部门" prop="fDeptid">
  319. <el-select v-model="form.fDeptid" filterable disabled style="width: 80%" remote>
  320. <el-option v-for="(item, index) in deptOptions" :key="index.deptId" :label="item.deptName"
  321. :value="item.deptId"></el-option>
  322. </el-select>
  323. </el-form-item>
  324. </el-col>
  325. <el-col :span="8">
  326. <el-form-item disabled label="制单日期" prop="createTime">
  327. <el-date-picker v-model="form.createTime" size="large" type="date" disabled style="width: 80%"
  328. value-format="timestamp" placeholder="制单日期">
  329. </el-date-picker>
  330. </el-form-item>
  331. </el-col>
  332. </el-row>
  333. <el-row>
  334. <el-col :span="8">
  335. <el-form-item label="品名" prop="fProductName">
  336. <el-input v-model="form.fProductName" style="width: 80%" disabled placeholder="品名" />
  337. </el-form-item>
  338. </el-col>
  339. <el-col :span="8">
  340. <el-form-item label="品牌">
  341. <el-input v-model="form.fMarks" style="width: 80%" disabled placeholder="品牌" />
  342. </el-form-item>
  343. </el-col>
  344. </el-row>
  345. </div>
  346. </el-form>
  347. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px" v-dialogDrag :close-on-click-modal="false">
  348. <template slot="title">
  349. <div class="avue-crud__dialog__header">
  350. <span class="el-dialog__title">
  351. <span style="
  352. display: inline-block;
  353. width: 3px;
  354. height: 20px;
  355. margin-right: 5px;
  356. float: left;
  357. margin-top: 2px;
  358. "></span>
  359. </span>
  360. </div>
  361. </template>
  362. <div>配置排序列数据(拖动调整顺序)</div>
  363. <div style="margin-left: 17px">
  364. <el-checkbox v-model="allCheck" label="全选" @change="allChecked"></el-checkbox>
  365. </div>
  366. <div style="padding: 4px; display: flex; justify-content: center">
  367. <draggable v-model="setRowList" group="site" animation="300" @start="onStart" @end="onEnd"
  368. handle=".indraggable">
  369. <transition-group>
  370. <div v-for="item in setRowList" :key="item.surface" class="listStyle">
  371. <div style="width: 500px" class="indraggable">
  372. <div class="progress" :style="{ width: item.width + 'px' }">
  373. <el-checkbox :label="item.name" v-model="item.checked" :true-label="0" :false-label="1">{{ item.name
  374. }}
  375. </el-checkbox>
  376. </div>
  377. </div>
  378. <el-input-number v-model.number="item.width" controls-position="right" :min="1" :max="500" size="mini">
  379. </el-input-number>
  380. </div>
  381. </transition-group>
  382. </draggable>
  383. </div>
  384. <span slot="footer" class="dialog-footer">
  385. <el-button @click="showSetting = false">取 消</el-button>
  386. <el-button @click="delRow" type="danger">重 置</el-button>
  387. <el-button type="primary" @click="save()">确 定</el-button>
  388. </span>
  389. </el-dialog>
  390. <el-collapse v-model="collapselist">
  391. <el-collapse-item name="1">
  392. <template slot="title">
  393. <i class="el-icon-s-home" style="font-size: 16px"></i>
  394. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">通关明细</span>
  395. </template>
  396. <div>
  397. <el-row type="flex" justify="space-between" style="margin-bottom: 10px">
  398. <el-col>
  399. <el-button type="primary" :disabled="browseStatus" size="small" @click="addRelevant">导入库存
  400. </el-button>
  401. <el-button :disabled="browseStatus" type="primary" size="small" @click="saveForm">保 存</el-button>
  402. </el-col>
  403. <el-col style="display: flex; justify-content: flex-end">
  404. <el-button size="small" type="info" :disabled="browseStatus" v-if="entryPrinting == 0" prop="打印"
  405. @click="printZyd">作业单
  406. </el-button>
  407. <el-button size="small" v-if="entryPrinting == 0" :disabled="browseStatus" @click="discharge">叫车进场
  408. </el-button>
  409. <el-button size="small" :disabled="dataListSelection.length <= 0 || browseStatus || deliveryConfirmation"
  410. @click="creditClick">确认通关
  411. </el-button>
  412. <el-button size="small"
  413. :disabled="dataWithdrawList.length <= 0 || browseStatus || form.fBillstatus > 3 || cancelDelivery"
  414. @click.prevent="withdrawClick">撤回通关
  415. </el-button>
  416. <el-dropdown @command="handleCommand" style="margin-left: 10px">
  417. <el-button :disabled="browseStatus" size="small" type="success">
  418. 打印单据<i class="el-icon-arrow-down el-icon--right"></i>
  419. </el-button>
  420. <el-dropdown-menu slot="dropdown">
  421. <el-dropdown-item command="a">收货单</el-dropdown-item>
  422. <el-dropdown-item command="b">入库单</el-dropdown-item>
  423. <el-dropdown-item command="c">移库单</el-dropdown-item>
  424. </el-dropdown-menu>
  425. </el-dropdown>
  426. <div style="margin: 0 10px">
  427. <el-button icon="el-icon-setting" size="mini" circle @click="showSetting = !showSetting"></el-button>
  428. </div>
  429. </el-col>
  430. </el-row>
  431. <el-table :data="detailList" tooltip-effect="dark" stripe :summary-method="getSummaries"
  432. @selection-change="Selectinventory" show-summary>
  433. <el-table-column type="selection" width="55" align="center" fixed />
  434. <el-table-column label="序号" type="index" width="80" fixed />
  435. <el-table-column v-for="(item, index) in getRowList" :key="index" :label="item.name" :width="item.width"
  436. :prop="item.label" align="center" :fixed="item.fixed" sortable show-overflow-tooltip>
  437. <template slot-scope="scope">
  438. <span v-if="item.label == 'fBillstatus'">
  439. <span v-if="scope.row.fBillstatus === 10">计划</span>
  440. <span v-if="scope.row.fBillstatus === 20">待通关</span>
  441. <span v-if="scope.row.fBillstatus === 30">通关中</span>
  442. <span v-if="scope.row.fBillstatus === 40">已通关</span>
  443. </span>
  444. <span v-else-if="item.label == 'fBsdate'">
  445. <el-date-picker v-model="scope.row.fBsdate" style="width: 138px"
  446. :disabled="browseStatus || scope.row.fBillstatus >= 40" type="date" value-format="timestamp"
  447. placeholder="业务日期" format="yyyy-MM-dd">
  448. </el-date-picker>
  449. </span>
  450. <span v-else-if="item.label == 'fGoodsid'">
  451. {{ scope.row.fGoodsid | goodsFormat(goodsOptions) }}
  452. </span>
  453. <span v-else-if="item.label == 'fTransferWarehouselocid'">
  454. <el-input placeholder="请选择" :disabled="
  455. !form.fWarehouseid ||
  456. browseStatus ||
  457. scope.row.fBillstatus >= 40
  458. " v-model="scope.row.fWarehouseInformation" @focus="getTreeselect(scope)">
  459. </el-input>
  460. </span>
  461. <span v-else-if="item.label == 'fBusinessType'">
  462. <el-select v-model="scope.row.fBusinessType" filterable disabled placeholder="请选择商品属性">
  463. <el-option v-for="(item, index) in fStorageTypeOptions" :key="index.dictValue"
  464. :label="item.dictLabel" :value="item.dictValue" />
  465. </el-select>
  466. </span>
  467. <span v-else-if="item.label == 'fQty'">
  468. <el-input @change="qtyChange(scope.row)" v-model="scope.row.fQty"
  469. :disabled="browseStatus || scope.row.fBillstatus == 40" placeholder="出库件数" />
  470. </span>
  471. <span v-else-if="item.label == 'fGrossweight'">
  472. <el-input :disabled="browseStatus || scope.row.fBillstatus == 40" v-model="scope.row.fGrossweight"
  473. @change="changeOutStock(scope.row)" placeholder="出库毛重" />
  474. </span>
  475. <span v-else-if="item.label == 'fNetweight'">
  476. <el-input v-model="scope.row.fNetweight" :disabled="browseStatus || scope.row.fBillstatus == 40"
  477. @change="changeOutStock(scope.row)" placeholder="出库净重" />
  478. </span>
  479. <span v-else-if="item.label == 'fPackagespecs'">
  480. <el-input v-model="scope.row.fPackagespecs" :disabled="browseStatus || scope.row.fBillstatus >= 40"
  481. placeholder="包装规格" />
  482. </span>
  483. <span v-else-if="item.label == 'fCntrtype'">
  484. <el-input v-model="scope.row.fCntrtype" :disabled="browseStatus || scope.row.fBillstatus >= 40"
  485. placeholder="箱型" />
  486. </span>
  487. <span v-else-if="item.label == 'fCntqty'">
  488. <el-input
  489. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  490. v-model="scope.row.fCntqty" placeholder="箱量"
  491. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  492. </span>
  493. <span v-else-if="item.label == 'fGoodsval'">
  494. <el-input v-model="scope.row.fGoodsval" placeholder="货值"
  495. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  496. </span>
  497. <span v-else-if="item.label == 'fTruckno'">
  498. <el-input v-model="scope.row.fTruckno" placeholder="车号"
  499. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  500. </span>
  501. <span v-else-if="item.label == 'fDriverName'">
  502. <el-input v-model="scope.row.fDriverName" placeholder="司机名"
  503. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  504. </span>
  505. <span v-else-if="item.label == 'fDriverTel'">
  506. <el-input v-model="scope.row.fDriverTel" placeholder="司机电话"
  507. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  508. </span>
  509. <span v-else-if="item.label == 'fDriverIdCar'">
  510. <el-input v-model="scope.row.fDriverIdCar" placeholder="司机身份证"
  511. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  512. </span>
  513. <span v-else-if="item.label == 'fIsPass'">
  514. <el-select v-model="scope.row.fIsPass" placeholder="是否放行"
  515. :disabled="browseStatus || scope.row.fBillstatus == 40" style="width: 80%">
  516. <el-option v-for="(item, index) in releaseList" :key="index.dictValue" :label="item.dictLabel"
  517. :value="item.dictValue" />
  518. </el-select>
  519. </span>
  520. <span v-else-if="item.label == 'fFleet'">
  521. <el-select v-model="scope.row.fFleet" placeholder="车队"
  522. :disabled="browseStatus || scope.row.fBillstatus >= 40" style="width: 80%">
  523. <el-option v-for="(item, index) in fleetOptions" :key="index.fId" :label="item.fName"
  524. :value="item.fId"></el-option>
  525. </el-select>
  526. </span>
  527. <span v-else-if="item.label == 'fLntype'">
  528. <el-select v-model="scope.row.fLntype" placeholder="装卸方式"
  529. :disabled="browseStatus || scope.row.fBillstatus >= 40" style="width: 80%">
  530. <el-option v-for="(item, index) in unloadModes" :key="index.dictValue" :label="item.dictLabel"
  531. :value="item.dictValue" />
  532. </el-select>
  533. </span>
  534. <span v-else-if="item.label == 'fForkliftman'">
  535. <el-input v-model="scope.row.fForkliftman" placeholder="叉车工"
  536. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  537. </span>
  538. <span v-else-if="item.label == 'fStevedore'">
  539. <el-input v-model="scope.row.fStevedore" placeholder="装卸工"
  540. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  541. </span>
  542. <span v-else-if="item.label == 'fLocalcntrno'">
  543. <el-input v-model="scope.row.fLocalcntrno" placeholder="库内箱号"
  544. :disabled="browseStatus || scope.row.fBillstatus >= 40" v-Alphabet />
  545. </span>
  546. <span v-else-if="item.label == 'fSealno'">
  547. <el-input v-model="scope.row.fSealno" placeholder="封号"
  548. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  549. </span>
  550. <span v-else-if="item.label == 'remark'">
  551. <el-input v-model="scope.row.remark" placeholder="备注" :disabled="browseStatus" show-word-limit />
  552. </span>
  553. <span v-else>{{ scope.row[item.label] }}</span>
  554. </template>
  555. </el-table-column>
  556. <el-table-column header-align="center" align="center" label="操作" width="130px" fixed="right">
  557. <template slot-scope="scope">
  558. <el-button :disabled="
  559. browseStatus ||
  560. scope.row.fBillstatus === 20 ||
  561. scope.row.fBillstatus === 30 ||
  562. scope.row.fBillstatus === 40
  563. " type="text" @click.native.prevent="wDeleteRow(scope.$index, detailList)" size="small">移除
  564. </el-button>
  565. </template>
  566. </el-table-column>
  567. </el-table>
  568. </div>
  569. </el-collapse-item>
  570. <el-collapse-item>
  571. <template slot="title">
  572. <i class="el-icon-s-order" style="font-size: 16px"></i>
  573. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">附件明细</span>
  574. </template>
  575. <up-load :relevantAttachments="relevantAttachments" :createBy="form.createBy" :browseStatus="browseStatus">
  576. </up-load>
  577. </el-collapse-item>
  578. <el-collapse-item>
  579. <template slot="title">
  580. <i class="el-icon-circle-plus" style="font-size: 16px"></i>
  581. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">收款信息</span>
  582. </template>
  583. <income-money :browseStatus="browseStatus" @chiSave="saveForm" @chiAdd="addCollection" @feeChangeD="feeChange"
  584. :warehouseDrList="warehouseDrList" :businessTypeOption="businessTypeOption" :fDNameOptions="fDNameOptions"
  585. :fMblnoOptions="fMblnoOptions" :fFeetUnitOptions="fFeetUnitOptions" :fStltypeOptions="fStltypeOptions"
  586. :fGrossweight="fGrossweight" :fQty="fQty" :fNetweight="fNetweight" :fCntqty="fCntqty" :form="form"
  587. :company="company" :CntrTable="CntrTable" :cntrList="cntrList" :goodsOptions="goodsOptions"
  588. :fCompanyName="fCompanyName" :printFeeConfirm="printFeeConfirm" tableName="货物通关收款"></income-money>
  589. </el-collapse-item>
  590. <el-collapse-item>
  591. <template slot="title">
  592. <i class="el-icon-remove" style="font-size: 16px"></i>
  593. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">付款信息</span>
  594. </template>
  595. <pay-money :browseStatus="browseStatus" @chiSave="saveForm" @chiAdd="addpayment" @checkRow="checkRow"
  596. @revokeRow="revokeRow" @feeChangeC="feeChange" :warehouseCrList="warehouseCrList"
  597. :businessTypeOption="businessTypeOption" :fCNameOptions="fCNameOptions" :fMblnoOptions="fMblnoOptions"
  598. :fFeetUnitOptions="fFeetUnitOptions" :fStltypeOptions="fStltypeOptions" :fGrossweight="fGrossweight"
  599. :fQty="fQty" :fNetweight="fNetweight" :fCntqty="fCntqty" :form="form" :goodsOptions="goodsOptions"
  600. :CntrTable="CntrTable" :cntrList="cntrList" tableName="货物通关付款"></pay-money>
  601. </el-collapse-item>
  602. </el-collapse>
  603. <el-dialog title="在库物资" :modal="false" style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  604. :visible.sync="whgenlegVisible" width="85%" @close="init2()" v-dialogDrag :close-on-click-modal="false">
  605. <el-dialog title="自定义列显示" :visible.sync="showSetting2" width="700px" v-dialogDrag append-to-body
  606. :close-on-click-modal="false">
  607. <template slot="title">
  608. <div class="avue-crud__dialog__header">
  609. <span class="el-dialog__title">
  610. <span style="
  611. display: inline-block;
  612. width: 3px;
  613. height: 20px;
  614. margin-right: 5px;
  615. float: left;
  616. margin-top: 2px;
  617. "></span>
  618. </span>
  619. </div>
  620. </template>
  621. <div>配置排序列数据(拖动调整顺序)</div>
  622. <div style="margin-left: 17px">
  623. <el-checkbox v-model="allCheck2" label="全选" @change="allChecked2"></el-checkbox>
  624. </div>
  625. <div style="padding: 4px; display: flex; justify-content: center">
  626. <draggable v-model="setRowList2" group="site" animation="300" @start="onStart" @end="onEnd"
  627. handle=".indraggable">
  628. <transition-group>
  629. <div v-for="item in setRowList2" :key="item.surface" class="listStyle">
  630. <div style="width: 500px" class="indraggable">
  631. <div class="progress" :style="{ width: item.width + 'px' }">
  632. <el-checkbox :label="item.name" v-model="item.checked" :true-label="0" :false-label="1">{{ item.name
  633. }}
  634. </el-checkbox>
  635. </div>
  636. </div>
  637. <el-input-number v-model.number="item.width" controls-position="right" :min="1" :max="500" size="mini">
  638. </el-input-number>
  639. </div>
  640. </transition-group>
  641. </draggable>
  642. </div>
  643. <span slot="footer" class="dialog-footer">
  644. <el-button @click="showSetting2 = false">取 消</el-button>
  645. <el-button @click="delRow2" type="danger">重 置</el-button>
  646. <el-button type="primary" @click="save2()">确 定</el-button>
  647. </span>
  648. </el-dialog>
  649. <el-form ref="whgenlegParams" :model="whgenlegParams">
  650. <el-row>
  651. <el-col :span="5">
  652. <el-form-item label="提单号" prop="fMblno" label-width="70px">
  653. <el-input v-model="whgenlegParams.fMblno" placeholder="请输入提单号" clearable />
  654. </el-form-item>
  655. </el-col>
  656. <el-col :span="5">
  657. <el-form-item label="箱号" prop="fCntrno" label-width="70px">
  658. <el-input v-model="whgenlegParams.fCntrno" placeholder="请输入箱号" clearable />
  659. </el-form-item>
  660. </el-col>
  661. <el-col :span="10">
  662. <el-form-item label="入库日期区间" prop="orgStorageDate" label-width="120px">
  663. <el-date-picker style="width: 80%" v-model="whgenlegParams.orgStorageDate" type="daterange"
  664. start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss"
  665. :default-time="['00:00:00', '23:59:59']">
  666. </el-date-picker>
  667. </el-form-item>
  668. </el-col>
  669. <el-col :span="2">
  670. <el-button type="cyan" icon="el-icon-search" @click="getDetailsList()">搜索</el-button>
  671. </el-col>
  672. <el-col :span="2" style="display: flex; justify-content: flex-end">
  673. <el-button icon="el-icon-setting" circle @click="showSetting2 = !showSetting2"></el-button>
  674. </el-col>
  675. </el-row>
  676. </el-form>
  677. <el-table :data="whgenlegList" ref="tableDialog" tooltip-effect="dark" width="100%" stripe
  678. @selection-change="whgenlegSelectionChange" :height="tableHeight">
  679. <el-table-column type="selection" width="50"> </el-table-column>
  680. <el-table-column v-for="(item, index) in getRowList2" :key="index" :label="item.name" :width="item.width"
  681. :prop="item.label" align="center" :fixed="item.fixed" sortable>
  682. <template slot-scope="scope">
  683. <span v-if="item.label == 'fQtyblc2'">
  684. <el-input @change="qtyChange(scope.row)" v-model="scope.row.fQtyblc2" placeholder="件数" />
  685. </span>
  686. <span v-else-if="item.label == 'fGrossweightblc2'">
  687. <el-input v-model="scope.row.fGrossweightblc2" @change="changeOutStock(scope.row)" placeholder="毛重" />
  688. </span>
  689. <span v-else-if="item.label == 'fNetweightblc2'">
  690. <el-input v-model="scope.row.fNetweightblc2" @change="changeOutStock(scope.row)" placeholder="净重" />
  691. </span>
  692. <span v-else>{{ scope.row[item.label] }}</span>
  693. </template>
  694. </el-table-column>
  695. </el-table>
  696. <pagination v-show="whgenlegTotal > 0" :total="whgenlegTotal" :page.sync="whgenlegParams.pageNum"
  697. :limit.sync="whgenlegParams.pageSize" @pagination="getDetailsList" />
  698. <div slot="footer" class="dialog-footer">
  699. <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
  700. <el-button @click="whgenlegVisible = false">取 消</el-button>
  701. </div>
  702. </el-dialog>
  703. <el-dialog :visible.sync="print_zyd" width="70%" :close-on-click-modal="false" :modal="false">
  704. <div id="print_area1" class="print-div">
  705. <div class="print-title" style="
  706. display: flex;
  707. justify-content: center;
  708. font-size: 24px;
  709. margin-bottom: 5px;
  710. ">
  711. {{ company }}作业单
  712. </div>
  713. <div style="
  714. display: flex;
  715. justify-content: center;
  716. font-size: 18px;
  717. margin-bottom: 5px;
  718. "></div>
  719. <div class="print_table" style="display: flex">
  720. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  721. <tr>
  722. <td>作业类型</td>
  723. <td colspan="2">
  724. {{ form.fBusinessType | fBusinessTypeFormat }}
  725. </td>
  726. <td>入库时间</td>
  727. <td colspan="2"></td>
  728. </tr>
  729. <tr>
  730. <td>车号</td>
  731. <td>物品名称</td>
  732. <td>提单号</td>
  733. <td>品牌/规格/产地</td>
  734. <td>净重(KG)</td>
  735. <td>件数/规格</td>
  736. </tr>
  737. <tr v-for="(item, index) in Printinglist" :key="index">
  738. <td>{{ item.fTruckno }}</td>
  739. <td>{{ item.fGoodsids }}</td>
  740. <td>{{ item.fMblno }}</td>
  741. <td>
  742. {{ item.fBusinessType | fStorageFormat }}/{{ item.fMarks }}
  743. </td>
  744. <td>{{ item.fNetweight }}</td>
  745. <td>{{ item.fQty }}/{{ item.fPackagespecs }}</td>
  746. </tr>
  747. <tr>
  748. <td>备注</td>
  749. <td colspan="5"></td>
  750. </tr>
  751. <tr v-for="(item, index) in Collectionoptionss" :key="index">
  752. <td>收费</td>
  753. <td colspan="2">{{ item.fFeeids }}</td>
  754. <td colspan="3">{{ item.fAmount }} 元</td>
  755. </tr>
  756. <tr>
  757. <td>司机签字</td>
  758. <td></td>
  759. <td>电话</td>
  760. <td>{{ fDriverTel }}</td>
  761. <td colspan="2" rowspan="2">
  762. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  763. </td>
  764. </tr>
  765. <tr>
  766. <td>制表</td>
  767. <td>{{ form.createBy }}</td>
  768. <td>机械/人工</td>
  769. <td></td>
  770. </tr>
  771. <tr>
  772. <td>地址</td>
  773. <td colspan="2">{{ stockaddr }}</td>
  774. <td>电话</td>
  775. <td colspan="2">{{ form.fTel }}</td>
  776. </tr>
  777. </table>
  778. </div>
  779. </div>
  780. <span lot="footer" class="dialog-footer">
  781. <el-button type="primary" size="mini" :disabled="browseStatus" @click="
  782. print_zyd = false;
  783. addprint('zyd');
  784. ">打印
  785. </el-button>
  786. <el-button @click="print_zyd = false" size="mini">取消 </el-button>
  787. </span>
  788. </el-dialog>
  789. <el-dialog :visible.sync="print_rkd" width="70%" :close-on-click-modal="false" :modal="false">
  790. <div id="print_area1" class="print-div">
  791. <div class="print-title" style="
  792. display: flex;
  793. justify-content: center;
  794. font-size: 24px;
  795. margin-bottom: 5px;
  796. ">
  797. {{ company }}进仓单
  798. </div>
  799. <div class="print_table" style="display: flex">
  800. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  801. <tr>
  802. <td>客户</td>
  803. <td>{{ form.fCorpidName }}</td>
  804. <td>仓库</td>
  805. <td>{{ form.fWarehouseids }}</td>
  806. <td>地址</td>
  807. <td colspan="2">{{ stockaddr }}</td>
  808. </tr>
  809. <tr>
  810. <td>保管方</td>
  811. <td width="200">{{ company }}</td>
  812. <td>联系人</td>
  813. <td>{{ form.fContacts }}</td>
  814. <td>电话</td>
  815. <td colspan="2">{{ form.fTel }}</td>
  816. </tr>
  817. <tr>
  818. <td>提单号</td>
  819. <td>品名</td>
  820. <td>箱型</td>
  821. <td>品牌</td>
  822. <td>件数</td>
  823. <td>重量</td>
  824. <td>包装规格</td>
  825. </tr>
  826. <tr>
  827. <td></td>
  828. <td></td>
  829. <td></td>
  830. <td></td>
  831. <td></td>
  832. <td></td>
  833. <td></td>
  834. </tr>
  835. <tr>
  836. <td>序号</td>
  837. <td>入货日期</td>
  838. <td>箱量(20GP)</td>
  839. <td>重量</td>
  840. <td>件数</td>
  841. <td>入库重量</td>
  842. <td>入库件数</td>
  843. </tr>
  844. <tr v-for="(item, index) in Printinglist" :key="index">
  845. <td>{{ index + 1 }}</td>
  846. <td>{{ item.fBsdate }}</td>
  847. <td>{{ item.fCntqty }}</td>
  848. <td v-if="item.fGrossweight">
  849. {{ (item.fGrossweight / 1000).toFixed(2) }}
  850. </td>
  851. <td v-else></td>
  852. <td>{{ item.fPlanqty }}</td>
  853. <td v-if="item.fNetweight">
  854. {{ (item.fNetweight / 1000).toFixed(2) }}
  855. </td>
  856. <td v-else></td>
  857. <td>{{ item.fQty }}</td>
  858. </tr>
  859. <tr>
  860. <td colspan="2">合计</td>
  861. <td>{{ allfCntqty }}</td>
  862. <td>{{ (allfGrossweight / 1000).toFixed(2) }}</td>
  863. <td>{{ allfPlanqty }}</td>
  864. <td>{{ (allfNetweight / 1000).toFixed(2) }}</td>
  865. <td>{{ allfQty }}</td>
  866. </tr>
  867. <tr>
  868. <td>备注</td>
  869. <td colspan="6"></td>
  870. </tr>
  871. <tr>
  872. <td colspan="7">
  873. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  874. </td>
  875. </tr>
  876. </table>
  877. </div>
  878. <div style="display: flex; justify-content: space-between; font-size: 12px">
  879. <div>开单员:</div>
  880. <div style="width: 150px">仓管员:</div>
  881. </div>
  882. <div style="display: flex; justify-content: space-between; font-size: 12px">
  883. <div>开单时间:</div>
  884. <div style="width: 150px">(盖章)</div>
  885. </div>
  886. </div>
  887. <span slot="footer" class="dialog-footer">
  888. <el-button type="primary" :disabled="browseStatus" @click="
  889. print_rkd = false;
  890. addprint();
  891. ">打印
  892. </el-button>
  893. <el-button @click="print_rkd = false">取消 </el-button>
  894. </span>
  895. </el-dialog>
  896. <el-dialog :visible.sync="print_shd" width="70%" :close-on-click-modal="false" :modal="false">
  897. <div id="print_area1" class="print-div">
  898. <div class="print-title" style="
  899. display: flex;
  900. justify-content: center;
  901. font-size: 24px;
  902. margin-bottom: 5px;
  903. ">
  904. {{ company }}收货单
  905. </div>
  906. <div class="print_table" style="display: flex">
  907. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  908. <tr>
  909. <td>车号</td>
  910. <td>{{ fTruckno }}</td>
  911. <td>日期</td>
  912. <td>{{ fBsdate }}</td>
  913. </tr>
  914. <tr v-for="(item, index) in Printinglist" :key="index">
  915. <td>货物品名</td>
  916. <td>{{ item.fGoodsids }}</td>
  917. <td>件数</td>
  918. <td>{{ item.fQty }}件</td>
  919. </tr>
  920. <tr>
  921. <td>备注</td>
  922. <td colspan="3"></td>
  923. </tr>
  924. <tr>
  925. <td>司机签字</td>
  926. <td></td>
  927. <td>司机电话</td>
  928. <td>{{ fDriverTel }}</td>
  929. </tr>
  930. <tr>
  931. <td>制单人</td>
  932. <td>{{ form.createBy }}</td>
  933. <td>收货人</td>
  934. <td>{{ form.fContacts }}</td>
  935. </tr>
  936. <tr>
  937. <td>地址</td>
  938. <td>{{ stockaddr }}</td>
  939. <td>电话</td>
  940. <td>{{ form.fTel }}</td>
  941. </tr>
  942. </table>
  943. </div>
  944. </div>
  945. <span slot="footer" class="dialog-footer">
  946. <el-button type="primary" :disabled="browseStatus" @click="
  947. addprint();
  948. print_shd = false;
  949. ">打印
  950. </el-button>
  951. <el-button @click="print_shd = false">取消 </el-button>
  952. </span>
  953. </el-dialog>
  954. <el-dialog :visible.sync="print_ykd" width="70%" :close-on-click-modal="false" :modal="false">
  955. <div id="print_area1" class="print-div">
  956. <div class="print-title" style="
  957. display: flex;
  958. justify-content: center;
  959. font-size: 24px;
  960. margin-bottom: 5px;
  961. ">
  962. {{ company }}
  963. </div>
  964. <div style="
  965. display: flex;
  966. justify-content: center;
  967. font-size: 18px;
  968. margin-bottom: 5px;
  969. ">
  970. <div>移&nbsp;库&nbsp;单</div>
  971. </div>
  972. <div style="
  973. display: flex;
  974. justify-content: space-between;
  975. margin-bottom: 5px;
  976. " class="print_form">
  977. <div>
  978. <div>业务编号:{{ form.fCustomno }}</div>
  979. <div>通关日期:{{ form.fChargedate }}</div>
  980. </div>
  981. <div>
  982. <div>客户名称:{{ form.fCorpidName }}</div>
  983. <div>提单号:{{ form.fMblno }}</div>
  984. </div>
  985. <div>
  986. <div>存放地址:{{ stockName }}</div>
  987. <div>通关:</div>
  988. </div>
  989. </div>
  990. <div class="print_table" style="display: flex">
  991. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  992. <tr>
  993. <td>箱号</td>
  994. <td>现存库区</td>
  995. <td>件数</td>
  996. <td>毛重</td>
  997. <td>净重</td>
  998. <td>移入库区</td>
  999. </tr>
  1000. <tr v-for="(item, index) in Printinglist" :key="index">
  1001. <td>{{ item.fCntrno }}</td>
  1002. <td>{{ item.fOrgwarehouseInformation }}</td>
  1003. <td>{{ item.fQty }}</td>
  1004. <td>{{ item.fGrossweight }}</td>
  1005. <td>{{ item.fNetweight }}</td>
  1006. <td>{{ item.fWarehouseInformation }}</td>
  1007. </tr>
  1008. </table>
  1009. </div>
  1010. <div style="display: flex; justify-content: space-between; font-size: 12px">
  1011. <div>库管:{{ form.fContacts }}</div>
  1012. <div style="width: 100px">叉车:</div>
  1013. </div>
  1014. </div>
  1015. <span slot="footer" class="dialog-footer">
  1016. <el-button type="primary" :disabled="browseStatus" @click="
  1017. addprint();
  1018. print_ykd = false;
  1019. ">打印
  1020. </el-button>
  1021. <el-button @click="print_ykd = false">取消 </el-button>
  1022. </span>
  1023. </el-dialog>
  1024. <!-- 选择作业费协议数据 -->
  1025. <el-dialog v-dialogDrag title="作业费协议" :close-on-click-modal="false" :modal="false"
  1026. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important" :visible.sync="warehousingagreements" width="70%">
  1027. <template slot="作业费协议">
  1028. <div class="avue-crud__dialog__header">
  1029. <span class="el-dialog__title">
  1030. <span style="
  1031. display: inline-block;
  1032. width: 3px;
  1033. height: 20px;
  1034. margin-right: 5px;
  1035. float: left;
  1036. margin-top: 2px;
  1037. "></span>
  1038. </span>
  1039. </div>
  1040. </template>
  1041. <el-menu :default-active="activeIndex" v-if="Navigation === true" class="el-menu-demo" mode="horizontal"
  1042. @select="handleSelect">
  1043. <el-menu-item index="1">车队作业费</el-menu-item>
  1044. <el-menu-item index="2">劳务作业费</el-menu-item>
  1045. </el-menu>
  1046. <el-table :data="tasklegList" ref="table" tooltip-effect="dark" width="100%" border stripe
  1047. @selection-change="whgenlegSelectionChange">
  1048. <el-table-column type="selection" width="55"> </el-table-column>
  1049. <el-table-column label="行号" type="index" width="80">
  1050. </el-table-column>
  1051. <el-table-column prop="fCorpname" header-align="center" align="center" label="客户名称" />
  1052. <el-table-column prop="fName" header-align="center" align="center" label="费用名称" />
  1053. <el-table-column prop="fFeeUnitid" header-align="center" align="center" width="180px" label="计价单位">
  1054. <template slot-scope="scope">
  1055. <el-select v-model="scope.row.fFeeUnitid" placeholder="请选择计价单位" @change="changeFeeUnit(scope.row)" disabled
  1056. clearable>
  1057. <el-option v-for="(dict, index) in fFeetUnitOptions" :key="index.dictValue" :label="dict.dictLabel"
  1058. :value="dict.dictValue" />
  1059. </el-select>
  1060. </template>
  1061. </el-table-column>
  1062. <el-table-column prop="fPrice" header-align="center" align="center" label="单价" />
  1063. </el-table>
  1064. <pagination v-show="whgenlegTotal > 0" :total="whgenlegTotal" :page.sync="pageNum" :limit.sync="pageSize"
  1065. @pagination="getWhgenlegList(key_id)" />
  1066. <div slot="footer" class="dialog-footer">
  1067. <el-button type="primary" @click="zhgenlegData" :disabled="browseStatus">导 入</el-button>
  1068. <el-button @click="
  1069. warehousingagreements = false;
  1070. Navigation = false;
  1071. ">取 消</el-button>
  1072. </div>
  1073. </el-dialog>
  1074. <el-dialog title="选择库位" :data="treeselectList" :visible.sync="choiceWarehouse" width="30%"
  1075. :before-close="hanDleclose">
  1076. <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions"
  1077. :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
  1078. <span slot="footer" class="dialog-footer">
  1079. <el-button @click="choiceWarehouse = false">取 消</el-button>
  1080. <el-button type="primary" @click="confirm">确 定</el-button>
  1081. </span>
  1082. </el-dialog>
  1083. <div style="display: flex; justify-content: flex-end; margin-top: 10px">
  1084. <!-- 弹窗, 新增 / 修改 -->
  1085. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1086. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData">
  1087. </approval-comments>
  1088. <el-button type="primary" :disabled="approvalStatus" v-if="form.fBillstatus > 3"
  1089. @click="addOrUpdateHandle(form, 'f_billstatus')">查看审批</el-button>
  1090. <el-button type="primary" v-if="approVal === true" @click="addOrUpdateHand(form, 'f_billstatus')">审批</el-button>
  1091. <el-button :disabled="browseStatus" type="primary" @click="saveForm()">保 存</el-button>
  1092. <el-button :disabled="browseStatus" style="background-color: #008000; color: #fff" @click="submitForm()">请核
  1093. </el-button>
  1094. <el-button type="danger" v-if="form.fBillstatus === 6" @click="revoke" v-hasPermi="['warehouseBusiness:revoke']">
  1095. 撤销请核</el-button>
  1096. <el-button type="danger" v-if="form.fBillstatus === 4 && current == before" :disabled="doNot"
  1097. @click="revokeTwo('f_billstatus')">撤销审批</el-button>
  1098. <el-button @click="cancel">取 消</el-button>
  1099. </div>
  1100. </div>
  1101. </template>
  1102. <script>
  1103. import print from "print-js";
  1104. import {
  1105. backFee,
  1106. RevocationApproval,
  1107. addWhgenleg,
  1108. getStockTransferList,
  1109. getStockTransfer,
  1110. delStockTransfer,
  1111. updateCredit,
  1112. addJoblist,
  1113. disChargelist,
  1114. addStockTransfer,
  1115. warehouseSubmission,
  1116. updateStockTransfer,
  1117. exportStockTransfer,
  1118. delstockTransfer_s,
  1119. serialNumber,
  1120. revoke,
  1121. submitWarehousingApproval,
  1122. ordersRevoke,
  1123. checkCode,
  1124. feesCheck,
  1125. revokefeeCheck
  1126. } from "@/api/warehouseBusiness/stockTransfer";
  1127. import { operationAgreement } from "@/api/agreement/agreement";
  1128. import { listCorps, getCorps } from "@/api/basicdata/corps";
  1129. import { listFees, getFees } from "@/api/basicdata/fees";
  1130. import {
  1131. listWarehouse,
  1132. treeselect,
  1133. listWarehousesss,
  1134. } from "@/api/basicdata/warehouse";
  1135. import { listGoods } from "@/api/basicdata/goods";
  1136. import { listCntrs } from "@/api/basicdata/cntr";
  1137. import { listUser, queryUserVal } from "@/api/system/user";
  1138. import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  1139. import ApprovalComments from "@/views/startApproval";
  1140. import AddOrUpdate from "@/views/viewApproval";
  1141. import Treeselect from "@riophae/vue-treeselect";
  1142. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  1143. import UploadFile from "@/components/Uploadfile";
  1144. import Cookies from "js-cookie";
  1145. import { addSet, select, resetModule } from "@/api/system/set";
  1146. import draggable from "vuedraggable";
  1147. import upLoad from "../components/upLoad";
  1148. import incomeMoney from '../components/incomeMoney'
  1149. import payMoney from '../components/payMoney'
  1150. import { customerWarehouse } from '@/api/basicdata/corps'
  1151. export default {
  1152. name: "inStock",
  1153. props: {
  1154. chiId: {
  1155. type: Number,
  1156. required: null,
  1157. },
  1158. copyStatus: {
  1159. type: Number,
  1160. required: null,
  1161. },
  1162. },
  1163. components: {
  1164. UploadFile,
  1165. Treeselect,
  1166. AddOrUpdate,
  1167. ApprovalComments,
  1168. draggable,
  1169. upLoad,
  1170. incomeMoney,
  1171. payMoney,
  1172. },
  1173. data() {
  1174. return {
  1175. pageNum: 1,
  1176. pageSize: 10,
  1177. dialogWhgenlegList: [],
  1178. tasklegList: [],
  1179. Navigation: false,
  1180. key_id: "",
  1181. warehousingagreements: false,
  1182. mblnoStatus: "",
  1183. selectloading: false,
  1184. fMblnoOptions: [],
  1185. warehouseDrList: [],
  1186. relevantAttachments: [],
  1187. warehouseCrList: [],
  1188. fStltypeOptions: [],
  1189. form: {},
  1190. rules: {
  1191. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  1192. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  1193. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1194. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  1195. fMarks: [{ required: true, message: " ", trigger: "blur" }],
  1196. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  1197. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  1198. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  1199. fBusinessType: [{ required: true, message: " ", trigger: "blur" }],
  1200. fStorekeeper: { required: true, message: " ", trigger: "blur" },
  1201. fInwarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  1202. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  1203. fbillingway: [{ required: true, message: " ", trigger: "blur" }],
  1204. fTocorpid: [{ required: true, message: " ", trigger: "blur" }],
  1205. fFeetUnit: [{ required: true, message: " ", trigger: "blur" }],
  1206. fNewTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  1207. },
  1208. browseStatus: false,
  1209. goodsOptions: [],
  1210. warehouseOptions: [],
  1211. userOptions: [],
  1212. businessTypeOption: [],
  1213. fCompanyOptIons: [],
  1214. fleetOptions: [],
  1215. fFeetUnitOptions: [],
  1216. current: "",
  1217. before: "",
  1218. contrOl: false,
  1219. isrequired: 2,
  1220. isrequired2: 2,
  1221. detailsHidden: false,
  1222. CntrTable: [],
  1223. cntrList: [],
  1224. fTrademodeidOptions: [],
  1225. fIfweighOptions: [],
  1226. fSbuOptions: [],
  1227. collapselist: ["1"],
  1228. fStorageTypeOptions: [],
  1229. weightList: false,
  1230. sumMum: 0,
  1231. detailList: [],
  1232. fWarehouseidOptions: [],
  1233. print_zyd: false,
  1234. print_shd: false,
  1235. print_rkd: false,
  1236. print_ykd: false,
  1237. company: "",
  1238. Printinglist: [],
  1239. //库位
  1240. stockName: "",
  1241. //库位地址
  1242. stockaddr: "",
  1243. Collectionoptionss: [],
  1244. fDriverTel: "",
  1245. fBsdate: "",
  1246. fTruckno: "",
  1247. allfCntqty: 0,
  1248. allfGrossweight: 0,
  1249. allfPlanqty: 0,
  1250. allfNetweight: 0,
  1251. allfQty: 0,
  1252. fixdetaiNum: null,
  1253. dataListSelection: [],
  1254. dataWithdrawList: [],
  1255. title: "",
  1256. fCNameOptions: [],
  1257. fDNameOptions: [],
  1258. whgenlegTotal: 0,
  1259. fGrossweight: 0,
  1260. fQty: 0,
  1261. fNetweight: 0,
  1262. fCntqty: 0,
  1263. activeIndex: "1",
  1264. ifCntrnoStatus: null,
  1265. addOrUpdateVisible: false,
  1266. addOrUpdateVisib: false,
  1267. approVal: false,
  1268. approvalStatus: false,
  1269. doNot: false,
  1270. fCartypeOptions: [],
  1271. fIfdamageOptions: [],
  1272. tableHeight: '600',
  1273. whgenlegList: [],
  1274. releaseList: [
  1275. { dictLabel: "已放行", dictValue: "T" },
  1276. { dictLabel: "未放行", dictValue: "F" },
  1277. ],
  1278. whgenlegVisible: false,
  1279. whgenlegParams: {
  1280. pageNum: 1,
  1281. pageSize: 10,
  1282. fCorpid: null,
  1283. fWarehouseid: null,
  1284. fTruckno: null,
  1285. fCntrno: null,
  1286. fMblno: null,
  1287. orgStorageDate: null,
  1288. },
  1289. choiceWarehouse: false,
  1290. treeselectList: {
  1291. fWarehouselocid: null,
  1292. },
  1293. TreeIndex: "",
  1294. drag: false,
  1295. tableDate: [
  1296. {
  1297. surface: "0",
  1298. label: "fBillstatus",
  1299. name: "状态",
  1300. checked: 0,
  1301. width: 80,
  1302. fixed: "left",
  1303. },
  1304. {
  1305. surface: "1",
  1306. label: "fBsdate",
  1307. name: "通关日期",
  1308. checked: 0,
  1309. width: 200,
  1310. fixed: "left",
  1311. },
  1312. {
  1313. surface: "2",
  1314. label: "fMblno",
  1315. name: "提单号",
  1316. checked: 0,
  1317. width: 100,
  1318. },
  1319. {
  1320. surface: "3",
  1321. label: "fGoodsid",
  1322. name: "品名",
  1323. checked: 0,
  1324. width: 100,
  1325. },
  1326. {
  1327. surface: "4",
  1328. label: "fBusinessType",
  1329. name: "货物属性",
  1330. checked: 0,
  1331. width: 100,
  1332. },
  1333. {
  1334. surface: "5",
  1335. label: "fMarks",
  1336. name: "属性详情",
  1337. checked: 0,
  1338. width: 100,
  1339. },
  1340. {
  1341. surface: "6",
  1342. label: "fOrgwarehouseInformation",
  1343. name: "库位",
  1344. checked: 0,
  1345. width: 150,
  1346. },
  1347. {
  1348. surface: "7",
  1349. label: "fTransferWarehouselocid",
  1350. name: "调入库位",
  1351. checked: 0,
  1352. width: 100,
  1353. },
  1354. {
  1355. surface: "8",
  1356. label: "fPlanqty",
  1357. name: "结余库存",
  1358. checked: 0,
  1359. width: 100,
  1360. },
  1361. {
  1362. surface: "9",
  1363. label: "fPlangrossweight",
  1364. name: "结余毛重(kg)",
  1365. checked: 0,
  1366. width: 120,
  1367. },
  1368. {
  1369. surface: "10",
  1370. label: "fPlannetweight",
  1371. name: "结余净重(kg)",
  1372. checked: 0,
  1373. width: 120,
  1374. },
  1375. {
  1376. surface: "11",
  1377. label: "fQty",
  1378. name: "通关件数",
  1379. checked: 0,
  1380. width: 100,
  1381. },
  1382. {
  1383. surface: "12",
  1384. label: "fGrossweight",
  1385. name: "通关毛重(kg)",
  1386. checked: 0,
  1387. width: 120,
  1388. },
  1389. {
  1390. surface: "13",
  1391. label: "fNetweight",
  1392. name: "通关净重(kg)",
  1393. checked: 0,
  1394. width: 120,
  1395. },
  1396. {
  1397. surface: "14",
  1398. label: "fPackagespecs",
  1399. name: "包装规格",
  1400. checked: 0,
  1401. width: 100,
  1402. },
  1403. {
  1404. surface: "15",
  1405. label: "fFleet",
  1406. name: "车队",
  1407. checked: 0,
  1408. width: 100,
  1409. },
  1410. {
  1411. surface: "16",
  1412. label: "fTruckno",
  1413. name: "车号",
  1414. checked: 0,
  1415. width: 100,
  1416. },
  1417. {
  1418. surface: "17",
  1419. label: "fDriverName",
  1420. name: "司机名称",
  1421. checked: 0,
  1422. width: 100,
  1423. },
  1424. {
  1425. surface: "18",
  1426. label: "fDriverTel",
  1427. name: "司机电话",
  1428. checked: 0,
  1429. width: 100,
  1430. },
  1431. {
  1432. surface: "19",
  1433. label: "fDriverIdCar",
  1434. name: "司机身份证",
  1435. checked: 0,
  1436. width: 150,
  1437. },
  1438. {
  1439. surface: "20",
  1440. label: "fCntrtype",
  1441. name: "箱型",
  1442. checked: 0,
  1443. width: 100,
  1444. },
  1445. {
  1446. surface: "21",
  1447. label: "fCntqty",
  1448. name: "箱量",
  1449. checked: 0,
  1450. width: 100,
  1451. },
  1452. {
  1453. surface: "22",
  1454. label: "fCntrno",
  1455. name: "箱号",
  1456. checked: 0,
  1457. width: 100,
  1458. },
  1459. {
  1460. surface: "23",
  1461. label: "fLntype",
  1462. name: "装卸方式",
  1463. checked: 0,
  1464. width: 100,
  1465. },
  1466. {
  1467. surface: "24",
  1468. label: "fForkliftman",
  1469. name: "叉车工",
  1470. checked: 0,
  1471. width: 100,
  1472. },
  1473. {
  1474. surface: "25",
  1475. label: "fStevedore",
  1476. name: "装卸工",
  1477. checked: 0,
  1478. width: 100,
  1479. },
  1480. {
  1481. surface: "26",
  1482. label: "fLocalcntrno",
  1483. name: "库内箱号",
  1484. checked: 0,
  1485. width: 100,
  1486. },
  1487. {
  1488. surface: "27",
  1489. label: "fSealno",
  1490. name: "封号",
  1491. checked: 0,
  1492. width: 100,
  1493. },
  1494. {
  1495. surface: "28",
  1496. label: "fGoodsval",
  1497. name: "货值",
  1498. checked: 0,
  1499. width: 100,
  1500. },
  1501. {
  1502. surface: "29",
  1503. label: "fSerialNumber",
  1504. name: "流水号",
  1505. checked: 0,
  1506. width: 100,
  1507. },
  1508. {
  1509. surface: "30",
  1510. label: "remark",
  1511. name: "备注",
  1512. checked: 0,
  1513. width: 100,
  1514. },
  1515. ],
  1516. setRowList: [],
  1517. getRowList: [],
  1518. allCheck: false,
  1519. fCompanyName: '',
  1520. printFeeConfirm: {
  1521. fAddr: '',
  1522. fBankname: '',
  1523. fBankno: '',
  1524. fTel: '',
  1525. fTax: '',
  1526. },
  1527. showSetting: false,
  1528. tableDate2: [
  1529. {
  1530. surface: "1",
  1531. label: "fMblno",
  1532. name: "提单号",
  1533. checked: 0,
  1534. width: 150,
  1535. },
  1536. {
  1537. surface: "2",
  1538. label: "fOriginalbilldate",
  1539. name: "入库日期",
  1540. checked: 0,
  1541. width: 100,
  1542. },
  1543. {
  1544. surface: "3",
  1545. label: "fGoodsids",
  1546. name: "品名",
  1547. checked: 0,
  1548. width: 100,
  1549. },
  1550. {
  1551. surface: "4",
  1552. label: "fCntrno",
  1553. name: "箱号",
  1554. checked: 0,
  1555. width: 100,
  1556. },
  1557. {
  1558. surface: "5",
  1559. label: "fQtyblc",
  1560. name: "结余数量",
  1561. checked: 0,
  1562. width: 150,
  1563. },
  1564. {
  1565. surface: "6",
  1566. label: "fGrossweightblc",
  1567. name: "结余毛重(kg)",
  1568. checked: 0,
  1569. width: 150,
  1570. },
  1571. {
  1572. surface: "7",
  1573. label: "fNetweightblc",
  1574. name: "结余净重(kg)",
  1575. checked: 0,
  1576. width: 150,
  1577. },
  1578. {
  1579. surface: "8",
  1580. label: "fWarehouseids",
  1581. name: "库位",
  1582. checked: 0,
  1583. width: 150,
  1584. },
  1585. {
  1586. surface: "9",
  1587. label: "fMarks",
  1588. name: "品牌",
  1589. checked: 0,
  1590. width: 100,
  1591. },
  1592. {
  1593. surface: "10",
  1594. label: "fQtyblc2",
  1595. name: "数量",
  1596. checked: 0,
  1597. width: 100,
  1598. },
  1599. {
  1600. surface: "11",
  1601. label: "fGrossweightblc2",
  1602. name: "毛重(kg)",
  1603. checked: 0,
  1604. width: 100,
  1605. },
  1606. {
  1607. surface: "12",
  1608. label: "fNetweightblc2",
  1609. name: "净重(kg)",
  1610. checked: 0,
  1611. width: 100,
  1612. },
  1613. {
  1614. surface: "13",
  1615. label: "fLocalcntrno",
  1616. name: "库内箱号",
  1617. checked: 0,
  1618. width: 100,
  1619. },
  1620. ],
  1621. setRowList2: [],
  1622. getRowList2: [],
  1623. allCheck2: false,
  1624. showSetting2: false,
  1625. unloadModes: [],
  1626. detailsHidden2: true,
  1627. dataShowcar: null,
  1628. tfNetweightnum: 0,
  1629. tfGrossweightnum: 0,
  1630. showApproval: null,
  1631. entryPrinting: 1,
  1632. cancelDelivery: false, //
  1633. deliveryConfirmation: false, //
  1634. clearanceDisabled: false, //明细是否有通关
  1635. };
  1636. },
  1637. created() {
  1638. this.setRowList = this.tableDate;
  1639. this.getRowList = this.tableDate;
  1640. this.setRowList2 = this.tableDate2;
  1641. this.getRowList2 = this.tableDate2;
  1642. this.getDicts("data_stltype_type").then((response) => {
  1643. this.fStltypeOptions = response.data;
  1644. });
  1645. this.getDicts("data_unitfees").then((response) => {
  1646. this.fFeetUnitOptions = response.data;
  1647. });
  1648. this.getDicts("data_trademodes").then((response) => {
  1649. this.fTrademodeidOptions = response.data;
  1650. });
  1651. this.getDicts("data_ifweigh_status").then((response) => {
  1652. this.fIfweighOptions = response.data;
  1653. });
  1654. this.getDicts("sys_car_type").then((response) => {
  1655. this.fCartypeOptions = response.data;
  1656. });
  1657. this.getDicts("unload_mode").then((response) => {
  1658. this.unloadModes = response.data;
  1659. });
  1660. this.getDicts("data_ifdamage_status").then((response) => {
  1661. this.fIfdamageOptions = response.data;
  1662. });
  1663. this.getDicts("st_trans_type").then((response) => {
  1664. this.businessTypeOption = response.data ? response.data : [];
  1665. localStorage.setItem("businessTypeList", JSON.stringify(response.data));
  1666. });
  1667. this.getDicts("storage_type").then((response) => {
  1668. this.fStorageTypeOptions = response.data;
  1669. localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
  1670. });
  1671. this.getConfigKey("data_showcar").then((response) => {
  1672. this.dataShowcar = response.msg;
  1673. if (this.dataShowcar == "0") {
  1674. this.detailsHidden2 = false;
  1675. } else {
  1676. this.detailsHidden2 = true;
  1677. }
  1678. });
  1679. this.getConfigKey('entry.printing').then((response) => {
  1680. this.entryPrinting = response.msg
  1681. })
  1682. listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
  1683. this.warehouseOptions = response.rows;
  1684. });
  1685. listFees({ fDc: "C" }).then((response) => {
  1686. this.fCNameOptions = response.rows;
  1687. });
  1688. listFees({ fDc: "D" }).then((response) => {
  1689. this.fDNameOptions = response.rows;
  1690. });
  1691. listCorps({ type: 1 }).then((response) => {
  1692. this.fMblnoOptions = response.rows;
  1693. });
  1694. listCorps().then((response) => {
  1695. this.fSbuOptions = response.rows;
  1696. });
  1697. listUser().then((response) => {
  1698. this.userOptions = response.rows;
  1699. });
  1700. listGoods({ fStatus: 0, delFlag: 0 }).then((response) => {
  1701. this.goodsOptions = response.rows;
  1702. });
  1703. listCntrs({ fStatus: "T" }).then((response) => {
  1704. this.cntrList = response.rows;
  1705. });
  1706. listCorps({ fTypeid: 6 }).then((response) => {
  1707. this.fCompanyOptIons = response.rows;
  1708. });
  1709. listCorps({ fTypeid: 2 }).then((response) => {
  1710. this.fleetOptions = response.rows;
  1711. });
  1712. this.getConfigKey("outStock.orders.approvalFlow").then((response) => {
  1713. this.showApproval = response.msg;
  1714. });
  1715. this.company = Cookies.get("companyName")
  1716. this.queryUser();
  1717. this.getRow();
  1718. this.getRow2();
  1719. },
  1720. mounted() {
  1721. this.$nextTick(() => {
  1722. // 监听浏览器高度变化,改变表格高度
  1723. window.onresize = () => {
  1724. this.tableHeight = window.innerHeight - this.$refs.tableDialog.$el.offsetTop
  1725. }
  1726. })
  1727. },
  1728. activated() {
  1729. this.getDicts("st_trans_type").then((response) => {
  1730. this.businessTypeOption = response.data ? response.data : [];
  1731. localStorage.setItem("businessTypeList", JSON.stringify(response.data));
  1732. });
  1733. this.getDicts("storage_type").then((response) => {
  1734. this.fStorageTypeOptions = response.data;
  1735. localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
  1736. });
  1737. },
  1738. filters: {
  1739. fStorageFormat(row) {
  1740. let name;
  1741. for (const item of JSON.parse(localStorage.getItem("fStorageTypeList"))) {
  1742. if (row == item.dictValue) {
  1743. name = item.dictLabel;
  1744. }
  1745. }
  1746. return name;
  1747. },
  1748. fBusinessTypeFormat(row) {
  1749. let name;
  1750. for (const item of JSON.parse(localStorage.getItem("businessTypeList"))) {
  1751. if (row == item.dictValue) {
  1752. name = item.dictLabel;
  1753. }
  1754. }
  1755. return name;
  1756. },
  1757. goodsFormat(row, goodsOptions) {
  1758. let goods;
  1759. goodsOptions.map((e) => {
  1760. if (row == e.fId) {
  1761. goods = e.fName;
  1762. }
  1763. });
  1764. return goods;
  1765. },
  1766. },
  1767. methods: {
  1768. init() {
  1769. this.approVal = false;
  1770. this.resetForm("form");
  1771. this.detailList = [];
  1772. this.relevantAttachments = [];
  1773. this.warehouseCrList = [];
  1774. this.warehouseDrList = [];
  1775. this.CntrTable = [];
  1776. if (this.dataShowcar == "0") {
  1777. this.detailsHidden2 = false;
  1778. } else {
  1779. this.detailsHidden2 = true;
  1780. }
  1781. if (this.$route.query.id) {
  1782. this.approVal = true;
  1783. this.$router.push({ query: {} });
  1784. }
  1785. this.getForm();
  1786. },
  1787. init2() {
  1788. this.whgenlegParams = {
  1789. pageNum: 1,
  1790. pageSize: 10,
  1791. fCorpid: null,
  1792. fWarehouseid: null,
  1793. fTruckno: null,
  1794. fCntrno: null,
  1795. fMblno: null,
  1796. orgStorageDate: null,
  1797. };
  1798. },
  1799. tfNetweight(row) {
  1800. this.tfNetweightnum = (row / 1000).toFixed(4);
  1801. },
  1802. tfGrossweight(row) {
  1803. this.tfGrossweightnum = (row / 1000).toFixed(4);
  1804. },
  1805. //列设置全选
  1806. allChecked() {
  1807. if (this.allCheck == true) {
  1808. this.setRowList.map((e) => {
  1809. return (e.checked = 0);
  1810. });
  1811. } else {
  1812. this.setRowList.map((e) => {
  1813. return (e.checked = 1);
  1814. });
  1815. }
  1816. },
  1817. //查询列数据
  1818. getRow() {
  1819. let that = this;
  1820. this.data = {
  1821. tableName: "通关明细",
  1822. userId: Cookies.get("userName"),
  1823. };
  1824. select(this.data).then((res) => {
  1825. if (res.data.length != 0) {
  1826. this.getRowList = res.data.filter((e) => e.checked == 0);
  1827. this.setRowList = res.data;
  1828. this.setRowList = this.setRowList.reduce((res, item) => {
  1829. res.push({
  1830. surface: item.surface,
  1831. label: item.label,
  1832. name: item.name,
  1833. checked: item.checked,
  1834. width: item.width,
  1835. fixed: item.fixed,
  1836. });
  1837. return res;
  1838. }, []);
  1839. }
  1840. });
  1841. },
  1842. //重置列表
  1843. delRow() {
  1844. this.data = {
  1845. tableName: "通关明细",
  1846. userId: Cookies.get("userName"),
  1847. };
  1848. resetModule(this.data).then((res) => {
  1849. if (res.code == 200) {
  1850. this.showSetting = false;
  1851. this.setRowList = this.$options.data().tableDate;
  1852. this.getRowList = this.$options.data().tableDate;
  1853. }
  1854. });
  1855. },
  1856. //保存列设置
  1857. save() {
  1858. this.showSetting = false;
  1859. this.data = {
  1860. tableName: "通关明细",
  1861. userId: Cookies.get("userName"),
  1862. sysTableSetList: this.setRowList,
  1863. };
  1864. addSet(this.data).then((res) => {
  1865. if (res.code == 200) {
  1866. this.showSetting = false;
  1867. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1868. }
  1869. });
  1870. },
  1871. //列设置全选
  1872. allChecked2() {
  1873. if (this.allCheck2 == true) {
  1874. this.setRowList2.map((e) => {
  1875. return (e.checked = 0);
  1876. });
  1877. } else {
  1878. this.setRowList2.map((e) => {
  1879. return (e.checked = 1);
  1880. });
  1881. }
  1882. },
  1883. //查询列数据
  1884. getRow2() {
  1885. let that = this;
  1886. this.data = {
  1887. tableName: "通关总账",
  1888. userId: Cookies.get("userName"),
  1889. };
  1890. select(this.data).then((res) => {
  1891. if (res.data.length != 0) {
  1892. this.getRowList2 = res.data.filter((e) => e.checked == 0);
  1893. this.setRowList2 = res.data;
  1894. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  1895. res.push({
  1896. surface: item.surface,
  1897. label: item.label,
  1898. name: item.name,
  1899. checked: item.checked,
  1900. width: item.width,
  1901. fixed: item.fixed,
  1902. });
  1903. return res;
  1904. }, []);
  1905. }
  1906. });
  1907. },
  1908. //重置列表
  1909. delRow2() {
  1910. this.data = {
  1911. tableName: "通关总账",
  1912. userId: Cookies.get("userName"),
  1913. };
  1914. resetModule(this.data).then((res) => {
  1915. if (res.code == 200) {
  1916. this.showSetting2 = false;
  1917. this.setRowList2 = this.$options.data().tableDate2;
  1918. this.getRowList2 = this.$options.data().tableDate2;
  1919. }
  1920. });
  1921. },
  1922. //保存列设置
  1923. save2() {
  1924. this.showSetting2 = false;
  1925. this.data = {
  1926. tableName: "通关总账",
  1927. userId: Cookies.get("userName"),
  1928. sysTableSetList: this.setRowList2,
  1929. };
  1930. addSet(this.data).then((res) => {
  1931. if (res.code == 200) {
  1932. this.showSetting2 = false;
  1933. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
  1934. }
  1935. });
  1936. },
  1937. //开始拖拽事件
  1938. onStart() {
  1939. this.drag = true;
  1940. },
  1941. //拖拽结束事件
  1942. onEnd() {
  1943. this.drag = false;
  1944. },
  1945. changeStock(row) {
  1946. let fNetweight = 0;
  1947. let fGrossweight = 0;
  1948. if (row.fNetweight) {
  1949. fNetweight = row.fNetweight;
  1950. }
  1951. if (row.fGrossweight) {
  1952. fGrossweight = row.fGrossweight;
  1953. }
  1954. if (row.fPlannetweight < fNetweight) {
  1955. this.$message({ message: "通关净重超出结余净重", type: "warning" });
  1956. return false;
  1957. }
  1958. if (row.fPlangrossweight < fGrossweight) {
  1959. this.$message({ message: "通关毛重超出结余毛重", type: "warning" });
  1960. return false;
  1961. }
  1962. },
  1963. // 付款信息请核
  1964. checkRow(index, rows) {
  1965. if (!rows[index].fQty) {
  1966. this.$message.error('请维护数量')
  1967. return false
  1968. }
  1969. if (!rows[index].fUnitprice) {
  1970. this.$message.error('请维护单价')
  1971. return false
  1972. }
  1973. if (!rows[index].fAmount) {
  1974. this.$message.error('请维护金额')
  1975. return false
  1976. }
  1977. rows[index].fBillstatus = 6
  1978. let formData = new window.FormData()
  1979. formData.append('tWarehouseBills', JSON.stringify(this.form))
  1980. // 库存明细
  1981. formData.append('tWarehousebillsitems', JSON.stringify(this.detailList))
  1982. // 附件数据
  1983. formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
  1984. // 费用明细付款
  1985. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  1986. // 收款
  1987. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  1988. formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
  1989. formData.append('tCntr', JSON.stringify(this.CntrTable))
  1990. addWarehousebills(formData).then(res => {
  1991. this.msgSuccess('请核成功')
  1992. })
  1993. },
  1994. revokeRow(index, rows) {
  1995. rows[index].fBillstatus = 2
  1996. let formData = new window.FormData()
  1997. formData.append('tWarehouseBills', JSON.stringify(this.form))
  1998. // 库存明细
  1999. formData.append('tWarehousebillsitems', JSON.stringify(this.detailList))
  2000. // 附件数据
  2001. formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
  2002. // 费用明细付款
  2003. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2004. // 收款
  2005. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2006. formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
  2007. formData.append('tCntr', JSON.stringify(this.CntrTable))
  2008. addWarehousebills(formData).then(res => {
  2009. this.msgSuccess('撤销成功')
  2010. })
  2011. },
  2012. // 出库件数的计算
  2013. qtyChange(row) {
  2014. // if (!row.fQty || row.fQty === "") {
  2015. // this.$set(row, "fNetweight", 0);
  2016. // this.$set(row, "fGrossweight", 0);
  2017. // return false;
  2018. // }
  2019. if (row.fPlanqty < row.fQty) {
  2020. this.$message.error("出库件数超出结余件数!");
  2021. this.$set(row, "fQty", 0);
  2022. this.$set(row, "fNetweight", 0);
  2023. this.$set(row, "fGrossweight", 0);
  2024. return false;
  2025. }
  2026. if (row.fQtyblc2 > row.fQtyblc) {
  2027. this.$message.error("出库件数超出结余件数!");
  2028. this.$set(row, "fQtyblc2", 0);
  2029. this.$set(row, "fGrossweightblc2", 0);
  2030. this.$set(row, "fNetweightblc2", 0);
  2031. return false;
  2032. }
  2033. this.$set(
  2034. row,
  2035. "fNetweight",
  2036. parseFloat(
  2037. (Number(row.fPlannetweight) / Number(row.fPlanqty)) * Number(row.fQty)
  2038. ).toFixed(2)
  2039. );
  2040. this.$set(
  2041. row,
  2042. "fGrossweight",
  2043. parseFloat(
  2044. (Number(row.fPlangrossweight) / Number(row.fPlanqty)) *
  2045. Number(row.fQty)
  2046. ).toFixed(2)
  2047. );
  2048. this.$set(
  2049. row,
  2050. "fNetweightblc2",
  2051. parseFloat(
  2052. (Number(row.fNetweightblc) / Number(row.fQtyblc)) *
  2053. Number(row.fQtyblc2)
  2054. ).toFixed(2)
  2055. );
  2056. this.$set(
  2057. row,
  2058. "fGrossweightblc2",
  2059. parseFloat(
  2060. (Number(row.fGrossweightblc) / Number(row.fQtyblc)) *
  2061. Number(row.fQtyblc2)
  2062. ).toFixed(2)
  2063. );
  2064. },
  2065. whgenlegData() {
  2066. if (this.dialogWhgenlegList.length === 0) {
  2067. this.$message({ message: "未勾选信息", type: "warning" });
  2068. return false;
  2069. }
  2070. let fTruckno = null;
  2071. let fDriverTel = null;
  2072. let fDriverName = null;
  2073. let fDriverIdCar = null;
  2074. if (this.form.fTruckno) {
  2075. fTruckno = this.form.fTruckno;
  2076. }
  2077. if (this.form.fDriverTel) {
  2078. fDriverTel = this.form.fDriverTel;
  2079. }
  2080. if (this.form.fDriverName) {
  2081. fDriverName = this.form.fDriverName;
  2082. }
  2083. if (this.form.fDriverIdCar) {
  2084. fDriverIdCar = this.form.fDriverIdCar;
  2085. }
  2086. this.dialogWhgenlegList.map((e) => {
  2087. this.detailList.push({
  2088. fBsdate: this.form.fBsdate,
  2089. fId: null,
  2090. fCntrtype: null,
  2091. fGrossweight: e.fGrossweightblc2,
  2092. fNetweight: e.fNetweightblc2,
  2093. fQty: e.fQtyblc2,
  2094. fCntqty: 1,
  2095. fIsPass: "F",
  2096. fGoodsval: null,
  2097. fBillstatus: 10,
  2098. fTruckno: this.form.fTruckno ? this.form.fTruckno : null,
  2099. fDriverName: this.form.fDriverName ? this.form.fDriverName : null,
  2100. fDriverTel: this.form.fDriverTel ? this.form.fDriverTel : null,
  2101. fDriverIdCar: this.form.fDriverIdCar ? this.form.fDriverIdCar : null,
  2102. fMblno: e.fMblno,
  2103. fMarks: e.fMarks,
  2104. fCntrno: e.fCntrno,
  2105. fPlanqty: e.fQtyblc,
  2106. fGoodsid: e.fGoodsid,
  2107. fVolumn: e.fVolumn,
  2108. fGoodsids: e.fGoodsids,
  2109. fBillingway: e.fBillingway,
  2110. fChargedate: e.fChargedate,
  2111. fOrgwarehouseInformation: e.fWarehouseids,
  2112. fPackagespecs: e.fPackagespecs,
  2113. fPlannetweight: e.fNetweightblc,
  2114. fOriginalbillno: e.fOriginalbillno,
  2115. fBusinessType: e.fBusinessType + "",
  2116. fPlangrossweight: e.fGrossweightblc,
  2117. fOriginalbilldate: e.fOriginalbilldate,
  2118. fWarehouselocid: e.fWarehouseLocationid,
  2119. fWarehouselocids: e.fWarehouseLocationids,
  2120. fWarehouseLocationids: e.fWarehouseLocationids,
  2121. fTransferWarehouselocid: null,
  2122. remark: null,
  2123. fSrcid: e.fId,
  2124. fSrcBsdate: e.fBsdate,
  2125. });
  2126. });
  2127. this.whgenlegVisible = false;
  2128. },
  2129. //撤销审批
  2130. revokeTwo(status) {
  2131. let data = {
  2132. actId: 140,
  2133. billId: this.form.fId,
  2134. id: this.form.fId,
  2135. fidStatus: status,
  2136. };
  2137. RevocationApproval(data).then((data) => {
  2138. if (data.code === 200) {
  2139. this.browseStatus = false;
  2140. this.msgSuccess("撤销成功");
  2141. }
  2142. });
  2143. },
  2144. // 查看审批流
  2145. getDataList() {
  2146. this.addOrUpdateVisible = false;
  2147. },
  2148. returnData() {
  2149. this.addOrUpdateVisib = false;
  2150. this.$router.push({ path: "/index" });
  2151. },
  2152. addOrUpdateHandle(form, status) {
  2153. this.addOrUpdateVisible = true;
  2154. this.$nextTick(() => {
  2155. this.$refs.addOrUpdate.init(form.fId, 140, status);
  2156. });
  2157. },
  2158. addOrUpdateHand(form, status) {
  2159. this.addOrUpdateVisib = true;
  2160. this.$nextTick(() => {
  2161. this.$refs.ApprovalComments.init(form.fId, status, 140);
  2162. });
  2163. },
  2164. changefStltype(row) {
  2165. // 根据客户id查询客户所属仓库
  2166. if (row != null && row != '') {
  2167. customerWarehouse(row).then((res) => {
  2168. this.warehouseOptions = res.data;
  2169. if (res.data == null) {
  2170. this.warehouseOptions = [];
  2171. this.form.fWarehouseid = null;
  2172. this.form.fInwarehouseid = null;
  2173. }
  2174. })
  2175. } else {
  2176. this.warehouseOptions = [];
  2177. this.form.fWarehouseid = null;
  2178. this.form.fInwarehouseid = null;
  2179. }
  2180. this.fMblnoOptions.map((e) => {
  2181. if (row == e.fId) {
  2182. this.$set(
  2183. this.form,
  2184. "fStltypeid",
  2185. e.fStltypeid ? e.fStltypeid.toString() : null
  2186. );
  2187. }
  2188. });
  2189. },
  2190. changeGoods(row) {
  2191. this.goodsOptions.map((e) => {
  2192. if (row == e.fId) {
  2193. if (e.ifCntrno == "1") {
  2194. this.ifCntrnoStatus = 1;
  2195. } else {
  2196. this.ifCntrnoStatus = null;
  2197. }
  2198. }
  2199. });
  2200. },
  2201. //撤销请核
  2202. revoke() {
  2203. revoke(this.form.fId).then((data) => {
  2204. if (data.code === 200) {
  2205. this.browseStatus = false;
  2206. this.msgSuccess("撤销成功");
  2207. }
  2208. });
  2209. },
  2210. ordersRevoke() {
  2211. ordersRevoke(this.form.fId).then((data) => {
  2212. if (data.code === 200) {
  2213. this.$set(this.form, "warehouseStatus", 2);
  2214. this.msgSuccess("撤销成功");
  2215. }
  2216. });
  2217. },
  2218. discharge() {
  2219. if (this.Printinglist.length > 0) {
  2220. for (let item in this.Printinglist) {
  2221. if (this.Printinglist[item].fBillstatus === 10) {
  2222. return this.$message.error("请先打印作业单");
  2223. }
  2224. if (this.Printinglist[item].fBillstatus >= 30) {
  2225. return this.$message.error("请勿重复卸货");
  2226. }
  2227. }
  2228. if (this.CntrTable.length > 0) {
  2229. let arr = [];
  2230. this.CntrTable.map((e) => {
  2231. this.cntrList.map((item) => {
  2232. if (item.fId == e.fCntrid) {
  2233. arr.push(item.fName + "X" + e.fCntrcount);
  2234. }
  2235. });
  2236. });
  2237. arr = [...new Set(arr)];
  2238. this.form.fCntval = arr.join(",");
  2239. } else {
  2240. this.form.fCntval = null;
  2241. }
  2242. if (this.detailList.length > 0) {
  2243. let arr = [];
  2244. this.detailList.map((e) => {
  2245. this.goodsOptions.map((item) => {
  2246. if (e.fGoodsid == item.fId) {
  2247. arr.push(item.fName);
  2248. }
  2249. });
  2250. });
  2251. arr = [...new Set(arr)];
  2252. this.form.fProductName = arr.join(",");
  2253. } else {
  2254. this.form.fProductName = "";
  2255. }
  2256. if (this.detailList.length > 0) {
  2257. let arr = [];
  2258. this.detailList.map((e) => {
  2259. arr.push(e.fMarks);
  2260. });
  2261. arr = [...new Set(arr)];
  2262. this.form.fMarks = arr.join(',')
  2263. this.form.fMarks = this.form.fMarks.slice(0, 100);
  2264. } else {
  2265. this.form.fMarks = "";
  2266. }
  2267. if (this.detailList.length == 0) {
  2268. this.form.fNetweight = 0;
  2269. this.form.fPlanvolumn = 0;
  2270. this.form.fGrossweight = 0;
  2271. } else {
  2272. this.form.fNetweight = this.fNetweight;
  2273. this.form.fPlanvolumn = this.fPlanvolumn;
  2274. this.form.fGrossweight = this.fGrossweight;
  2275. }
  2276. let formData = new window.FormData();
  2277. formData.append("type", "2");
  2278. formData.append("warehouseBills", JSON.stringify(this.form));
  2279. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2280. formData.append(
  2281. "warehousebillsitems",
  2282. JSON.stringify(this.Printinglist)
  2283. );
  2284. formData.append(
  2285. "warehousebillsfeesDr",
  2286. JSON.stringify(this.warehouseDrList)
  2287. );
  2288. formData.append(
  2289. "warehousebillsfeesCr",
  2290. JSON.stringify(this.warehouseCrList)
  2291. );
  2292. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2293. disChargelist(formData).then((response) => {
  2294. if ((response.code = 200)) {
  2295. this.detailList.map((e, index) => {
  2296. response.data.warehousebillsitems.map((item) => {
  2297. item.fBsdate = Date.parse(new Date(item.fBsdate));
  2298. if (item.fBusinessType) {
  2299. item.fBusinessType = item.fBusinessType.toString();
  2300. }
  2301. item.fLntype = item.fLntype ? item.fLntype.toString() : null;
  2302. if (e.fId == item.fId) {
  2303. e = item;
  2304. this.$set(this.detailList, index, e);
  2305. }
  2306. });
  2307. });
  2308. this.msgSuccess("卸货成功");
  2309. this.$set(this.form, "fItemsStatus", 3);
  2310. }
  2311. });
  2312. } else {
  2313. this.$message.error("请选择需要卸货的明细!");
  2314. }
  2315. },
  2316. creditClick() {
  2317. if (this.form.fNewTrademodeid == this.form.fTrademodeid) {
  2318. return this.$alert('新旧贸易方式相同,请做调拨单处理', '提示', {
  2319. confirmButtonText: '确定'
  2320. })
  2321. }
  2322. for (let item in this.Printinglist) {
  2323. if (!this.Printinglist[item].fId) {
  2324. return this.$message.error("请存在未保存的数据");
  2325. }
  2326. if (this.entryPrinting == 0) {
  2327. if (this.Printinglist[item].fBillstatus == 10) {
  2328. return this.$message.error("请存在未打印的作业单");
  2329. }
  2330. }
  2331. // if (!this.Printinglist[item].fTruckno) {
  2332. // return this.$message.error("车号不能为空");
  2333. // }
  2334. if (!this.Printinglist[item].fTransferWarehouselocid) {
  2335. return this.$message.error("调入库位不能为空");
  2336. }
  2337. }
  2338. if (this.CntrTable.length > 0) {
  2339. let arr = [];
  2340. this.CntrTable.map((e) => {
  2341. this.cntrList.map((item) => {
  2342. if (item.fId == e.fCntrid) {
  2343. arr.push(item.fName + "X" + e.fCntrcount);
  2344. }
  2345. });
  2346. });
  2347. arr = [...new Set(arr)];
  2348. this.form.fCntval = arr.join(",");
  2349. } else {
  2350. this.form.fCntval = null;
  2351. }
  2352. if (this.detailList.length > 0) {
  2353. let arr = [];
  2354. this.detailList.map((e) => {
  2355. this.goodsOptions.map((item) => {
  2356. if (e.fGoodsid == item.fId) {
  2357. arr.push(item.fName);
  2358. }
  2359. });
  2360. });
  2361. arr = [...new Set(arr)];
  2362. this.form.fProductName = arr.join(",");
  2363. } else {
  2364. this.form.fProductName = "";
  2365. }
  2366. if (this.detailList.length > 0) {
  2367. let arr = [];
  2368. this.detailList.map((e) => {
  2369. arr.push(e.fMarks);
  2370. });
  2371. arr = [...new Set(arr)];
  2372. this.form.fMarks = arr.join(',')
  2373. this.form.fMarks = this.form.fMarks.slice(0, 100);
  2374. } else {
  2375. this.form.fMarks = "";
  2376. }
  2377. if (this.detailList.length == 0) {
  2378. this.form.fNetweight = 0;
  2379. this.form.fPlanvolumn = 0;
  2380. this.form.fGrossweight = 0;
  2381. } else {
  2382. this.form.fNetweight = this.fNetweight;
  2383. this.form.fPlanvolumn = this.fPlanvolumn;
  2384. this.form.fGrossweight = this.fGrossweight;
  2385. }
  2386. let formData = new window.FormData();
  2387. formData.append("type", "2");
  2388. formData.append("warehouseBills", JSON.stringify(this.form));
  2389. formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
  2390. formData.append(
  2391. "warehousebillsfeesDr",
  2392. JSON.stringify(this.warehouseDrList)
  2393. );
  2394. formData.append(
  2395. "warehousebillsfeesCr",
  2396. JSON.stringify(this.warehouseCrList)
  2397. );
  2398. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2399. formData.append("whgenleg", JSON.stringify(this.relevantAttachments));
  2400. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2401. addWhgenleg(formData).then((response) => {
  2402. if ((response.code = 200)) {
  2403. this.detailList.map((e, index) => {
  2404. response.data.warehouseItem.map((item) => {
  2405. item.fBsdate = Date.parse(new Date(item.fBsdate));
  2406. if (item.fBusinessType) {
  2407. item.fBusinessType = item.fBusinessType.toString();
  2408. }
  2409. item.fLntype = item.fLntype ? item.fLntype.toString() : null;
  2410. if (e.fId == item.fId) {
  2411. e = item;
  2412. this.$set(this.detailList, index, e);
  2413. }
  2414. });
  2415. });
  2416. this.msgSuccess("通关成功");
  2417. this.clearanceDisabled = true;
  2418. this.$set(this.form, "fItemsStatus", 4);
  2419. }
  2420. });
  2421. },
  2422. getAlltree(tree) {
  2423. this.information = tree.fWarehouseInformation;
  2424. this.informationId = tree.id;
  2425. },
  2426. //树状库位下拉关闭询问
  2427. hanDleclose(done) {
  2428. this.$confirm("确认关闭?")
  2429. .then((_) => {
  2430. done();
  2431. })
  2432. .catch((_) => { });
  2433. },
  2434. getTreeselect(row) {
  2435. this.treeselectList.fWarehouselocid = null;
  2436. this.TreeIndex = row.$index;
  2437. this.choiceWarehouse = true;
  2438. treeselect(this.form.fWarehouseid).then((response) => {
  2439. this.fWarehouseidOptions = response.data;
  2440. });
  2441. },
  2442. confirm() {
  2443. this.$set(
  2444. this.detailList[this.TreeIndex],
  2445. "fWarehouseInformation",
  2446. this.information
  2447. );
  2448. this.$set(
  2449. this.detailList[this.TreeIndex],
  2450. "fTransferWarehouselocid",
  2451. this.informationId
  2452. );
  2453. this.choiceWarehouse = false;
  2454. this.detailList.fTransferWarehouselocid = this.informationId;
  2455. },
  2456. // 撤回入账
  2457. withdrawClick() {
  2458. for (let item in this.Printinglist) {
  2459. if (!this.Printinglist[item].fId) {
  2460. return this.$message.error("请存在未保存的数据");
  2461. }
  2462. if (this.Printinglist[item].fBillstatus == 10) {
  2463. return this.$message.error("请存在未打印的作业单");
  2464. }
  2465. if (this.Printinglist[item].fBillstatus == 20) {
  2466. return this.$message.error("请存在未卸货的数据");
  2467. }
  2468. if (this.Printinglist[item].fBillstatus == 30) {
  2469. return this.$message.error("请存在未出库的数据");
  2470. }
  2471. }
  2472. if (this.CntrTable.length > 0) {
  2473. let arr = [];
  2474. this.CntrTable.map((e) => {
  2475. this.cntrList.map((item) => {
  2476. if (item.fId == e.fCntrid) {
  2477. arr.push(item.fName + "X" + e.fCntrcount);
  2478. }
  2479. });
  2480. });
  2481. arr = [...new Set(arr)];
  2482. this.form.fCntval = arr.join(",");
  2483. } else {
  2484. this.form.fCntval = null;
  2485. }
  2486. if (this.detailList.length > 0) {
  2487. let arr = [];
  2488. this.detailList.map((e) => {
  2489. this.goodsOptions.map((item) => {
  2490. if (e.fGoodsid == item.fId) {
  2491. arr.push(item.fName);
  2492. }
  2493. });
  2494. });
  2495. arr = [...new Set(arr)];
  2496. this.form.fProductName = arr.join(",");
  2497. } else {
  2498. this.form.fProductName = "";
  2499. }
  2500. if (this.detailList.length > 0) {
  2501. let arr = [];
  2502. this.detailList.map((e) => {
  2503. arr.push(e.fMarks);
  2504. });
  2505. arr = [...new Set(arr)];
  2506. this.form.fMarks = arr.join(',')
  2507. this.form.fMarks = this.form.fMarks.slice(0, 100);
  2508. } else {
  2509. this.form.fMarks = "";
  2510. }
  2511. if (this.detailList.length == 0) {
  2512. this.form.fNetweight = 0;
  2513. this.form.fPlanvolumn = 0;
  2514. this.form.fGrossweight = 0;
  2515. } else {
  2516. this.form.fNetweight = this.fNetweight;
  2517. this.form.fPlanvolumn = this.fPlanvolumn;
  2518. this.form.fGrossweight = this.fGrossweight;
  2519. }
  2520. // 撤回入库
  2521. let formData = new window.FormData();
  2522. formData.append("type", "2");
  2523. formData.append("warehouseBills", JSON.stringify(this.form));
  2524. formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
  2525. formData.append(
  2526. "warehousebillsfeesDr",
  2527. JSON.stringify(this.warehouseDrList)
  2528. );
  2529. formData.append(
  2530. "warehousebillsfeesCr",
  2531. JSON.stringify(this.warehouseCrList)
  2532. );
  2533. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2534. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2535. this.clearanceDisabled = false;
  2536. updateCredit(formData).then((response) => {
  2537. this.Printinglist.map((e) => {
  2538. this.detailList.map((item, index) => {
  2539. if (e.fId == item.fId) {
  2540. this.$set(this.detailList[index], "fBillstatus", 10);
  2541. }
  2542. if (item.fBillstatus == 40) this.clearanceDisabled = true;
  2543. });
  2544. });
  2545. this.msgSuccess("撤回成功");
  2546. this.$set(this.form, "fItemsStatus", 1);
  2547. });
  2548. },
  2549. fStorageTypeFormat(row) {
  2550. let fStorageType;
  2551. this.fStorageTypeOptions.map((e) => {
  2552. if (row.fBusinessType == e.dictValue) {
  2553. fStorageType = e.dictLabel;
  2554. }
  2555. });
  2556. return fStorageType;
  2557. },
  2558. fCntrtypeFormat(row) {
  2559. let fCntrtype;
  2560. this.cntrList.map((e) => {
  2561. if (row.fCntrtype == e.fId) {
  2562. fCntrtype = e.fName;
  2563. }
  2564. });
  2565. return fCntrtype;
  2566. },
  2567. fBsdateFormat(row) {
  2568. const dateMat = new Date(row.fBsdate);
  2569. const year = dateMat.getFullYear();
  2570. const month = dateMat.getMonth() + 1;
  2571. const day = dateMat.getDate();
  2572. const timeFormat = year + "-" + month + "-" + day;
  2573. return timeFormat;
  2574. },
  2575. getForm() {
  2576. getStockTransfer(this.chiId).then((response) => {
  2577. this.form = response.data.warehousebills;
  2578. if (this.form.fCompany) this.changePrint()
  2579. if (this.form.fBillstatus > 2) {
  2580. this.approvalStatus = false;
  2581. this.browseStatus = true;
  2582. } else {
  2583. this.approvalStatus = true;
  2584. this.browseStatus = false;
  2585. }
  2586. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2587. this.$set(this.form, "fBstifime", Date.parse(this.form.fBstime));
  2588. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  2589. this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
  2590. this.tfNetweightnum = (this.form.fPlannetweight / 1000).toFixed(4);
  2591. this.tfGrossweightnum = (this.form.fPlangrossweight / 1000).toFixed(4);
  2592. if (this.form.fCartype || this.form.fCartype == 0) {
  2593. this.$set(this.form, "fCartype", this.form.fCartype.toString());
  2594. }
  2595. if (this.form.fStltypeid || this.form.fStltypeid == 0) {
  2596. this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
  2597. }
  2598. if (this.form.fTrademodeid) {
  2599. this.$set(
  2600. this.form,
  2601. "fTrademodeid",
  2602. this.form.fTrademodeid.toString()
  2603. );
  2604. }
  2605. if (this.form.fNewTrademodeid) {
  2606. this.$set(
  2607. this.form,
  2608. "fNewTrademodeid",
  2609. this.form.fNewTrademodeid.toString()
  2610. );
  2611. }
  2612. treeselect(this.form.fWarehouseid).then((response) => {
  2613. this.fWarehouseidOptions = response.data;
  2614. });
  2615. if (!this.copyStatus) {
  2616. if (response.data.warehouseBillsItem) {
  2617. response.data.warehouseBillsItem.map((e) => {
  2618. e.fBsdate = Date.parse(e.fBsdate);
  2619. e.fBusinessType = e.fBusinessType.toString();
  2620. e.fLntype = e.fLntype ? e.fLntype.toString() : null;
  2621. if (e.fBillstatus == 40) {
  2622. this.clearanceDisabled = true;
  2623. };
  2624. });
  2625. this.detailList = response.data.warehouseBillsItem;
  2626. } else {
  2627. this.detailList = [];
  2628. }
  2629. response.data.warehousebillsfeesCr.map((e) => {
  2630. if (e.fFeeunitid) {
  2631. e.fFeeUnitid = e.fFeeunitid.toString();
  2632. }
  2633. if (e.fStltypeid || e.fStltypeid == 0) {
  2634. e.fStltypeid = e.fStltypeid.toString();
  2635. }
  2636. });
  2637. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2638. response.data.warehousebillsfeesDr.map((e) => {
  2639. if (e.fFeeunitid) {
  2640. e.fFeeUnitid = e.fFeeunitid.toString();
  2641. }
  2642. if (e.fStltypeid || e.fStltypeid == 0) {
  2643. e.fStltypeid = e.fStltypeid.toString();
  2644. }
  2645. });
  2646. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2647. if (response.data.tCntrList) {
  2648. this.CntrTable = response.data.tCntrList;
  2649. } else {
  2650. this.CntrTable = [];
  2651. }
  2652. if (response.data.enclosures) {
  2653. this.relevantAttachments = response.data.enclosures;
  2654. }
  2655. } else {
  2656. this.$set(this.form, "fId", null);
  2657. this.$set(this.form, "fMblno", null);
  2658. this.$set(this.form, "fMarks", null);
  2659. this.$set(this.form, "fProductName", null);
  2660. this.$set(this.form, "fNetweight", 0);
  2661. this.$set(this.form, "fPlanvolumn", 0);
  2662. this.$set(this.form, "fGrossweight", 0);
  2663. }
  2664. });
  2665. },
  2666. changePrint() {
  2667. if (this.form.fCompany) {
  2668. getCorps(this.form.fCompany).then(res => {
  2669. this.fCompanyName = res.data.corp.fName
  2670. this.printFeeConfirm.fAddr = res.data.corp.fAddr
  2671. this.printFeeConfirm.fTel = res.data.corp.fTel
  2672. this.printFeeConfirm.fBankname = res.data.corp.fBankname
  2673. this.printFeeConfirm.fBankno = res.data.corp.fBankno
  2674. this.printFeeConfirm.fTax = res.data.corp.fTax
  2675. })
  2676. } else {
  2677. this.fCompanyName = ''
  2678. this.printFeeConfirm = {
  2679. fAddr: '',
  2680. fBankname: '',
  2681. fBankno: '',
  2682. fTel: '',
  2683. fTax: '',
  2684. }
  2685. }
  2686. },
  2687. submitForm() {
  2688. this.$refs["form"].validate((valid) => {
  2689. if (valid) {
  2690. // if (this.detailList.length === 0) {
  2691. // return this.$message.error("请新增库存明细!");
  2692. // }
  2693. this.updateDeduplication();
  2694. for (let item in this.warehouseDrList) {
  2695. if (!this.warehouseDrList[item].fCorpid) {
  2696. if (item === "fBusinessType") {
  2697. } else {
  2698. this.$message.error(
  2699. "请维护收款信息第" + (Number(item) + 1) + "行客户名称"
  2700. );
  2701. return false;
  2702. }
  2703. }
  2704. if (!this.warehouseDrList[item].fFeeid) {
  2705. if (item === "fBusinessType") {
  2706. } else {
  2707. this.$message.error(
  2708. "请维护收款信息第" + (Number(item) + 1) + "行费用名称"
  2709. );
  2710. return false;
  2711. }
  2712. }
  2713. if (!this.warehouseDrList[item].fFeeUnitid) {
  2714. if (item === "fBusinessType") {
  2715. } else {
  2716. this.$message.error(
  2717. "请维护收款信息第" + (Number(item) + 1) + "行计价单位"
  2718. );
  2719. return false;
  2720. }
  2721. }
  2722. }
  2723. for (let item in this.warehouseCrList) {
  2724. if (!this.warehouseCrList[item].fCorpid) {
  2725. if (item === "fBusinessType") {
  2726. } else {
  2727. this.$message.error(
  2728. "请维护付款信息第" + (Number(item) + 1) + "行客户名称"
  2729. );
  2730. return false;
  2731. }
  2732. }
  2733. if (!this.warehouseCrList[item].fFeeid) {
  2734. if (item === "fBusinessType") {
  2735. } else {
  2736. this.$message.error(
  2737. "请维护付款信息第" + (Number(item) + 1) + "行费用名称"
  2738. );
  2739. return false;
  2740. }
  2741. }
  2742. if (!this.warehouseCrList[item].fFeeUnitid) {
  2743. if (item === "fBusinessType") {
  2744. } else {
  2745. this.$message.error(
  2746. "请维护付款信息第" + (Number(item) + 1) + "行计价单位"
  2747. );
  2748. return false;
  2749. }
  2750. }
  2751. }
  2752. // 附件数据
  2753. this.form.fBillingway = this.form.fFeetUnit;
  2754. if (this.detailList.length == 0) {
  2755. this.form.fNetweight = 0;
  2756. this.form.fPlanvolumn = 0;
  2757. this.form.fGrossweight = 0;
  2758. } else {
  2759. this.form.fNetweight = this.fNetweight;
  2760. this.form.fPlanvolumn = this.fPlanvolumn;
  2761. this.form.fGrossweight = this.fGrossweight;
  2762. }
  2763. if (this.CntrTable.length > 0) {
  2764. let arr = [];
  2765. this.CntrTable.map((e) => {
  2766. this.cntrList.map((item) => {
  2767. if (item.fId == e.fCntrid) {
  2768. arr.push(item.fName + "X" + e.fCntrcount);
  2769. }
  2770. });
  2771. });
  2772. arr = [...new Set(arr)];
  2773. this.form.fCntval = arr.join(",");
  2774. } else {
  2775. this.form.fCntval = null;
  2776. }
  2777. if (this.detailList.length > 0) {
  2778. let arr = [];
  2779. this.detailList.map((e) => {
  2780. this.goodsOptions.map((item) => {
  2781. if (e.fGoodsid == item.fId) {
  2782. arr.push(item.fName);
  2783. }
  2784. });
  2785. });
  2786. arr = [...new Set(arr)];
  2787. this.form.fProductName = arr.join(",");
  2788. } else {
  2789. this.form.fProductName = "";
  2790. }
  2791. if (this.detailList.length > 0) {
  2792. let arr = [];
  2793. this.detailList.map((e) => {
  2794. arr.push(e.fMarks);
  2795. });
  2796. arr = [...new Set(arr)];
  2797. this.form.fMarks = arr.join(',')
  2798. this.form.fMarks = this.form.fMarks.slice(0, 100);
  2799. } else {
  2800. this.form.fMarks = "";
  2801. }
  2802. let formData = new window.FormData();
  2803. formData.append("type", "2");
  2804. formData.append("warehouseBills", JSON.stringify(this.form));
  2805. // 库存明细
  2806. formData.append(
  2807. "warehousebillsitems",
  2808. JSON.stringify(this.detailList)
  2809. );
  2810. // 附件数据
  2811. formData.append(
  2812. "tEnclosure",
  2813. JSON.stringify(this.relevantAttachments)
  2814. );
  2815. // 费用明细付款
  2816. formData.append(
  2817. "warehousebillsfeesCr",
  2818. JSON.stringify(this.warehouseCrList)
  2819. );
  2820. // 收款
  2821. formData.append(
  2822. "warehousebillsfeesDr",
  2823. JSON.stringify(this.warehouseDrList)
  2824. );
  2825. formData.append("mblnoStatus", JSON.stringify(this.mblnoStatus));
  2826. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2827. warehouseSubmission(formData).then((response) => {
  2828. if (response.code == 200) {
  2829. this.msgSuccess("提交成功");
  2830. setTimeout(() => {
  2831. this.cancel();
  2832. }, 200);
  2833. }
  2834. });
  2835. }
  2836. });
  2837. },
  2838. saveForm(status) {
  2839. this.$refs["form"].validate((valid) => {
  2840. if (valid) {
  2841. if (this.form.fNewTrademodeid == this.form.fTrademodeid) {
  2842. return this.$alert('新旧贸易方式相同,请做调拨单处理', '提示', {
  2843. confirmButtonText: '确定'
  2844. })
  2845. }
  2846. this.updateDeduplication();
  2847. this.form.fBillingway = this.form.fFeetUnit;
  2848. this.form.fFeetunit = this.form.fFeetUnit;
  2849. if (this.detailList.length == 0) {
  2850. this.form.fNetweight = 0;
  2851. this.form.fPlanvolumn = 0;
  2852. this.form.fGrossweight = 0;
  2853. } else {
  2854. this.form.fNetweight = this.fNetweight;
  2855. this.form.fPlanvolumn = this.fPlanvolumn;
  2856. this.form.fGrossweight = this.fGrossweight;
  2857. }
  2858. if (this.form.fTrademodeid == this.form.fNewTrademodeid) {
  2859. return this.$message.error("原贸易方式不能与新贸易方式相同");
  2860. }
  2861. // 附件数据
  2862. this.form.fQty = this.fQty;
  2863. if (this.CntrTable.length > 0) {
  2864. let arr = [];
  2865. this.CntrTable.map((e) => {
  2866. this.cntrList.map((item) => {
  2867. if (item.fId == e.fCntrid) {
  2868. arr.push(item.fName + "X" + e.fCntrcount);
  2869. }
  2870. });
  2871. });
  2872. arr = [...new Set(arr)];
  2873. this.form.fCntval = arr.join(",");
  2874. } else {
  2875. this.form.fCntval = null;
  2876. }
  2877. if (this.detailList.length > 0) {
  2878. let arr = [];
  2879. this.detailList.map((e) => {
  2880. this.goodsOptions.map((item) => {
  2881. if (e.fGoodsid == item.fId) {
  2882. arr.push(item.fName);
  2883. }
  2884. });
  2885. });
  2886. arr = [...new Set(arr)];
  2887. this.form.fProductName = arr.join(",");
  2888. } else {
  2889. this.form.fProductName = "";
  2890. }
  2891. if (this.detailList.length > 0) {
  2892. let arr = [];
  2893. this.detailList.map((e) => {
  2894. arr.push(e.fMarks);
  2895. });
  2896. arr = [...new Set(arr)];
  2897. this.form.fMarks = arr.join(',')
  2898. this.form.fMarks = this.form.fMarks.slice(0, 100);
  2899. } else {
  2900. this.form.fMarks = "";
  2901. }
  2902. this.form.fBillstatus = 2;
  2903. for (let item in this.warehouseDrList) {
  2904. if (!this.warehouseDrList[item].fCorpid) {
  2905. return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
  2906. } else if (!this.warehouseDrList[item].fFeeid) {
  2907. return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
  2908. } else if (!this.warehouseDrList[item].fFeeUnitid) {
  2909. return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
  2910. }
  2911. }
  2912. for (let item in this.warehouseCrList) {
  2913. if (!this.warehouseCrList[item].fCorpid) {
  2914. return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
  2915. } else if (!this.warehouseCrList[item].fFeeid) {
  2916. return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
  2917. } else if (!this.warehouseCrList[item].fFeeUnitid) {
  2918. return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
  2919. }
  2920. }
  2921. let formData = new window.FormData();
  2922. formData.append("type", "2");
  2923. formData.append("warehouseBills", JSON.stringify(this.form));
  2924. // 库存明细
  2925. formData.append(
  2926. "warehousebillsitems",
  2927. JSON.stringify(this.detailList)
  2928. );
  2929. // 附件数据
  2930. formData.append(
  2931. "tEnclosure",
  2932. JSON.stringify(this.relevantAttachments)
  2933. );
  2934. // 费用明细付款
  2935. formData.append(
  2936. "warehousebillsfeesCr",
  2937. JSON.stringify(this.warehouseCrList)
  2938. );
  2939. // 收款
  2940. formData.append(
  2941. "warehousebillsfeesDr",
  2942. JSON.stringify(this.warehouseDrList)
  2943. );
  2944. formData.append("mblnoStatus", JSON.stringify(this.mblnoStatus));
  2945. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2946. addStockTransfer(formData).then((response) => {
  2947. if (response.data == false) {
  2948. this.$confirm(response.msg, "提示", {
  2949. confirmButtonText: "确定",
  2950. cancelButtonText: "取消",
  2951. type: "warning",
  2952. })
  2953. .then(() => {
  2954. this.mblnoStatus = true;
  2955. this.saveForm();
  2956. })
  2957. .catch(() => {
  2958. this.$message({
  2959. type: "info",
  2960. message: "已取消",
  2961. });
  2962. });
  2963. } else {
  2964. if ((response.code = 200)) {
  2965. this.mblnoStatus = "";
  2966. this.form = response.data.warehouseBills;
  2967. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2968. this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
  2969. this.$set(
  2970. this.form,
  2971. "createTime",
  2972. Date.parse(this.form.createTime)
  2973. );
  2974. if (this.form.fStltypeid || this.form.fStltypeid == 0) {
  2975. this.$set(
  2976. this.form,
  2977. "fStltypeid",
  2978. this.form.fStltypeid.toString()
  2979. );
  2980. }
  2981. this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
  2982. if (this.form.fCartype || this.form.fCartype == 0) {
  2983. this.$set(
  2984. this.form,
  2985. "fCartype",
  2986. this.form.fCartype.toString()
  2987. );
  2988. }
  2989. if (this.form.fTrademodeid) {
  2990. this.$set(
  2991. this.form,
  2992. "fTrademodeid",
  2993. this.form.fTrademodeid.toString()
  2994. );
  2995. }
  2996. if (this.form.fNewTrademodeid) {
  2997. this.$set(
  2998. this.form,
  2999. "fNewTrademodeid",
  3000. this.form.fNewTrademodeid.toString()
  3001. );
  3002. }
  3003. response.data.warehousebillsitems.map((e) => {
  3004. e.fBsdate = Date.parse(e.fBsdate);
  3005. e.fBusinessType = e.fBusinessType.toString();
  3006. e.fLntype = e.fLntype ? e.fLntype.toString() : null;
  3007. });
  3008. this.detailList = response.data.warehousebillsitems;
  3009. this.msgSuccess("保存成功");
  3010. if (status == "goBack") {
  3011. this.cancel();
  3012. }
  3013. }
  3014. }
  3015. });
  3016. }
  3017. });
  3018. },
  3019. // 库存明细多选
  3020. Selectinventory(selection) {
  3021. this.Printinglist = selection
  3022. //允许撤销入库list
  3023. this.dataWithdrawList = selection
  3024. //允许确认入库list
  3025. this.dataListSelection = selection
  3026. if (this.dataWithdrawList.length === 0) {
  3027. this.cancelDelivery = true
  3028. } else {
  3029. for (let item in this.dataWithdrawList) {
  3030. if (this.dataWithdrawList[item].fBillstatus === 40) {
  3031. this.cancelDelivery = false
  3032. this.deliveryConfirmation = true
  3033. for (let li in this.dataWithdrawList) {
  3034. if (this.entryPrinting != 0 ? this.dataWithdrawList[li].fBillstatus === 10 : this.dataWithdrawList[li].fBillstatus === 30) {
  3035. this.deliveryConfirmation = true
  3036. this.cancelDelivery = true
  3037. return
  3038. }
  3039. }
  3040. } else if (this.entryPrinting != 0 ? this.dataWithdrawList[item].fBillstatus === 10 : this.dataWithdrawList[item].fBillstatus === 30) {
  3041. this.deliveryConfirmation = false
  3042. this.cancelDelivery = true
  3043. for (let li in this.dataWithdrawList) {
  3044. if (this.dataWithdrawList[li].fBillstatus === 40) {
  3045. this.deliveryConfirmation = true
  3046. this.cancelDelivery = true
  3047. return
  3048. }
  3049. }
  3050. }
  3051. }
  3052. }
  3053. },
  3054. // 合计
  3055. getSummaries(param) {
  3056. const { columns, data } = param;
  3057. const sums = [];
  3058. var values = [];
  3059. columns.forEach((column, index) => {
  3060. if (index === 0) {
  3061. sums[index] = "";
  3062. return;
  3063. }
  3064. if (column.property === "fGrossweight") {
  3065. values = data.map((item) => Number(item["fGrossweight"]));
  3066. }
  3067. if (column.property === "fNetweight") {
  3068. values = data.map((item) => Number(item["fNetweight"]));
  3069. }
  3070. if (column.property === "fQty") {
  3071. values = data.map((item) => Number(item["fQty"]));
  3072. }
  3073. if (column.property === "fCntqty") {
  3074. values = data.map((item) => Number(item["fCntqty"]));
  3075. }
  3076. if (
  3077. column.property === "fGrossweight" ||
  3078. column.property === "fNetweight" ||
  3079. column.property === "fQty" ||
  3080. column.property === "fCntqty"
  3081. ) {
  3082. sums[index] = values.reduce((prev, curr) => {
  3083. const value = Number(curr);
  3084. if (!isNaN(value)) {
  3085. if (column.property === "fGrossweight") {
  3086. this.fGrossweight = prev + curr;
  3087. }
  3088. if (column.property === "fNetweight") {
  3089. this.fNetweight = prev + curr;
  3090. }
  3091. if (column.property === "fQty") {
  3092. this.fQty = prev + curr;
  3093. this.sumMum = prev + curr;
  3094. }
  3095. if (column.property === "fCntqty") {
  3096. this.fCntqty = prev + curr;
  3097. }
  3098. return prev + curr;
  3099. } else {
  3100. return prev;
  3101. }
  3102. }, 0);
  3103. if (column.property === "fGrossweight") {
  3104. sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
  3105. } else if (column.property === "fNetweight") {
  3106. sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
  3107. } else {
  3108. sums[index] = sums[index].toFixed(2);
  3109. }
  3110. }
  3111. });
  3112. this.sums = sums;
  3113. return sums;
  3114. },
  3115. // 付款合计
  3116. warehouseDrSummaries(param) {
  3117. const { columns, data } = param;
  3118. const sums = [];
  3119. columns.forEach((column, index) => {
  3120. if (index === 0) {
  3121. sums[index] = "合计";
  3122. return;
  3123. }
  3124. const values = data.map((item) => Number(item[column.property]));
  3125. if (
  3126. column.property === "fUnitprice" ||
  3127. column.property === "fAmount" ||
  3128. column.property === "fQty" ||
  3129. column.property === "fQty"
  3130. ) {
  3131. sums[index] = values.reduce((prev, curr) => {
  3132. const value = Number(curr);
  3133. if (!isNaN(value)) {
  3134. return prev + curr;
  3135. } else {
  3136. return prev;
  3137. }
  3138. }, 0);
  3139. sums[index] = sums[index].toFixed(2);
  3140. }
  3141. });
  3142. return sums;
  3143. },
  3144. // 库存总账多选框
  3145. whgenlegSelectionChange(selection) {
  3146. this.dialogWhgenlegList = selection;
  3147. },
  3148. handleSelect(key) {
  3149. if (!this.form.fCorpid) {
  3150. this.$message({
  3151. message: "请维护客户",
  3152. type: "warning",
  3153. });
  3154. } else if (this.form.fProductName == undefined) {
  3155. this.$message({
  3156. message: "请维护入库明细品名",
  3157. type: "warning",
  3158. });
  3159. } else {
  3160. this.pageNum = 1;
  3161. this.pageSize = 10;
  3162. this.dialogWhgenlegList = [];
  3163. this.whgenlegTotal = 0;
  3164. this.warehousingagreements = true;
  3165. this.getWhgenlegList(key);
  3166. }
  3167. },
  3168. // 查询作业费信息
  3169. getWhgenlegList(key) {
  3170. let data = {};
  3171. if (key == 2) {
  3172. this.key_id = key;
  3173. this.Navigation = true;
  3174. data = {
  3175. pageNum: this.pageNum,
  3176. pageSize: this.pageSize,
  3177. fTaskType: key,
  3178. fLabour: this.form.fLabour,
  3179. };
  3180. } else if (key == 1) {
  3181. this.key_id = key;
  3182. this.Navigation = true;
  3183. data = {
  3184. pageNum: this.pageNum,
  3185. pageSize: this.pageSize,
  3186. fTaskType: key,
  3187. fFleet: this.form.fFleet,
  3188. };
  3189. } else {
  3190. this.Navigation = false;
  3191. this.key_id = key;
  3192. data = {
  3193. pageNum: this.pageNum,
  3194. pageSize: this.pageSize,
  3195. fCorpid: this.form.fCorpid,
  3196. };
  3197. }
  3198. operationAgreement(data).then((response) => {
  3199. response.rows.map((e) => {
  3200. if (e.fFeeUnitid) {
  3201. e.fFeeUnitid = e.fFeeUnitid.toString();
  3202. }
  3203. });
  3204. this.tasklegList = response.rows;
  3205. this.whgenlegTotal = response.total;
  3206. });
  3207. },
  3208. // 入库明细新增list
  3209. addRelevant() {
  3210. this.$refs["form"].validate((valid) => {
  3211. if (valid) {
  3212. this.whgenlegList = [];
  3213. this.dialogWhgenlegList = [];
  3214. this.whgenlegTotal = 0;
  3215. this.whgenlegVisible = true;
  3216. this.getDetailsList();
  3217. }
  3218. });
  3219. },
  3220. // 查询库存总账信息
  3221. getDetailsList() {
  3222. if (this.detailList.length == 0) {
  3223. this.whgenlegParams.fMblno = this.form.fMblno;
  3224. }
  3225. this.whgenlegParams.fCorpid = this.form.fCorpid;
  3226. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  3227. this.whgenlegParams.fWarehouseid = this.form.fInwarehouseid;
  3228. listWhgenleg(this.whgenlegParams).then((response) => {
  3229. response.rows.map((e) => {
  3230. e.fQtyblc2 = e.fQtyblc;
  3231. e.fGrossweightblc2 = e.fGrossweightblc;
  3232. e.fNetweightblc2 = e.fNetweightblc;
  3233. });
  3234. this.whgenlegList = response.rows;
  3235. this.whgenlegTotal = response.total;
  3236. });
  3237. },
  3238. printZyd() {
  3239. if (this.Printinglist.length > 0) {
  3240. for (let item in this.Printinglist) {
  3241. if (!this.Printinglist[item].fId) {
  3242. return this.$message.error("请先保存!");
  3243. }
  3244. if (
  3245. this.Printinglist[item].fTruckno !== this.Printinglist[0].fTruckno
  3246. ) {
  3247. return this.$message.error("请选择车相同车号");
  3248. }
  3249. }
  3250. this.print_zyd = true;
  3251. this.warehouseOptions.map((e) => {
  3252. if (e.fId == this.form.fWarehouseid) {
  3253. this.stockaddr = e.fAddr;
  3254. }
  3255. });
  3256. this.fDriverTel = this.Printinglist[0].fDriverTel;
  3257. } else {
  3258. this.$message.error("请选择需要打印的明细!");
  3259. }
  3260. },
  3261. handleCommand(command) {
  3262. if (this.Printinglist.length > 0) {
  3263. this.$refs["form"].validate((valid) => {
  3264. if (valid) {
  3265. for (let corp in this.fMblnoOptions) {
  3266. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  3267. this.$set(
  3268. this.form,
  3269. "fCorpidName",
  3270. this.fMblnoOptions[corp].fName
  3271. );
  3272. }
  3273. }
  3274. this.warehouseOptions.map((e) => {
  3275. if (e.fId == this.form.fWarehouseid) {
  3276. this.stockName = e.fName;
  3277. this.stockaddr = e.fAddr;
  3278. }
  3279. });
  3280. this.fDriverTel = this.Printinglist[0].fDriverTel;
  3281. this.fBsdate = this.Printinglist[0].fBsdate;
  3282. this.fTruckno = this.Printinglist[0].fTruckno;
  3283. this.allfCntqty = 0;
  3284. this.allfGrossweight = 0;
  3285. this.allfPlanqty = 0;
  3286. this.allfNetweight = 0;
  3287. this.allfQty = 0;
  3288. this.Printinglist.map((e) => {
  3289. if (e.fCntqty) {
  3290. this.allfCntqty += e.fCntqty;
  3291. }
  3292. if (e.fGrossweight) {
  3293. this.allfGrossweight += e.fGrossweight;
  3294. }
  3295. if (e.fPlanqty) {
  3296. this.allfPlanqty += e.fPlanqty;
  3297. }
  3298. if (e.fNetweight) {
  3299. this.allfNetweight += e.fNetweight;
  3300. }
  3301. if (e.fQty) {
  3302. this.allfQty += e.fQty;
  3303. }
  3304. });
  3305. if (command == "a") {
  3306. this.print_shd = true;
  3307. } else if (command == "b") {
  3308. this.print_rkd = true;
  3309. } else if (command == "c") {
  3310. this.print_ykd = true;
  3311. }
  3312. }
  3313. });
  3314. } else {
  3315. this.$message.error("请选择需要打印的明细!");
  3316. }
  3317. },
  3318. //计算仓储费日期变更
  3319. changeDate() {
  3320. this.$set(this.form, "fChargedate", this.form.fBsdate);
  3321. },
  3322. addRow() {
  3323. var obj = {};
  3324. this.CntrTable.push(obj);
  3325. },
  3326. deleteRow(index, rows) {
  3327. rows.splice(index, 1);
  3328. },
  3329. wDeleteRow(index, rows) {
  3330. rows.splice(index, 1);
  3331. this.sumMum = 0;
  3332. this.detailList.map((e) => {
  3333. if (e.fQty) {
  3334. this.sumMum += e.fQty;
  3335. }
  3336. });
  3337. if (this.detailList.length == 0) {
  3338. this.form.fProductName = "";
  3339. this.form.fMarks = "";
  3340. this.form.fNetweight = 0;
  3341. this.form.fPlanvolumn = 0;
  3342. this.form.fGrossweight = 0;
  3343. }
  3344. },
  3345. // 收款信息新行
  3346. addCollection() {
  3347. this.$refs["form"].validate((valid) => {
  3348. if (valid) {
  3349. if (this.form.fBusinessType == null) {
  3350. this.$message.error("请维护作业类型");
  3351. return false;
  3352. } else {
  3353. this.warehouseDrList.push({
  3354. fCorpid: this.form.fCorpid,
  3355. fFeeid: null,
  3356. fFeeUnitid: "",
  3357. fQty: null,
  3358. fUnitprice: null,
  3359. fAmount: null,
  3360. fCurrency: "RMB",
  3361. fExrate: "1",
  3362. fTaxrate: '0',
  3363. fCxrate: null,
  3364. fRate: null,
  3365. remarks: null,
  3366. fMblno: this.form.fMblno,
  3367. fProductName: this.form.fProductName,
  3368. fMarks: this.form.fMarks,
  3369. fBusinessType: this.form.fBusinessType,
  3370. fSrcTypeId: 0,
  3371. fStltypeid: '1',
  3372. });
  3373. this.fWbuOptions = [];
  3374. let queryParams = { pageNum: 1, fDc: "D" };
  3375. listFees(queryParams).then((response) => {
  3376. this.fDNameOptions = response.rows;
  3377. });
  3378. }
  3379. }
  3380. });
  3381. },
  3382. //付款信息新行
  3383. addpayment() {
  3384. this.$refs["form"].validate((valid) => {
  3385. if (valid) {
  3386. if (this.form.fBusinessType == null) {
  3387. return this.$message.error("请维护作业类型");
  3388. } else {
  3389. this.warehouseCrList.push({
  3390. fCorpid: this.form.fCorpid,
  3391. fFeeid: null,
  3392. fFeeUnitid: "",
  3393. fQty: null,
  3394. fUnitprice: null,
  3395. fAmount: null,
  3396. fCurrency: "RMB",
  3397. fExrate: "1",
  3398. fTaxrate: '0',
  3399. fCxrate: null,
  3400. fRate: null,
  3401. remarks: null,
  3402. fMblno: this.form.fMblno,
  3403. fProductName: this.form.fProductName,
  3404. fMarks: this.form.fMarks,
  3405. fBusinessType: this.form.fBusinessType,
  3406. fSrcTypeId: 0,
  3407. fStltypeid: '1',
  3408. });
  3409. this.fWbuOptions = [];
  3410. let queryParams = { pageNum: 1, fDc: "C" };
  3411. listFees(queryParams).then((response) => {
  3412. this.fCNameOptions = response.rows;
  3413. });
  3414. }
  3415. }
  3416. });
  3417. },
  3418. //导入收付款信息明细
  3419. zhgenlegData() {
  3420. if (this.dialogWhgenlegList.length === 0) {
  3421. this.$message({
  3422. message: "请选择需要导入的数据",
  3423. type: "warning",
  3424. });
  3425. } else {
  3426. this.dialogWhgenlegList.map((e) => {
  3427. let qty = 1;
  3428. if (e.fFeeUnitid == 1) {
  3429. qty = this.fQty;
  3430. } else if (e.fFeeUnitid == 2) {
  3431. qty = (this.fGrossweight / 1000).toFixed(2);
  3432. } else if (e.fFeeUnitid == 3) {
  3433. qty = (this.fNetweight / 1000).toFixed(2);
  3434. } else if (e.fFeeUnitid == 7) {
  3435. qty = this.fCntqty;
  3436. }
  3437. let fAmount = 0;
  3438. fAmount = e.fPrice * qty;
  3439. console.log(this.key_id);
  3440. if (this.key_id == 3) {
  3441. this.warehouseDrList.push({
  3442. fQty: qty,
  3443. fCorpid: e.fCorpid,
  3444. fFeeid: e.feeFId,
  3445. fFeeUnitid: e.fFeeUnitid,
  3446. fUnitprice: e.fPrice,
  3447. fCurrency: "RMB",
  3448. fExrate: 1,
  3449. fAmount: fAmount,
  3450. fTaxrate: '0',
  3451. fMblno: this.form.fMblno,
  3452. fProductName: this.form.fProductName,
  3453. fMarks: this.form.fMarks,
  3454. fBusinessType: this.form.fBusinessType,
  3455. fSrcTypeId: 1,
  3456. fStltypeid: '1',
  3457. });
  3458. } else {
  3459. this.warehouseCrList.push({
  3460. fQty: qty,
  3461. fCorpid: e.fCorpid,
  3462. fFeeid: e.feeFId,
  3463. fFeeUnitid: e.fFeeUnitid,
  3464. fUnitprice: e.fPrice,
  3465. fCurrency: "RMB",
  3466. fExrate: 1,
  3467. fAmount: fAmount,
  3468. fTaxrate: '0',
  3469. fMblno: this.form.fMblno,
  3470. fProductName: this.form.fProductName,
  3471. fMarks: this.form.fMarks,
  3472. fBusinessType: this.form.fBusinessType,
  3473. fSrcTypeId: 1,
  3474. fStltypeid: '1',
  3475. });
  3476. }
  3477. });
  3478. this.warehousingagreements = false;
  3479. }
  3480. },
  3481. // 收款选
  3482. Collectionoptions(selection) {
  3483. this.Collectionoptionss = selection;
  3484. for (let item in this.fWbuOptions) {
  3485. for (let li in this.Collectionoptionss) {
  3486. if (
  3487. this.fWbuOptions[item].fId === this.Collectionoptionss[li].fFeeid
  3488. ) {
  3489. this.$set(
  3490. this.Collectionoptionss[li],
  3491. "fFeeids",
  3492. this.fWbuOptions[item].fName
  3493. );
  3494. }
  3495. }
  3496. }
  3497. },
  3498. //获取登陆人
  3499. queryUser() {
  3500. queryUserVal().then((response) => {
  3501. if (response.user !== null) {
  3502. this.userVal = response.user;
  3503. this.$set(this.form, "fDeptid", this.userVal.deptId);
  3504. this.$set(this.form, "createBy", this.userVal.userName);
  3505. this.$set(this.form, "fStorekeeper", this.userVal.nickName);
  3506. this.$set(this.form, "fIfdamage", "1");
  3507. this.$set(this.form, "fIfweigh", "1");
  3508. this.$set(this.form, "fTrademodeid", "1");
  3509. this.$set(this.form, "createTime", Date.parse(new Date()));
  3510. this.$set(this.form, "fBstime", Date.parse(new Date()));
  3511. this.$set(this.form, "fBusinessType", "0");
  3512. }
  3513. if (response.dept !== null) {
  3514. this.deptOptions = [];
  3515. this.deptOptions.push(response.dept);
  3516. }
  3517. });
  3518. },
  3519. //作业类型校验
  3520. educationChange() {
  3521. if (this.form.fBusinessType === "1" || this.form.fBusinessType === "2") {
  3522. this.isrequired = 1;
  3523. this.isrequired2 = 2;
  3524. } else if (
  3525. this.form.fBusinessType === "3" ||
  3526. this.form.fBusinessType === "4"
  3527. ) {
  3528. this.isrequired2 = 1;
  3529. this.isrequired = 2;
  3530. } else {
  3531. this.isrequired = 2;
  3532. this.isrequired2 = 2;
  3533. }
  3534. },
  3535. // 数量计算
  3536. changeContractAmt(row) {
  3537. let fQty = 0;
  3538. let fUnitprice = 0;
  3539. if (row.fUnitprice) {
  3540. fUnitprice = row.fUnitprice;
  3541. }
  3542. if (row.fQty) {
  3543. fQty = row.fQty;
  3544. }
  3545. this.$set(row, "fAmount", (Number(fUnitprice) * Number(fQty)).toFixed(2));
  3546. },
  3547. // 变更计价单位
  3548. changeFeeUnit(row) {
  3549. if (!row.fFeeUnitid) {
  3550. return false;
  3551. }
  3552. if (row.fFeeUnitid === "2") {
  3553. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(3));
  3554. } else if (row.fFeeUnitid === "1") {
  3555. this.$set(row, "fQty", this.fQty.toFixed(2));
  3556. } else if (row.fFeeUnitid === "3") {
  3557. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(3));
  3558. } else if (row.fFeeUnitid === "7") {
  3559. this.$set(row, "fQty", this.fCntqty);
  3560. } else if (row.fFeeUnitid === "8") {
  3561. this.$set(row, "fQty", 1);
  3562. } else {
  3563. this.$set(row, "fQty", 0);
  3564. }
  3565. if (row.fUnitprice) {
  3566. this.$set(
  3567. row,
  3568. "fAmount",
  3569. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  3570. );
  3571. }
  3572. },
  3573. updateDeduplication() {
  3574. if (this.detailList.length) {
  3575. let fMarks = [];
  3576. let fProductName = [];
  3577. let fMblno = [];
  3578. this.detailList.map((e) => {
  3579. if (e.fMarks) {
  3580. fMarks.push(e.fMarks);
  3581. }
  3582. if (e.fGoodsids) {
  3583. fProductName.push(e.fGoodsids);
  3584. }
  3585. if (e.fMblno) {
  3586. fMblno.push(e.fMblno);
  3587. }
  3588. });
  3589. this.$set(this.form, "fMarks", [...new Set(fMarks)].join(","));
  3590. this.$set(
  3591. this.form,
  3592. "fProductName",
  3593. [...new Set(fProductName)].join(",")
  3594. );
  3595. fMblno = [...new Set(fMblno)];
  3596. if (fMblno.length <= 2) {
  3597. this.$set(this.form, "fMblno", [...new Set(fMblno)].join(","));
  3598. } else {
  3599. this.$set(this.form, "fMblno", fMblno[0] + "," + fMblno[1] + "…");
  3600. }
  3601. }
  3602. },
  3603. //打印
  3604. addprint(status) {
  3605. if (status == "zyd") {
  3606. if (this.CntrTable.length > 0) {
  3607. let arr = [];
  3608. this.CntrTable.map((e) => {
  3609. this.cntrList.map((item) => {
  3610. if (item.fId == e.fCntrid) {
  3611. arr.push(item.fName + "X" + e.fCntrcount);
  3612. }
  3613. });
  3614. });
  3615. arr = [...new Set(arr)];
  3616. this.form.fCntval = arr.join(",");
  3617. } else {
  3618. this.form.fCntval = null;
  3619. }
  3620. if (this.detailList.length > 0) {
  3621. let arr = [];
  3622. this.detailList.map((e) => {
  3623. this.goodsOptions.map((item) => {
  3624. if (e.fGoodsid == item.fId) {
  3625. arr.push(item.fName);
  3626. }
  3627. });
  3628. });
  3629. arr = [...new Set(arr)];
  3630. this.form.fProductName = arr.join(",");
  3631. } else {
  3632. this.form.fProductName = "";
  3633. }
  3634. if (this.detailList.length > 0) {
  3635. let arr = [];
  3636. this.detailList.map((e) => {
  3637. arr.push(e.fMarks);
  3638. });
  3639. arr = [...new Set(arr)];
  3640. this.form.fMarks = arr.join(',')
  3641. this.form.fMarks = this.form.fMarks.slice(0, 100);
  3642. } else {
  3643. this.form.fMarks = "";
  3644. }
  3645. this.form.fBillingway = this.form.fFeetUnit;
  3646. if (this.detailList.length == 0) {
  3647. this.form.fNetweight = 0;
  3648. this.form.fPlanvolumn = 0;
  3649. this.form.fGrossweight = 0;
  3650. } else {
  3651. this.form.fNetweight = this.fNetweight;
  3652. this.form.fPlanvolumn = this.fPlanvolumn;
  3653. this.form.fGrossweight = this.fGrossweight;
  3654. }
  3655. let formData = new window.FormData();
  3656. formData.append("type", "2");
  3657. formData.append("warehouseBills", JSON.stringify(this.form));
  3658. formData.append(
  3659. "warehousebillsitems",
  3660. JSON.stringify(this.Printinglist)
  3661. );
  3662. formData.append(
  3663. "warehousebillsfeesDr",
  3664. JSON.stringify(this.warehouseDrList)
  3665. );
  3666. formData.append(
  3667. "warehousebillsfeesCr",
  3668. JSON.stringify(this.warehouseCrList)
  3669. );
  3670. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3671. formData.append("tCntr", JSON.stringify(this.CntrTable));
  3672. addJoblist(formData).then((response) => {
  3673. if (response.code == 200) {
  3674. this.detailList.map((e, index) => {
  3675. response.data.warehousebillsitems.map((item) => {
  3676. item.fBsdate = Date.parse(new Date(item.fBsdate));
  3677. if (item.fBusinessType) {
  3678. item.fBusinessType = item.fBusinessType.toString();
  3679. }
  3680. item.fLntype = item.fLntype ? item.fLntype.toString() : null;
  3681. if (e.fId == item.fId) {
  3682. this.$set(this.detailList, index, item);
  3683. }
  3684. });
  3685. });
  3686. this.$set(this.form, "fItemsStatus", 2);
  3687. }
  3688. });
  3689. }
  3690. const style =
  3691. "@page { } " +
  3692. "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
  3693. print({
  3694. printable: "print_area1",
  3695. type: "html",
  3696. style: style, // 亦可使用引入的外部css;
  3697. scanStyles: false,
  3698. });
  3699. },
  3700. cancel() {
  3701. if (this.$route.query.id) {
  3702. this.$router.push({ query: {} });
  3703. }
  3704. this.resetForm("form");
  3705. this.detailList = [];
  3706. this.relevantAttachments = [];
  3707. this.warehouseCrList = [];
  3708. this.warehouseDrList = [];
  3709. this.CntrTable = [];
  3710. this.$emit("changeShow", "true");
  3711. },
  3712. goBack() {
  3713. this.$confirm("是否确定返回列表?", "提示", {
  3714. confirmButtonText: "保存",
  3715. cancelButtonText: "取消",
  3716. type: "warning",
  3717. })
  3718. .then(() => {
  3719. this.saveForm("goBack");
  3720. })
  3721. .catch(() => {
  3722. this.cancel();
  3723. });
  3724. },
  3725. feeChange(fDC) {
  3726. let data = {
  3727. form: {},
  3728. warehousebillsfeesCr: [],
  3729. warehousebillsfeesDr: [],
  3730. billType: 'cargoClearance',
  3731. fDc: fDC
  3732. }
  3733. data.form = this.form
  3734. if (fDC == 'C') {
  3735. data.warehousebillsfeesCr = this.warehouseCrList
  3736. } else {
  3737. data.warehousebillsfeesDr = this.warehouseDrList
  3738. }
  3739. this.$router.push({
  3740. path: "/business/costModify",
  3741. query: { data: data },
  3742. });
  3743. },
  3744. // 费用明细请核
  3745. listCheck(row) {
  3746. feesCheck(row.fId).then(res => {
  3747. this.$message.success('请核成功')
  3748. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  3749. res.data.fStltypeid = res.data.fStltypeid.toString();
  3750. if (res.data.fDc == 'D') {
  3751. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  3752. this.warehouseDrList.splice(index, 1, res.data)
  3753. } else {
  3754. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  3755. this.warehouseCrList.splice(index, 1, res.data)
  3756. }
  3757. })
  3758. },
  3759. // 费用明细撤销请核
  3760. revokeListCheck(row) {
  3761. revokefeeCheck(row.fId).then(res => {
  3762. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  3763. res.data.fStltypeid = res.data.fStltypeid.toString();
  3764. this.$message.success('操作成功')
  3765. if (res.data.fDc == 'D') {
  3766. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  3767. this.warehouseDrList.splice(index, 1, res.data)
  3768. } else {
  3769. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  3770. this.warehouseCrList.splice(index, 1, res.data)
  3771. }
  3772. })
  3773. },
  3774. feeChoice(row) {
  3775. getFees(row.fFeeid).then(res => {
  3776. row.fFeeUnitid = (res.data.fFeeunitid).toString()
  3777. this.changeFeeUnit(row)
  3778. })
  3779. },
  3780. // 原仓库和新仓库一样
  3781. fInwarehouseChange() {
  3782. if (this.form.fInwarehouseid) this.$set(this.form, 'fWarehouseid', this.form.fInwarehouseid)
  3783. },
  3784. },
  3785. watch: {
  3786. // 监听 addOrUpdateVisible 改变
  3787. addOrUpdateVisible(oldVal, newVal) {
  3788. this.showDialog = this.addOrUpdateVisible;
  3789. },
  3790. },
  3791. };
  3792. </script>
  3793. <style lang="scss" scoped>
  3794. .tag-hover:hover {
  3795. background-color: #d9ebfb;
  3796. }
  3797. .tag-hover {
  3798. border-top-left-radius: 0;
  3799. border-bottom-left-radius: 0;
  3800. height: 15px;
  3801. padding: 0px 1px;
  3802. line-height: 12px;
  3803. }
  3804. .print-div {
  3805. color: #000;
  3806. }
  3807. .print_table {
  3808. table {
  3809. border-right: 1px solid #000;
  3810. border-bottom: 1px solid #000;
  3811. font-size: 12px;
  3812. margin-bottom: 5px;
  3813. }
  3814. table td {
  3815. border-left: 1px solid #000;
  3816. border-top: 1px solid #000;
  3817. vertical-align: middle;
  3818. padding: 2px;
  3819. text-align: center;
  3820. }
  3821. }
  3822. .print_form {
  3823. font-size: 12px;
  3824. }
  3825. </style>