index.vue 134 KB

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