index.vue 132 KB

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