index.vue 139 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="88px"
  9. >
  10. <el-form-item label="业务编号" prop="fBillno">
  11. <el-input
  12. v-model="queryParams.fBillno"
  13. placeholder="请输入业务编号"
  14. style="width: 80%"
  15. clearable
  16. size="small"
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="制单人" prop="createBy">
  21. <el-select
  22. v-model="queryParams.createBy"
  23. filterable
  24. remote
  25. clearable
  26. style="width: 80%"
  27. :remote-method="userRemoteMethod"
  28. placeholder="请选择制单人"
  29. >
  30. <el-option
  31. v-for="(dict, index) in userOptions"
  32. :key="index.userName"
  33. :label="dict.nickName"
  34. :value="dict.userName"
  35. ></el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="入库日期" prop="timeInterval">
  39. <el-date-picker
  40. v-model="queryParams.timeInterval"
  41. type="daterange"
  42. value-format="yyyy-MM-dd"
  43. clearable
  44. style="width: 60%"
  45. range-separator="至"
  46. start-placeholder="开始日期"
  47. end-placeholder="结束日期"
  48. @keyup.enter.native="handleQuery"
  49. >
  50. </el-date-picker>
  51. </el-form-item>
  52. <el-form-item label="贸易方式" prop="fTrademodeid">
  53. <el-select
  54. v-model="queryParams.fTrademodeid"
  55. placeholder="请选择贸易方式"
  56. clearable
  57. style="width: 80%"
  58. @keyup.enter.native="handleQuery"
  59. >
  60. <el-option
  61. v-for="(dict, index) in fTrademodeidOptions"
  62. :key="index.dictValue"
  63. :label="dict.dictLabel"
  64. :value="dict.dictValue"
  65. />
  66. </el-select>
  67. </el-form-item>
  68. <el-form-item label="货权方" prop="fCorpid">
  69. <el-select
  70. v-model="queryParams.fCorpid"
  71. filterable
  72. remote
  73. clearable
  74. style="width: 80%"
  75. @keyup.enter.native="handleQuery"
  76. :remote-method="corpsRemoteMethod"
  77. placeholder="请输入模糊查找"
  78. >
  79. <el-option
  80. v-for="(dict, index) in fMblnoOptions"
  81. :key="index.fId"
  82. :label="dict.fName"
  83. :value="dict.fId"
  84. ></el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item label="提单号" prop="fMblno">
  88. <el-input
  89. v-model="queryParams.fMblno"
  90. placeholder="请输入提单号"
  91. clearable
  92. style="width: 80%"
  93. size="small"
  94. @keyup.enter.native="handleQuery"
  95. />
  96. </el-form-item>
  97. <el-form-item label="经营单位" prop="fSbu">
  98. <el-select
  99. v-model="queryParams.fSbu"
  100. filterable
  101. remote
  102. clearable
  103. :remote-method="fSbuRemoteMethod"
  104. @keyup.enter.native="handleQuery"
  105. style="width: 80%"
  106. placeholder="请选择经营单位"
  107. >
  108. <el-option
  109. v-for="(dict, index) in fMblnoOptions"
  110. :key="index.fId"
  111. :label="dict.fName"
  112. :value="dict.fId"
  113. ></el-option>
  114. </el-select>
  115. </el-form-item>
  116. <el-form-item label="货物名称" prop="fGoodsid">
  117. <el-select
  118. v-model="queryParams.fGoodsid"
  119. filterable
  120. remote
  121. clearable
  122. style="width: 80%"
  123. :remote-method="goodsRemoteMethod"
  124. @keyup.enter.native="handleQuery"
  125. placeholder="请选择货物名称"
  126. >
  127. <el-option
  128. v-for="(dict, index) in goodsOptions"
  129. :key="index.fId"
  130. :label="dict.fName"
  131. :value="dict.fId"
  132. ></el-option>
  133. </el-select>
  134. </el-form-item>
  135. <el-form-item label="仓库" prop="fWarehouseid">
  136. <el-select
  137. v-model="queryParams.fWarehouseid"
  138. filterable
  139. :disabled="browseStatus"
  140. remote
  141. clearable
  142. style="width: 80%"
  143. :remote-method="warehouseRemoteMethod"
  144. @keyup.enter.native="handleQuery"
  145. placeholder="请输入"
  146. >
  147. <el-option
  148. v-for="(dict, index) in warehouseOptions"
  149. :key="index.fId"
  150. :label="dict.fName"
  151. :value="dict.fId"
  152. ></el-option>
  153. </el-select>
  154. </el-form-item>
  155. <el-form-item label="品牌" prop="fMarks">
  156. <el-input
  157. v-model="queryParams.fMarks"
  158. placeholder="请输入品牌"
  159. clearable
  160. style="width: 80%"
  161. size="small"
  162. @keyup.enter.native="handleQuery"
  163. />
  164. </el-form-item>
  165. <el-form-item>
  166. <el-button
  167. type="cyan"
  168. icon="el-icon-search"
  169. size="mini"
  170. @click="handleQuery"
  171. >搜索
  172. </el-button>
  173. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  174. >重置
  175. </el-button>
  176. </el-form-item>
  177. </el-form>
  178. <el-row :gutter="10" class="mb8">
  179. <el-col :span="1.5">
  180. <el-button
  181. type="primary"
  182. icon="el-icon-plus"
  183. size="mini"
  184. @click="handleAdd(false)"
  185. v-hasPermi="['warehouseBusiness:warehousebills:add']"
  186. >新增
  187. </el-button>
  188. </el-col>
  189. <el-col :span="1.5">
  190. <el-button
  191. type="success"
  192. icon="el-icon-edit"
  193. size="mini"
  194. :disabled="single"
  195. @click="handleUpdate"
  196. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  197. >修改
  198. </el-button>
  199. </el-col>
  200. <!-- <el-col :span="1.5">
  201. <el-button
  202. type="danger"
  203. icon="el-icon-delete"
  204. size="mini"
  205. :disabled="multiple"
  206. @click="handleDelete"
  207. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  208. >删除
  209. </el-button>
  210. </el-col> -->
  211. <el-col :span="1.5">
  212. <el-button
  213. type="warning"
  214. icon="el-icon-download"
  215. size="mini"
  216. @click="handleExport"
  217. v-hasPermi="['warehouseBusiness:warehousebills:export']"
  218. >导出
  219. </el-button>
  220. </el-col>
  221. <el-col :span="1.5">
  222. <el-button
  223. type="warning"
  224. icon="el-icon-download"
  225. size="mini"
  226. @click="handleExport"
  227. :disabled="multiple"
  228. v-hasPermi="['warehouseBusiness:warehousebills:export']"
  229. >导入
  230. </el-button>
  231. </el-col>
  232. <right-toolbar
  233. :showSearch.sync="showSearch"
  234. @queryTable="getList"
  235. ></right-toolbar>
  236. </el-row>
  237. <el-table
  238. v-loading="loading"
  239. :data="warehousebillsList"
  240. @selection-change="handleSelectionChange"
  241. >
  242. <el-table-column type="selection" width="55" align="center" />
  243. <el-table-column type="index" label="行号" align="center" />
  244. <el-table-column
  245. :show-overflow-tooltip="true"
  246. label="货权方"
  247. align="center"
  248. prop="fCorpid"
  249. />
  250. <el-table-column label="提单号" align="center" prop="fMblno" />
  251. <el-table-column label="品牌" align="ceter" prop="fMarks" />
  252. <el-table-column
  253. label="入库日期"
  254. align="center"
  255. prop="fBsdate"
  256. width="180"
  257. ><template slot-scope="scope">
  258. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  259. </template>
  260. </el-table-column>
  261. <!-- <el-table-column
  262. label="贸易方式"
  263. align="center"
  264. prop="fTrademodeid"
  265. :formatter="fTrademodeidFormat"
  266. /> -->
  267. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  268. <el-table-column label="计划件数" align="center" prop="fPlanqty" />
  269. <el-table-column label="入库件数" align="center" prop="fQty" />
  270. <!-- <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
  271. <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
  272. <el-table-column label="入库毛重" align="center" prop="fGrossweight" />
  273. <el-table-column label="入库净重" align="center" prop="fNetweight" />
  274. <el-table-column
  275. width="100"
  276. label="入库状态"
  277. align="center"
  278. prop="fItemsStatus"
  279. >
  280. <template slot-scope="scope">
  281. <span v-if="scope.row.fItemsStatus === 1">计划</span>
  282. <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
  283. <span v-if="scope.row.fItemsStatus === 3">已卸货</span>
  284. <span v-if="scope.row.fItemsStatus === 4">已入库</span>
  285. </template>
  286. </el-table-column>
  287. <el-table-column
  288. width="100"
  289. label="费用状态"
  290. align="center"
  291. prop="fBillstatus"
  292. >
  293. <template slot-scope="scope">
  294. <span v-if="scope.row.fBillstatus === 1">录入</span>
  295. <span v-if="scope.row.fBillstatus === 2">暂存</span>
  296. <span v-if="scope.row.fBillstatus === 3">驳回</span>
  297. <span v-if="scope.row.fBillstatus === 4">请核</span>
  298. <span v-if="scope.row.fBillstatus === 5">审核中</span>
  299. <span v-if="scope.row.fBillstatus === 6">全部入账</span>
  300. </template>
  301. </el-table-column>
  302. <el-table-column
  303. label="操作"
  304. align="center"
  305. class-name="small-padding fixed-width"
  306. width="180"
  307. >
  308. <template slot-scope="scope">
  309. <el-button
  310. size="mini"
  311. type="text"
  312. icon="el-icon-edit"
  313. @click="handleUpdate(scope.row, true)"
  314. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  315. >查看
  316. </el-button>
  317. <el-button
  318. size="mini"
  319. type="text"
  320. icon="el-icon-edit"
  321. v-if="
  322. scope.row.fBillstatus === 1 ||
  323. scope.row.fBillstatus === 2 ||
  324. scope.row.fBillstatus === 3
  325. "
  326. @click="handleUpdate(scope.row, false)"
  327. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  328. >修改
  329. </el-button>
  330. <el-button
  331. size="mini"
  332. type="text"
  333. icon="el-icon-delete"
  334. v-if="scope.row.fBillstatus !== 6 && scope.row.fItemsStatus === 1"
  335. @click="handleDelete(scope.row)"
  336. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  337. >删除
  338. </el-button>
  339. </template>
  340. </el-table-column>
  341. </el-table>
  342. <pagination
  343. v-show="total > 0"
  344. :total="total"
  345. :page.sync="queryParams.pageNum"
  346. :limit.sync="queryParams.pageSize"
  347. @pagination="getList"
  348. />
  349. <!-- 新增或修改仓库主(出入库)对话框 -->
  350. <el-dialog
  351. :visible.sync="open"
  352. :close-on-click-modal="false"
  353. width="80%"
  354. append-to-body
  355. >
  356. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  357. <el-row>
  358. <el-col :span="8">
  359. <el-form-item label="货权方" prop="fCorpid">
  360. <el-select
  361. v-model="form.fCorpid"
  362. filterable
  363. remote
  364. @change="changefCorpid(form)"
  365. :disabled="browseStatus || formBrowseStatus"
  366. style="width: 80%"
  367. :remote-method="corpsRemoteMethod"
  368. placeholder="请输入模糊查找"
  369. >
  370. <el-option
  371. v-for="(dict, index) in fMblnoOptions"
  372. :key="index.fId"
  373. :label="dict.fName"
  374. :value="dict.fId"
  375. ></el-option>
  376. </el-select>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="8">
  380. <el-form-item label="结算方式" prop="fStltypeid">
  381. <el-select
  382. v-model="form.fStltypeid"
  383. placeholder="请选择结算方式"
  384. clearable
  385. :disabled="browseStatus || formBrowseStatus"
  386. style="width: 80%"
  387. >
  388. <el-option
  389. v-for="(dict, index) in fStltypeOptions"
  390. :key="index.dictValue"
  391. :label="dict.dictLabel"
  392. :value="dict.dictValue"
  393. />
  394. </el-select>
  395. </el-form-item>
  396. </el-col>
  397. <el-col :span="8">
  398. <el-form-item label="提单号" prop="fMblno">
  399. <el-input
  400. v-model="form.fMblno"
  401. :disabled="browseStatus || formBrowseStatus"
  402. style="width: 80%"
  403. placeholder="手工输入"
  404. />
  405. </el-form-item>
  406. </el-col>
  407. </el-row>
  408. <el-row>
  409. <el-col :span="8">
  410. <el-form-item label="业务日期" prop="fBsdate">
  411. <el-date-picker
  412. v-model="form.fBsdate"
  413. style="width: 80%"
  414. type="date"
  415. :disabled="browseStatus || formBrowseStatus"
  416. @change="changefBsdate"
  417. value-format="timestamp"
  418. placeholder="业务日期"
  419. >
  420. </el-date-picker>
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="8">
  424. <el-form-item label="仓管员" prop="fStorekeeper">
  425. <el-select
  426. v-model="form.fStorekeeper"
  427. filterable
  428. remote
  429. :disabled="browseStatus || formBrowseStatus"
  430. style="width: 80%"
  431. :remote-method="userRemoteMethod"
  432. placeholder="请输入模糊查找"
  433. >
  434. <el-option
  435. v-for="(dict, index) in userOptions"
  436. :key="index.userName"
  437. :label="dict.nickName"
  438. :value="dict.userName"
  439. ></el-option>
  440. </el-select>
  441. </el-form-item>
  442. </el-col>
  443. <el-col :span="8">
  444. <el-form-item label="仓库" prop="fWarehouseid">
  445. <el-select
  446. v-model="form.fWarehouseid"
  447. filterable
  448. :disabled="browseStatus || formBrowseStatus"
  449. remote
  450. style="width: 80%"
  451. :remote-method="warehouseRemoteMethod"
  452. placeholder="请输入模糊查找"
  453. >
  454. <el-option
  455. v-for="(dict, index) in warehouseOptions"
  456. :key="index.fId"
  457. :label="dict.fName"
  458. :value="dict.fId"
  459. ></el-option>
  460. </el-select>
  461. </el-form-item>
  462. </el-col>
  463. </el-row>
  464. <el-row>
  465. <el-col :span="8">
  466. <el-form-item label="计划件数" prop="fPlanqty">
  467. <el-input
  468. v-model="form.fPlanqty"
  469. style="width: 80%"
  470. laceholder="计划件数"
  471. oninput='this.value=this.value.replace(/\D/g,"")'
  472. :disabled="browseStatus"
  473. />
  474. </el-form-item>
  475. </el-col>
  476. <el-col :span="8">
  477. <el-form-item label="计划净重" prop="fPlannetweight">
  478. <el-input
  479. v-model="form.fPlannetweight"
  480. style="width: 80%"
  481. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  482. laceholder="计划毛重"
  483. :disabled="browseStatus"
  484. />
  485. </el-form-item>
  486. </el-col>
  487. <el-col :span="8">
  488. <el-form-item label="计划毛重" prop="fPlangrossweight">
  489. <el-input
  490. v-model="form.fPlangrossweight"
  491. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  492. style="width: 80%"
  493. laceholder="计划毛重"
  494. :disabled="browseStatus"
  495. />
  496. </el-form-item>
  497. </el-col>
  498. </el-row>
  499. <el-row>
  500. <el-col :span="8">
  501. <el-form-item label="存货编号" prop="fBscorpno">
  502. <el-input
  503. disabled
  504. v-model="form.fBscorpno"
  505. style="width: 80%"
  506. laceholder="存货编号"
  507. />
  508. </el-form-item>
  509. </el-col>
  510. <el-col :span="8">
  511. <el-form-item label="计费单位" prop="fFeetunit">
  512. <el-select
  513. v-model="form.fFeetunit"
  514. placeholder="请选择计费单位"
  515. clearable
  516. :disabled="browseStatus || formBrowseStatus"
  517. style="width: 80%"
  518. >
  519. <el-option
  520. v-for="(dict, index) in fFeetunitOptions"
  521. :key="index.dictValue"
  522. :label="dict.dictLabel"
  523. :value="dict.dictValue"
  524. />
  525. </el-select>
  526. </el-form-item>
  527. </el-col>
  528. <el-col :span="8">
  529. <el-form-item label="品牌" prop="fMarks">
  530. <el-input
  531. v-model="form.fMarks"
  532. style="width: 80%"
  533. :disabled="browseStatus || formBrowseStatus"
  534. placeholder="品牌"
  535. />
  536. </el-form-item>
  537. </el-col>
  538. <el-col :span="15">
  539. <el-form-item label="备注" prop="remark">
  540. <el-input
  541. style="width: 100%"
  542. v-model="form.remark"
  543. type="textarea"
  544. :disabled="browseStatus || formBrowseStatus"
  545. placeholder="请输入内容"
  546. />
  547. </el-form-item>
  548. </el-col>
  549. </el-row>
  550. <div v-if="detailsHidden">
  551. <el-row style="margin-top: 30px">
  552. <el-col :span="8">
  553. <el-form-item label="仓库联系人" prop="fContacts">
  554. <el-input
  555. v-model="form.fContacts"
  556. style="width: 80%"
  557. :disabled="browseStatus || formBrowseStatus"
  558. placeholder="仓库联系人"
  559. />
  560. </el-form-item>
  561. </el-col>
  562. <el-col :span="8">
  563. <el-form-item label="仓库电话" prop="fTel">
  564. <el-input
  565. v-model="form.fTel"
  566. :disabled="browseStatus || formBrowseStatus"
  567. style="width: 80%"
  568. placeholder="请输仓库入电话"
  569. />
  570. </el-form-item>
  571. </el-col>
  572. <el-col :span="8">
  573. <el-form-item label="船名航次" prop="fVslvoy">
  574. <el-input
  575. v-model="form.fVslvoy"
  576. style="width: 80%"
  577. :disabled="browseStatus || formBrowseStatus"
  578. placeholder="船名航次"
  579. />
  580. </el-form-item>
  581. </el-col>
  582. </el-row>
  583. <el-row>
  584. <el-col :span="8">
  585. <el-form-item label="到港日期" prop="fEta">
  586. <el-date-picker
  587. v-model="form.fEta"
  588. style="width: 80%"
  589. type="date"
  590. :disabled="browseStatus || formBrowseStatus"
  591. value-format="timestamp"
  592. placeholder="到港日期"
  593. >
  594. </el-date-picker>
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="8">
  598. <el-form-item label="报关单号" prop="fCustomno">
  599. <el-input
  600. v-model="form.fCustomno"
  601. style="width: 80%"
  602. :disabled="browseStatus || formBrowseStatus"
  603. laceholder="报关单号"
  604. />
  605. </el-form-item>
  606. </el-col>
  607. <el-col :span="8">
  608. <el-form-item label="经营单位" prop="fSbu">
  609. <el-select
  610. v-model="form.fSbu"
  611. filterable
  612. remote
  613. :disabled="browseStatus || formBrowseStatus"
  614. :remote-method="fSbuRemoteMethod"
  615. style="width: 80%"
  616. placeholder="请选择经营单位"
  617. >
  618. <el-option
  619. v-for="(dict, index) in fMblnoOptions"
  620. :key="index.fId"
  621. :label="dict.fName"
  622. :value="dict.fId"
  623. ></el-option>
  624. </el-select>
  625. </el-form-item>
  626. </el-col>
  627. </el-row>
  628. <el-row>
  629. <el-col :span="8">
  630. <el-form-item label="单据编号" prop="fBillno">
  631. <el-input
  632. v-model="form.fBillno"
  633. disabled
  634. style="width: 80%"
  635. placeholder="单据编号"
  636. />
  637. </el-form-item>
  638. </el-col>
  639. <el-col :span="8">
  640. <el-form-item label="贸易方式" prop="fTrademodeid">
  641. <el-select
  642. v-model="form.fTrademodeid"
  643. placeholder="请选择贸易方式"
  644. :disabled="browseStatus || formBrowseStatus"
  645. clearable
  646. style="width: 80%"
  647. >
  648. <el-option
  649. v-for="(dict, index) in fTrademodeidOptions"
  650. :key="index.dictValue"
  651. :label="dict.dictLabel"
  652. :value="dict.dictValue"
  653. />
  654. </el-select>
  655. </el-form-item>
  656. </el-col>
  657. <el-col :span="8">
  658. <el-form-item label="制单人" prop="createBy">
  659. <el-input
  660. disabled
  661. v-model="form.createBy"
  662. style="width: 80%"
  663. placeholder="制单人"
  664. />
  665. </el-form-item>
  666. </el-col>
  667. </el-row>
  668. <el-row>
  669. <el-col :span="8">
  670. <el-form-item label="制单部门" prop="fDeptid">
  671. <el-select
  672. v-model="form.fDeptid"
  673. filterable
  674. disabled
  675. style="width: 80%"
  676. remote
  677. >
  678. <el-option
  679. v-for="(dict, index) in deptOptions"
  680. :key="index.deptId"
  681. :label="dict.deptName"
  682. :value="dict.deptId"
  683. ></el-option>
  684. </el-select>
  685. </el-form-item>
  686. </el-col>
  687. <el-col :span="8">
  688. <el-form-item disabled label="制单日期" prop="fbilldate">
  689. <el-date-picker
  690. v-model="form.createTime"
  691. size="large"
  692. type="date"
  693. disabled
  694. style="width: 80%"
  695. value-format="timestamp"
  696. placeholder="制单日期"
  697. >
  698. </el-date-picker>
  699. </el-form-item>
  700. </el-col>
  701. <el-col :span="8">
  702. <el-form-item label="过磅" prop="fIfweigh">
  703. <el-select
  704. v-model="form.fIfweigh"
  705. placeholder="请选择是否过磅"
  706. clearable
  707. :disabled="browseStatus || formBrowseStatus"
  708. style="width: 80%"
  709. >
  710. <el-option
  711. v-for="(dict, index) in fIfweighOptions"
  712. :key="index.dictValue"
  713. :label="dict.dictLabel"
  714. :value="dict.dictValue"
  715. />
  716. </el-select>
  717. </el-form-item>
  718. </el-col>
  719. </el-row>
  720. <el-row>
  721. <el-col :span="8">
  722. <el-form-item label="质押" prop="fIfpledge">
  723. <el-select
  724. v-model="form.fIfpledge"
  725. placeholder="请选择是否质押"
  726. clearable
  727. :disabled="browseStatus || formBrowseStatus"
  728. style="width: 80%"
  729. >
  730. <el-option
  731. v-for="(dict, index) in fIfpledgeOptions"
  732. :key="index.dictValue"
  733. :label="dict.dictLabel"
  734. :value="dict.dictValue"
  735. />
  736. </el-select>
  737. </el-form-item>
  738. </el-col>
  739. <el-col :span="8">
  740. <el-form-item label="质押银行" prop="fBankcorpid">
  741. <el-select
  742. v-model="queryParams.fBankcorpid"
  743. filterable
  744. remote
  745. clearable
  746. style="width: 80%"
  747. :disabled="browseStatus || formBrowseStatus"
  748. @keyup.enter.native="handleQuery"
  749. :remote-method="corpsRemoteMethodd"
  750. placeholder="请输入模糊查找"
  751. >
  752. <el-option
  753. v-for="(dict, index) in Pledgebank"
  754. :key="index.fId"
  755. :label="dict.fName"
  756. :value="dict.fId"
  757. ></el-option>
  758. </el-select>
  759. </el-form-item>
  760. </el-col>
  761. </el-row>
  762. </div>
  763. </el-form>
  764. <div
  765. class="dialogTableTitle flex a-center jlr"
  766. style="
  767. display: flex;
  768. justify-content: space-between;
  769. align-items: center;
  770. margin: 10px 0;
  771. "
  772. >
  773. <div>
  774. <el-button
  775. type="primary"
  776. :disabled="browseStatus"
  777. @click.prevent="addRelevant(10)"
  778. >新行
  779. </el-button>
  780. <el-button
  781. :disabled="browseStatus"
  782. type="primary"
  783. @click="submitForm(2)"
  784. >保 存</el-button
  785. >
  786. </div>
  787. <div>
  788. <el-button
  789. @click="
  790. detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
  791. "
  792. >{{ detailsHidden ? "隐藏" : "展开" }}</el-button
  793. >
  794. <el-button type="info" prop="打印" @click="showEditDialog_sss"
  795. >作业单
  796. </el-button>
  797. <el-button @click="discharge">卸货 </el-button>
  798. <el-button
  799. :disabled="dataListSelection.length <= 0"
  800. @click.prevent="creditClick"
  801. >入库确认
  802. </el-button>
  803. <el-button
  804. :disabled="dataWithdrawList.length <= 0"
  805. @click.prevent="withdrawClick"
  806. >撤回入库</el-button
  807. >
  808. <el-button type="success" prop="打印" @click="showEditDialog_ss"
  809. >收货单
  810. </el-button>
  811. <el-button type="warning" prop="打印" @click="showEditDialog_s"
  812. >入库单
  813. </el-button>
  814. <!--
  815. <el-button
  816. :disabled="browseStatus"
  817. type="primary"
  818. @click="submitForm(2)"
  819. >保 存</el-button
  820. > -->
  821. <el-button
  822. :disabled="browseStatus"
  823. style="background-color: #008000; color: #fff"
  824. @click="submitForm(6)"
  825. >请核</el-button
  826. >
  827. </div>
  828. <div style="font-size: 18px">入库明细</div>
  829. </div>
  830. <el-table
  831. :data="dataList"
  832. ref="tableList"
  833. tooltip-effect="dark"
  834. border
  835. stripe
  836. :summary-method="getSummaries"
  837. @selection-change="Selectinventory"
  838. show-summary
  839. >
  840. <el-table-column type="selection" width="55" align="center" />
  841. <el-table-column label="序号" type="index" width="80">
  842. </el-table-column>
  843. <el-table-column
  844. prop="fBsdate"
  845. header-align="center"
  846. align="center"
  847. width="150px"
  848. label="入库日期"
  849. >
  850. <template slot-scope="scope">
  851. <el-date-picker
  852. v-model="scope.row.fBsdate"
  853. style="width: 138px"
  854. :disabled="
  855. browseStatus ||
  856. scope.row.fBillstatus === 20 ||
  857. scope.row.fBillstatus === 30 ||
  858. scope.row.fBillstatus === 40
  859. "
  860. type="date"
  861. value-format="timestamp"
  862. placeholder="入库日期"
  863. >
  864. </el-date-picker>
  865. </template>
  866. </el-table-column>
  867. <el-table-column
  868. prop="fGoodsid"
  869. header-align="center"
  870. align="center"
  871. width="140px"
  872. label="品名"
  873. >
  874. <template slot-scope="scope">
  875. <el-select
  876. v-model="scope.row.fGoodsid"
  877. filterable
  878. :disabled="
  879. browseStatus ||
  880. scope.row.fBillstatus === 20 ||
  881. scope.row.fBillstatus === 30 ||
  882. scope.row.fBillstatus === 40
  883. "
  884. remote
  885. :remote-method="goodsRemoteMethod"
  886. @change="changefGoodsid(scope.row)"
  887. placeholder="请选择品名"
  888. >
  889. <el-option
  890. v-for="(dict, index) in goodsOptions"
  891. :key="index.fId"
  892. :label="dict.fName"
  893. :value="dict.fId"
  894. ></el-option>
  895. </el-select>
  896. </template>
  897. </el-table-column>
  898. <el-table-column
  899. prop="fMarks"
  900. header-align="center"
  901. align="center"
  902. width="140px"
  903. label="*品牌"
  904. >
  905. <template slot-scope="scope">
  906. <el-input
  907. v-model="scope.row.fMarks"
  908. placeholder="品牌"
  909. :disabled="
  910. browseStatus ||
  911. scope.row.fBillstatus === 20 ||
  912. scope.row.fBillstatus === 30 ||
  913. scope.row.fBillstatus === 40
  914. "
  915. show-word-limit
  916. />
  917. </template>
  918. </el-table-column>
  919. <el-table-column
  920. prop="fWarehouselocid"
  921. header-align="center"
  922. width="140px"
  923. align="center"
  924. label="*库区"
  925. >
  926. <template slot-scope="scope">
  927. <el-select
  928. v-model="scope.row.fWarehouselocid"
  929. filterable
  930. remote
  931. :disabled="
  932. browseStatus ||
  933. scope.row.fBillstatus === 20 ||
  934. scope.row.fBillstatus === 30 ||
  935. scope.row.fBillstatus === 40
  936. "
  937. :remote-method="kqhouseRemoteMethod"
  938. placeholder="请选择库区"
  939. >
  940. <el-option
  941. v-for="(dict, index) in kqhouseOptions"
  942. :key="index.fId"
  943. :label="dict.fName"
  944. :value="dict.fId"
  945. ></el-option>
  946. </el-select>
  947. </template>
  948. </el-table-column>
  949. <el-table-column
  950. prop="fcntrtype"
  951. header-align="center"
  952. align="center"
  953. width="140px"
  954. label="箱型"
  955. >
  956. <template slot-scope="scope">
  957. <el-input
  958. v-model="scope.row.fCntrtype"
  959. maxlength="4"
  960. placeholder="箱型"
  961. :disabled="
  962. browseStatus ||
  963. scope.row.fBillstatus === 20 ||
  964. scope.row.fBillstatus === 30 ||
  965. scope.row.fBillstatus === 40
  966. "
  967. show-word-limit
  968. />
  969. </template>
  970. </el-table-column>
  971. <el-table-column
  972. prop="fCntqty"
  973. header-align="center"
  974. align="center"
  975. width="140px"
  976. label="箱量"
  977. >
  978. <template slot-scope="scope">
  979. <el-input
  980. v-model="scope.row.fCntqty"
  981. placeholder="箱量"
  982. :disabled="
  983. browseStatus ||
  984. scope.row.fBillstatus === 20 ||
  985. scope.row.fBillstatus === 30 ||
  986. scope.row.fBillstatus === 40
  987. "
  988. show-word-limit
  989. />
  990. </template>
  991. </el-table-column>
  992. <el-table-column
  993. prop="fGrossweight"
  994. header-align="center"
  995. width="150px"
  996. align="center"
  997. label="*入库毛重"
  998. >
  999. <template slot-scope="scope">
  1000. <el-input
  1001. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1002. v-model="scope.row.fGrossweight"
  1003. placeholder="入库毛重"
  1004. :disabled="
  1005. browseStatus ||
  1006. scope.row.fBillstatus === 20 ||
  1007. scope.row.fBillstatus === 30 ||
  1008. scope.row.fBillstatus === 40
  1009. "
  1010. show-word-limit
  1011. />
  1012. </template>
  1013. </el-table-column>
  1014. <el-table-column
  1015. prop="fNetweight"
  1016. header-align="center"
  1017. width="150px"
  1018. align="center"
  1019. label="*入库净重"
  1020. >
  1021. <template slot-scope="scope">
  1022. <el-input
  1023. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1024. v-model="scope.row.fNetweight"
  1025. placeholder="入库净重"
  1026. :disabled="
  1027. browseStatus ||
  1028. scope.row.fBillstatus === 20 ||
  1029. scope.row.fBillstatus === 30 ||
  1030. scope.row.fBillstatus === 40
  1031. "
  1032. show-word-limit
  1033. />
  1034. </template>
  1035. </el-table-column>
  1036. <el-table-column
  1037. prop="fQty"
  1038. header-align="center"
  1039. width="150px"
  1040. align="center"
  1041. label="*入库件数"
  1042. >
  1043. <template slot-scope="scope">
  1044. <el-input
  1045. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1046. v-model="scope.row.fQty"
  1047. placeholder="入库件数"
  1048. :disabled="
  1049. browseStatus ||
  1050. scope.row.fBillstatus === 20 ||
  1051. scope.row.fBillstatus === 30 ||
  1052. scope.row.fBillstatus === 40
  1053. "
  1054. show-word-limit
  1055. />
  1056. </template>
  1057. </el-table-column>
  1058. <el-table-column
  1059. prop="fPackagespecs"
  1060. header-align="center"
  1061. width="150px"
  1062. align="center"
  1063. label="*包装规格"
  1064. >
  1065. <template slot-scope="scope">
  1066. <el-input
  1067. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1068. v-model="scope.row.fPackagespecs"
  1069. placeholder="包装规格"
  1070. :disabled="
  1071. browseStatus ||
  1072. scope.row.fBillstatus === 20 ||
  1073. scope.row.fBillstatus === 30 ||
  1074. scope.row.fBillstatus === 40
  1075. "
  1076. show-word-limit
  1077. />
  1078. </template>
  1079. </el-table-column>
  1080. <el-table-column
  1081. prop="fTruckno"
  1082. header-align="center"
  1083. width="130px"
  1084. align="center"
  1085. label="*车号"
  1086. >
  1087. <template slot-scope="scope">
  1088. <el-input
  1089. v-model="scope.row.fTruckno"
  1090. placeholder="*车号"
  1091. :disabled="
  1092. browseStatus ||
  1093. scope.row.fBillstatus === 20 ||
  1094. scope.row.fBillstatus === 30 ||
  1095. scope.row.fBillstatus === 40
  1096. "
  1097. show-word-limit
  1098. />
  1099. </template>
  1100. </el-table-column>
  1101. <el-table-column
  1102. prop="fDriverName"
  1103. header-align="center"
  1104. width="130px"
  1105. align="center"
  1106. label="*司机名"
  1107. >
  1108. <template slot-scope="scope">
  1109. <el-input
  1110. v-model="scope.row.fDriverName"
  1111. placeholder="司机名"
  1112. :disabled="
  1113. browseStatus ||
  1114. scope.row.fBillstatus === 20 ||
  1115. scope.row.fBillstatus === 30 ||
  1116. scope.row.fBillstatus === 40
  1117. "
  1118. show-word-limit
  1119. />
  1120. </template>
  1121. </el-table-column>
  1122. <el-table-column
  1123. prop="fDriverTel"
  1124. header-align="center"
  1125. width="130px"
  1126. align="center"
  1127. label="*司机电话"
  1128. >
  1129. <template slot-scope="scope">
  1130. <el-input
  1131. v-model="scope.row.fDriverTel"
  1132. placeholder="司机电话"
  1133. :disabled="
  1134. browseStatus ||
  1135. scope.row.fBillstatus === 20 ||
  1136. scope.row.fBillstatus === 30 ||
  1137. scope.row.fBillstatus === 40
  1138. "
  1139. show-word-limit
  1140. />
  1141. </template>
  1142. </el-table-column>
  1143. <el-table-column
  1144. prop="fDriverIdCar"
  1145. header-align="center"
  1146. width="200px"
  1147. align="center"
  1148. label="*司机身份证"
  1149. >
  1150. <template slot-scope="scope">
  1151. <el-input
  1152. v-model="scope.row.fDriverIdCar"
  1153. placeholder="司机身份证"
  1154. :disabled="
  1155. browseStatus ||
  1156. scope.row.fBillstatus === 20 ||
  1157. scope.row.fBillstatus === 30 ||
  1158. scope.row.fBillstatus === 40
  1159. "
  1160. show-word-limit
  1161. />
  1162. </template>
  1163. </el-table-column>
  1164. <el-table-column
  1165. prop="fSerialNumber"
  1166. header-align="center"
  1167. width="160px"
  1168. align="center"
  1169. label="流水号"
  1170. >
  1171. <template slot-scope="scope">
  1172. <el-input
  1173. v-model="scope.row.fSerialNumber"
  1174. placeholder="流水号"
  1175. disabled
  1176. show-word-limit
  1177. />
  1178. </template>
  1179. </el-table-column>
  1180. <el-table-column
  1181. prop="fCntrno"
  1182. header-align="center"
  1183. width="130px"
  1184. align="center"
  1185. label="箱号"
  1186. >
  1187. <template slot-scope="scope">
  1188. <el-input
  1189. v-model="scope.row.fCntrno"
  1190. placeholder="箱号"
  1191. :disabled="
  1192. browseStatus ||
  1193. scope.row.fBillstatus === 20 ||
  1194. scope.row.fBillstatus === 30 ||
  1195. scope.row.fBillstatus === 40
  1196. "
  1197. show-word-limit
  1198. />
  1199. </template>
  1200. </el-table-column>
  1201. <el-table-column
  1202. prop="fGoodsval"
  1203. header-align="center"
  1204. width="130px"
  1205. align="center"
  1206. label="货值"
  1207. >
  1208. <template slot-scope="scope">
  1209. <el-input
  1210. oninput="value=value.replace(/[^\d.]/g,'')"
  1211. v-model="scope.row.fGoodsval"
  1212. placeholder="货值"
  1213. :disabled="
  1214. browseStatus ||
  1215. scope.row.fBillstatus === 20 ||
  1216. scope.row.fBillstatus === 30 ||
  1217. scope.row.fBillstatus === 40
  1218. "
  1219. show-word-limit
  1220. />
  1221. </template>
  1222. </el-table-column>
  1223. <el-table-column
  1224. prop="remark"
  1225. header-align="center"
  1226. width="130px"
  1227. align="center"
  1228. label="备注"
  1229. >
  1230. <template slot-scope="scope">
  1231. <el-input
  1232. v-model="scope.row.remark"
  1233. placeholder="备注"
  1234. :disabled="
  1235. browseStatus ||
  1236. scope.row.fBillstatus === 20 ||
  1237. scope.row.fBillstatus === 30 ||
  1238. scope.row.fBillstatus === 40
  1239. "
  1240. show-word-limit
  1241. />
  1242. </template>
  1243. </el-table-column>
  1244. <el-table-column
  1245. prop="fBillstatus"
  1246. header-align="center"
  1247. width="150px"
  1248. align="center"
  1249. label="状态"
  1250. >
  1251. <template slot-scope="scope">
  1252. <span v-if="scope.row.fBillstatus === 40">已入库</span>
  1253. <span v-if="scope.row.fBillstatus === 20">卸货中</span>
  1254. <span v-if="scope.row.fBillstatus === 30">已卸货</span>
  1255. <span v-if="scope.row.fBillstatus === 10">计划</span>
  1256. <!-- <span v-if="scope.row.fBillstatus === '30'">待入库</span> -->
  1257. <!-- <span v-else>未入账</span> -->
  1258. <!-- <el-input
  1259. v-model="scope.row.fBillstatus"
  1260. placeholder="状态"
  1261. :disabled="browseStatus"
  1262. show-word-limit
  1263. /> -->
  1264. </template>
  1265. </el-table-column>
  1266. <el-table-column
  1267. header-align="center"
  1268. align="center"
  1269. label="操作"
  1270. width="130PX"
  1271. >
  1272. <template slot-scope="scope">
  1273. <el-button
  1274. :disabled="
  1275. browseStatus ||
  1276. scope.row.fBillstatus === 20 ||
  1277. scope.row.fBillstatus === 30 ||
  1278. scope.row.fBillstatus === 40
  1279. "
  1280. @click.native.prevent="wDeleteRow(scope.$index, dataList)"
  1281. size="small"
  1282. >移除</el-button
  1283. >
  1284. </template>
  1285. </el-table-column>
  1286. </el-table>
  1287. <div
  1288. class="dialogTableTitle flex a-center jlr"
  1289. style="
  1290. display: flex;
  1291. justify-content: space-between;
  1292. align-items: center;
  1293. margin: 10px 0;
  1294. "
  1295. >
  1296. <div>
  1297. <el-button
  1298. type="primary"
  1299. :disabled="browseStatus"
  1300. @click.prevent="addRelevt()"
  1301. >新行
  1302. </el-button>
  1303. </div>
  1304. <div style="font-size: 18px">附件明细</div>
  1305. </div>
  1306. <el-table
  1307. :data="relevantAttachments"
  1308. ref="table"
  1309. tooltip-effect="dark"
  1310. border
  1311. stripe
  1312. style="width: 100%"
  1313. height="150"
  1314. >
  1315. <el-table-column label="序号" type="index" width="80">
  1316. </el-table-column>
  1317. <el-table-column
  1318. prop="fName"
  1319. header-align="center"
  1320. align="center"
  1321. width="250px"
  1322. label="附件名称"
  1323. >
  1324. <template slot-scope="scope">
  1325. <el-input
  1326. v-model="scope.row.fName"
  1327. :disabled="browseStatus"
  1328. placeholder="附件名称"
  1329. show-word-limit
  1330. />
  1331. </template>
  1332. </el-table-column>
  1333. <el-table-column
  1334. prop="createBy"
  1335. header-align="center"
  1336. align="center"
  1337. width="250px"
  1338. label="上传人"
  1339. >
  1340. <template slot-scope="scope">
  1341. <el-input
  1342. v-model="scope.row.createBy"
  1343. disabled
  1344. placeholder="上传人"
  1345. show-word-limit
  1346. />
  1347. </template>
  1348. </el-table-column>
  1349. <el-table-column
  1350. prop="createTime"
  1351. header-align="center"
  1352. align="center"
  1353. label="上传时间"
  1354. >
  1355. <template slot-scope="scope">
  1356. <el-date-picker
  1357. v-model="scope.row.createTime"
  1358. type="date"
  1359. disabled
  1360. placeholder="上传时间"
  1361. format="yyyy-MM-dd HH:mm"
  1362. value-format="timestamp"
  1363. ></el-date-picker>
  1364. </template>
  1365. </el-table-column>
  1366. <el-table-column
  1367. prop="fUrl"
  1368. header-align="center"
  1369. align="center"
  1370. width="300px"
  1371. label="上传附件"
  1372. >
  1373. <template slot-scope="scope">
  1374. <uploadFile
  1375. :disabled="browseStatus"
  1376. @input="showFile"
  1377. v-model="scope.row.fUrl"
  1378. />
  1379. </template>
  1380. </el-table-column>
  1381. <el-table-column
  1382. header-align="center"
  1383. align="center"
  1384. label="操作"
  1385. width="130PX"
  1386. >
  1387. <template slot-scope="scope">
  1388. <el-button
  1389. @click.native.prevent="
  1390. deleteRow(scope.$index, relevantAttachments)
  1391. "
  1392. :disabled="browseStatus"
  1393. size="small"
  1394. >移除
  1395. </el-button>
  1396. </template>
  1397. </el-table-column>
  1398. </el-table>
  1399. <div
  1400. class="dialogTableTitle flex a-center jlr"
  1401. style="
  1402. display: flex;
  1403. justify-content: space-between;
  1404. align-items: center;
  1405. margin: 10px 0;
  1406. "
  1407. >
  1408. <div>
  1409. <el-button
  1410. type="primary"
  1411. :disabled="browseStatus"
  1412. @click.prevent="addCollection()"
  1413. >新行
  1414. </el-button>
  1415. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  1416. >删除
  1417. </el-button> -->
  1418. <el-button type="primary" @click="submitForm(2)">保 存</el-button>
  1419. <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
  1420. <el-button @click.prevent="addAgreement()" type="danger"
  1421. >作业费协议</el-button
  1422. >
  1423. </div>
  1424. <div style="font-size: 18px">收款信息</div>
  1425. </div>
  1426. <el-table
  1427. :data="warehouseDrList"
  1428. ref="table"
  1429. tooltip-effect="dark"
  1430. border
  1431. stripe
  1432. show-summary
  1433. @selection-change="Collectionoptions"
  1434. :summary-method="warehouseDrSummaries"
  1435. >
  1436. <el-table-column type="selection" width="55" align="center" />
  1437. <el-table-column label="序号" type="index" width="80">
  1438. </el-table-column>
  1439. <el-table-column
  1440. prop="fCorpid"
  1441. header-align="center"
  1442. align="center"
  1443. width="180px"
  1444. label="客户名称"
  1445. >
  1446. <template slot-scope="scope">
  1447. <el-select
  1448. v-model="scope.row.fCorpid"
  1449. filterable
  1450. remote
  1451. :disabled="browseStatus"
  1452. :remote-method="corpsRemoteMethod"
  1453. placeholder="客户名称"
  1454. >
  1455. <el-option
  1456. v-for="(dict, index) in KHblnoOptions"
  1457. :key="index.fId"
  1458. :label="dict.fName"
  1459. :value="dict.fId"
  1460. ></el-option>
  1461. </el-select>
  1462. </template>
  1463. </el-table-column>
  1464. <el-table-column
  1465. prop="fFeeid"
  1466. header-align="center"
  1467. align="center"
  1468. width="180px"
  1469. label="费用名称"
  1470. >
  1471. <template slot-scope="scope">
  1472. <el-select
  1473. v-model="scope.row.fFeeid"
  1474. filterable
  1475. remote
  1476. :disabled="browseStatus"
  1477. :remote-method="fWRemoteMethod"
  1478. placeholder="费用名称"
  1479. >
  1480. <el-option
  1481. v-for="(dict, index) in fWbuOptions"
  1482. :key="index.fId"
  1483. :label="dict.fName"
  1484. :value="dict.fId"
  1485. ></el-option>
  1486. </el-select>
  1487. </template>
  1488. </el-table-column>
  1489. <el-table-column
  1490. prop="fFeeUnitid"
  1491. header-align="center"
  1492. align="center"
  1493. width="180px"
  1494. label="计价单位"
  1495. >
  1496. <template slot-scope="scope">
  1497. <el-select
  1498. v-model="scope.row.fFeeUnitid"
  1499. placeholder="请选择计价单位"
  1500. @change="changeFeeUnit(scope.row)"
  1501. clearable
  1502. :disabled="browseStatus"
  1503. >
  1504. <el-option
  1505. v-for="(dict, index) in jFeetunitOptions"
  1506. :key="index.dictValue"
  1507. :label="dict.dictLabel"
  1508. :value="dict.dictValue"
  1509. />
  1510. </el-select>
  1511. </template>
  1512. </el-table-column>
  1513. <el-table-column
  1514. prop="fQty"
  1515. header-align="center"
  1516. align="center"
  1517. width="130px"
  1518. label="数量"
  1519. >
  1520. <template slot-scope="scope">
  1521. <el-input
  1522. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1523. v-model="scope.row.fQty"
  1524. placeholder="数量"
  1525. :disabled="browseStatus"
  1526. @change="changeContractAmt(scope.row)"
  1527. show-word-limit
  1528. />
  1529. </template>
  1530. </el-table-column>
  1531. <el-table-column
  1532. prop="fUnitprice"
  1533. header-align="center"
  1534. align="center"
  1535. width="130px"
  1536. label="单价"
  1537. >
  1538. <template slot-scope="scope">
  1539. <el-input
  1540. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1541. v-model="scope.row.fUnitprice"
  1542. placeholder="单价"
  1543. :disabled="browseStatus"
  1544. @change="changeContractAmt(scope.row)"
  1545. show-word-limit
  1546. />
  1547. </template>
  1548. </el-table-column>
  1549. <el-table-column
  1550. prop="fAmount"
  1551. header-align="center"
  1552. align="center"
  1553. width="130px"
  1554. label="金额"
  1555. >
  1556. <template slot-scope="scope">
  1557. <el-input
  1558. disabled
  1559. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1560. v-model="scope.row.fAmount"
  1561. placeholder="金额"
  1562. show-word-limit
  1563. />
  1564. </template>
  1565. </el-table-column>
  1566. <el-table-column
  1567. prop="fCurrency"
  1568. header-align="center"
  1569. align="center"
  1570. width="130px"
  1571. label="币别"
  1572. >
  1573. <template slot-scope="scope">
  1574. <el-input
  1575. v-model="scope.row.fCurrency"
  1576. :disabled="browseStatus"
  1577. placeholder="币别"
  1578. show-word-limit
  1579. />
  1580. </template>
  1581. </el-table-column>
  1582. <el-table-column
  1583. prop="fExrate"
  1584. header-align="center"
  1585. align="center"
  1586. width="130px"
  1587. label="汇率"
  1588. >
  1589. <template slot-scope="scope">
  1590. <el-input
  1591. v-model="scope.row.fExrate"
  1592. :disabled="browseStatus"
  1593. placeholder="汇率"
  1594. show-word-limit
  1595. />
  1596. </template>
  1597. </el-table-column>
  1598. <el-table-column
  1599. prop="fTaxrate"
  1600. header-align="center"
  1601. align="center"
  1602. width="130px"
  1603. label="税率"
  1604. >
  1605. <template slot-scope="scope">
  1606. <el-input
  1607. v-model="scope.row.fTaxrate"
  1608. :disabled="browseStatus"
  1609. placeholder="税率"
  1610. show-word-limit
  1611. />
  1612. </template>
  1613. </el-table-column>
  1614. <el-table-column
  1615. prop="remarks"
  1616. header-align="center"
  1617. align="center"
  1618. width="150px"
  1619. label="备注"
  1620. >
  1621. <template slot-scope="scope">
  1622. <el-input
  1623. v-model="scope.row.Remarks"
  1624. :disabled="browseStatus"
  1625. placeholder="备注"
  1626. show-word-limit
  1627. />
  1628. </template>
  1629. </el-table-column>
  1630. <el-table-column
  1631. header-align="center"
  1632. align="center"
  1633. label="操作"
  1634. width="200px"
  1635. >
  1636. <template slot-scope="scope">
  1637. <!-- <el-button size="small">审核费用</el-button> -->
  1638. <el-button
  1639. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1640. size="small"
  1641. >移除</el-button
  1642. >
  1643. </template>
  1644. </el-table-column>
  1645. </el-table>
  1646. <div
  1647. class="dialogTableTitle flex a-center jlr"
  1648. style="
  1649. display: flex;
  1650. justify-content: space-between;
  1651. align-items: center;
  1652. margin: 10px 0;
  1653. "
  1654. >
  1655. <div>
  1656. <el-button
  1657. type="primary"
  1658. :disabled="browseStatus"
  1659. @click.prevent="addpayment()"
  1660. >新行
  1661. </el-button>
  1662. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseCrList)"
  1663. >删除
  1664. </el-button> -->
  1665. <el-button type="primary" @click="submitForm(2)">保 存</el-button>
  1666. <!-- <el-button type="warning">仓储费协议</el-button> -->
  1667. <el-button type="danger" @click.prevent="addAgreements()"
  1668. >作业费协议</el-button
  1669. >
  1670. </div>
  1671. <div style="font-size: 18px">付款信息</div>
  1672. </div>
  1673. <el-table
  1674. :data="warehouseCrList"
  1675. ref="table"
  1676. tooltip-effect="dark"
  1677. border
  1678. stripe
  1679. show-summary
  1680. @selection-change="Paymentoptions"
  1681. :summary-method="warehouseDrSummaries"
  1682. >
  1683. <el-table-column type="selection" width="55" align="center" />
  1684. <el-table-column label="序号" type="index" width="80">
  1685. </el-table-column>
  1686. <el-table-column
  1687. prop="fCorpid"
  1688. header-align="center"
  1689. align="center"
  1690. width="180px"
  1691. label="客户名称"
  1692. >
  1693. <template slot-scope="scope">
  1694. <el-select
  1695. v-model="scope.row.fCorpid"
  1696. filterable
  1697. remote
  1698. :disabled="browseStatus"
  1699. :remote-method="corpsRemoteMethod"
  1700. placeholder="客户名称"
  1701. >
  1702. <el-option
  1703. v-for="(dict, index) in KHblnoOptions"
  1704. :key="index.fId"
  1705. :label="dict.fName"
  1706. :value="dict.fId"
  1707. ></el-option>
  1708. </el-select>
  1709. </template>
  1710. </el-table-column>
  1711. <el-table-column
  1712. prop="fFeeid"
  1713. header-align="center"
  1714. align="center"
  1715. width="180px"
  1716. label="费用名称"
  1717. >
  1718. <template slot-scope="scope">
  1719. <el-select
  1720. v-model="scope.row.fFeeid"
  1721. filterable
  1722. :disabled="browseStatus"
  1723. remote
  1724. :remote-method="fWRemoteMethod"
  1725. placeholder="费用名称"
  1726. >
  1727. <el-option
  1728. v-for="(dict, index) in fWbuOptions"
  1729. :key="index.fId"
  1730. :label="dict.fName"
  1731. :value="dict.fId"
  1732. ></el-option>
  1733. </el-select>
  1734. </template>
  1735. </el-table-column>
  1736. <el-table-column
  1737. prop="fFeeUnitid"
  1738. header-align="center"
  1739. align="center"
  1740. width="180px"
  1741. label="计价单位"
  1742. >
  1743. <template slot-scope="scope">
  1744. <el-select
  1745. v-model="scope.row.fFeeUnitid"
  1746. filterable
  1747. remote
  1748. @change="changeFeeUnit(scope.row)"
  1749. :disabled="browseStatus"
  1750. :remote-method="corpsRemoteMethod"
  1751. placeholder="计价单位"
  1752. >
  1753. <el-option
  1754. v-for="(dict, index) in jFeetunitOptions"
  1755. :key="index.dictValue"
  1756. :label="dict.dictLabel"
  1757. :value="dict.dictValue"
  1758. ></el-option>
  1759. </el-select>
  1760. </template>
  1761. </el-table-column>
  1762. <el-table-column
  1763. prop="fQty"
  1764. header-align="center"
  1765. align="center"
  1766. width="150px"
  1767. label="数量"
  1768. >
  1769. <template slot-scope="scope">
  1770. <el-input
  1771. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1772. v-model="scope.row.fQty"
  1773. :disabled="browseStatus"
  1774. @change="changeContractAmt(scope.row)"
  1775. placeholder="数量"
  1776. show-word-limit
  1777. />
  1778. </template>
  1779. </el-table-column>
  1780. <el-table-column
  1781. prop="fUnitprice"
  1782. header-align="center"
  1783. align="center"
  1784. width="150px"
  1785. label="单价"
  1786. >
  1787. <template slot-scope="scope">
  1788. <el-input
  1789. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1790. v-model="scope.row.fUnitprice"
  1791. :disabled="browseStatus"
  1792. @change="changeContractAmt(scope.row)"
  1793. placeholder="单价"
  1794. show-word-limit
  1795. />
  1796. </template>
  1797. </el-table-column>
  1798. <el-table-column
  1799. prop="fAmount"
  1800. header-align="center"
  1801. align="center"
  1802. width="150px"
  1803. label="金额"
  1804. >
  1805. <template slot-scope="scope">
  1806. <el-input
  1807. disabled
  1808. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1809. v-model="scope.row.fAmount"
  1810. placeholder="金额"
  1811. show-word-limit
  1812. />
  1813. </template>
  1814. </el-table-column>
  1815. <el-table-column
  1816. prop="fCurrency"
  1817. header-align="center"
  1818. align="center"
  1819. width="150px"
  1820. label="币别"
  1821. >
  1822. <template slot-scope="scope">
  1823. <el-input
  1824. v-model="scope.row.fCurrency"
  1825. :disabled="browseStatus"
  1826. placeholder="币别"
  1827. show-word-limit
  1828. />
  1829. </template>
  1830. </el-table-column>
  1831. <el-table-column
  1832. prop="fExrate"
  1833. header-align="center"
  1834. align="center"
  1835. width="150px"
  1836. label="汇率"
  1837. >
  1838. <template slot-scope="scope">
  1839. <el-input
  1840. v-model="scope.row.fExrate"
  1841. :disabled="browseStatus"
  1842. placeholder="汇率"
  1843. show-word-limit
  1844. />
  1845. </template>
  1846. </el-table-column>
  1847. <el-table-column
  1848. prop="fTaxrate"
  1849. header-align="center"
  1850. align="center"
  1851. width="150px"
  1852. label="税率"
  1853. >
  1854. <template slot-scope="scope">
  1855. <el-input
  1856. v-model="scope.row.fTaxrate"
  1857. :disabled="browseStatus"
  1858. placeholder="税率"
  1859. show-word-limit
  1860. />
  1861. </template>
  1862. </el-table-column>
  1863. <el-table-column
  1864. prop="remarks"
  1865. header-align="center"
  1866. align="center"
  1867. width="150px"
  1868. label="备注"
  1869. >
  1870. <template slot-scope="scope">
  1871. <el-input
  1872. v-model="scope.row.remarks"
  1873. :disabled="browseStatus"
  1874. placeholder="备注"
  1875. show-word-limit
  1876. />
  1877. </template>
  1878. </el-table-column>
  1879. <el-table-column
  1880. header-align="center"
  1881. align="center"
  1882. width="200px"
  1883. label="操作"
  1884. >
  1885. <template slot-scope="scope">
  1886. <!-- <el-button size="small">审核费用</el-button> -->
  1887. <el-button
  1888. @click.native.prevent="deleteRoww(scope.$index, warehouseCrList)"
  1889. size="small"
  1890. >移除</el-button
  1891. >
  1892. </template>
  1893. </el-table-column>
  1894. </el-table>
  1895. <div slot="footer" class="dialog-footer">
  1896. <el-button
  1897. type="primary"
  1898. :disabled="approvalStatus"
  1899. @click="addOrUpdateHandle(form)"
  1900. >查看审批</el-button
  1901. >
  1902. <el-button
  1903. type="primary"
  1904. :disabled="approvalStatus"
  1905. @click="addOrUpdateHand(form)"
  1906. >审批弹窗</el-button
  1907. >
  1908. <!-- 弹窗, 新增 / 修改 -->
  1909. <add-or-update
  1910. v-if="addOrUpdateVisible"
  1911. ref="addOrUpdate"
  1912. @refreshDataList="getDataList"
  1913. ></add-or-update>
  1914. <approval-comments
  1915. v-if="addOrUpdateVisib"
  1916. ref="ApprovalComments"
  1917. @refreshDataList="returnData"
  1918. ></approval-comments>
  1919. <el-button type="success" prop="打印" @click="showEditDialog_ss"
  1920. >收货单
  1921. </el-button>
  1922. <el-button type="warning" prop="打印" @click="showEditDialog_s"
  1923. >入库单
  1924. </el-button>
  1925. <el-button @click="discharge">卸货 </el-button>
  1926. <el-button type="info" prop="打印" @click="showEditDialog_sss"
  1927. >作业单
  1928. </el-button>
  1929. <el-button
  1930. :disabled="browseStatus"
  1931. type="primary"
  1932. @click="submitForm(2)"
  1933. >保 存</el-button
  1934. >
  1935. <el-button
  1936. :disabled="browseStatus"
  1937. style="background-color: #008000; color: #fff"
  1938. @click="submitForm(6)"
  1939. >请核</el-button
  1940. >
  1941. <el-button @click="cancel">取 消</el-button>
  1942. </div>
  1943. <!-- 入库新行计划重量导入 -->
  1944. <el-dialog
  1945. title="入库明细"
  1946. :modal="false"
  1947. style="height: 500px"
  1948. height="50%"
  1949. :close-on-click-modal="false"
  1950. :visible.sync="weightList"
  1951. @close="closeDialog"
  1952. width="70%"
  1953. >
  1954. <el-form
  1955. ref="planningList"
  1956. :model="form"
  1957. :rules="rules"
  1958. label-width="120px"
  1959. >
  1960. <el-row>
  1961. <el-col :span="8">
  1962. <el-form-item label="计划件数" prop="fPlanqty">
  1963. <el-input
  1964. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1965. v-model="planningList.fPlanqty"
  1966. style="width: 80%"
  1967. laceholder="计划件数"
  1968. @input="changeList(form)"
  1969. />
  1970. </el-form-item>
  1971. </el-col>
  1972. <el-col :span="8">
  1973. <el-form-item label="计划净重" prop="fPlannetweight">
  1974. <el-input
  1975. v-model="planningList.fPlannetweight"
  1976. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1977. style="width: 80%"
  1978. disabled
  1979. laceholder="计划毛重"
  1980. />
  1981. </el-form-item>
  1982. </el-col>
  1983. <el-col :span="8">
  1984. <el-form-item label="计划毛重" prop="fPlangrossweight">
  1985. <el-input
  1986. v-model="planningList.fPlangrossweight"
  1987. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1988. style="width: 80%"
  1989. disabled
  1990. laceholder="计划毛重"
  1991. />
  1992. </el-form-item>
  1993. </el-col>
  1994. </el-row>
  1995. </el-form>
  1996. <div slot="footer" class="dialog-footer">
  1997. <el-button type="primary" @click="costList">导入</el-button>
  1998. <el-button @click="weightList = false">取 消</el-button>
  1999. </div>
  2000. </el-dialog>
  2001. <!-- 选择作业费协议数据 -->
  2002. <el-dialog
  2003. title="作业费协议"
  2004. :close-on-click-modal="false"
  2005. :modal="false"
  2006. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2007. :visible.sync="warehousingagreement"
  2008. width="70%"
  2009. >
  2010. <el-table
  2011. :data="tasklegList"
  2012. ref="table"
  2013. tooltip-effect="dark"
  2014. width="100%"
  2015. border
  2016. stripe
  2017. @selection-change="whgenlegSelectionChange"
  2018. >
  2019. <el-table-column type="selection" width="55"> </el-table-column>
  2020. <el-table-column label="行号" type="index" width="80">
  2021. </el-table-column>
  2022. <el-table-column
  2023. prop="fCorpname"
  2024. header-align="center"
  2025. align="center"
  2026. label="客户名称"
  2027. >
  2028. </el-table-column>
  2029. <el-table-column
  2030. prop="fName"
  2031. header-align="center"
  2032. align="center"
  2033. label="费用名称"
  2034. >
  2035. </el-table-column>
  2036. <el-table-column
  2037. prop="fFeeUnitid"
  2038. header-align="center"
  2039. align="center"
  2040. width="180px"
  2041. label="计价单位"
  2042. >
  2043. <template slot-scope="scope">
  2044. <el-select
  2045. v-model="scope.row.fFeeUnitid"
  2046. placeholder="请选择计费单位"
  2047. @change="changeFeeUnit(scope.row)"
  2048. disabled
  2049. clearable
  2050. >
  2051. <el-option
  2052. v-for="dict in jFeetunitOptions"
  2053. :key="dict.dictValue"
  2054. :label="dict.dictLabel"
  2055. :value="dict.dictValue"
  2056. />
  2057. </el-select>
  2058. </template>
  2059. </el-table-column>
  2060. <el-table-column
  2061. prop="fPrice"
  2062. header-align="center"
  2063. align="center"
  2064. label="单价"
  2065. >
  2066. </el-table-column>
  2067. <!-- <el-table-column
  2068. prop="fMarks"
  2069. header-align="center"
  2070. align="center"
  2071. label="唛头"
  2072. >
  2073. </el-table-column> -->
  2074. </el-table>
  2075. <pagination
  2076. v-show="whgenlegTotal > 0"
  2077. :total="whgenlegTotal"
  2078. :page.sync="queryParams.pageNum"
  2079. :limit.sync="queryParams.pageSize"
  2080. @pagination="getWhgenlegList"
  2081. />
  2082. <div slot="footer" class="dialog-footer">
  2083. <el-button type="primary" @click="whgenlegData"
  2084. >导入作业费协议</el-button
  2085. >
  2086. <el-button @click="warehousingagreement = false">取 消</el-button>
  2087. </div>
  2088. </el-dialog>
  2089. <!-- 选择作业费协议数据 -->
  2090. <el-dialog
  2091. title="作业费协议"
  2092. :close-on-click-modal="false"
  2093. :modal="false"
  2094. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2095. :visible.sync="warehousingagreements"
  2096. width="70%"
  2097. >
  2098. <el-table
  2099. :data="tasklegList"
  2100. ref="table"
  2101. tooltip-effect="dark"
  2102. width="100%"
  2103. border
  2104. stripe
  2105. @selection-change="whgenlegSelectionChange"
  2106. >
  2107. <el-table-column type="selection" width="55"> </el-table-column>
  2108. <el-table-column label="行号" type="index" width="80">
  2109. </el-table-column>
  2110. <el-table-column
  2111. prop="fCorpname"
  2112. header-align="center"
  2113. align="center"
  2114. label="客户名称"
  2115. >
  2116. </el-table-column>
  2117. <el-table-column
  2118. prop="fName"
  2119. header-align="center"
  2120. align="center"
  2121. label="费用名称"
  2122. >
  2123. </el-table-column>
  2124. <el-table-column
  2125. prop="fFeeUnitid"
  2126. header-align="center"
  2127. align="center"
  2128. width="180px"
  2129. label="计价单位"
  2130. >
  2131. <template slot-scope="scope">
  2132. <el-select
  2133. v-model="scope.row.fFeeUnitid"
  2134. placeholder="请选择计费单位"
  2135. @change="changeFeeUnit(scope.row)"
  2136. disabled
  2137. clearable
  2138. >
  2139. <el-option
  2140. v-for="dict in jFeetunitOptions"
  2141. :key="dict.dictValue"
  2142. :label="dict.dictLabel"
  2143. :value="dict.dictValue"
  2144. />
  2145. </el-select>
  2146. </template>
  2147. </el-table-column>
  2148. <el-table-column
  2149. prop="fPrice"
  2150. header-align="center"
  2151. align="center"
  2152. label="单价"
  2153. >
  2154. </el-table-column>
  2155. <!-- <el-table-column
  2156. prop="fMarks"
  2157. header-align="center"
  2158. align="center"
  2159. label="唛头"
  2160. >
  2161. </el-table-column> -->
  2162. </el-table>
  2163. <pagination
  2164. v-show="whgenlegTotal > 0"
  2165. :total="whgenlegTotal"
  2166. :page.sync="queryParams.pageNum"
  2167. :limit.sync="queryParams.pageSize"
  2168. @pagination="getWhgenlegList"
  2169. />
  2170. <div slot="footer" class="dialog-footer">
  2171. <el-button type="primary" @click="zhgenlegData">导入</el-button>
  2172. <el-button @click="warehousingagreements = false">取 消</el-button>
  2173. </div>
  2174. </el-dialog>
  2175. <el-dialog
  2176. title=""
  2177. :modal="false"
  2178. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2179. :visible.sync="editDialogVisible_s"
  2180. :close-on-click-modal="false"
  2181. @close="closeDialog"
  2182. width="70%"
  2183. >
  2184. <table
  2185. id="print_area2"
  2186. class="biaoge zzss"
  2187. border="1"
  2188. style="border-collapse: collapse; border: none"
  2189. >
  2190. <tr>
  2191. <td
  2192. width="100"
  2193. colspan="7"
  2194. class="zzss"
  2195. style="font-size: 28px; font-weight: bold; border: none"
  2196. >
  2197. 青岛大木进仓单
  2198. </td>
  2199. </tr>
  2200. <tr>
  2201. <td
  2202. width="100"
  2203. colspan="7"
  2204. class="zzss"
  2205. style="font-size: 28px; font-weight: bold; border: none"
  2206. >
  2207. &nbsp;
  2208. </td>
  2209. </tr>
  2210. <tr>
  2211. <td width="450" colspan="2" class="zzss">
  2212. 货权方:{{ form.fCorpid }}
  2213. </td>
  2214. <td width="450" colspan="2" class="zzss">
  2215. 仓库:{{ form.fWarehouseid }}
  2216. </td>
  2217. <td width="450" colspan="3" class="zzss">地址:{{ fAddr }}</td>
  2218. </tr>
  2219. <tr>
  2220. <td width="200" colspan="2" class="zzss">保管方:大木有限公司</td>
  2221. <td width="200" colspan="2" class="zzss">
  2222. 联系人:{{ form.fContacts }}
  2223. </td>
  2224. <td width="200" colspan="3" class="zzss">电话:{{ fDriverTel }}</td>
  2225. </tr>
  2226. <tr>
  2227. <td width="100" border="1">提单号</td>
  2228. <td width="100">品名</td>
  2229. <td width="100">箱型</td>
  2230. <td width="100">品牌</td>
  2231. <td width="100">件数</td>
  2232. <td width="100">重量</td>
  2233. <td width="100">包装规格</td>
  2234. </tr>
  2235. <tr>
  2236. <td width="100">{{ form.fMblno }}</td>
  2237. <td width="100">{{ fGoodsids }}</td>
  2238. <td width="100">{{ fCntrtype }}</td>
  2239. <td width="100"></td>
  2240. <td width="100">包</td>
  2241. <td width="100">吨</td>
  2242. <td width="100">{{ fPackagespecs }}</td>
  2243. </tr>
  2244. <tr>
  2245. <td width="100">序号</td>
  2246. <td width="100">入货日期</td>
  2247. <td width="100">箱量(20GP)</td>
  2248. <td width="100">重量</td>
  2249. <td width="100">件数</td>
  2250. <td width="100">入库重量</td>
  2251. <td width="100">入库件数</td>
  2252. </tr>
  2253. <tr v-for="(item, indexx) in Printinglist" :key="indexx">
  2254. <td width="100">{{ indexx + 1 }}</td>
  2255. <td width="100">{{ item.fBsdate }}</td>
  2256. <td width="100">{{ item.fCntqty }}</td>
  2257. <td width="100">{{ item.fGrossweight }}</td>
  2258. <td width="100">{{ item.fPlanqty }}</td>
  2259. <td width="100">{{ item.fNetweight }}</td>
  2260. <td width="100">{{ item.fQty }}</td>
  2261. </tr>
  2262. <tr>
  2263. <td width="100" colspan="2">合计:</td>
  2264. <td width="100">{{ fCntqty }}</td>
  2265. <td width="100">{{ fGrossweight }}</td>
  2266. <td width="100">{{ fPlanqty }}</td>
  2267. <td width="100">{{ fNetweight }}</td>
  2268. <td width="100">{{ fQty }}</td>
  2269. </tr>
  2270. <tr>
  2271. <td width="100">备注:</td>
  2272. <td width="100" colspan="6"></td>
  2273. </tr>
  2274. <tr>
  2275. <td width="100" colspan="7" class="zzss">
  2276. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  2277. </td>
  2278. </tr>
  2279. <tr style="border: none">
  2280. <td width="100" colspan="2" class="zzss" style="border: none">
  2281. 开单员:
  2282. </td>
  2283. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  2284. <td width="100" colspan="2" class="zzss" style="border: none">
  2285. 仓管员:
  2286. </td>
  2287. </tr>
  2288. <tr style="border: none">
  2289. <td width="100" colspan="2" class="zzss" style="border: none">
  2290. 开单时间:
  2291. </td>
  2292. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  2293. <td width="100" colspan="2" class="zzss" style="border: none">
  2294. (盖章)
  2295. </td>
  2296. </tr>
  2297. </table>
  2298. <button @click="printSomething1">打印</button>
  2299. </el-dialog>
  2300. <el-dialog
  2301. title=""
  2302. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2303. :visible.sync="editDialogVisible_ss"
  2304. :close-on-click-modal="false"
  2305. width="70%"
  2306. :modal="false"
  2307. >
  2308. <table
  2309. id="print_area3"
  2310. class="biaoge zzss"
  2311. border="1"
  2312. style="border-collapse: collapse; border: none;margin-top;100px;"
  2313. >
  2314. <tr>
  2315. <td
  2316. width="1400"
  2317. colspan="6"
  2318. class="zzss"
  2319. style="font-size: 26px; font-weight: bold; border: none"
  2320. >
  2321. 大木国际物流(青岛)有限公司收货单
  2322. </td>
  2323. </tr>
  2324. <!-- <div v-for="{{}}" :key="index"> -->
  2325. <tr>
  2326. <td width="400">车号:</td>
  2327. <td width="400">{{ fTruckno }}</td>
  2328. <td
  2329. width="500"
  2330. colspan="4"
  2331. style="padding-bottom: 0px; font-weight: bold; border: none"
  2332. class="zzss"
  2333. >
  2334. 日期:{{ fBsdates }}
  2335. </td>
  2336. <!-- <td
  2337. width="500"
  2338. colspan="2"
  2339. style="padding-bottom: 0px; font-weight: bold; border: none"
  2340. class="zzss"
  2341. >
  2342. </td> -->
  2343. </tr>
  2344. <tr v-for="(item, index) in Printinglist" :key="index">
  2345. <td width="250">货物品名:</td>
  2346. <!-- <td width="200" colspan="">1</td> -->
  2347. <td width="250">{{ item.fGoodsids }}</td>
  2348. <!-- <td width="250">白色聚吕</td> -->
  2349. <!-- <td width="200" colspan="2">件数: 161件</td> -->
  2350. <!-- <td width="200"></td> -->
  2351. <td width="200" colspan="4" class="zzss">
  2352. 件数: {{ item.fQty }}件
  2353. </td>
  2354. </tr>
  2355. <!-- <tr>
  2356. <td width="1400" colspan="6">&nbsp;</td>
  2357. </tr> -->
  2358. <tr>
  2359. <td>备注:</td>
  2360. <td colspan="5">{{ form.remark }}</td>
  2361. </tr>
  2362. <tr>
  2363. <td>司机签字:</td>
  2364. <td></td>
  2365. <td colspan="2">司机电话:</td>
  2366. <td colspan="2">{{ fDriverTel }}</td>
  2367. </tr>
  2368. <tr>
  2369. <td>制单人:</td>
  2370. <td>{{ form.createBy }}</td>
  2371. <td colspan="2">收货人:</td>
  2372. <td colspan="2">{{ form.fContacts }}</td>
  2373. </tr>
  2374. <!-- <tr>
  2375. <td colspan="6" class="zzss">&nbsp;</td>
  2376. </tr> -->
  2377. <tr>
  2378. <td width="280" class="zzss"></td>
  2379. <td width="280" class="zzss"></td>
  2380. <td width="280" class="zzss"></td>
  2381. <td width="280" class="zzss"></td>
  2382. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2383. <td width="290" class="zzss">电话:{{ fDriverTel }}</td>
  2384. </tr>
  2385. <!-- </div> -->
  2386. </table>
  2387. <button @click="printSomething">打印</button>
  2388. </el-dialog>
  2389. <el-dialog
  2390. title=""
  2391. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2392. :visible.sync="editDialogVisible_sss"
  2393. :close-on-click-modal="false"
  2394. width="70%"
  2395. :modal="false"
  2396. >
  2397. <table
  2398. id="print_area1"
  2399. class="biaoge zzss"
  2400. border="1"
  2401. style="border-collapse: collapse; border: none"
  2402. >
  2403. <tr>
  2404. <td
  2405. width="1400"
  2406. colspan="6"
  2407. class="zzss"
  2408. style="font-size: 28px; font-weight: bold; border: none"
  2409. >
  2410. 大木国际物流(青岛)有限公司作业单
  2411. </td>
  2412. </tr>
  2413. <tr>
  2414. <td
  2415. width="900"
  2416. colspan="4"
  2417. class="zzss"
  2418. style="font-size: 28px; font-weight: bold"
  2419. >
  2420. &nbsp;
  2421. </td>
  2422. <td
  2423. width="500"
  2424. colspan="2"
  2425. style="padding-bottom: 0px; font-weight: bold; border: none"
  2426. class="zzss"
  2427. >
  2428. 入库日期:{{ fBsdates }}
  2429. </td>
  2430. </tr>
  2431. <tr v-for="(item, index) in Printinglist" :key="index">
  2432. <td width="200">车号</td>
  2433. <td width="200">{{ item.fTruckno }}</td>
  2434. <td width="200">货物品名</td>
  2435. <td width="200" colspan="4" class="zzss">
  2436. {{ item.fGoodsids }}
  2437. </td>
  2438. </tr>
  2439. <tr>
  2440. <td width="1400" colspan="6">&nbsp;</td>
  2441. </tr>
  2442. <tr>
  2443. <td>备注:</td>
  2444. <td colspan="5">{{ form.remark }}</td>
  2445. </tr>
  2446. <tr
  2447. v-for="(item, indexe) in Collectionoptionss"
  2448. :key="indexe + 'index'"
  2449. >
  2450. <td>收费</td>
  2451. <td>{{ item.fFeeids }}</td>
  2452. <td>{{ item.fAmount }} 元</td>
  2453. <!-- <td colspan="4">办单费:5元,过磅费自理</td> -->
  2454. </tr>
  2455. <tr>
  2456. <td>司机签字:</td>
  2457. <td></td>
  2458. <td>电话</td>
  2459. <td>{{ fDriverTel }}</td>
  2460. <td colspan="2" rowspan="2">
  2461. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  2462. </td>
  2463. </tr>
  2464. <tr>
  2465. <td>制表:</td>
  2466. <td>{{ form.createBy }}</td>
  2467. <td>机械/人工:</td>
  2468. <td></td>
  2469. </tr>
  2470. <tr>
  2471. <td colspan="6" class="zzss">&nbsp;</td>
  2472. </tr>
  2473. <tr>
  2474. <td width="280" class="zzss"></td>
  2475. <td width="280" class="zzss"></td>
  2476. <td width="280" class="zzss"></td>
  2477. <td width="280" class="zzss"></td>
  2478. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2479. <td width="290" class="zzss">电话:{{ fDriverTel }}</td>
  2480. </tr>
  2481. </table>
  2482. <div style="display: flex; justify-content: space-between">
  2483. <el-button
  2484. type="primary"
  2485. :disabled="browseStatus"
  2486. @click="printSomething2"
  2487. >打印
  2488. </el-button>
  2489. <el-button @click="editDialogVisible_sss = false">取消 </el-button>
  2490. </div>
  2491. </el-dialog>
  2492. </el-dialog>
  2493. </div>
  2494. </template>
  2495. <script>
  2496. import print from "print-js";
  2497. import {
  2498. addWhgenleg,
  2499. addJoblist,
  2500. disChargelist,
  2501. updateCredit,
  2502. listWarehousebills,
  2503. getWarehousebills,
  2504. delWarehousebills,
  2505. addWarehousebills,
  2506. addWarehouse,
  2507. updateWarehousebills,
  2508. exportWarehousebills,
  2509. } from "@/api/warehouseBusiness/warehouseInStock";
  2510. import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
  2511. import { listCorps } from "@/api/basicdata/corps";
  2512. import { listFees, getFees } from "@/api/basicdata/fees";
  2513. import { listWarehouse } from "@/api/basicdata/warehouse";
  2514. import { listArea } from "@/api/basicdata/area";
  2515. import { listGoods } from "@/api/basicdata/goods";
  2516. import { listUser, queryUserVal } from "@/api/system/user";
  2517. import UploadFile from "@/components/Uploadfile";
  2518. import AddOrUpdate from "@/views/viewApproval";
  2519. import ApprovalComments from "@/views/startApproval";
  2520. export default {
  2521. name: "Warehousebills",
  2522. components: {
  2523. UploadFile,
  2524. AddOrUpdate,
  2525. ApprovalComments,
  2526. },
  2527. data() {
  2528. return {
  2529. // 修改查看状态
  2530. browseStatus: false,
  2531. // 审批状态控制
  2532. approvalStatus: false,
  2533. detailsHidden: false,
  2534. warehousingagreement: false,
  2535. warehousingagreements: false,
  2536. formBrowseStatus: false,
  2537. fTruckno: "",
  2538. fBsdates: "",
  2539. fCntrtype: "",
  2540. fGoodsids: "",
  2541. fPlaNnumber: "",
  2542. fPlangNumber: "",
  2543. // fPlannetweight: "",
  2544. fPlanvolumn: "",
  2545. // 司机电话
  2546. fDriverTel: "",
  2547. fPlanqty: "",
  2548. fPlangrossweight: "",
  2549. fPlannetweight: "",
  2550. fFeeUnitid: "",
  2551. fFeeUnitids: "",
  2552. fGrossweight: 0,
  2553. fid: "",
  2554. fCntqty: "",
  2555. fPackagespecs: "",
  2556. fNetweight: 0,
  2557. fQty: 0,
  2558. mum: 0,
  2559. // 遮罩层
  2560. loading: true,
  2561. // 选中数组
  2562. ids: [],
  2563. Collectionoptionss: [],
  2564. userVal: {
  2565. userName: null,
  2566. nickName: null,
  2567. deptId: null,
  2568. },
  2569. queryForm: {},
  2570. // 新增用户对话框
  2571. editDialogVisible_s: false,
  2572. editDialogVisible_ss: false,
  2573. editDialogVisible_sss: false,
  2574. editDialogClosed_ss: false,
  2575. addOrUpdateVisible: false,
  2576. addOrUpdateVisib: false,
  2577. // 新增计划净重
  2578. weightList: false,
  2579. dataList: [],
  2580. warehouseCrList: [],
  2581. warehouseDrList: [],
  2582. Pledgebank: [],
  2583. relevantAttachments: [],
  2584. // 非单个禁用
  2585. single: true,
  2586. // 非多个禁用
  2587. multiple: true,
  2588. // 显示搜索条件
  2589. showSearch: true,
  2590. // 总条数
  2591. total: 0,
  2592. // 仓库主(出入库)表格数据
  2593. warehousebillsList: [],
  2594. // 弹出层标题
  2595. title: "",
  2596. // 是否显示弹出层
  2597. open: false,
  2598. // 货权方(客户数据)
  2599. fMblnoOptions: [],
  2600. // 货权方(客户数据)
  2601. // 客户名称
  2602. KHblnoOptions: [],
  2603. // 作业费协议
  2604. tasklegList: [],
  2605. whgenlegTotal: 0,
  2606. Printinglist: [],
  2607. // 库存明细入账数组
  2608. dataListSelection: [],
  2609. fAddr: "",
  2610. // 库存明细撤回入账数组
  2611. dataWithdrawList: [],
  2612. fSbuOptions: [],
  2613. // 操作员
  2614. userOptions: [],
  2615. // 操作员
  2616. goodsOptions: [],
  2617. // 制单部门
  2618. deptOptions: [],
  2619. // 仓库(仓库数据)
  2620. warehouseOptions: [],
  2621. kqhouseOptions: [],
  2622. // 贸易方式(数据字典),对应t_trademodels 字典
  2623. fTrademodeidOptions: [],
  2624. // 计费单位(数据字典),下拉选择毛重或净重字典
  2625. fFeetunitOptions: [
  2626. { dictLabel: "件数", dictValue: "1" },
  2627. { dictLabel: "毛重", dictValue: "2" },
  2628. { dictLabel: "净重", dictValue: "3" },
  2629. { dictLabel: "尺码", dictValue: "4" },
  2630. { dictLabel: "固定", dictValue: "5" },
  2631. ],
  2632. // 结算方式(数据字典),下拉选择字典
  2633. fStltypeOptions: [],
  2634. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2635. fIfweighOptions: [],
  2636. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  2637. fIfpledgeOptions: [],
  2638. // 是否破损(数据字典),默认F否则T字典
  2639. fIfdamageOptions: [],
  2640. // 单据类型(数据字典)SJRK字典
  2641. fBilltypeOptions: [],
  2642. // 状态(数据字典),N 入字典
  2643. fBillstatusOptions: [],
  2644. // 费用名称
  2645. fWbuOptions: [],
  2646. // 计价单位
  2647. jFeetunitOptions: [
  2648. { dictLabel: "件数", dictValue: "1" },
  2649. { dictLabel: "毛重", dictValue: "2" },
  2650. { dictLabel: "净重", dictValue: "3" },
  2651. { dictLabel: "尺码", dictValue: "4" },
  2652. { dictLabel: "固定", dictValue: "5" },
  2653. ],
  2654. // 查询参数
  2655. queryParams: {
  2656. pageNum: 1,
  2657. pageSize: 10,
  2658. fBillno: null,
  2659. createBy: null,
  2660. createTime: null,
  2661. fCustomsdeclartion: null,
  2662. fOriginalbillno: null,
  2663. fDeptid: null,
  2664. timeInterval: null,
  2665. fBsdeptid: null,
  2666. fContacts: null,
  2667. fTel: null,
  2668. fCorpid: null,
  2669. fTocorpid: null,
  2670. fStltypeid: null,
  2671. fBscorpno: null,
  2672. fWarehouseid: null,
  2673. fStorekeeper: null,
  2674. fBsdate: null,
  2675. fPlanqty: null,
  2676. fPlangrossweight: null,
  2677. fPlannetweight: null,
  2678. fPlanvolumn: null,
  2679. fQty: null,
  2680. fGrossweight: null,
  2681. fNetweight: null,
  2682. fVolumn: null,
  2683. fTrademodeid: null,
  2684. fSbu: null,
  2685. fFeetunit: null,
  2686. fMblno: null,
  2687. fVslvoy: null,
  2688. fEta: null,
  2689. fCustomno: null,
  2690. fIfweigh: null,
  2691. fIfpledge: null,
  2692. fIfdamage: null,
  2693. fBankcorpid: null,
  2694. fBilltype: null,
  2695. fBillstatus: null,
  2696. fCreateby: null,
  2697. fCreatetime: null,
  2698. fGoodsid: null,
  2699. fCntrtype: null,
  2700. fCntqty: null,
  2701. },
  2702. // 作业费参数
  2703. queryParams: {
  2704. pageNum: 1,
  2705. pageSize: 10,
  2706. fCorpid: null,
  2707. fLineno: null,
  2708. },
  2709. planningList: {
  2710. fPlanqty: null,
  2711. fPlannetweight: null,
  2712. fPlangrossweight: null,
  2713. },
  2714. // 表单参数
  2715. form: {
  2716. fItemsStatus: null,
  2717. },
  2718. // 表单校验
  2719. rules: {
  2720. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  2721. fMblno: [{ required: true, message: " ", trigger: "blur" }],
  2722. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  2723. fCorpid: [
  2724. {
  2725. required: true,
  2726. message: " ",
  2727. trigger: "blur",
  2728. },
  2729. ],
  2730. fFeetunit: [{ required: true, message: " ", trigger: "blur" }],
  2731. fPlanqty: [{ required: true, message: " ", trigger: "blur" }],
  2732. fPlangrossweight: [{ required: true, message: " ", trigger: "blur" }],
  2733. fPlannetweight: [{ required: true, message: " ", trigger: "blur" }],
  2734. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  2735. fMarks: [{ required: true, message: " ", trigger: "blur" }],
  2736. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  2737. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  2738. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  2739. fStorekeeper: {
  2740. required: true,
  2741. message: " ",
  2742. trigger: "blur",
  2743. },
  2744. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  2745. fbillingway: [
  2746. {
  2747. required: true,
  2748. message: " ",
  2749. trigger: "blur",
  2750. },
  2751. ],
  2752. fTocorpid: [
  2753. {
  2754. required: true,
  2755. message: " ",
  2756. trigger: "blur",
  2757. },
  2758. ],
  2759. },
  2760. };
  2761. },
  2762. created() {
  2763. this.getList();
  2764. this.getDicts("data_trademodes").then((response) => {
  2765. this.fTrademodeidOptions = response.data;
  2766. });
  2767. this.getDicts("data_stltype_type").then((response) => {
  2768. this.fStltypeOptions = response.data;
  2769. });
  2770. this.getDicts("tax_rate").then((response) => {
  2771. this.fTaxrate = response.data[0].dictValue;
  2772. });
  2773. this.getDicts("data_ifweigh_status").then((response) => {
  2774. this.fIfweighOptions = response.data;
  2775. });
  2776. this.getDicts("data_ifpledge_status").then((response) => {
  2777. this.fIfpledgeOptions = response.data;
  2778. });
  2779. this.getDicts("data_ifdamage_status").then((response) => {
  2780. this.fIfdamageOptions = response.data;
  2781. });
  2782. this.getDicts("data_billtype_type").then((response) => {
  2783. this.fBilltypeOptions = response.data;
  2784. });
  2785. this.getDicts("sys_common_status").then((response) => {
  2786. this.fBillstatusOptions = response.data;
  2787. });
  2788. },
  2789. methods: {
  2790. // 上传成功返回数据
  2791. showFile(row) {
  2792. for (let list in this.relevantAttachments) {
  2793. this.$set(this.relevantAttachments[list], "fUrl", row.url);
  2794. this.$set(this.relevantAttachments[list], "fName", row.fileName);
  2795. }
  2796. },
  2797. printSomething() {
  2798. // 此处的style即为打印时的样式
  2799. const style =
  2800. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2801. print({
  2802. printable: "print_area3",
  2803. type: "html",
  2804. style: style, // 亦可使用引入的外部css;
  2805. scanStyles: false,
  2806. });
  2807. },
  2808. printSomething1() {
  2809. // 此处的style即为打印时的样式
  2810. const style =
  2811. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2812. print({
  2813. printable: "print_area2",
  2814. type: "html",
  2815. style: style, // 亦可使用引入的外部css;
  2816. scanStyles: false,
  2817. });
  2818. },
  2819. printSomething2() {
  2820. // 此处的style即为打印时的样式
  2821. const style =
  2822. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2823. print({
  2824. printable: "print_area1",
  2825. type: "html",
  2826. style: style, // 亦可使用引入的外部css;
  2827. scanStyles: false,
  2828. });
  2829. this.addList();
  2830. this.editDialogVisible_sss = false;
  2831. },
  2832. // 新增附件上传
  2833. addRelevt() {
  2834. this.relevantAttachments.push({
  2835. fUrl: null,
  2836. fName: null,
  2837. createBy: this.form.createBy,
  2838. createTime: Date.parse(new Date()),
  2839. });
  2840. },
  2841. // 新增作业费协议
  2842. addAgreement() {
  2843. if (!this.form.fCorpid) {
  2844. this.$message({
  2845. message: "请维护货权方",
  2846. type: "warning",
  2847. });
  2848. } else {
  2849. this.whgenlegList = [];
  2850. this.dialogWhgenlegList = [];
  2851. this.whgenlegTotal = 0;
  2852. this.warehousingagreement = true;
  2853. this.getWhgenlegList();
  2854. }
  2855. },
  2856. // 新增付款作业费协议
  2857. addAgreements() {
  2858. if (!this.form.fCorpid) {
  2859. this.$message({
  2860. message: "请维护货权方",
  2861. type: "warning",
  2862. });
  2863. } else {
  2864. this.whgenlegList = [];
  2865. this.dialogWhgenlegList = [];
  2866. this.whgenlegTotal = 0;
  2867. this.warehousingagreements = true;
  2868. this.getWhgenlegList();
  2869. }
  2870. },
  2871. // 新增list
  2872. addRelevant(status) {
  2873. let corpidStatus =
  2874. typeof this.form.fPlannetweight === "undefined" ||
  2875. this.form.fPlannetweight == null ||
  2876. this.form.fPlannetweight === "";
  2877. let ftrademodeids =
  2878. typeof this.form.fPlangrossweight === "undefined" ||
  2879. this.form.fPlangrossweight == null ||
  2880. this.form.fPlangrossweight === "";
  2881. let warehouseidStatus =
  2882. typeof this.form.fPlanqty === "undefined" ||
  2883. this.form.fPlanqty == null ||
  2884. this.form.fPlanqty === "";
  2885. if (corpidStatus || warehouseidStatus || ftrademodeids) {
  2886. this.$message({
  2887. message: "请维护计划净重,计划毛重,计划件数",
  2888. type: "warning",
  2889. });
  2890. return false;
  2891. }
  2892. this.fPlaNnumber = this.form.fPlannetweight / this.form.fPlanqty;
  2893. this.fPlangNumber = this.form.fPlangrossweight / this.form.fPlanqty;
  2894. (this.planningList.fPlanqty =
  2895. Number(this.form.fPlanqty) - Number(this.mum)),
  2896. (this.planningList.fPlannetweight = (
  2897. Number(this.fPlaNnumber) * Number(this.planningList.fPlanqty)
  2898. ).toFixed(2)),
  2899. (this.planningList.fPlangrossweight = (
  2900. Number(this.fPlangNumber) * Number(this.planningList.fPlanqty)
  2901. ).toFixed(2)),
  2902. (this.weightList = true);
  2903. },
  2904. // 收货单打印界面
  2905. showEditDialog_s() {
  2906. if (this.Printinglist.length > 0) {
  2907. this.editDialogVisible_s = true;
  2908. for (let aorp in this.Printinglist) {
  2909. var date = new Date(this.Printinglist[aorp].fBsdate);
  2910. var Y = date.getFullYear() + "-";
  2911. var M =
  2912. (date.getMonth() + 1 < 10
  2913. ? "0" + (date.getMonth() + 1)
  2914. : date.getMonth() + 1) + "-";
  2915. var D =
  2916. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  2917. this.$set(this.Printinglist[aorp], "fBsdate", Y + M + D);
  2918. }
  2919. for (let corp in this.fMblnoOptions) {
  2920. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  2921. this.$set(this.form, "fCorpid", this.fMblnoOptions[corp].fName);
  2922. }
  2923. }
  2924. for (let sorp in this.warehouseOptions) {
  2925. if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
  2926. this.$set(
  2927. this.form,
  2928. "fWarehouseid",
  2929. this.warehouseOptions[sorp].fName
  2930. );
  2931. }
  2932. }
  2933. } else {
  2934. this.$message.error("请选择需要打印的明细!");
  2935. }
  2936. },
  2937. closeDialog() {
  2938. for (let aorp in this.Printinglist) {
  2939. this.$set(
  2940. this.Printinglist[aorp],
  2941. "fBsdate",
  2942. Date.parse(this.Printinglist[aorp].fBsdate)
  2943. );
  2944. }
  2945. },
  2946. showEditDialog_ss() {
  2947. if (this.Printinglist.length > 0) {
  2948. for (let li in this.Printinglist) {
  2949. if (this.dataListSelection.length > 0) {
  2950. this.fTruckno = this.dataListSelection[0].fTruckno;
  2951. this.fCntrtype = this.dataListSelection[0].fCntrtype;
  2952. this.fGoodsids = this.dataListSelection[0].fGoodsids;
  2953. this.fPackagespecs = this.dataListSelection[0].fPackagespecs;
  2954. var date = new Date(this.dataListSelection[0].fBsdate);
  2955. var Y = date.getFullYear() + "-";
  2956. var M =
  2957. (date.getMonth() + 1 < 10
  2958. ? "0" + (date.getMonth() + 1)
  2959. : date.getMonth() + 1) + "-";
  2960. var D =
  2961. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) +
  2962. " ";
  2963. this.fBsdates = Y + M + D;
  2964. }
  2965. for (let list in this.goodsOptions) {
  2966. if (
  2967. this.Printinglist[li].fGoodsid === this.goodsOptions[list].fId
  2968. ) {
  2969. this.$set(
  2970. this.Printinglist[li],
  2971. "fGoodsids",
  2972. this.goodsOptions[list].fName
  2973. );
  2974. }
  2975. }
  2976. }
  2977. this.editDialogVisible_ss = true;
  2978. } else {
  2979. this.$message.error("请选择需要打印的明细!");
  2980. }
  2981. },
  2982. showEditDialog_sss() {
  2983. if (this.Printinglist.length > 0) {
  2984. for (let li in this.Printinglist) {
  2985. if (!this.Printinglist[li].fId) {
  2986. this.$message.error("请先保存!");
  2987. return false;
  2988. }
  2989. if (this.dataListSelection.length > 0) {
  2990. this.fTruckno = this.dataListSelection[0].fTruckno;
  2991. this.fCntrtype = this.dataListSelection[0].fCntrtype;
  2992. this.fGoodsids = this.dataListSelection[0].fGoodsids;
  2993. this.fDriverTel = this.dataListSelection[0].fDriverTel;
  2994. this.fPackagespecs = this.dataListSelection[0].fPackagespecs;
  2995. var date = new Date(this.dataListSelection[0].fBsdate);
  2996. var Y = date.getFullYear() + "-";
  2997. var M =
  2998. (date.getMonth() + 1 < 10
  2999. ? "0" + (date.getMonth() + 1)
  3000. : date.getMonth() + 1) + "-";
  3001. var D =
  3002. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) +
  3003. " ";
  3004. this.fBsdates = Y + M + D;
  3005. }
  3006. for (let list in this.goodsOptions) {
  3007. if (
  3008. this.Printinglist[li].fGoodsid === this.goodsOptions[list].fId
  3009. ) {
  3010. this.$set(
  3011. this.Printinglist[li],
  3012. "fGoodsids",
  3013. this.goodsOptions[list].fName
  3014. );
  3015. }
  3016. }
  3017. }
  3018. if (this.Printinglist.length > 0) {
  3019. for (let warehouseCr in this.Printinglist) {
  3020. if (
  3021. this.Printinglist[warehouseCr].fTruckno !=
  3022. this.Printinglist[0].fTruckno
  3023. ) {
  3024. this.$message.error("请选择车相同车号");
  3025. return false;
  3026. }
  3027. if (
  3028. this.Printinglist[warehouseCr].fDriverName !=
  3029. this.Printinglist[0].fDriverName
  3030. ) {
  3031. this.$message.error("请选择相同司机名");
  3032. return false;
  3033. }
  3034. if (!this.Printinglist[warehouseCr].fGoodsid) {
  3035. this.$message.error("请选择品名");
  3036. return false;
  3037. }
  3038. if (!this.Printinglist[warehouseCr].fWarehouselocid) {
  3039. this.$message.error("请选择库区");
  3040. return false;
  3041. }
  3042. if (!this.Printinglist[warehouseCr].fGrossweight) {
  3043. this.$message.error("请选择入库毛重");
  3044. return false;
  3045. }
  3046. if (!this.Printinglist[warehouseCr].fNetweight) {
  3047. this.$message.error("请选择入库净重");
  3048. return false;
  3049. }
  3050. if (!this.Printinglist[warehouseCr].fPackagespecs) {
  3051. this.$message.error("请输入包装规格");
  3052. return false;
  3053. }
  3054. if (!this.Printinglist[warehouseCr].fMarks) {
  3055. this.$message.error("请输入品牌");
  3056. return false;
  3057. }
  3058. if (!this.Printinglist[warehouseCr].fQty) {
  3059. this.$message.error("请选择入库件数");
  3060. return false;
  3061. }
  3062. if (!this.Printinglist[warehouseCr].fDriverName) {
  3063. this.$message.error("请输入司机姓名");
  3064. return false;
  3065. }
  3066. if (!this.Printinglist[warehouseCr].fDriverTel) {
  3067. this.$message.error("请输入司机电话");
  3068. return false;
  3069. }
  3070. if (!this.Printinglist[warehouseCr].fTruckno) {
  3071. this.$message.error("请输入车号");
  3072. return false;
  3073. }
  3074. }
  3075. this.editDialogVisible_sss = true;
  3076. }
  3077. } else {
  3078. this.$message.error("请选择需要打印的明细!");
  3079. }
  3080. },
  3081. // 收款信息
  3082. addCollection() {
  3083. this.warehouseDrList.push({
  3084. fCorpid: null,
  3085. fFeeid: null,
  3086. fFeeUnitid: null,
  3087. fQty: null,
  3088. fUnitprice: null,
  3089. fAmount: null,
  3090. fCurrency: "RMB",
  3091. fExrate: "1",
  3092. fTaxrate: this.fTaxrate,
  3093. fCxrate: null,
  3094. fRate: null,
  3095. remarks: null,
  3096. });
  3097. },
  3098. addpayment() {
  3099. this.warehouseCrList.push({
  3100. fCorpid: null,
  3101. fFeeid: null,
  3102. fFeeUnitid: null,
  3103. fQty: null,
  3104. fUnitprice: null,
  3105. fAmount: null,
  3106. fCurrency: "RMB",
  3107. fExrate: "1",
  3108. fTaxrate: this.fTaxrate,
  3109. fCxrate: null,
  3110. fRate: null,
  3111. remarks: null,
  3112. });
  3113. },
  3114. queryUser() {
  3115. queryUserVal().then((response) => {
  3116. if (response.user !== null) {
  3117. this.userVal = response.user;
  3118. this.$set(this.form, "fDeptid", this.userVal.deptId);
  3119. this.$set(this.form, "createBy", this.userVal.userName);
  3120. this.$set(this.form, "fIfdamage", "1");
  3121. this.$set(this.form, "fIfweigh", "1");
  3122. this.$set(this.form, "fTrademodeid", "1");
  3123. this.$set(this.form, "createTime", Date.parse(new Date()));
  3124. }
  3125. if (response.dept !== null) {
  3126. this.deptOptions = [];
  3127. this.deptOptions.push(response.dept);
  3128. }
  3129. });
  3130. },
  3131. /** 查询仓库主(出入库)列表 */
  3132. getList() {
  3133. this.loading = true;
  3134. listWarehousebills(this.queryParams).then((response) => {
  3135. console.log(response)
  3136. this.warehousebillsList = response.rows;
  3137. this.total = response.total;
  3138. this.loading = false;
  3139. });
  3140. },
  3141. // 查询作业费信息
  3142. getWhgenlegList() {
  3143. // this.queryParams.fCorpid = this.form.fCorpid;
  3144. this.queryParams.fLineno = this.form.fCorpid;
  3145. operationAgreement(this.queryParams).then((response) => {
  3146. this.tasklegList = response.rows;
  3147. for (let li in this.tasklegList) {
  3148. this.$set(
  3149. this.tasklegList[li],
  3150. "fFeeUnitid",
  3151. this.tasklegList[li].fFeeUnitid + ""
  3152. );
  3153. }
  3154. this.whgenlegTotal = response.total;
  3155. });
  3156. },
  3157. // 导入计划重量
  3158. costList() {
  3159. if (Number(this.planningList.fPlanqty) > Number(this.form.fPlanqty)) {
  3160. this.$message({
  3161. message: "计划费件数不能大于主表计划费件数!",
  3162. type: "warning",
  3163. });
  3164. return false;
  3165. }
  3166. if (Number(this.planningList.fPlanqty === 0)) {
  3167. this.$message({
  3168. message: "计划件数不能为0",
  3169. type: "warning",
  3170. });
  3171. return false;
  3172. }
  3173. this.dataList.push({
  3174. fBsdate: this.form.fBsdate,
  3175. fGoodsid: null,
  3176. fCntrtype: null,
  3177. fCntqty: 1,
  3178. fNetweight: this.planningList.fPlannetweight,
  3179. fPlanvolumn: 0,
  3180. fGrossweight: this.planningList.fPlangrossweight,
  3181. fQty: this.planningList.fPlanqty,
  3182. fPackagespecs: null,
  3183. fWarehouselocid: null,
  3184. fBoxno: null,
  3185. fMarks: this.form.fMarks,
  3186. fGoodsval: null,
  3187. fTruckno: null,
  3188. remark: null,
  3189. fBillstatus: 10,
  3190. });
  3191. this.weightList = false;
  3192. },
  3193. // 导入付款信息
  3194. whgenlegData() {
  3195. if (this.dialogWhgenlegList.length === 0) {
  3196. this.$message({
  3197. message: "请选择需要导入的数据",
  3198. type: "warning",
  3199. });
  3200. } else {
  3201. for (let whgen in this.dialogWhgenlegList) {
  3202. let feeId = this.dialogWhgenlegList[whgen].feeFId;
  3203. getFees(feeId).then((response) => {
  3204. this.fWbuOptions.push(response.data);
  3205. });
  3206. this.warehouseDrList.push({
  3207. fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
  3208. fFeeid: feeId,
  3209. fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
  3210. fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
  3211. fCurrency: "RMB",
  3212. fExrate: "1",
  3213. fTaxrate: this.fTaxrate,
  3214. });
  3215. }
  3216. for (let list in this.warehouseDrList) {
  3217. if (this.warehouseDrList[list].fFeeUnitid == 1) {
  3218. this.$set(this.warehouseDrList[list], "fQty", this.fQty.toFixed(2));
  3219. } else if (this.warehouseDrList[list].fFeeUnitid == 2) {
  3220. this.$set(
  3221. this.warehouseDrList[list],
  3222. "fQty",
  3223. this.fGrossweight.toFixed(2)
  3224. );
  3225. } else if (this.warehouseDrList[list].fFeeUnitid == 3) {
  3226. this.$set(
  3227. this.warehouseDrList[list],
  3228. "fQty",
  3229. this.fNetweight.toFixed(2)
  3230. );
  3231. } else {
  3232. this.$set(this.warehouseDrList[list], "fQty", 0);
  3233. }
  3234. this.$set(
  3235. this.warehouseDrList[list],
  3236. "fAmount",
  3237. (
  3238. Number(this.warehouseDrList[list].fUnitprice) *
  3239. Number(this.warehouseDrList[list].fQty)
  3240. ).toFixed(2)
  3241. );
  3242. }
  3243. this.warehousingagreement = false;
  3244. }
  3245. },
  3246. zhgenlegData() {
  3247. if (this.dialogWhgenlegList.length === 0) {
  3248. this.$message({
  3249. message: "请选择需要导入的数据",
  3250. type: "warning",
  3251. });
  3252. } else {
  3253. for (let zhgen in this.dialogWhgenlegList) {
  3254. let feeId = this.dialogWhgenlegList[zhgen].feeFId;
  3255. getFees(feeId).then((response) => {
  3256. this.fWbuOptions.push(response.data);
  3257. });
  3258. this.warehouseCrList.push({
  3259. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  3260. fFeeid: feeId,
  3261. fFeeUnitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + "",
  3262. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  3263. fCurrency: "RMB",
  3264. fExrate: "1",
  3265. fTaxrate: this.fTaxrate,
  3266. });
  3267. }
  3268. for (let list in this.warehouseCrList) {
  3269. if (this.warehouseCrList[list].fFeeUnitid == 1) {
  3270. this.$set(this.warehouseCrList[list], "fQty", this.fQty.toFixed(2));
  3271. } else if (this.warehouseCrList[list].fFeeUnitid == 2) {
  3272. this.$set(
  3273. this.warehouseCrList[list],
  3274. "fQty",
  3275. this.fGrossweight.toFixed(2)
  3276. );
  3277. } else if (this.warehouseCrList[list].fFeeUnitid == 3) {
  3278. this.$set(
  3279. this.warehouseCrList[list],
  3280. "fQty",
  3281. this.fNetweight.toFixed(2)
  3282. );
  3283. } else {
  3284. this.$set(this.warehouseCrList[list], "fQty", 0);
  3285. }
  3286. this.$set(
  3287. this.warehouseCrList[list],
  3288. "fAmount",
  3289. (
  3290. Number(this.warehouseCrList[list].fUnitprice) *
  3291. Number(this.warehouseCrList[list].fQty)
  3292. ).toFixed(2)
  3293. );
  3294. }
  3295. this.warehousingagreements = false;
  3296. }
  3297. },
  3298. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  3299. fTrademodeidFormat(row, column) {
  3300. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  3301. },
  3302. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  3303. fFeetunitFormat(row, column) {
  3304. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  3305. },
  3306. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  3307. fIfweighFormat(row, column) {
  3308. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  3309. },
  3310. // 编号字典翻译
  3311. fStltypeidFormat(row, column) {
  3312. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid);
  3313. },
  3314. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  3315. fIfpledgeFormat(row, column) {
  3316. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  3317. },
  3318. // 是否破损(数据字典),默认F否则T字典翻译
  3319. fIfdamageFormat(row, column) {
  3320. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  3321. },
  3322. // 单据类型(数据字典)SJRK字典翻译
  3323. fBilltypeFormat(row, column) {
  3324. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  3325. },
  3326. // 状态(数据字典),N 入字典翻译
  3327. fBillstatusFormat(row, column) {
  3328. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  3329. },
  3330. // 取消按钮
  3331. cancel() {
  3332. this.open = false;
  3333. this.reset();
  3334. },
  3335. // 表单重置
  3336. reset() {
  3337. this.form = {
  3338. fId: null,
  3339. fBillno: null,
  3340. fCustomsdeclartion: null,
  3341. fOriginalbillno: null,
  3342. fDeptid: null,
  3343. fBsdeptid: null,
  3344. fContacts: null,
  3345. fTel: null,
  3346. fCorpid: null,
  3347. fTocorpid: null,
  3348. fStltypeid: null,
  3349. fBscorpno: null,
  3350. fWarehouseid: null,
  3351. fStorekeeper: null,
  3352. fBsdate: null,
  3353. fPlanqty: null,
  3354. fPlangrossweight: null,
  3355. fPlannetweight: null,
  3356. fPlanvolumn: null,
  3357. fQty: null,
  3358. fGrossweight: null,
  3359. fNetweight: null,
  3360. fVolumn: null,
  3361. fTrademodeid: null,
  3362. fSbu: null,
  3363. fFeetunit: null,
  3364. fMblno: null,
  3365. fVslvoy: null,
  3366. fEta: null,
  3367. fCustomno: null,
  3368. fIfweigh: null,
  3369. fIfpledge: null,
  3370. fIfdamage: null,
  3371. fBankcorpid: null,
  3372. fBilltype: null,
  3373. fBillstatus: null,
  3374. delFlag: null,
  3375. createBy: null,
  3376. createTime: null,
  3377. updateBy: null,
  3378. updateTime: null,
  3379. remark: null,
  3380. fCreateby: null,
  3381. fCreatetime: null,
  3382. fGoodsid: null,
  3383. fCntrtype: null,
  3384. fCntqty: null,
  3385. };
  3386. this.fMblnoOptions = [];
  3387. this.userOptions = [];
  3388. this.warehouseOptions = [];
  3389. this.fSbuOptions = [];
  3390. this.goodsOptions = [];
  3391. this.kqhouseOptions = [];
  3392. this.relevantAttachments = [];
  3393. this.KHblnoOptions = [];
  3394. this.fWbuOptions = [];
  3395. this.resetForm("form");
  3396. },
  3397. /** 搜索按钮操作 */
  3398. handleQuery() {
  3399. this.queryParams.pageNum = 1;
  3400. this.getList();
  3401. },
  3402. /** 重置按钮操作 */
  3403. resetQuery() {
  3404. this.resetForm("queryForm");
  3405. this.handleQuery();
  3406. },
  3407. // 多选框选中数据
  3408. handleSelectionChange(selection) {
  3409. this.ids = selection.map((item) => item.fId);
  3410. this.single = selection.length !== 1;
  3411. this.multiple = !selection.length;
  3412. },
  3413. // 库存明细多选
  3414. Selectinventory(selection) {
  3415. this.Printinglist = selection;
  3416. this.Printinglists = selection;
  3417. this.dataListSelection = [];
  3418. this.dataWithdrawList = [];
  3419. if (!selection || selection.length === 0) {
  3420. return false;
  3421. } else {
  3422. for (let se in selection) {
  3423. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
  3424. this.dataListSelection.push(selection[se]);
  3425. } else if (
  3426. selection[se].fBillstatus &&
  3427. selection[se].fBillstatus === 40
  3428. ) {
  3429. this.dataWithdrawList.push(selection[se]);
  3430. }
  3431. }
  3432. }
  3433. // 打印回显仓库
  3434. for (let corp in this.warehouseOptions) {
  3435. this.fAddr = this.warehouseOptions[corp].fAddr;
  3436. }
  3437. },
  3438. // 收款选
  3439. Collectionoptions(selection) {
  3440. this.Collectionoptionss = selection;
  3441. for (let lest in this.fWbuOptions) {
  3442. for (let li in this.Collectionoptionss) {
  3443. if (
  3444. this.fWbuOptions[lest].fId == this.Collectionoptionss[li].fFeeid
  3445. ) {
  3446. this.$set(
  3447. this.Collectionoptionss[li],
  3448. "fFeeids",
  3449. this.fWbuOptions[lest].fName
  3450. );
  3451. }
  3452. }
  3453. }
  3454. },
  3455. // 收款删除
  3456. deleteRow(index, rows) {
  3457. rows.splice(index, 1);
  3458. },
  3459. deleteRoww(index, rows) {
  3460. rows.splice(index, 1);
  3461. },
  3462. // 付款选择
  3463. Paymentoptions(selection) {
  3464. },
  3465. /** 新增按钮操作 */
  3466. handleAdd(status) {
  3467. this.browseStatus = status;
  3468. this.reset();
  3469. this.queryUser();
  3470. this.open = true;
  3471. this.detailsHidden = false;
  3472. this.dataList = [];
  3473. this.warehouseCrList = [];
  3474. this.warehouseDrList = [];
  3475. this.relevantAttachments = [];
  3476. this.mum = 0;
  3477. this.title = "入库单";
  3478. this.formBrowseStatus = false;
  3479. },
  3480. /** 修改按钮操作 */
  3481. handleUpdate(row, status) {
  3482. this.browseStatus = status;
  3483. this.reset();
  3484. this.detailsHidden = false;
  3485. this.formBrowseStatus = false;
  3486. const fId = row.fId || this.ids;
  3487. this.dataList = [];
  3488. getWarehousebills(fId).then((response) => {
  3489. if (response.data.warehousebills) {
  3490. this.form = response.data.warehousebills;
  3491. if (this.form.fBillstatus > 2) {
  3492. this.approvalStatus = false;
  3493. } else {
  3494. this.approvalStatus = true;
  3495. }
  3496. }
  3497. if (response.data.warehouseBillsItem) {
  3498. this.dataList = response.data.warehouseBillsItem;
  3499. for (let list in this.dataList) {
  3500. if (this.dataList[list].fBillstatus > 10) {
  3501. this.formBrowseStatus = true;
  3502. }
  3503. }
  3504. }
  3505. if (response.data.corps) {
  3506. this.fMblnoOptions = response.data.corps;
  3507. this.KHblnoOptions = response.data.corps;
  3508. this.fSbuOptions = response.data.corps;
  3509. }
  3510. if (response.data.feesList) {
  3511. this.fWbuOptions = response.data.feesList;
  3512. }
  3513. if (response.data.warehouse) {
  3514. this.warehouseOptions = response.data.warehouse;
  3515. }
  3516. if (response.data.warehouseBillsItem) {
  3517. this.dataList = response.data.warehouseBillsItem;
  3518. }
  3519. if (response.data.enclosures) {
  3520. this.relevantAttachments = response.data.enclosures;
  3521. }
  3522. this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
  3523. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3524. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3525. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  3526. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
  3527. this.$set(
  3528. this.form,
  3529. "fPlannetweight",
  3530. this.form.fPlannetweight.toFixed(2)
  3531. );
  3532. this.$set(
  3533. this.form,
  3534. "fPlangrossweight",
  3535. this.form.fPlangrossweight.toFixed(2)
  3536. );
  3537. for (let list in this.dataList) {
  3538. this.$set(
  3539. this.dataList[list],
  3540. "fBsdate",
  3541. Date.parse(this.dataList[list].fBsdate)
  3542. );
  3543. }
  3544. this.goodsOptions = response.data.goodsList;
  3545. this.kqhouseOptions = response.data.warehouseAreas;
  3546. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3547. for (let dr in this.warehouseDrList) {
  3548. this.$set(
  3549. this.warehouseDrList[dr],
  3550. "fFeeUnitid",
  3551. this.warehouseDrList[dr].fFeeunitid + ""
  3552. );
  3553. this.$set(
  3554. this.warehouseDrList[dr],
  3555. "fQty",
  3556. this.warehouseDrList[dr].fQty.toFixed(2)
  3557. );
  3558. this.$set(
  3559. this.warehouseDrList[dr],
  3560. "fAmount",
  3561. this.warehouseDrList[dr].fAmount.toFixed(2)
  3562. );
  3563. }
  3564. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3565. for (let cr in this.warehouseCrList) {
  3566. this.$set(
  3567. this.warehouseCrList[cr],
  3568. "fFeeUnitid",
  3569. this.warehouseCrList[cr].fFeeunitid + ""
  3570. );
  3571. }
  3572. this.userOptions = response.data.sysUser;
  3573. this.open = true;
  3574. this.title = "修改仓入库";
  3575. });
  3576. },
  3577. // 库存总账多选框
  3578. whgenlegSelectionChange(selection) {
  3579. this.dialogWhgenlegList = selection;
  3580. },
  3581. // 合计
  3582. getSummaries(param) {
  3583. const { columns, data } = param;
  3584. const sums = [];
  3585. var values = [];
  3586. columns.forEach((column, index) => {
  3587. if (index === 0) {
  3588. sums[index] = "";
  3589. return;
  3590. }
  3591. if (column.property === "fPlanvolumn") {
  3592. values = data.map((item) => Number(item["fPlanvolumn"]));
  3593. }
  3594. if (column.property === "fGrossweight") {
  3595. values = data.map((item) => Number(item["fGrossweight"]));
  3596. }
  3597. if (column.property === "fNetweight") {
  3598. values = data.map((item) => Number(item["fNetweight"]));
  3599. }
  3600. if (column.property === "fQty") {
  3601. values = data.map((item) => Number(item["fQty"]));
  3602. }
  3603. if (column.property === "fCntqty") {
  3604. values = data.map((item) => Number(item["fCntqty"]));
  3605. }
  3606. if (
  3607. column.property === "fPlanvolumn" ||
  3608. column.property === "fGrossweight" ||
  3609. column.property === "fNetweight" ||
  3610. column.property === "fQty" ||
  3611. column.property === "fCntqty"
  3612. ) {
  3613. sums[index] = values.reduce((prev, curr) => {
  3614. const value = Number(curr);
  3615. if (!isNaN(value)) {
  3616. if (column.property === "fPlanvolumn") {
  3617. this.fPlanvolumn = prev + curr;
  3618. }
  3619. if (column.property === "fGrossweight") {
  3620. this.fGrossweight = prev + curr;
  3621. }
  3622. if (column.property === "fNetweight") {
  3623. this.fNetweight = prev + curr;
  3624. }
  3625. if (column.property === "fQty") {
  3626. this.fQty = prev + curr;
  3627. this.mum = prev + curr;
  3628. }
  3629. if (column.property === "fCntqty") {
  3630. this.fCntqty = prev + curr;
  3631. }
  3632. return prev + curr;
  3633. } else {
  3634. if (column.property === "fQty") {
  3635. this.fQty = prev;
  3636. this.mum = prev;
  3637. }
  3638. return prev;
  3639. }
  3640. }, 0);
  3641. sums[index] = sums[index].toFixed(2);
  3642. }
  3643. });
  3644. this.sums = sums;
  3645. return sums;
  3646. },
  3647. // 付款合计
  3648. warehouseDrSummaries(param) {
  3649. const { columns, data } = param;
  3650. const sums = [];
  3651. columns.forEach((column, index) => {
  3652. if (index === 0) {
  3653. sums[index] = "合计";
  3654. return;
  3655. }
  3656. const values = data.map((item) => Number(item[column.property]));
  3657. if (
  3658. column.property === "fUnitprice" ||
  3659. column.property === "fAmount" ||
  3660. column.property === "fQty" ||
  3661. column.property === "fQty"
  3662. ) {
  3663. sums[index] = values.reduce((prev, curr) => {
  3664. const value = Number(curr);
  3665. if (!isNaN(value)) {
  3666. return prev + curr;
  3667. } else {
  3668. return prev;
  3669. }
  3670. }, 0);
  3671. sums[index] = sums[index].toFixed(2);
  3672. }
  3673. });
  3674. return sums;
  3675. },
  3676. // 计划废用导入计算
  3677. changeList(row) {
  3678. this.fPlaNnumber = this.form.fPlannetweight / this.form.fPlanqty;
  3679. this.fPlangNumber = this.form.fPlangrossweight / this.form.fPlanqty;
  3680. this.planningList.fPlannetweight = (
  3681. Number(this.planningList.fPlanqty) * Number(this.fPlaNnumber)
  3682. ).toFixed(2);
  3683. this.planningList.fPlangrossweight = (
  3684. Number(this.planningList.fPlanqty) * Number(this.fPlangNumber)
  3685. ).toFixed(2);
  3686. },
  3687. // 数量计算
  3688. changeContractAmt(row) {
  3689. let fQty = 0;
  3690. let fUnitprice = 0;
  3691. if (row.fUnitprice) {
  3692. fUnitprice = row.fUnitprice;
  3693. }
  3694. if (row.fQty) {
  3695. fQty = row.fQty;
  3696. }
  3697. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  3698. },
  3699. changefCorpid(row) {
  3700. this.$set(row, "fSbu", row.fCorpid);
  3701. for (let corp in this.fMblnoOptions) {
  3702. if (row.fCorpid === this.fMblnoOptions[corp].fId) {
  3703. this.$set(
  3704. this.form,
  3705. "fStltypeid",
  3706. this.fMblnoOptions[corp].fStltypeid + ""
  3707. );
  3708. }
  3709. }
  3710. },
  3711. // 品名改变
  3712. changefGoodsid(row) {
  3713. for (let corp in this.goodsOptions) {
  3714. if (row.fGoodsid === this.goodsOptions[corp].fId) {
  3715. this.$set(
  3716. row,
  3717. "fPackagespecs",
  3718. this.goodsOptions[corp].fPackagespecs
  3719. );
  3720. }
  3721. }
  3722. },
  3723. // 变更计价单位
  3724. changeFeeUnit(row) {
  3725. if (!row.fFeeUnitid) {
  3726. return false;
  3727. }
  3728. if (row.fFeeUnitid === "2") {
  3729. this.$set(row, "fQty", this.fGrossweight);
  3730. } else if (row.fFeeUnitid === "1") {
  3731. this.$set(row, "fQty", this.fQty);
  3732. } else if (row.fFeeUnitid === "3") {
  3733. this.$set(row, "fQty", this.fNetweight);
  3734. } else {
  3735. this.$set(row, "fQty", 0);
  3736. }
  3737. if (row.fUnitprice) {
  3738. this.$set(
  3739. row,
  3740. "fAmount",
  3741. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  3742. );
  3743. }
  3744. },
  3745. changefBsdate(row) {
  3746. if (this.dataList.length > 0) {
  3747. for (var i = 0; i < this.dataList.length; i++) {
  3748. this.$set(this.dataList[i], "fBsdate", row);
  3749. }
  3750. }
  3751. },
  3752. // 入账
  3753. creditClick() {
  3754. this.$refs["form"].validate((valid) => {
  3755. for (let warehouseCr in this.dataListSelection) {
  3756. if (this.dataListSelection[warehouseCr].fBillstatus === 20) {
  3757. this.$message.error("请先卸货");
  3758. return false;
  3759. }
  3760. if (this.dataListSelection[warehouseCr].fBillstatus != 30) {
  3761. this.$message.error("请先打印作业单");
  3762. return false;
  3763. }
  3764. if (!this.dataListSelection[warehouseCr].fWarehouselocid) {
  3765. this.$message.error("请选择库区");
  3766. return false;
  3767. }
  3768. if (!this.dataListSelection[warehouseCr].fGoodsid) {
  3769. this.$message.error("请选择品名");
  3770. return false;
  3771. }
  3772. if (!this.dataListSelection[warehouseCr].fGrossweight) {
  3773. this.$message.error("请选择入库毛重");
  3774. return false;
  3775. }
  3776. if (!this.dataListSelection[warehouseCr].fNetweight) {
  3777. this.$message.error("请选择入库净重");
  3778. return false;
  3779. }
  3780. if (!this.dataListSelection[warehouseCr].fQty) {
  3781. this.$message.error("请选择入库件数");
  3782. return false;
  3783. }
  3784. if (!this.dataListSelection[warehouseCr].fDriverName) {
  3785. this.$message.error("请输入司机姓名");
  3786. return false;
  3787. }
  3788. }
  3789. if (valid) {
  3790. let formData = new window.FormData();
  3791. formData.append("warehouseBills", JSON.stringify(this.form));
  3792. formData.append(
  3793. "warehousebillsitems",
  3794. JSON.stringify(this.dataListSelection)
  3795. );
  3796. formData.append(
  3797. "warehousebillsfeesDr",
  3798. JSON.stringify(this.warehouseDrList)
  3799. );
  3800. formData.append(
  3801. "warehousebillsfeesCr",
  3802. JSON.stringify(this.warehouseCrList)
  3803. );
  3804. formData.append(
  3805. "tEnclosure",
  3806. JSON.stringify(this.relevantAttachments)
  3807. );
  3808. formData.append("whgenleg", JSON.stringify(this.relevantAttachments));
  3809. addWhgenleg(formData).then((response) => {
  3810. this.fid = response.data;
  3811. this.formBrowseStatus = true;
  3812. this.msgSuccess("入账成功");
  3813. for (let li in this.dataListSelection) {
  3814. for (let i in this.dataList) {
  3815. let fQty =
  3816. this.dataList[i].fQty === this.dataListSelection[li].fQty;
  3817. let fMblno =
  3818. this.dataList[i].fMblno === this.dataListSelection[li].fMblno;
  3819. let fBillstatus =
  3820. this.dataList[i].fBillstatus ===
  3821. this.dataListSelection[li].fBillstatus;
  3822. let fPackagespecs =
  3823. this.dataList[i].fPackagespecs ===
  3824. this.dataListSelection[li].fPackagespecs;
  3825. let fWarehouselocid =
  3826. this.dataList[i].fWarehouselocid ===
  3827. this.dataListSelection[li].fWarehouselocid;
  3828. let fGoodsid =
  3829. this.dataList[i].fGoodsid ===
  3830. this.dataListSelection[li].fGoodsid;
  3831. let fNetweight =
  3832. this.dataList[i].fNetweight ===
  3833. this.dataListSelection[li].fNetweight;
  3834. let fGrossweight =
  3835. this.dataList[i].fGrossweight ===
  3836. this.dataListSelection[li].fGrossweight;
  3837. if (
  3838. fMblno &&
  3839. fGoodsid &&
  3840. fBillstatus &&
  3841. fPackagespecs &&
  3842. fWarehouselocid &&
  3843. fGrossweight &&
  3844. fNetweight &&
  3845. fQty
  3846. ) {
  3847. this.$set(this.dataList[i], "fBillstatus", 40);
  3848. }
  3849. }
  3850. }
  3851. this.$refs.tableList.clearSelection();
  3852. });
  3853. }
  3854. });
  3855. },
  3856. // 打印作业单
  3857. addList() {
  3858. this.$refs["form"].validate((valid) => {
  3859. if (valid) {
  3860. let formData = new window.FormData();
  3861. formData.append("warehouseBills", JSON.stringify(this.form));
  3862. formData.append(
  3863. "warehousebillsitems",
  3864. JSON.stringify(this.dataListSelection)
  3865. );
  3866. formData.append(
  3867. "warehousebillsfeesDr",
  3868. JSON.stringify(this.warehouseDrList)
  3869. );
  3870. formData.append(
  3871. "warehousebillsfeesCr",
  3872. JSON.stringify(this.warehouseCrList)
  3873. );
  3874. formData.append(
  3875. "tEnclosure",
  3876. JSON.stringify(this.relevantAttachments)
  3877. );
  3878. for (let li in this.dataListSelection) {
  3879. this.dataListSelection[li].fBillstatus = 20;
  3880. }
  3881. addJoblist(formData).then((response) => {
  3882. this.formBrowseStatus = true;
  3883. for (let li in this.dataListSelection) {
  3884. for (let i in this.dataList) {
  3885. let fQty =
  3886. this.dataList[i].fQty === this.dataListSelection[li].fQty;
  3887. let fBsdate =
  3888. this.dataList[i].fBsdate ===
  3889. this.dataListSelection[li].fBsdate;
  3890. let fGoodsid =
  3891. this.dataList[i].fGoodsid ===
  3892. this.dataListSelection[li].fGoodsid;
  3893. let fcntrtype =
  3894. this.dataList[i].fcntrtype ===
  3895. this.dataListSelection[li].fcntrtype;
  3896. let fNetweight =
  3897. this.dataList[i].fNetweight ===
  3898. this.dataListSelection[li].fNetweight;
  3899. let fGrossweight =
  3900. this.dataList[i].fGrossweight ===
  3901. this.dataListSelection[li].fGrossweight;
  3902. if (
  3903. fBsdate &&
  3904. fGoodsid &&
  3905. fcntrtype &&
  3906. fGrossweight &&
  3907. fNetweight &&
  3908. fQty
  3909. ) {
  3910. this.$set(this.dataList[i], "fBillstatus", 20);
  3911. for (let list in response.data.warehousebillsitems) {
  3912. this.$set(
  3913. this.dataList[i],
  3914. "fSerialNumber",
  3915. response.data.warehousebillsitems[list].fSerialNumber
  3916. );
  3917. }
  3918. }
  3919. }
  3920. }
  3921. this.$refs.tableList.clearSelection();
  3922. });
  3923. }
  3924. });
  3925. },
  3926. // 撤回入账
  3927. withdrawClick() {
  3928. // 撤回入库
  3929. let formData = new window.FormData();
  3930. formData.append("warehouseBills", JSON.stringify(this.form));
  3931. formData.append(
  3932. "warehousebillsitems",
  3933. JSON.stringify(this.dataWithdrawList)
  3934. );
  3935. formData.append(
  3936. "warehousebillsfeesDr",
  3937. JSON.stringify(this.warehouseDrList)
  3938. );
  3939. formData.append(
  3940. "warehousebillsfeesCr",
  3941. JSON.stringify(this.warehouseCrList)
  3942. );
  3943. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3944. updateCredit(formData).then((response) => {
  3945. this.fid = response.data;
  3946. this.formBrowseStatus = false;
  3947. this.msgSuccess("撤销入账成功");
  3948. for (let li in this.dataWithdrawList) {
  3949. for (let i in this.dataList) {
  3950. let fQty = this.dataList[i].fQty === this.dataWithdrawList[li].fQty;
  3951. let fBsdate =
  3952. this.dataList[i].fBsdate === this.dataWithdrawList[li].fBsdate;
  3953. let fGoodsid =
  3954. this.dataList[i].fGoodsid === this.dataWithdrawList[li].fGoodsid;
  3955. let fcntrtype =
  3956. this.dataList[i].fcntrtype ===
  3957. this.dataWithdrawList[li].fcntrtype;
  3958. let fNetweight =
  3959. this.dataList[i].fNetweight ===
  3960. this.dataWithdrawList[li].fNetweight;
  3961. let fGrossweight =
  3962. this.dataList[i].fGrossweight ===
  3963. this.dataWithdrawList[li].fGrossweight;
  3964. if (
  3965. fBsdate &&
  3966. fGoodsid &&
  3967. fcntrtype &&
  3968. fGrossweight &&
  3969. fNetweight &&
  3970. fQty
  3971. ) {
  3972. this.$set(this.dataList[i], "fBillstatus", 10);
  3973. }
  3974. }
  3975. }
  3976. this.$refs.tableList.clearSelection();
  3977. });
  3978. },
  3979. // 卸货按钮
  3980. discharge() {
  3981. if (this.Printinglist.length > 0) {
  3982. for (let warehouseCr in this.Printinglist) {
  3983. if (this.Printinglist[warehouseCr].fBillstatus === 10) {
  3984. this.$message.error("请先打印作业单");
  3985. return false;
  3986. }
  3987. if (this.Printinglist[warehouseCr].fBillstatus === 30) {
  3988. this.$message.error("请勿重复卸货");
  3989. return false;
  3990. }
  3991. if (this.Printinglist[warehouseCr].fBillstatus === 40) {
  3992. this.$message.error("请勿重复卸货");
  3993. return false;
  3994. }
  3995. }
  3996. this.$refs["form"].validate((valid) => {
  3997. if (valid) {
  3998. let formData = new window.FormData();
  3999. formData.append("warehouseBills", JSON.stringify(this.form));
  4000. formData.append(
  4001. "warehousebillsitems",
  4002. JSON.stringify(this.dataListSelection)
  4003. );
  4004. formData.append(
  4005. "warehousebillsfeesDr",
  4006. JSON.stringify(this.warehouseDrList)
  4007. );
  4008. formData.append(
  4009. "warehousebillsfeesCr",
  4010. JSON.stringify(this.warehouseCrList)
  4011. );
  4012. formData.append(
  4013. "tEnclosure",
  4014. JSON.stringify(this.relevantAttachments)
  4015. );
  4016. for (let li in this.dataListSelection) {
  4017. this.dataListSelection[li].fBillstatus = 30;
  4018. }
  4019. if (!this.form.fId) {
  4020. this.form.fId = this.fid;
  4021. }
  4022. disChargelist(formData).then((response) => {
  4023. for (let li in this.dataListSelection) {
  4024. for (let i in this.dataList) {
  4025. let fQty =
  4026. this.dataList[i].fQty === this.dataListSelection[li].fQty;
  4027. let fBsdate =
  4028. this.dataList[i].fBsdate ===
  4029. this.dataListSelection[li].fBsdate;
  4030. let fGoodsid =
  4031. this.dataList[i].fGoodsid ===
  4032. this.dataListSelection[li].fGoodsid;
  4033. let fcntrtype =
  4034. this.dataList[i].fcntrtype ===
  4035. this.dataListSelection[li].fcntrtype;
  4036. let fNetweight =
  4037. this.dataList[i].fNetweight ===
  4038. this.dataListSelection[li].fNetweight;
  4039. let fGrossweight =
  4040. this.dataList[i].fGrossweight ===
  4041. this.dataListSelection[li].fGrossweight;
  4042. if (
  4043. fBsdate &&
  4044. fGoodsid &&
  4045. fcntrtype &&
  4046. fGrossweight &&
  4047. fNetweight &&
  4048. fQty
  4049. ) {
  4050. this.$set(this.dataList[i], "fBillstatus", 30);
  4051. }
  4052. }
  4053. }
  4054. this.msgSuccess("卸货成功");
  4055. this.$refs.tableList.clearSelection();
  4056. });
  4057. }
  4058. });
  4059. } else {
  4060. this.$message.error("请选择需要卸货的明细!");
  4061. }
  4062. },
  4063. /** 提交按钮 */
  4064. submitForm(status) {
  4065. if (status === 2) {
  4066. this.preservation();
  4067. } else {
  4068. this.pleaseCheck();
  4069. }
  4070. },
  4071. // 提交保存保存成功
  4072. preservation() {
  4073. this.$refs["form"].validate((valid) => {
  4074. if (valid) {
  4075. this.form.fBillstatus = status;
  4076. this.form.fNetweight = this.fNetweight;
  4077. this.form.fPlanvolumn = this.fPlanvolumn;
  4078. this.form.fGrossweight = this.fGrossweight;
  4079. this.form.fQty = this.fQty;
  4080. if (!this.form.fId) {
  4081. this.form.fId = this.fid;
  4082. }
  4083. let formDatae = new window.FormData();
  4084. // 附件数据
  4085. this.form.fBillingway = this.form.fFeetunit;
  4086. formDatae.append("tWarehouseBills", JSON.stringify(this.form));
  4087. // 库存明细
  4088. formDatae.append(
  4089. "tWarehousebillsitems",
  4090. JSON.stringify(this.dataList)
  4091. );
  4092. // 附件数据
  4093. formDatae.append(
  4094. "tEnclosure",
  4095. JSON.stringify(this.relevantAttachments)
  4096. );
  4097. // 费用明细付款
  4098. formDatae.append(
  4099. "tWarehousebillsfeesCr",
  4100. JSON.stringify(this.warehouseCrList)
  4101. );
  4102. // 收款
  4103. formDatae.append(
  4104. "tWarehousebillsfeesDr",
  4105. JSON.stringify(this.warehouseDrList)
  4106. );
  4107. addWarehousebills(formDatae).then((response) => {
  4108. this.msgSuccess("保存成功");
  4109. this.form = response.data.warehouseBills;
  4110. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4111. this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
  4112. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
  4113. this.$set(
  4114. this.form,
  4115. "createTime",
  4116. Date.parse(this.form.createTime)
  4117. );
  4118. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4119. this.dataList = response.data.warehousebillsitems;
  4120. for (let list in this.dataList) {
  4121. this.$set(
  4122. this.dataList[list],
  4123. "fBsdate",
  4124. Date.parse(this.dataList[list].fBsdate)
  4125. );
  4126. }
  4127. this.fid = response.data.warehouseBills.fId;
  4128. // this.open = true;
  4129. this.getList();
  4130. });
  4131. }
  4132. });
  4133. },
  4134. // 请核成功
  4135. pleaseCheck() {
  4136. this.$refs["form"].validate((valid) => {
  4137. if (this.dataList.length === 0) {
  4138. this.$message.error("请新增库存明细!");
  4139. return false;
  4140. }
  4141. for (let list in this.dataList) {
  4142. if (!this.dataList[list].fGoodsid) {
  4143. this.$message.error("请输入品名!");
  4144. return false;
  4145. }
  4146. if (!this.dataList[list].fWarehouselocid) {
  4147. this.$message.error("请输入库区!");
  4148. return false;
  4149. }
  4150. if (this.dataList[list].fBillstatus != 40) {
  4151. this.$message.error("请入账库存明细!");
  4152. return false;
  4153. }
  4154. }
  4155. if (valid) {
  4156. this.form.fBillstatus = status;
  4157. this.form.fNetweight = this.fNetweight;
  4158. // this.form.fPlangrossweight = this.fPlangrossweight;
  4159. // this.form.fPlannetweight = this.fPlannetweight;
  4160. this.form.fPlanvolumn = this.fPlanvolumn;
  4161. // this.form.fPlanqty = this.fPlanqty;
  4162. this.form.fGrossweight = this.fGrossweight;
  4163. this.form.fQty = this.fQty;
  4164. if (!this.form.fId) {
  4165. this.form.fId = this.fid;
  4166. }
  4167. let formData = new window.FormData();
  4168. // 附件数据
  4169. this.form.fBillingway = this.form.fFeetunit;
  4170. formData.append("tWarehouseBills", JSON.stringify(this.form));
  4171. // 库存明细
  4172. formData.append(
  4173. "tWarehousebillsitems",
  4174. JSON.stringify(this.dataList)
  4175. );
  4176. // 附件数据
  4177. formData.append(
  4178. "tEnclosure",
  4179. JSON.stringify(this.relevantAttachments)
  4180. );
  4181. // 费用明细付款
  4182. formData.append(
  4183. "tWarehousebillsfeesCr",
  4184. JSON.stringify(this.warehouseCrList)
  4185. );
  4186. // 收款
  4187. formData.append(
  4188. "tWarehousebillsfeesDr",
  4189. JSON.stringify(this.warehouseDrList)
  4190. );
  4191. addWarehouse(formData).then((response) => {
  4192. this.msgSuccess("提交成功");
  4193. this.open = false;
  4194. this.getList();
  4195. });
  4196. }
  4197. });
  4198. },
  4199. /** 删除按钮操作 */
  4200. handleDelete(row) {
  4201. const fIds = row.fId || this.ids;
  4202. this.$confirm(
  4203. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  4204. "警告",
  4205. {
  4206. confirmButtonText: "确定",
  4207. cancelButtonText: "取消",
  4208. type: "warning",
  4209. }
  4210. )
  4211. .then(function () {
  4212. return delWarehousebills(fIds);
  4213. })
  4214. .then(() => {
  4215. this.getList();
  4216. this.msgSuccess("删除成功");
  4217. });
  4218. },
  4219. /** 导出按钮操作 */
  4220. handleExport() {
  4221. const queryParams = this.queryParams;
  4222. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  4223. confirmButtonText: "确定",
  4224. cancelButtonText: "取消",
  4225. type: "warning",
  4226. })
  4227. .then(function () {
  4228. return exportWarehousebills(queryParams);
  4229. })
  4230. .then((response) => {
  4231. this.download(response.msg);
  4232. });
  4233. },
  4234. wDeleteRow(index, rows) {
  4235. rows.splice(index, 1);
  4236. if (this.dataList) {
  4237. let sum = 0;
  4238. for (let li in this.dataList) {
  4239. if (this.dataList[li].fQty) {
  4240. sum = Number(sum) + Number(this.dataList[li].fQty);
  4241. }
  4242. }
  4243. this.mum = sum;
  4244. }
  4245. },
  4246. // 查看审批流
  4247. getDataList() {
  4248. this.addOrUpdateVisible = false;
  4249. },
  4250. returnData() {
  4251. this.addOrUpdateVisib = false;
  4252. },
  4253. addOrUpdateHandle(form) {
  4254. this.addOrUpdateVisible = true;
  4255. let id = form.fId;
  4256. let actId = "110";
  4257. this.$nextTick(() => {
  4258. this.$refs.addOrUpdate.init(id, actId);
  4259. });
  4260. },
  4261. addOrUpdateHand(form) {
  4262. this.addOrUpdateVisib = true;
  4263. let id = form.fId;
  4264. let actId = "110";
  4265. this.$nextTick(() => {
  4266. this.$refs.ApprovalComments.init(id, actId);
  4267. });
  4268. },
  4269. /* 远程模糊查询用户 */
  4270. corpsRemoteMethod(name) {
  4271. if (name == null || name === "") {
  4272. return false;
  4273. }
  4274. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  4275. listCorps(queryParams).then((response) => {
  4276. this.fMblnoOptions = response.rows;
  4277. this.KHblnoOptions = response.rows;
  4278. });
  4279. },
  4280. /* 远程模糊查询质押银行 */
  4281. corpsRemoteMethodd(name) {
  4282. if (name == null || name === "") {
  4283. return false;
  4284. }
  4285. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 5 };
  4286. listCorps(queryParams).then((response) => {
  4287. this.Pledgebank = response.rows;
  4288. });
  4289. },
  4290. /* 远程模糊查询商品 */
  4291. goodsRemoteMethod(name) {
  4292. if (name == null || name === "") {
  4293. return false;
  4294. }
  4295. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4296. listGoods(queryParams).then((response) => {
  4297. this.goodsOptions = response.rows;
  4298. });
  4299. },
  4300. // 远程模糊查询费用名称
  4301. fWRemoteMethod(name) {
  4302. if (name == null || name === "") {
  4303. return false;
  4304. }
  4305. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4306. listFees(queryParams).then((response) => {
  4307. this.fWbuOptions = response.rows;
  4308. });
  4309. },
  4310. /* 远程模糊查询经营单位 */
  4311. fSbuRemoteMethod(name) {
  4312. if (name == null || name === "") {
  4313. return false;
  4314. }
  4315. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4316. listCorps(queryParams).then((response) => {
  4317. this.fSbuOptions = response.rows;
  4318. });
  4319. },
  4320. /* 远程模糊查询仓库 */
  4321. warehouseRemoteMethod(name) {
  4322. if (name == null || name === "") {
  4323. return false;
  4324. }
  4325. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4326. listWarehouse(queryParams).then((response) => {
  4327. this.warehouseOptions = response.rows;
  4328. });
  4329. },
  4330. /* 远程模糊查询库区 */
  4331. kqhouseRemoteMethod(name) {
  4332. if (name == null || name === "") {
  4333. return false;
  4334. }
  4335. if (!this.form.fWarehouseid) {
  4336. this.$message.error("请输入仓库!");
  4337. return false;
  4338. }
  4339. let queryParams = {
  4340. pageNum: 1,
  4341. pageSize: 10,
  4342. fWarehouseid: this.form.fWarehouseid,
  4343. fName: name,
  4344. };
  4345. listArea(queryParams).then((response) => {
  4346. this.kqhouseOptions = response.rows;
  4347. });
  4348. },
  4349. /* 远程模糊查询操作用户 */
  4350. userRemoteMethod(name) {
  4351. if (name == null || name === "") {
  4352. return false;
  4353. }
  4354. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  4355. listUser(queryParams).then((response) => {
  4356. this.userOptions = response.rows;
  4357. });
  4358. },
  4359. },
  4360. };
  4361. </script>
  4362. <style lang="scss">
  4363. .juzhong > th {
  4364. text-align: center;
  4365. }
  4366. .biaoge > tr > td {
  4367. height: 50px;
  4368. text-align: center;
  4369. border-right: 1px solid #dfe6ec !important;
  4370. order-bottom: 1px solid #dfe6ec !important;
  4371. border-bottom: 1px solid #dfe6ec !important;
  4372. }
  4373. .el-table thead th {
  4374. background: #1890ff;
  4375. color: #fff;
  4376. }
  4377. .upload-demo {
  4378. margin-left: 50px;
  4379. }
  4380. .el-form-item {
  4381. margin-bottom: 5px !important;
  4382. }
  4383. .el-form-item__label {
  4384. font-size: 12px !important;
  4385. }
  4386. </style>