index.vue 133 KB

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