index.vue 143 KB

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