index.vue 132 KB

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