index.vue 134 KB

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