index.vue 134 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065
  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. :disabled="browseStatus"
  139. remote
  140. clearable
  141. style="width: 80%"
  142. :remote-method="warehouseRemoteMethod"
  143. @keyup.enter.native="handleQuery"
  144. placeholder="请选择仓库"
  145. >
  146. <el-option
  147. v-for="(dict, index) in warehouseOptions"
  148. :key="index.fId"
  149. :label="dict.fName"
  150. :value="dict.fId"
  151. ></el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item label="品牌" prop="fMarks">
  155. <el-input
  156. v-model="queryParams.fMarks"
  157. placeholder="请输入品牌"
  158. clearable
  159. size="small"
  160. style="width: 80%"
  161. @keyup.enter.native="handleQuery"
  162. />
  163. </el-form-item>
  164. <el-form-item>
  165. <el-button
  166. type="cyan"
  167. icon="el-icon-search"
  168. size="mini"
  169. @click="handleQuery"
  170. >搜索
  171. </el-button>
  172. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  173. >重置
  174. </el-button>
  175. </el-form-item>
  176. </el-form>
  177. <el-row :gutter="10" class="mb8">
  178. <el-col :span="1.5">
  179. <el-button
  180. type="primary"
  181. icon="el-icon-plus"
  182. size="mini"
  183. @click="handleAdd(false)"
  184. v-hasPermi="['warehouseBusiness:outStock:add']"
  185. >新增
  186. </el-button>
  187. </el-col>
  188. <el-col :span="1.5">
  189. <el-button
  190. type="success"
  191. icon="el-icon-edit"
  192. size="mini"
  193. :disabled="single"
  194. @click="handleUpdate"
  195. v-hasPermi="['warehouseBusiness:outStock:edit']"
  196. >修改
  197. </el-button>
  198. </el-col>
  199. <el-col :span="1.5">
  200. <el-button
  201. type="warning"
  202. icon="el-icon-download"
  203. size="mini"
  204. @click="handleExport"
  205. v-hasPermi="['warehouseBusiness:outStock:export']"
  206. >导出
  207. </el-button>
  208. </el-col>
  209. <el-col :span="1.5">
  210. <el-button
  211. type="warning"
  212. icon="el-icon-download"
  213. size="mini"
  214. @click="handleExport"
  215. :disabled="multiple"
  216. v-hasPermi="['warehouseBusiness:outStock:export']"
  217. >导入
  218. </el-button>
  219. </el-col>
  220. <right-toolbar
  221. :showSearch.sync="showSearch"
  222. @queryTable="getList"
  223. ></right-toolbar>
  224. </el-row>
  225. <el-table
  226. v-loading="loading"
  227. :data="warehousebillsList"
  228. @selection-change="handleSelectionChange"
  229. >
  230. <el-table-column type="selection" width="55" align="center" />
  231. <el-table-column type="index" label="行号" align="center" />
  232. <el-table-column
  233. :show-overflow-tooltip="true"
  234. label="货权方"
  235. align="center"
  236. prop="fCorpid"
  237. />
  238. <el-table-column label="提单号" align="center" prop="fMblno" />
  239. <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
  240. <el-table-column label="品牌" align="center" prop="fMarks" />
  241. <el-table-column
  242. label="出库日期"
  243. align="center"
  244. prop="createTime"
  245. style="width: 60%"
  246. ><template slot-scope="scope">
  247. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  248. </template>
  249. </el-table-column>
  250. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  251. <el-table-column label="计划出库件数" align="center" prop="fPlanqty" />
  252. <el-table-column label="出库件数" align="center" prop="fQty" />
  253. <el-table-column label="出库毛重" align="center" prop="fGrossweight" />
  254. <el-table-column label="出库净重" align="center" prop="fNetweight" />
  255. <el-table-column
  256. width="100"
  257. label="出库状态"
  258. align="center"
  259. prop="fItemsStatus"
  260. >
  261. <template slot-scope="scope">
  262. <span v-if="scope.row.fItemsStatus === 1">计划</span>
  263. <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
  264. <span v-if="scope.row.fItemsStatus === 3">已装货</span>
  265. <span v-if="scope.row.fItemsStatus === 4">已出库</span>
  266. </template>
  267. </el-table-column>
  268. <el-table-column
  269. width="100"
  270. label="费用状态"
  271. align="center"
  272. prop="fBillstatus"
  273. >
  274. <template slot-scope="scope">
  275. <span v-if="scope.row.fBillstatus === 1">录入</span>
  276. <span v-if="scope.row.fBillstatus === 2">录入</span>
  277. <span v-if="scope.row.fBillstatus === 3">驳回</span>
  278. <span v-if="scope.row.fBillstatus === 4">请核</span>
  279. <span v-if="scope.row.fBillstatus === 5">审核中</span>
  280. <span v-if="scope.row.fBillstatus === 6">全部入账</span>
  281. </template>
  282. </el-table-column>
  283. <el-table-column
  284. label="操作"
  285. align="center"
  286. class-name="small-padding fixed-width"
  287. width="180"
  288. >
  289. <template slot-scope="scope">
  290. <el-button
  291. size="mini"
  292. type="text"
  293. icon="el-icon-edit"
  294. @click="handleUpdate(scope.row, true)"
  295. v-hasPermi="['warehouseBusiness:inStock:edit']"
  296. >查看
  297. </el-button>
  298. <el-button
  299. size="mini"
  300. type="text"
  301. icon="el-icon-edit"
  302. v-if="
  303. scope.row.fBillstatus === 1 ||
  304. scope.row.fBillstatus === 2 ||
  305. scope.row.fBillstatus === 3
  306. "
  307. @click="handleUpdate(scope.row, false)"
  308. v-hasPermi="['warehouseBusiness:inStock:edit']"
  309. >修改
  310. </el-button>
  311. <el-button
  312. size="mini"
  313. type="text"
  314. icon="el-icon-delete"
  315. v-if="scope.row.fBillstatus !== 6 && scope.row.fItemsStatus === 1"
  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="fWarehouselocids"
  761. header-align="center"
  762. width="150px"
  763. align="center"
  764. label="*库区"
  765. >
  766. </el-table-column>
  767. <el-table-column
  768. prop="fMarks"
  769. header-align="center"
  770. align="center"
  771. width="140px"
  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. </tr>
  2168. <tr>
  2169. <td width="1400" colspan="6">&nbsp;</td>
  2170. </tr>
  2171. <tr>
  2172. <td>备注:</td>
  2173. <td colspan="5">{{form.remark}}</td>
  2174. </tr>
  2175. <tr v-for="(item, index) in feelDrSelection" :key="'info2-'+index">
  2176. <td width="200">收费</td>
  2177. <td width="200">{{ item.fFeeName }}</td>
  2178. <td width="200">货物品名</td>
  2179. <td width="200">元</td>
  2180. <td width="200">{{ item.fAmount }}</td>
  2181. </tr>
  2182. <tr>
  2183. <td>司机签字:</td>
  2184. <td></td>
  2185. <td>电话</td>
  2186. <td colspan="1" v-if="dataList.length !== 0">{{ dataList[0].fDriverTel }}</td>
  2187. <td colspan="1" v-else>1</td>
  2188. <td colspan="2" rowspan="2">
  2189. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  2190. </td>
  2191. </tr>
  2192. <tr>
  2193. <td>制表:</td>
  2194. <td>{{ form.createBy }}</td>
  2195. <td>机械/人工:</td>
  2196. <td>{{ form.fContacts }}</td>
  2197. </tr>
  2198. <tr>
  2199. <td colspan="6" class="zzss">&nbsp;</td>
  2200. </tr>
  2201. <tr>
  2202. <td width="280" class="zzss"></td>
  2203. <td width="280" class="zzss"></td>
  2204. <td width="280" class="zzss"></td>
  2205. <td width="280" class="zzss"></td>
  2206. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2207. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  2208. </tr>
  2209. </table>
  2210. <div style="display: flex; justify-content: space-between">
  2211. <el-button type="primary" @click="printSomething">打印</el-button>
  2212. <el-button @click="closeWindow">取消</el-button>
  2213. </div>
  2214. </el-dialog>
  2215. </el-dialog>
  2216. </div>
  2217. </template>
  2218. <script>
  2219. import print from "print-js";
  2220. import {
  2221. addWhgenleg,
  2222. listWarehousebills,
  2223. getWarehousebills,
  2224. delWarehousebills,
  2225. addWarehousebills,
  2226. updateCredit,
  2227. addJoblist,
  2228. disChargelist,
  2229. warehouseSubmission,
  2230. updateWarehousebills,
  2231. exportWarehousebills,
  2232. revokeTwo,
  2233. revoke,
  2234. } from "@/api/warehouseBusiness/warehouseOutStock";
  2235. import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
  2236. import { listAgreements } from "@/api/warehouseBusiness/agreement";
  2237. import { listCorps } from "@/api/basicdata/corps";
  2238. import { listFees, getFees } from "@/api/basicdata/fees";
  2239. import { listWarehouse } from "@/api/basicdata/warehouse";
  2240. import { listArea } from "@/api/basicdata/area";
  2241. import { listGoods } from "@/api/basicdata/goods";
  2242. import { listUser, queryUserVal } from "@/api/system/user";
  2243. import UploadFile from "@/components/Uploadfile";
  2244. import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  2245. import Global from '@/layout/components/global'
  2246. import AddOrUpdate from "@/views/viewApproval";
  2247. import ApprovalComments from '@/views/startApproval'
  2248. export default {
  2249. name: "Warehousebills",
  2250. components: {
  2251. UploadFile,
  2252. AddOrUpdate,
  2253. ApprovalComments,
  2254. },
  2255. data() {
  2256. return {
  2257. addOrUpdateVisible: false,
  2258. addOrUpdateVisib: false,
  2259. fFeeUnitid: null,
  2260. fFeeUnitids: null,
  2261. formBrowseStatus: false,
  2262. detailsHidden: false,
  2263. warehousingagreements: false,
  2264. fTruckno: null,
  2265. fBsdate: null,
  2266. fCntrtype: null,
  2267. fGoodsids: null,
  2268. fPlanqty: null,
  2269. fPlannetweight: null,
  2270. fPlanvolumn: null,
  2271. fGrossweight: 0,
  2272. fCntqty: 0,
  2273. fNetweight: 0,
  2274. fVolumn: 0,
  2275. fid: 0,
  2276. fQty: 0,
  2277. fSbu: 0,
  2278. before:'',
  2279. // 遮罩层
  2280. loading: true,
  2281. // 打印地址
  2282. fAddr: "",
  2283. // 税率
  2284. fTaxrate: null,
  2285. // 选中数组
  2286. ids: [],
  2287. userVal: {
  2288. userName: null,
  2289. nickName: null,
  2290. deptId: null,
  2291. },
  2292. queryForm: {},
  2293. // 费用状态
  2294. costStatus: 'Dr',
  2295. // 库存总账表
  2296. whgenlegList: [],
  2297. whgenlegTotal: 0,
  2298. // 弹窗库存总账数据
  2299. dialogWhgenlegList: [],
  2300. // 库存总账对话框
  2301. whgenlegVisible: false,
  2302. // 收费多选框
  2303. feelDrSelection: [],
  2304. approvalStatus: false,
  2305. // 新增用户对话框
  2306. editDialogVisible_s: false,
  2307. editDialogVisible_ss: false,
  2308. openPrintJobSheet: false,
  2309. editDialogClosed_ss: false,
  2310. storageAgreements: false,
  2311. dataList: [],
  2312. warehouseCrList: [],
  2313. current:'',
  2314. warehouseDrList: [],
  2315. printinglist: [],
  2316. browseStatus: false,
  2317. relevantAttachments: [],
  2318. // 非单个禁用
  2319. single: true,
  2320. // 非多个禁用
  2321. multiple: true,
  2322. // 显示搜索条件
  2323. showSearch: true,
  2324. // 总条数
  2325. total: 0,
  2326. // 仓库主(出入库)表格数据
  2327. warehousebillsList: [],
  2328. // 弹出层标题
  2329. title: "",
  2330. // 是否显示弹出层
  2331. open: false,
  2332. // 货权方(客户数据)
  2333. fMblnoOptions: [],
  2334. // 货权方(客户数据)
  2335. // 客户名称
  2336. KHblnoOptions: [],
  2337. // 作业费协议
  2338. tasklegList: [],
  2339. fSbuOptions: [],
  2340. // 操作员
  2341. userOptions: [],
  2342. // 操作员
  2343. goodsOptions: [],
  2344. // 制单部门
  2345. deptOptions: [],
  2346. // 仓库(仓库数据)
  2347. warehouseOptions: [],
  2348. // 库存明细入账数组
  2349. dataListSelection: [],
  2350. // 库存明细撤回入账数组
  2351. dataWithdrawList: [],
  2352. kqhouseOptions: [],
  2353. // 贸易方式(数据字典),对应t_trademodels 字典
  2354. fTrademodeidOptions: [],
  2355. // 是否放行
  2356. releaseList: [
  2357. {dictLabel: "已放行",dictValue: "T"},
  2358. {dictLabel: "未放行",dictValue: "F"},
  2359. ],
  2360. // 结算方式(数据字典),下拉选择字典
  2361. fStltypeOptions: [],
  2362. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2363. fIfweighOptions: [],
  2364. // 是否破损(数据字典),默认F否则T字典
  2365. fIfdamageOptions: [],
  2366. // 单据类型(数据字典)SJRK字典
  2367. fBilltypeOptions: [],
  2368. // 状态(数据字典),N 入字典
  2369. fBillstatusOptions: [],
  2370. // 费用名称
  2371. fWbuOptions: [],
  2372. approVal:false,
  2373. // 计价单位
  2374. jFeetunitOptions: [
  2375. {dictLabel: "件数",dictValue: 1},
  2376. {dictLabel: "毛重",dictValue: 2},
  2377. {dictLabel: "净重",dictValue: 3},
  2378. {dictLabel: "尺码",dictValue: 4},
  2379. {dictLabel: "固定",dictValue: 5},
  2380. ],
  2381. // 查询参数
  2382. queryParams: {
  2383. pageNum: 1,
  2384. pageSize: 10,
  2385. fBillno: null,
  2386. createBy: null,
  2387. createTime: null,
  2388. fCustomsdeclartion: null,
  2389. fOriginalbillno: null,
  2390. fDeptid: null,
  2391. fBsdeptid: null,
  2392. fContacts: null,
  2393. fTel: null,
  2394. fCorpid: null,
  2395. fTocorpid: null,
  2396. fStltypeid: null,
  2397. fBscorpno: null,
  2398. fWarehouseid: null,
  2399. fStorekeeper: null,
  2400. fBsdate: null,
  2401. fPlanqty: null,
  2402. fPlangrossweight: null,
  2403. fPlannetweight: null,
  2404. fPlanvolumn: null,
  2405. fQty: null,
  2406. fGrossweight: null,
  2407. fNetweight: null,
  2408. fVolumn: null,
  2409. fTrademodeid: null,
  2410. fSbu: null,
  2411. fFeetunit: null,
  2412. fMblno: null,
  2413. fVslvoy: null,
  2414. fEta: null,
  2415. fCustomno: null,
  2416. fIfweigh: null,
  2417. fIfpledge: null,
  2418. fIfdamage: null,
  2419. fBankcorpid: null,
  2420. fBilltype: null,
  2421. fBillstatus: null,
  2422. fCreateby: null,
  2423. fCreatetime: null,
  2424. fGoodsid: null,
  2425. fCntrtype: null,
  2426. fCntqty: null,
  2427. },
  2428. // 库存总账参数
  2429. whgenlegParams: {
  2430. pageNum: 1,
  2431. pageSize: 10,
  2432. fMblno: null,
  2433. fCorpid: null,
  2434. fWarehouseid: null,
  2435. },
  2436. // 表单参数
  2437. form: {
  2438. fMblno: null,
  2439. fCorpid: null,
  2440. fTrademodeid: null,
  2441. fWarehouseid: null,
  2442. },
  2443. // 表单校验
  2444. rules: {
  2445. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  2446. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  2447. fCorpid: [{ required: true, message: " ", trigger: "blur"},],
  2448. fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
  2449. fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
  2450. fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
  2451. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  2452. fBillingway: [{ required: true, message: " ", trigger: "blur" }],
  2453. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  2454. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  2455. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  2456. fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
  2457. fStorekeeper: {
  2458. required: true,
  2459. message: " ",
  2460. trigger: "blur",
  2461. },
  2462. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  2463. // fBscorpno: [
  2464. // { required: true, message: "请输入存货编号", trigger: "blur" },
  2465. // ],
  2466. fbillingway: [
  2467. {
  2468. required: true,
  2469. message: " ",
  2470. trigger: "blur",
  2471. },
  2472. ],
  2473. fTocorpid: [
  2474. {
  2475. required: true,
  2476. message: " ",
  2477. trigger: "blur",
  2478. },
  2479. ],
  2480. },
  2481. };
  2482. },
  2483. created() {
  2484. this.getList();
  2485. this.getDicts("data_trademodes").then((response) => {
  2486. this.fTrademodeidOptions = response.data;
  2487. });
  2488. this.getDicts("data_stltype_type").then((response) => {
  2489. this.fStltypeOptions = response.data;
  2490. });
  2491. this.getDicts("tax_rate").then((response) => {
  2492. this.fTaxrate = response.data[0].dictValue
  2493. });
  2494. this.getDicts("data_ifweigh_status").then((response) => {
  2495. this.fIfweighOptions = response.data;
  2496. });
  2497. this.getDicts("data_ifdamage_status").then((response) => {
  2498. this.fIfdamageOptions = response.data;
  2499. });
  2500. this.getDicts("data_billtype_type").then((response) => {
  2501. this.fBilltypeOptions = response.data;
  2502. });
  2503. this.getDicts("sys_common_status").then((response) => {
  2504. this.fBillstatusOptions = response.data;
  2505. });
  2506. },
  2507. activated() {
  2508. this.adoPt()
  2509. },
  2510. methods: {
  2511. adoPt(){
  2512. this.approval = this.$route.query.data
  2513. if (this.approval){
  2514. this.closeButton = false
  2515. this.approval = JSON.parse(this.approval)
  2516. this.approVal = true
  2517. this.browseStatus = status;
  2518. this.reset();
  2519. this.detailsHidden = false;
  2520. this.formBrowseStatus = false;
  2521. this.dataList = [];
  2522. getWarehousebills(this.approval.billId).then((response) => {
  2523. if (response.data.warehousebills) {
  2524. this.form = response.data.warehousebills;
  2525. if (this.form.fBillstatus > 2) {
  2526. this.approvalStatus = false;
  2527. } else {
  2528. this.approvalStatus = true;
  2529. }
  2530. }
  2531. if (response.data.warehouseBillsItem) {
  2532. this.dataList = response.data.warehouseBillsItem;
  2533. for (let list in this.dataList) {
  2534. if (this.dataList[list].fBillstatus > 10) {
  2535. this.formBrowseStatus = true;
  2536. }
  2537. }
  2538. }
  2539. if (response.data.corps) {
  2540. this.fMblnoOptions = response.data.corps;
  2541. this.KHblnoOptions = response.data.corps;
  2542. this.fSbuOptions = response.data.corps;
  2543. }
  2544. if (response.data.feesList) {
  2545. this.fWbuOptions = response.data.feesList;
  2546. }
  2547. if (response.data.warehouse) {
  2548. this.warehouseOptions = response.data.warehouse;
  2549. }
  2550. if (response.data.warehouseBillsItem) {
  2551. this.dataList = response.data.warehouseBillsItem;
  2552. }
  2553. if (response.data.enclosures) {
  2554. this.relevantAttachments = response.data.enclosures;
  2555. }
  2556. this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
  2557. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  2558. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2559. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  2560. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
  2561. this.$set(
  2562. this.form,
  2563. "fPlannetweight",
  2564. this.form.fPlannetweight.toFixed(2)
  2565. );
  2566. this.$set(
  2567. this.form,
  2568. "fPlangrossweight",
  2569. this.form.fPlangrossweight.toFixed(2)
  2570. );
  2571. for (let list in this.dataList) {
  2572. this.$set(
  2573. this.dataList[list],
  2574. "fBsdate",
  2575. Date.parse(this.dataList[list].fBsdate)
  2576. );
  2577. }
  2578. this.goodsOptions = response.data.goodsList;
  2579. this.kqhouseOptions = response.data.warehouseAreas;
  2580. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2581. for (let dr in this.warehouseDrList) {
  2582. this.$set(
  2583. this.warehouseDrList[dr],
  2584. "fFeeUnitid",
  2585. this.warehouseDrList[dr].fFeeunitid + ""
  2586. );
  2587. this.$set(
  2588. this.warehouseDrList[dr],
  2589. "fQty",
  2590. this.warehouseDrList[dr].fQty.toFixed(2)
  2591. );
  2592. this.$set(
  2593. this.warehouseDrList[dr],
  2594. "fAmount",
  2595. this.warehouseDrList[dr].fAmount.toFixed(2)
  2596. );
  2597. }
  2598. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2599. for (let cr in this.warehouseCrList) {
  2600. this.$set(
  2601. this.warehouseCrList[cr],
  2602. "fFeeUnitid",
  2603. this.warehouseCrList[cr].fFeeunitid + ""
  2604. );
  2605. }
  2606. this.userOptions = response.data.sysUser;
  2607. this.open = true;
  2608. this.title = "修改仓入库";
  2609. });
  2610. }
  2611. },
  2612. getDataList() {
  2613. this.addOrUpdateVisible = false;
  2614. },
  2615. returnData() {
  2616. this.addOrUpdateVisib = false;
  2617. this.cancelTwo()
  2618. },
  2619. addOrUpdateHandle(form) {
  2620. this.addOrUpdateVisible = true;
  2621. this.$nextTick(() => {
  2622. this.$refs.addOrUpdate.init(form.fId, 120);
  2623. });
  2624. },
  2625. addOrUpdateHand(form) {
  2626. this.addOrUpdateVisib = true;
  2627. this.$nextTick(() => {
  2628. this.$refs.ApprovalComments.init(form.fId, 120);
  2629. });
  2630. },
  2631. cancelTwo(){
  2632. this.open = false
  2633. let view = {
  2634. fullPath: "/business/outStock",
  2635. hash: "",
  2636. matched: Array(2),
  2637. meta: Object,
  2638. name: "OutStock",
  2639. params: Object,
  2640. path: "/business/outStock",
  2641. query: Object,
  2642. title: "出库"
  2643. }
  2644. this.$router.push({ path: '/index'})
  2645. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2646. if (this.isActive(view)) {
  2647. this.toLastView(visitedViews, view)
  2648. }
  2649. })
  2650. Global.$emit("removeCache", "closeSelectedTag", view);
  2651. },
  2652. //关闭弹框的事件
  2653. addCloseDialog(){
  2654. this.getList()
  2655. },
  2656. // 上传成功返回数据
  2657. showFile(row) {
  2658. for(let list in this.relevantAttachments) {
  2659. this.$set(this.relevantAttachments[list], "fUrl", row.url);
  2660. this.$set(this.relevantAttachments[list], "fName", row.fileName);
  2661. }
  2662. },
  2663. revoke(){
  2664. revoke(this.form.fId).then(data=>{
  2665. console.log(data)
  2666. if (data.code == 200){
  2667. this.open = false;
  2668. }
  2669. })
  2670. },
  2671. printSomething() {
  2672. // 此处的style即为打印时的样式
  2673. const style = "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2674. print({ printable: "print_area", type: "html",
  2675. style: style, // 亦可使用引入的外部css;
  2676. scanStyles: false,
  2677. });
  2678. this.addList();
  2679. this.openPrintJobSheet = false;
  2680. },
  2681. // 关闭二级弹窗
  2682. closeWindow () {
  2683. this.openPrintJobSheet = false
  2684. },
  2685. // 新增附件上传
  2686. addRelevt() {
  2687. this.relevantAttachments.push({
  2688. fUrl: null,
  2689. fName: null,
  2690. createBy: this.form.createBy,
  2691. createTime: Date.parse(new Date()),
  2692. });
  2693. },
  2694. // 新增作业费协议
  2695. addAgreement(status) {
  2696. this.costStatus = status
  2697. if (!this.form.fCorpid) {
  2698. this.$message({ message: "请维护货权方", type: "warning", });
  2699. } else {
  2700. this.whgenlegList = [];
  2701. this.dialogWhgenlegList = [];
  2702. this.whgenlegTotal = 0;
  2703. this.warehousingagreements = true;
  2704. this.getWhgenlegListt();
  2705. }
  2706. },
  2707. // 新增仓储费协议
  2708. addStorages() {
  2709. if (!this.form.fCorpid) {
  2710. this.$message({ message: "请维护货权方", type: "warning", });
  2711. return false
  2712. }
  2713. this.whgenlegList = [];
  2714. this.dialogWhgenlegList = [];
  2715. this.whgenlegTotal = 0;
  2716. this.storageAgreements = true;
  2717. this.getAgreement();
  2718. },
  2719. // 查询仓储费协议
  2720. getAgreement() {
  2721. this.queryParams.fCorpid = this.form.fCorpid;
  2722. listAgreements(this.queryParams).then((response) => {
  2723. this.tasklegList = response.rows;
  2724. this.whgenlegTotal = response.total;
  2725. });
  2726. },
  2727. // 查询作业费信息
  2728. getWhgenlegListt() {
  2729. this.queryParams.fLineno = this.form.fCorpid;
  2730. operationAgreement(this.queryParams).then((response) => {
  2731. this.tasklegList = response.rows;
  2732. this.whgenlegTotal = response.total;
  2733. });
  2734. },
  2735. revokeTwo(){
  2736. let data = {
  2737. actId:120,
  2738. billId:this.form.fId,
  2739. id:this.form.fId
  2740. }
  2741. console.log(data)
  2742. revokeTwo(data).then(data =>{
  2743. console.log(data)
  2744. })
  2745. },
  2746. // 导入付款信息
  2747. whgenlegDatas() {
  2748. if (this.dialogWhgenlegList.length === 0) {
  2749. this.$message({
  2750. message: "请选择需要导入的数据",
  2751. type: "warning",
  2752. });
  2753. } else {
  2754. for (let whgen in this.dialogWhgenlegList) {
  2755. let feeId = this.dialogWhgenlegList[whgen].feeFId;
  2756. getFees(feeId).then((response) => {
  2757. this.fWbuOptions.push(response.data);
  2758. });
  2759. this.warehouseDrList.push({
  2760. fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
  2761. fFeeid: feeId,
  2762. fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
  2763. fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
  2764. fCurrency: "RMB",
  2765. fExrate: 1,
  2766. fTaxrate: this.fTaxrate
  2767. });
  2768. }
  2769. this.warehousingagreements = false;
  2770. }
  2771. },
  2772. // 导出作业费
  2773. zhgenlegData() {
  2774. if (this.dialogWhgenlegList.length === 0) {
  2775. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  2776. return false
  2777. }
  2778. for (let zhgen in this.dialogWhgenlegList) {
  2779. let haveGoods = false
  2780. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  2781. if (this.fWbuOptions.length !== 0) {
  2782. for (let wbu in this.fWbuOptions) {
  2783. if (this.fWbuOptions[wbu].fId === feeId) {
  2784. haveGoods = true
  2785. break
  2786. }
  2787. }
  2788. }
  2789. if (!haveGoods) {
  2790. getFees(feeId).then((response) => {
  2791. this.fWbuOptions.push(response.data)
  2792. })
  2793. }
  2794. let qty = 1;
  2795. if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 1) {
  2796. qty = this.fQty
  2797. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 2) {
  2798. qty = this.fGrossweight
  2799. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 3) {
  2800. qty = this.fNetweight
  2801. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 4) {
  2802. qty = this.fVolumn
  2803. }
  2804. let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
  2805. if (this.costStatus === 'Cr') {
  2806. this.warehouseCrList.push({
  2807. fQty: qty,
  2808. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2809. fFeeid: feeId,
  2810. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2811. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2812. fCurrency: 'RMB',
  2813. fExrate: 1,
  2814. fAmount: fAmount,
  2815. fTaxrate: this.fTaxrate
  2816. })
  2817. } else {
  2818. this.warehouseDrList.push({
  2819. fQty: qty,
  2820. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2821. fFeeid: feeId,
  2822. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2823. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2824. fCurrency: 'RMB',
  2825. fExrate: 1,
  2826. fAmount: fAmount,
  2827. fTaxrate: this.fTaxrate
  2828. })
  2829. }
  2830. }
  2831. this.warehousingagreements = false
  2832. },
  2833. // 导出仓储费
  2834. storageFeeExport () {
  2835. if (this.dialogWhgenlegList.length === 0) {
  2836. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  2837. return false
  2838. }
  2839. for (let zhgen in this.dialogWhgenlegList) {
  2840. let haveGoods = false
  2841. if (this.fWbuOptions.length !== 0) {
  2842. for (let wbu in this.fWbuOptions) {
  2843. if (this.fWbuOptions[wbu].fId === this.dialogWhgenlegList[zhgen].fGoodsid) {
  2844. haveGoods = true
  2845. break
  2846. }
  2847. }
  2848. }
  2849. if (!haveGoods) {
  2850. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  2851. getFees(feeId).then((response) => {
  2852. this.fWbuOptions.push(response.data)
  2853. })
  2854. }
  2855. if (this.costStatus === 'Cr') {
  2856. this.warehouseCrList.push({
  2857. fQty: 0,
  2858. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2859. fFeeid: null,
  2860. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2861. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2862. fCurrency: 'RMB',
  2863. fExrate: 1,
  2864. fAmount: 0,
  2865. fTaxrate: this.fTaxrate
  2866. })
  2867. } else {
  2868. this.warehouseDrList.push({
  2869. fQty: 0,
  2870. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2871. fFeeid: null,
  2872. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2873. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2874. fCurrency: 'RMB',
  2875. fExrate: 1,
  2876. fAmount: 0,
  2877. fTaxrate: this.fTaxrate
  2878. })
  2879. }
  2880. }
  2881. this.storageAgreements = false
  2882. },
  2883. // 新增list
  2884. addRelevant() {
  2885. this.$refs['form'].validate((valid) => {
  2886. if (valid) {
  2887. this.whgenlegList = [];
  2888. this.dialogWhgenlegList = [];
  2889. this.whgenlegTotal = 0;
  2890. this.whgenlegVisible = true;
  2891. this.getWhgenlegList();
  2892. }
  2893. })
  2894. },
  2895. // 库存总账导出数据
  2896. whgenlegData() {
  2897. if (this.dialogWhgenlegList.length === 0) {
  2898. this.$message({ message: "未勾选信息", type: "warning" });
  2899. return false;
  2900. }
  2901. for (let whgen in this.dialogWhgenlegList) {
  2902. if (!this.form.fMblno || this.form.fMblno === "") {
  2903. this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
  2904. }
  2905. this.dataList.push({
  2906. fId: null,
  2907. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2908. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2909. fCntrtype: null,
  2910. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  2911. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  2912. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  2913. fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2914. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2915. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  2916. fChargedate: this.dialogWhgenlegList[whgen].fChargedate,
  2917. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  2918. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  2919. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  2920. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  2921. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  2922. fGrossweight: 0,
  2923. fNetweight: 0,
  2924. fQty: 0,
  2925. fCntqty: 1,
  2926. fBillstatus: 10,
  2927. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2928. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2929. fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
  2930. fGoodsval: null,
  2931. fTruckno: null,
  2932. remark: null,
  2933. fIsPass: 'F'
  2934. });
  2935. }
  2936. this.whgenlegVisible = false;
  2937. },
  2938. // 收货单打印界面
  2939. showEditDialog_s() {
  2940. if (this.printinglist.length <= 0) {
  2941. this.$message.error("请选择需要打印的明细!");
  2942. return false
  2943. }
  2944. for (let aorp in this.printinglist) {
  2945. var date = new Date(this.printinglist[aorp].fBsdate);
  2946. var Y = date.getFullYear() + "-";
  2947. var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
  2948. var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  2949. this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
  2950. }
  2951. this.editDialogVisible_s = true;
  2952. for (let corp in this.fMblnoOptions) {
  2953. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  2954. this.$set(this.form, "fCorpName", this.fMblnoOptions[corp].fName);
  2955. }
  2956. }
  2957. for (let sorp in this.warehouseOptions) {
  2958. if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
  2959. this.$set(this.form, "fWarehouseids", this.warehouseOptions[sorp].fName);
  2960. }
  2961. }
  2962. },
  2963. // 作业单打印
  2964. printJobSheet() {
  2965. // if (this.feelDrSelection.length <= 0) {
  2966. // this.$message.error("请勾选收款信息!");
  2967. // return false;
  2968. // }
  2969. for (let fee in this.feelDrSelection) {
  2970. if (!this.feelDrSelection[fee].fCorpid) {
  2971. this.$message.error("请维护收款费用客户名称!");
  2972. return false;
  2973. }
  2974. if (!this.feelDrSelection[fee].fFeeid) {
  2975. this.$message.error("请维护收款费用费用信息!");
  2976. return false;
  2977. }
  2978. }
  2979. for (let li in this.printinglist) {
  2980. if(!this.printinglist[li].fId) {
  2981. this.$message.error("请先保存!");
  2982. return false;
  2983. }
  2984. }
  2985. let fTruckno = this.printinglist[0].fTruckno
  2986. let fDriverName = this.printinglist[0].fDriverName
  2987. for (let warehouseCr in this.printinglist) {
  2988. if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== fTruckno) {
  2989. this.$message.error('请填写车号或选择车相同车号')
  2990. return false
  2991. } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== fDriverName) {
  2992. this.$message.error('请填写司机姓名选择相同司机姓名')
  2993. return false
  2994. } else if (!this.printinglist[warehouseCr].fGrossweight) {
  2995. this.$message.error('请选择出库毛重')
  2996. return false
  2997. } else if (!this.printinglist[warehouseCr].fDriverTel) {
  2998. this.$message.error('请选填写司机电话')
  2999. return false
  3000. } else if (!this.printinglist[warehouseCr].fDriverIdCar) {
  3001. this.$message.error('请选填写司机身份证')
  3002. return false
  3003. } else if (!this.printinglist[warehouseCr].fNetweight) {
  3004. this.$message.error('请选择出库净重')
  3005. return false
  3006. } else if (!this.printinglist[warehouseCr].fQty) {
  3007. this.$message.error('请选择出库件数')
  3008. return false
  3009. } else if (!this.printinglist[warehouseCr].fDriverName) {
  3010. this.$message.error('请输入司机姓名')
  3011. return false
  3012. } else if (!this.printinglist[warehouseCr].fDriverTel) {
  3013. this.$message.error('请输入司机电话')
  3014. return false
  3015. }
  3016. }
  3017. // 获取业务日期
  3018. var date = new Date(this.form.fBsdate)
  3019. var Y = date.getFullYear() + '-'
  3020. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
  3021. var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
  3022. this.fBsdate = Y + M + D
  3023. for (let dr in this.feelDrSelection) {
  3024. for (let opt in this.fWbuOptions) {
  3025. if (this.fWbuOptions[opt].fId === this.feelDrSelection[dr].fFeeid) {
  3026. this.$set(this.feelDrSelection[dr], 'fFeeName', this.fWbuOptions[opt].fName)
  3027. break
  3028. }
  3029. }
  3030. }
  3031. setTimeout(() => {
  3032. this.openPrintJobSheet = true
  3033. }, 200);
  3034. },
  3035. showEditDialog_ss() {
  3036. if (this.printinglist.length > 0) {
  3037. for (let warehouseCr in this.printinglist) {
  3038. if (
  3039. this.printinglist[warehouseCr].fTruckno != this.printinglist[0].fTruckno
  3040. ) {
  3041. this.$message.error("请选择车相同车号");
  3042. return false;
  3043. }
  3044. if (!this.printinglist[warehouseCr].fGoodsid) {
  3045. this.$message.error("请选择品名");
  3046. return false;
  3047. }
  3048. if (!this.printinglist[warehouseCr].fWarehouselocid) {
  3049. this.$message.error("请选择库区");
  3050. return false;
  3051. }
  3052. if (!this.printinglist[warehouseCr].fGrossweight) {
  3053. this.$message.error("请选择入库毛重");
  3054. return false;
  3055. }
  3056. if (!this.printinglist[warehouseCr].fNetweight) {
  3057. this.$message.error("请选择入库净重");
  3058. return false;
  3059. }
  3060. if (!this.printinglist[warehouseCr].fQty) {
  3061. this.$message.error("请选择入库件数");
  3062. return false;
  3063. }
  3064. if (!this.printinglist[warehouseCr].fDriverName) {
  3065. this.$message.error("请输入司机姓名");
  3066. return false;
  3067. }
  3068. if (!this.printinglist[warehouseCr].fDriverTel) {
  3069. this.$message.error("请输入司机电话");
  3070. return false;
  3071. }
  3072. }
  3073. this.openPrintJobSheet = true;
  3074. // this.addList()
  3075. } else {
  3076. this.$message.error("请选择需要打印的明细!");
  3077. }
  3078. },
  3079. // 收款信息
  3080. addCollection() {
  3081. this.warehouseDrList.push({
  3082. fcorpid: this.form.fCorpid,
  3083. ffeeid: null,
  3084. fFeeUnitid: null,
  3085. fQty: 0,
  3086. funitprice: 0,
  3087. fAmount: 0,
  3088. fCurrency: "RMB",
  3089. fExrate: 1,
  3090. fTaxrate: this.fTaxrate,
  3091. remarks: null,
  3092. });
  3093. },
  3094. addpayment() {
  3095. this.warehouseCrList.push({
  3096. fcorpid: this.form.fCorpid,
  3097. ffeeid: null,
  3098. fFeeUnitid: null,
  3099. fQty: 0,
  3100. funitprice: 0,
  3101. fAmount: 0,
  3102. fCurrency: "RMB",
  3103. fExrate: 1,
  3104. fTaxrate: this.fTaxrate,
  3105. remarks: null,
  3106. });
  3107. },
  3108. queryUser() {
  3109. queryUserVal().then((response) => {
  3110. if (response.user !== null) {
  3111. this.userVal = response.user;
  3112. this.$set(this.form, "fDeptid", this.userVal.deptId);
  3113. this.$set(this.form, "createBy", this.userVal.userName);
  3114. this.$set(this.form, "fIfdamage", "1");
  3115. this.$set(this.form, "fIfweigh", "1");
  3116. this.$set(this.form, "fTrademodeid", "1");
  3117. this.$set(this.form, "createTime", Date.parse(new Date()));
  3118. }
  3119. if (response.dept !== null) {
  3120. this.deptOptions = [];
  3121. this.deptOptions.push(response.dept);
  3122. }
  3123. });
  3124. },
  3125. /** 查询仓库主(出入库)列表 */
  3126. getList() {
  3127. this.loading = true;
  3128. listWarehousebills(this.queryParams).then((response) => {
  3129. this.warehousebillsList = response.rows;
  3130. this.total = response.total;
  3131. this.loading = false;
  3132. });
  3133. },
  3134. // 查询库存总账信息
  3135. getWhgenlegList() {
  3136. this.whgenlegParams.fMblno = this.form.fMblno;
  3137. this.whgenlegParams.fCorpid = this.form.fCorpid;
  3138. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid;
  3139. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  3140. listWhgenleg(this.whgenlegParams).then((response) => {
  3141. this.whgenlegList = response.rows;
  3142. this.whgenlegTotal = response.total;
  3143. });
  3144. },
  3145. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  3146. fTrademodeidFormat(row, column) {
  3147. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  3148. },
  3149. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  3150. fIfweighFormat(row, column) {
  3151. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  3152. },
  3153. // 是否破损(数据字典),默认F否则T字典翻译
  3154. fIfdamageFormat(row, column) {
  3155. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  3156. },
  3157. // 单据类型(数据字典)SJRK字典翻译
  3158. fBilltypeFormat(row, column) {
  3159. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  3160. },
  3161. // 状态(数据字典),N 入字典翻译
  3162. fBillstatusFormat(row, column) {
  3163. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  3164. },
  3165. // 取消按钮
  3166. cancel() {
  3167. this.open = false;
  3168. this.reset();
  3169. },
  3170. // 表单重置
  3171. reset() {
  3172. this.form = {
  3173. fId: null,
  3174. fBillno: null,
  3175. fCustomsdeclartion: null,
  3176. fOriginalbillno: null,
  3177. fDeptid: null,
  3178. fBsdeptid: null,
  3179. fContacts: null,
  3180. fTel: null,
  3181. fCorpid: null,
  3182. fTocorpid: null,
  3183. fStltypeid: null,
  3184. fBscorpno: null,
  3185. fWarehouseid: null,
  3186. fStorekeeper: null,
  3187. fBsdate: null,
  3188. fPlanqty: null,
  3189. fPlangrossweight: null,
  3190. fPlannetweight: null,
  3191. fPlanvolumn: null,
  3192. fQty: null,
  3193. fGrossweight: null,
  3194. fNetweight: null,
  3195. fVolumn: null,
  3196. fTrademodeid: null,
  3197. fSbu: null,
  3198. fFeetunit: null,
  3199. fMblno: null,
  3200. fVslvoy: null,
  3201. fEta: null,
  3202. fCustomno: null,
  3203. fIfweigh: null,
  3204. fIfpledge: null,
  3205. fIfdamage: null,
  3206. fBankcorpid: null,
  3207. fBilltype: null,
  3208. fBillstatus: null,
  3209. delFlag: null,
  3210. createBy: null,
  3211. createTime: null,
  3212. updateBy: null,
  3213. updateTime: null,
  3214. remark: null,
  3215. fCreateby: null,
  3216. fCreatetime: null,
  3217. fGoodsid: null,
  3218. fCntrtype: null,
  3219. fCntqty: null,
  3220. };
  3221. this.deptOptions = [];
  3222. this.userOptions = [];
  3223. this.fSbuOptions = [];
  3224. this.fWbuOptions = [];
  3225. this.goodsOptions = [];
  3226. this.KHblnoOptions = [];
  3227. this.fMblnoOptions = [];
  3228. this.kqhouseOptions = [];
  3229. this.resetForm("form");
  3230. },
  3231. /** 搜索按钮操作 */
  3232. handleQuery() {
  3233. this.queryParams.pageNum = 1;
  3234. this.getList();
  3235. },
  3236. /** 重置按钮操作 */
  3237. resetQuery() {
  3238. this.resetForm("queryForm");
  3239. this.handleQuery();
  3240. },
  3241. // 多选框选中数据
  3242. handleSelectionChange(selection) {
  3243. this.ids = selection;
  3244. // this.ids = selection.map((item) => item.fId);
  3245. this.single = selection.length !== 1;
  3246. this.multiple = !selection.length;
  3247. },
  3248. // 库存总账多选框
  3249. whgenlegSelectionChange(selection) {
  3250. this.dialogWhgenlegList = selection;
  3251. },
  3252. /** 新增按钮操作 */
  3253. handleAdd(status) {
  3254. this.browseStatus = status;
  3255. this.reset();
  3256. this.queryUser();
  3257. this.open = true;
  3258. this.detailsHidden = false;
  3259. this.dataList = [];
  3260. this.warehouseCrList = [];
  3261. this.warehouseDrList = [];
  3262. this.relevantAttachments = [];
  3263. this.title = "出库单";
  3264. this.formBrowseStatus = false;
  3265. },
  3266. /** 修改按钮操作 */
  3267. handleUpdate(row, status) {
  3268. this.browseStatus = status;
  3269. this.reset();
  3270. this.detailsHidden = false;
  3271. this.formBrowseStatus = false;
  3272. const fId = row.fId || this.ids;
  3273. this.dataList = [];
  3274. getWarehousebills(fId).then((response) => {
  3275. this.before = response.data.corps[0].createBy
  3276. console.log(response.data.corps[0].createBy)
  3277. if (response.data.warehousebills) {
  3278. this.form = response.data.warehousebills;
  3279. if (this.form.fBillstatus > 2) {
  3280. this.approvalStatus = false;
  3281. } else {
  3282. this.approvalStatus = true;
  3283. }
  3284. }
  3285. if (response.data.warehouseBillsItem) {
  3286. this.dataList = response.data.warehouseBillsItem;
  3287. for (let list in this.dataList) {
  3288. if (this.dataList[list].fBillstatus > 10) {
  3289. this.formBrowseStatus = true;
  3290. }
  3291. }
  3292. }
  3293. if (response.data.corps) {
  3294. this.fMblnoOptions = response.data.corps;
  3295. this.KHblnoOptions = response.data.corps;
  3296. this.fSbuOptions = response.data.corps;
  3297. }
  3298. if (response.data.feesList) {
  3299. this.fWbuOptions = response.data.feesList;
  3300. }
  3301. if (response.data.warehouse) {
  3302. this.warehouseOptions = response.data.warehouse;
  3303. }
  3304. if (response.data.warehouseBillsItem) {
  3305. this.dataList = response.data.warehouseBillsItem;
  3306. }
  3307. if (response.data.enclosures) {
  3308. this.relevantAttachments = response.data.enclosures;
  3309. }
  3310. this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
  3311. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3312. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3313. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  3314. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
  3315. this.$set(
  3316. this.form,
  3317. "fPlannetweight",
  3318. this.form.fPlannetweight.toFixed(2)
  3319. );
  3320. this.$set(
  3321. this.form,
  3322. "fPlangrossweight",
  3323. this.form.fPlangrossweight.toFixed(2)
  3324. );
  3325. for (let list in this.dataList) {
  3326. this.$set(
  3327. this.dataList[list],
  3328. "fBsdate",
  3329. Date.parse(this.dataList[list].fBsdate)
  3330. );
  3331. }
  3332. this.goodsOptions = response.data.goodsList;
  3333. this.kqhouseOptions = response.data.warehouseAreas;
  3334. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3335. for (let dr in this.warehouseDrList) {
  3336. this.$set(
  3337. this.warehouseDrList[dr],
  3338. "fFeeUnitid",
  3339. this.warehouseDrList[dr].fFeeunitid + ""
  3340. );
  3341. this.$set(
  3342. this.warehouseDrList[dr],
  3343. "fQty",
  3344. this.warehouseDrList[dr].fQty.toFixed(2)
  3345. );
  3346. this.$set(
  3347. this.warehouseDrList[dr],
  3348. "fAmount",
  3349. this.warehouseDrList[dr].fAmount.toFixed(2)
  3350. );
  3351. }
  3352. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3353. for (let cr in this.warehouseCrList) {
  3354. this.$set(
  3355. this.warehouseCrList[cr],
  3356. "fFeeUnitid",
  3357. this.warehouseCrList[cr].fFeeunitid + ""
  3358. );
  3359. }
  3360. this.userOptions = response.data.sysUser;
  3361. this.open = true;
  3362. this.title = "修改仓入库";
  3363. });
  3364. queryUserVal().then((response)=>{
  3365. console.log(response)
  3366. this.current = response.user.userName
  3367. console.log(this.queryParams)
  3368. })
  3369. },
  3370. // 数量计算
  3371. changeContractAmt(row) {
  3372. let fQty = 0
  3373. let fUnitprice = 0
  3374. if (row.fUnitprice) {
  3375. fUnitprice = row.fUnitprice
  3376. }
  3377. if (row.fQty) {
  3378. fQty = row.fQty
  3379. }
  3380. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  3381. },
  3382. changefBsdate(row) {
  3383. if (this.dataList.length > 0) {
  3384. for (var i = 0; i < this.dataList.length; i++) {
  3385. this.$set(this.dataList[i], "fBsdate", row);
  3386. }
  3387. }
  3388. },
  3389. // change仓库
  3390. changefWarehouseid(row) {
  3391. for (let corp in this.warehouseOptions) {
  3392. if (row.fWarehouseid === this.warehouseOptions[corp].fId) {
  3393. this.$set(
  3394. this.form,
  3395. "fContacts",
  3396. this.warehouseOptions[corp].createBy
  3397. );
  3398. this.$set(this.form, "fTel", this.warehouseOptions[corp].fTotalgross);
  3399. this.fAddr = this.warehouseOptions[corp].fAddr;
  3400. }
  3401. }
  3402. },
  3403. // 选择按钮
  3404. collectionoptions(selection) {
  3405. this.feelDrSelection = selection
  3406. },
  3407. changefCorpid(row) {
  3408. this.$set(row, "fSbu", row.fCorpid);
  3409. for (let corp in this.fMblnoOptions) {
  3410. if (row.fCorpid === this.fMblnoOptions[corp].fId) {
  3411. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + "");
  3412. }
  3413. }
  3414. },
  3415. // 合计
  3416. getSummaries(param) {
  3417. const { columns, data } = param;
  3418. const sums = [];
  3419. var values = [];
  3420. columns.forEach((column, index) => {
  3421. if (index === 0) {
  3422. sums[index] = "合计";
  3423. return;
  3424. }
  3425. if (column.property === "fGrossweight") {
  3426. values = data.map((item) => Number(item["fGrossweight"]));
  3427. }
  3428. if (column.property === "fNetweight") {
  3429. values = data.map((item) => Number(item["fNetweight"]));
  3430. }
  3431. if (column.property === "fQty") {
  3432. values = data.map((item) => Number(item["fQty"]));
  3433. }
  3434. if (column.property === "fCntqty") {
  3435. values = data.map((item) => Number(item["fCntqty"]));
  3436. } // const values = data.map(item => Number(item[column.property]))
  3437. if (
  3438. column.property === "fGrossweight" ||
  3439. column.property === "fNetweight" ||
  3440. column.property === "fQty" ||
  3441. column.property === "fCntqty"
  3442. ) {
  3443. sums[index] = values.reduce((prev, curr) => {
  3444. const value = Number(curr);
  3445. if (!isNaN(value)) {
  3446. if (column.property === "fGrossweight") {
  3447. this.form.fGrossweight = prev + curr;
  3448. this.fGrossweight = prev + curr;
  3449. }
  3450. if (column.property === "fNetweight") {
  3451. this.form.fNetweight = prev + curr;
  3452. this.fNetweight = prev + curr;
  3453. }
  3454. if (column.property === "fVolumn") {
  3455. this.fVolumn = prev + curr;
  3456. }
  3457. if (column.property === "fQty") {
  3458. this.form.fQty = prev + curr;
  3459. this.fQty = prev + curr;
  3460. }
  3461. if (column.property === "fCntqty") {
  3462. this.fCntqty = prev + curr;
  3463. }
  3464. return prev + curr;
  3465. } else {
  3466. return prev;
  3467. }
  3468. }, 0); // sums[index]
  3469. }
  3470. });
  3471. this.sums = sums;
  3472. return sums;
  3473. },
  3474. // 付款合计
  3475. warehouseDrSummaries(param) {
  3476. const { columns, data } = param;
  3477. const sums = [];
  3478. columns.forEach((column, index) => {
  3479. if (index === 0) {
  3480. sums[index] = "合计";
  3481. return;
  3482. }
  3483. const values = data.map((item) => Number(item[column.property]));
  3484. if (
  3485. column.property === "fUnitprice" ||
  3486. column.property === "fAmount" ||
  3487. column.property === "fQty" ||
  3488. column.property === "fQty"
  3489. ) {
  3490. sums[index] = values.reduce((prev, curr) => {
  3491. const value = Number(curr);
  3492. if (!isNaN(value)) {
  3493. return prev + curr;
  3494. } else {
  3495. return prev;
  3496. }
  3497. }, 0); // sums[index]
  3498. }
  3499. });
  3500. return sums;
  3501. },
  3502. // 库存明细多选框结果
  3503. dataListChange(row) {
  3504. this.dataListSelection = row;
  3505. },
  3506. // 变更计价单位
  3507. changeFeeUnit(row) {
  3508. if (!row.fFeeunitid) {
  3509. return false
  3510. }
  3511. let fQty = 0;
  3512. let fGrossweight = 0;
  3513. let fNetweight = 0;
  3514. let volumn = 0;
  3515. let fixed = 1;
  3516. for (let li in this.dataList) {
  3517. if (this.dataList[li].fQty) {
  3518. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  3519. }
  3520. if (this.dataList[li].fGrossweight) {
  3521. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  3522. }
  3523. if (this.dataList[li].fNetweight) {
  3524. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  3525. }
  3526. if (this.dataList[li].volumn) {
  3527. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  3528. }
  3529. }
  3530. if (row.fFeeunitid === 1) {
  3531. this.$set(row, 'fQty', fQty)
  3532. } else if (row.fFeeunitid === 2) {
  3533. this.$set(row, 'fQty', fGrossweight)
  3534. }else if (row.fFeeunitid === 3) {
  3535. this.$set(row, 'fQty', fNetweight)
  3536. }else if (row.fFeeunitid === 4) {
  3537. this.$set(row, 'fQty', volumn)
  3538. }else if (row.fFeeunitid === 5) {
  3539. this.$set(row, 'fQty', fixed)
  3540. }
  3541. if (row.fUnitprice) {
  3542. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  3543. }
  3544. },
  3545. // 出库确认
  3546. creditClick() {
  3547. console.log(this.dataList)
  3548. this.$refs["form"].validate((valid) => {
  3549. console.log(this.dataListSelection[0].fIsPass)
  3550. for (let warehouseCr in this.dataListSelection) {
  3551. if (this.dataListSelection[warehouseCr].fBillstatus === 10) {
  3552. this.$message.error("请先打印作业单");
  3553. return false;
  3554. } else if (this.dataListSelection[warehouseCr].fBillstatus === 20) {
  3555. this.$message.error("请先卸货");
  3556. return false;
  3557. } else if (!this.dataListSelection[warehouseCr].fGrossweight) {
  3558. this.$message.error("请选择入库毛重");
  3559. return false;
  3560. } else if (!this.dataListSelection[warehouseCr].fNetweight) {
  3561. this.$message.error("请选择入库净重");
  3562. return false;
  3563. } else if (!this.dataListSelection[warehouseCr].fQty) {
  3564. this.$message.error("请维护出库件数");
  3565. return false;
  3566. } else if (this.dataListSelection[warehouseCr].fIsPass !== 'T') {
  3567. this.$message.error("请放行才能出库");
  3568. return false;
  3569. }
  3570. }
  3571. if (valid) {
  3572. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  3573. let formData = new window.FormData();
  3574. formData.append("warehouseBills", JSON.stringify(this.form));
  3575. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3576. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3577. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3578. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3579. addWhgenleg(formData).then((response) => {
  3580. this.fid = response.data.fPid;
  3581. // 暂时注释掉,后续可能会加回来 仓储费得出的明细
  3582. /* this.fWbuOptions = response.data.fees;
  3583. let warehousebillsfees = response.data.warehousebillsfees;
  3584. for (let fees in warehousebillsfees) {
  3585. this.$set(warehousebillsfees[fees], "fFeeid", warehousebillsfees[fees].fFeeid + "");
  3586. this.$set(warehousebillsfees[fees], "fCorpid", warehousebillsfees[fees].fCorpid + "");
  3587. this.$set(warehousebillsfees[fees], "fFeeUnitid", warehousebillsfees[fees].fFeeUnitid + "");
  3588. this.warehouseDrList.push(warehousebillsfees[fees]);
  3589. } */
  3590. this.dataWithdrawList = []
  3591. this.dataListSelection = []
  3592. this.msgSuccess("出库成功");
  3593. this.$refs.tableList.clearSelection();
  3594. this.formBrowseStatus = true;
  3595. for (let li in listSelection) {
  3596. for (let i in this.dataList) {
  3597. if (listSelection[li].fId === this.dataList[i].fId) {
  3598. this.$set(this.dataList[i], "fBillstatus", 40);
  3599. }
  3600. }
  3601. }
  3602. });
  3603. }
  3604. });
  3605. },
  3606. // 打印作业单
  3607. addList() {
  3608. this.$refs["form"].validate((valid) => {
  3609. if (valid) {
  3610. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  3611. let formData = new window.FormData();
  3612. formData.append("warehouseBills", JSON.stringify(this.form));
  3613. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3614. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3615. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3616. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3617. addJoblist(formData).then((response) => {
  3618. this.formBrowseStatus = true;
  3619. this.$refs.tableDr.clearSelection();
  3620. this.$refs.tableList.clearSelection();
  3621. let dataitem = response.data.warehousebillsitems
  3622. for (let ite in dataitem) {
  3623. for (let li in this.dataList) {
  3624. if (this.dataList[li].fId === dataitem[ite].fId) {
  3625. this.$set(this.dataList[li], 'fBillstatus', dataitem[ite].fBillstatus)
  3626. this.$set(this.dataList[li], 'fSerialNumber', dataitem[ite].fSerialNumber)
  3627. }
  3628. }
  3629. }
  3630. });
  3631. }
  3632. });
  3633. },
  3634. // 撤回入账
  3635. withdrawClick() {
  3636. for (let li in this.dataWithdrawList) {
  3637. if (this.dataWithdrawList[li].fBillstatus < 40) {
  3638. this.$message.error("所选信息中存在未出库数据!");
  3639. return false
  3640. }
  3641. }
  3642. let formData = new window.FormData();
  3643. // 撤回入库
  3644. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  3645. formData.append("warehouseBills", JSON.stringify(this.form));
  3646. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3647. formData.append("warehousebillsitems", JSON.stringify(this.dataWithdrawList));
  3648. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3649. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3650. updateCredit(formData).then((response) => {
  3651. this.fid = response.data;
  3652. this.formBrowseStatus = false;
  3653. this.msgSuccess("撤销入账成功");
  3654. this.$refs.tableList.clearSelection();
  3655. let mun = 0;
  3656. for (let i in this.dataList) {
  3657. for (let li in withdrawList) {
  3658. if (withdrawList[li].fId === this.dataList[i].fId) {
  3659. this.$set(this.dataList[i], 'fBillstatus', 10)
  3660. }
  3661. }
  3662. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus > 10) {
  3663. mun ++;
  3664. }
  3665. }
  3666. if (mun > 0) {
  3667. this.formBrowseStatus = true
  3668. } else {
  3669. this.formBrowseStatus = false
  3670. }
  3671. });
  3672. },
  3673. // 装货按钮
  3674. discharge() {
  3675. if (this.printinglist.length <= 0) {
  3676. this.$message.error("请选择需要装货的明细!");
  3677. return false
  3678. }
  3679. for (let li in this.dataListSelection) {
  3680. if (!this.dataListSelection[li].fId) {
  3681. this.$message.error('请先保存!')
  3682. return false
  3683. } else if (this.dataListSelection[li].fBillstatus === 10) {
  3684. this.$message.error('请先打印')
  3685. return false
  3686. } else if (this.dataListSelection[li].fBillstatus >= 30) {
  3687. this.$message.error('请勿重复卸货')
  3688. return false
  3689. }
  3690. }
  3691. this.$refs['form'].validate((valid) => {
  3692. if (valid) {
  3693. let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
  3694. let formData = new window.FormData()
  3695. formData.append("warehouseBills", JSON.stringify(this.form));
  3696. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3697. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3698. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3699. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3700. for (let li in this.dataListSelection) {
  3701. this.dataListSelection[li].fBillstatus = 30
  3702. }
  3703. this.formBrowseStatus = true
  3704. this.$refs.tableList.clearSelection()
  3705. disChargelist(formData).then((response) => {
  3706. for (let li in withdrawList) {
  3707. for (let i in this.dataList) {
  3708. if (withdrawList.fId === this.dataList[i].fId) {
  3709. this.$set(this.dataList[i], 'fBillstatus', 30)
  3710. }
  3711. }
  3712. }
  3713. this.msgSuccess('装货成功')
  3714. })
  3715. }
  3716. })
  3717. },
  3718. // 付款信息计价单位合计
  3719. getwarehouseCrList(param) {
  3720. const { columns, data } = param
  3721. const sums = []
  3722. var values = []
  3723. columns.forEach((column, index) => {
  3724. if (index === 0) {
  3725. sums[index] = "合计";
  3726. return;
  3727. }
  3728. if (index === 3) {
  3729. // values = data.map((item) => Number(item["fFeeUnitid"]));
  3730. sums[index] = this.fFeeUnitids;
  3731. return;
  3732. }
  3733. });
  3734. this.sums = sums;
  3735. return sums;
  3736. },
  3737. // 库存明细多选
  3738. selectinventory(selection) {
  3739. this.printinglist = selection;
  3740. this.dataWithdrawList = [];
  3741. this.dataListSelection = [];
  3742. if (!selection || selection.length === 0) {
  3743. return false
  3744. }
  3745. for (let se in selection) {
  3746. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
  3747. this.dataListSelection.push(selection[se])
  3748. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 40) {
  3749. this.dataWithdrawList.push(selection[se])
  3750. }
  3751. }
  3752. this.fTruckno = selection[0].fTruckno
  3753. this.fCntrtype = selection[0].fCntrtype
  3754. this.fGoodsids = selection[0].fGoodsids
  3755. },
  3756. // 更新主表品名并去重
  3757. updateDeduplication: function() {
  3758. if (this.dataList.length === 0) {
  3759. return false
  3760. }
  3761. let fMarks = []
  3762. let fGoodsid = []
  3763. for (let li in this.dataList) {
  3764. fMarks.push(this.dataList[li].fMarks)
  3765. fGoodsid.push(this.dataList[li].fGoodsids)
  3766. }
  3767. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  3768. this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
  3769. },
  3770. // 保存
  3771. saveForm () {
  3772. this.updateDeduplication()
  3773. this.$refs['form'].validate((valid) => {
  3774. if (this.dataList.length === 0) {
  3775. this.$message.error('请添加库存明细!')
  3776. return false
  3777. }
  3778. for (let list in this.dataList) {
  3779. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  3780. this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库件数!')
  3781. return false
  3782. }
  3783. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  3784. this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库毛重!')
  3785. return false
  3786. }
  3787. if (!this.dataList[list].fNetweight || Number(this.dataList[list].fNetweight) === 0) {
  3788. this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库净重!')
  3789. return false
  3790. }
  3791. }
  3792. if (valid) {
  3793. setTimeout(() => {
  3794. this.form.fBillstatus = 2
  3795. let formData = new window.FormData()
  3796. formData.append("warehouseBills", JSON.stringify(this.form));
  3797. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3798. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3799. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3800. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3801. addWarehousebills(formData).then((response) => {
  3802. this.msgSuccess('保存成功')
  3803. this.form = response.data.warehouseBills
  3804. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  3805. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3806. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3807. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3808. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3809. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3810. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3811. this.dataList = response.data.warehousebillsitems
  3812. })
  3813. }, 200);
  3814. }
  3815. })
  3816. },
  3817. /** 提交按钮 */
  3818. submitForm() {
  3819. this.updateDeduplication()
  3820. this.$refs['form'].validate((valid) => {
  3821. if (this.dataList.length === 0) {
  3822. this.$message.error('请新增库存明细!')
  3823. return false
  3824. }
  3825. for (let list in this.dataList) {
  3826. if (this.dataList[list].fQty === 0) {
  3827. this.$message.error('请输入出库件数!')
  3828. return false
  3829. }
  3830. if (this.dataList[list].fNetweight === 0) {
  3831. this.$message.error('请输入出库净重!')
  3832. return false
  3833. }
  3834. if (this.dataList[list].fGrossweight === 0) {
  3835. this.$message.error('请输入出库毛重!')
  3836. return false
  3837. }
  3838. if (this.dataList[list].fBillstatus !== 40) {
  3839. this.$message.error('请入账库存明细!')
  3840. return false
  3841. }
  3842. }
  3843. for (let list in this.warehouseDrList) {
  3844. if (!this.warehouseDrList[list].fCorpid) {
  3845. this.$message.error('请选择客户名称')
  3846. return false
  3847. }
  3848. }
  3849. for (let list in this.warehouseCrList) {
  3850. if (!this.warehouseCrList[list].fCorpid) {
  3851. this.$message.error('请选择客户名称')
  3852. return false
  3853. }
  3854. }
  3855. if (valid) {
  3856. setTimeout(() => {
  3857. this.form.fBillstatus = status
  3858. this.form.fNetweight = this.fNetweight
  3859. this.form.fPlangrossweight = this.fPlangrossweight
  3860. this.form.fPlannetweight = this.fPlannetweight
  3861. this.form.fPlanvolumn = this.fPlanvolumn
  3862. this.form.fPlanqty = this.fPlanqty
  3863. this.form.fGrossweight = this.fGrossweight
  3864. this.form.fQty = this.fQty
  3865. if (!this.form.fId) {
  3866. this.form.fId = this.fid
  3867. }
  3868. let formData = new window.FormData()
  3869. formData.append("warehouseBills", JSON.stringify(this.form));
  3870. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3871. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3872. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3873. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3874. warehouseSubmission(formData).then((response) => {
  3875. this.msgSuccess('提交成功')
  3876. this.cancel()
  3877. this.getList()
  3878. })
  3879. }, 200);
  3880. }
  3881. })
  3882. },
  3883. /** 删除按钮操作 */
  3884. handleDelete(row) {
  3885. const fIds = row.fId || this.ids.fId;
  3886. this.$confirm(
  3887. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  3888. "警告",
  3889. {
  3890. confirmButtonText: "确定",
  3891. cancelButtonText: "取消",
  3892. type: "warning",
  3893. }
  3894. )
  3895. .then(function () {
  3896. return delWarehousebills(fIds);
  3897. })
  3898. .then(() => {
  3899. this.getList();
  3900. this.msgSuccess("删除成功");
  3901. });
  3902. },
  3903. /** 导出按钮操作 */
  3904. handleExport() {
  3905. const queryParams = this.queryParams;
  3906. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  3907. confirmButtonText: "确定",
  3908. cancelButtonText: "取消",
  3909. type: "warning",
  3910. })
  3911. .then(function () {
  3912. return exportWarehousebills(queryParams);
  3913. })
  3914. .then((response) => {
  3915. this.download(response.msg);
  3916. });
  3917. },
  3918. // 出库件数的计算
  3919. qtyChange(row) {
  3920. if (!row.fQty || row.fQty === "") {
  3921. this.$set(row, "fNetweight", 0);
  3922. this.$set(row, "fGrossweight", 0);
  3923. return false;
  3924. }
  3925. // 净重 fPlannetweight
  3926. // 毛重 fPlangrossweight
  3927. let fVolumn = parseFloat(Number(row.fVolumn) / Number(row.fPlanqty)).toFixed(2);
  3928. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2);
  3929. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2);
  3930. this.$set(row, "fVolumn", parseFloat(Number(fVolumn) * Number(row.fQty)).toFixed(2));
  3931. this.$set(row, "fNetweight", parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2));
  3932. this.$set(row, "fGrossweight", parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2));
  3933. },
  3934. deleteRow(index, rows) {
  3935. rows.splice(index, 1);
  3936. },
  3937. /* 远程模糊查询用户 */
  3938. corpsRemoteMethod(name) {
  3939. if (name == null || name === "") {
  3940. return false;
  3941. }
  3942. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3943. listCorps(queryParams).then((response) => {
  3944. this.fMblnoOptions = response.rows;
  3945. this.KHblnoOptions = response.rows;
  3946. });
  3947. },
  3948. /* 远程模糊查询商品 */
  3949. goodsRemoteMethod(name) {
  3950. if (name == null || name === "") {
  3951. return false;
  3952. }
  3953. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3954. listGoods(queryParams).then((response) => {
  3955. this.goodsOptions = response.rows;
  3956. });
  3957. },
  3958. // 远程模糊查询费用名称
  3959. fWRemoteMethod(name) {
  3960. if (name == null || name === "") {
  3961. return false;
  3962. }
  3963. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3964. listFees(queryParams).then((response) => {
  3965. this.fWbuOptions = response.rows;
  3966. });
  3967. },
  3968. /* 远程模糊查询经营单位 */
  3969. fSbuRemoteMethod(name) {
  3970. if (name == null || name === "") {
  3971. return false;
  3972. }
  3973. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3974. listCorps(queryParams).then((response) => {
  3975. this.fSbuOptions = response.rows;
  3976. });
  3977. },
  3978. /* 远程模糊查询仓库 */
  3979. warehouseRemoteMethod(name) {
  3980. if (name == null || name === "") {
  3981. return false;
  3982. }
  3983. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3984. listWarehouse(queryParams).then((response) => {
  3985. this.warehouseOptions = response.rows;
  3986. });
  3987. },
  3988. /* 远程模糊查询库区 */
  3989. kqhouseRemoteMethod(name) {
  3990. if (name == null || name === "") {
  3991. return false;
  3992. }
  3993. if (!this.form.fWarehouseid) {
  3994. this.$message.error("请输入仓库!");
  3995. return false;
  3996. }
  3997. let queryParams = {
  3998. pageNum: 1,
  3999. pageSize: 10,
  4000. fWarehouseid: this.form.fWarehouseid,
  4001. fName: name,
  4002. };
  4003. listArea(queryParams).then((response) => {
  4004. this.kqhouseOptions = response.rows;
  4005. });
  4006. },
  4007. /* 远程模糊查询操作用户 */
  4008. userRemoteMethod(name) {
  4009. if (name == null || name === "") {
  4010. return false;
  4011. }
  4012. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  4013. listUser(queryParams).then((response) => {
  4014. this.userOptions = response.rows;
  4015. });
  4016. },
  4017. },
  4018. };
  4019. </script>
  4020. <style lang="scss">
  4021. .juzhong > th {
  4022. text-align: center;
  4023. }
  4024. .biaoge > tr > td {
  4025. height: 50px;
  4026. text-align: center;
  4027. border-right: 1px solid #dfe6ec !important;
  4028. // order-bottom: 1px solid #dfe6ec !important;
  4029. border-bottom: 1px solid #dfe6ec !important;
  4030. }
  4031. .el-table thead th {
  4032. background: #1890ff;
  4033. color: #fff;
  4034. }
  4035. .upload-demo {
  4036. margin-left: 50px;
  4037. }
  4038. .el-form-item {
  4039. margin-bottom: 5px !important;
  4040. }
  4041. .el-form-item__label {
  4042. font-size: 12px !important;
  4043. }
  4044. </style>