AddOrUpdate.vue 123 KB

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