index.vue 131 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957
  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="fQtyblc"
  1755. header-align="center"
  1756. align="center"
  1757. label="结余数量"
  1758. >
  1759. </el-table-column>
  1760. <el-table-column
  1761. prop="fWarehouseids"
  1762. header-align="center"
  1763. align="center"
  1764. label="库位"
  1765. >
  1766. </el-table-column>
  1767. <!-- <el-table-column-->
  1768. <!-- prop="fWarehouseLocationids"-->
  1769. <!-- header-align="center"-->
  1770. <!-- align="center"-->
  1771. <!-- label="库区"-->
  1772. <!-- >-->
  1773. <!-- </el-table-column>-->
  1774. </el-table>
  1775. <pagination
  1776. v-show="whgenlegTotal > 0"
  1777. :total="whgenlegTotal"
  1778. :page.sync="whgenlegParams.pageNum"
  1779. :limit.sync="whgenlegParams.pageSize"
  1780. @pagination="getWhgenlegList"
  1781. />
  1782. <div slot="footer" class="dialog-footer">
  1783. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1784. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1785. </div>
  1786. </el-dialog>
  1787. </el-dialog>
  1788. </div>
  1789. </template>
  1790. <script>
  1791. import print from 'print-js'
  1792. import {
  1793. backFee,
  1794. RevocationApproval,
  1795. addWhgenleg,
  1796. listGoodsTransfer,
  1797. getGoodsTransfer,
  1798. addGoodsTransfer,
  1799. warehouseSubmission,
  1800. delGoodsTransfer,
  1801. delgoodsTransfer_s,
  1802. exportgoodsTransfer
  1803. } from '@/api/warehouseBusiness/goodsTransfer'
  1804. import { updateCredit } from '@/api/warehouseBusiness/goodsTransfer'
  1805. import { listCorps } from '@/api/basicdata/corps'
  1806. import { listFees } from '@/api/basicdata/fees'
  1807. import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
  1808. import { listArea } from '@/api/basicdata/area'
  1809. import { listGoods } from '@/api/basicdata/goods'
  1810. import { listUser, queryUserVal } from '@/api/system/user'
  1811. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1812. import UploadFile from '@/components/Uploadfile'
  1813. import AddOrUpdate from '@/views/viewApproval'
  1814. import ApprovalComments from '@/views/startApproval'
  1815. import Global from '@/layout/components/global'
  1816. import { getAgreement } from '@/api/warehouseBusiness/agreement'
  1817. import Treeselect from '@riophae/vue-treeselect'
  1818. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  1819. import { getToken } from '@/utils/auth'
  1820. import Cookies from 'js-cookie'
  1821. import { addSet, select } from '@/api/system/set'
  1822. import draggable from "vuedraggable";
  1823. import Vue from 'vue'
  1824. Vue.directive('dialogDrag', {
  1825. bind(el, binding, vnode, oldVnode) {
  1826. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  1827. const dragDom = el.querySelector('.el-dialog')
  1828. const enlarge = el.querySelector('.enlarge')
  1829. dialogHeaderEl.style.cursor = 'move'
  1830. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1831. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  1832. if(enlarge){
  1833. enlarge.onclick = (e) => {
  1834. dragDom.style.top = '0px'
  1835. dragDom.style.left = '0px'
  1836. }
  1837. }
  1838. dialogHeaderEl.onmousedown = (e) => {
  1839. // 鼠标按下,计算当前元素距离可视区的距离
  1840. const disX = e.clientX - dialogHeaderEl.offsetLeft
  1841. const disY = e.clientY - dialogHeaderEl.offsetTop
  1842. // 获取到的值带px 正则匹配替换
  1843. let styL, styT
  1844. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1845. if (sty.left.includes('%')) {
  1846. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  1847. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  1848. } else {
  1849. styL = +sty.left.replace(/\px/g, '')
  1850. styT = +sty.top.replace(/\px/g, '')
  1851. }
  1852. document.onmousemove = function(e) {
  1853. // 通过事件委托,计算移动的距离
  1854. const l = e.clientX - disX
  1855. const t = e.clientY - disY
  1856. // 移动当前元素
  1857. if ((t + styT) >= 0){
  1858. dragDom.style.top = `${t + styT}px`
  1859. }
  1860. dragDom.style.left = `${l + styL}px`
  1861. // 将此时的位置传出去
  1862. // binding.value({x:e.pageX,y:e.pageY})
  1863. }
  1864. document.onmouseup = function(e) {
  1865. document.onmousemove = null
  1866. document.onmouseup = null
  1867. }
  1868. }
  1869. }
  1870. })
  1871. export default {
  1872. name: 'goodsTransfer',
  1873. components: {
  1874. UploadFile,
  1875. AddOrUpdate,
  1876. ApprovalComments,
  1877. Treeselect,
  1878. draggable,
  1879. },
  1880. data() {
  1881. return {
  1882. idCopy:'',
  1883. //全屏放大
  1884. dialogFull:false,
  1885. drag: false,
  1886. setRowList: [
  1887. {
  1888. surface: "1",
  1889. label: "createBy",
  1890. name: "制单人",
  1891. checked: 0,
  1892. width: 100,
  1893. },
  1894. {
  1895. surface: "13",
  1896. label: "fItemsStatus",
  1897. name: "货转状态",
  1898. checked: 0,
  1899. width: 100,
  1900. },
  1901. {
  1902. surface: "14",
  1903. label: "fBillstatus",
  1904. name: "费用状态",
  1905. checked: 0,
  1906. width: 100,
  1907. },
  1908. {
  1909. surface: "2",
  1910. label: "fCorpid",
  1911. name: "货权方",
  1912. checked: 0,
  1913. width: 100,
  1914. },
  1915. {
  1916. surface: "3",
  1917. label: "fTocorpid",
  1918. name: "转货权方",
  1919. checked: 0,
  1920. width: 100,
  1921. },
  1922. {
  1923. surface: "4",
  1924. label: "fProductName",
  1925. name: "品名",
  1926. checked: 0,
  1927. width: 100,
  1928. },
  1929. {
  1930. surface: "5",
  1931. label: "fMarks",
  1932. name: "品牌",
  1933. checked: 0,
  1934. width: 100,
  1935. },
  1936. {
  1937. surface: "6",
  1938. label: "fBillno",
  1939. name: "业务编号",
  1940. checked: 0,
  1941. width: 100,
  1942. },
  1943. {
  1944. surface: "7",
  1945. label: "fBsdate",
  1946. name: "货转日期",
  1947. checked: 0,
  1948. width: 100,
  1949. },
  1950. {
  1951. surface: "8",
  1952. label: "fTrademodeid",
  1953. name: "贸易方式",
  1954. checked: 0,
  1955. width: 100,
  1956. },
  1957. {
  1958. surface: "9",
  1959. label: "fWarehouseid",
  1960. name: "仓库",
  1961. checked: 0,
  1962. width: 100,
  1963. },
  1964. {
  1965. surface: "10",
  1966. label: "fQty",
  1967. name: "件数",
  1968. checked: 0,
  1969. width: 100,
  1970. },
  1971. {
  1972. surface: "11",
  1973. label: "fGrossweight",
  1974. name: "毛重(kg)",
  1975. checked: 0,
  1976. width: 100,
  1977. },
  1978. {
  1979. surface: "12",
  1980. label: "fNetweight",
  1981. name: "净重(kg)",
  1982. checked: 0,
  1983. width: 100,
  1984. },
  1985. ],
  1986. getRowList: [
  1987. {
  1988. surface: "1",
  1989. label: "createBy",
  1990. name: "制单人",
  1991. checked: 0,
  1992. width: 100,
  1993. },
  1994. {
  1995. surface: "13",
  1996. label: "fItemsStatus",
  1997. name: "货转状态",
  1998. checked: 0,
  1999. width: 100,
  2000. },
  2001. {
  2002. surface: "14",
  2003. label: "fBillstatus",
  2004. name: "费用状态",
  2005. checked: 0,
  2006. width: 100,
  2007. },
  2008. {
  2009. surface: "2",
  2010. label: "fCorpid",
  2011. name: "货权方",
  2012. checked: 0,
  2013. width: 100,
  2014. },
  2015. {
  2016. surface: "3",
  2017. label: "fTocorpid",
  2018. name: "转货权方",
  2019. checked: 0,
  2020. width: 100,
  2021. },
  2022. {
  2023. surface: "4",
  2024. label: "fProductName",
  2025. name: "品名",
  2026. checked: 0,
  2027. width: 100,
  2028. },
  2029. {
  2030. surface: "5",
  2031. label: "fMarks",
  2032. name: "品牌",
  2033. checked: 0,
  2034. width: 100,
  2035. },
  2036. {
  2037. surface: "6",
  2038. label: "fBillno",
  2039. name: "业务编号",
  2040. checked: 0,
  2041. width: 100,
  2042. },
  2043. {
  2044. surface: "7",
  2045. label: "fBsdate",
  2046. name: "货转日期",
  2047. checked: 0,
  2048. width: 100,
  2049. },
  2050. {
  2051. surface: "8",
  2052. label: "fTrademodeid",
  2053. name: "贸易方式",
  2054. checked: 0,
  2055. width: 100,
  2056. },
  2057. {
  2058. surface: "9",
  2059. label: "fWarehouseid",
  2060. name: "仓库",
  2061. checked: 0,
  2062. width: 100,
  2063. },
  2064. {
  2065. surface: "10",
  2066. label: "fQty",
  2067. name: "件数",
  2068. checked: 0,
  2069. width: 100,
  2070. },
  2071. {
  2072. surface: "11",
  2073. label: "fGrossweight",
  2074. name: "毛重(kg)",
  2075. checked: 0,
  2076. width: 100,
  2077. },
  2078. {
  2079. surface: "12",
  2080. label: "fNetweight",
  2081. name: "净重(kg)",
  2082. checked: 0,
  2083. width: 100,
  2084. },
  2085. ],
  2086. allCheck: false,
  2087. showSetting:false,
  2088. headers: {
  2089. Authorization: 'Bearer ' + getToken()
  2090. },
  2091. uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
  2092. fDNameOptions:[],
  2093. fCNameOptions:[],
  2094. activeNames:['1'],
  2095. //仓库树状图
  2096. warehousesOptions:[],
  2097. fWarehouseidOption:[],
  2098. Lander:'',
  2099. Operator:'',
  2100. colseButton:true,
  2101. cancelButton:true,
  2102. disappear:false,
  2103. goodsTransferId:130,
  2104. addOrUpdateVisible: false,
  2105. addOrUpdateVisib:false,
  2106. approvalStatus: false,
  2107. // 审批状态
  2108. approve:false,
  2109. notChange:false,
  2110. // 修改查看状态
  2111. browseStatus: false,
  2112. // 是否有明细入库
  2113. formBrowseStatus: false,
  2114. // 遮罩层
  2115. loading: true,
  2116. // 选中数组
  2117. ids: [],
  2118. userVal: {
  2119. userName: null,
  2120. nickName: null,
  2121. deptId: null
  2122. },
  2123. queryForm: {},
  2124. // 添加用户对话框
  2125. editDialogVisible_s: false,
  2126. editDialogVisible_ss: false,
  2127. editDialogClosed_ss: false,
  2128. dataList: [],
  2129. warehouseCrList: [],
  2130. warehouseDrList: [],
  2131. relevantAttachments: [],
  2132. fPlannetweight: '',
  2133. // 税率
  2134. fTaxrate: null,
  2135. // 非单个禁用
  2136. single: true,
  2137. // 非多个禁用
  2138. multiple: true,
  2139. // 显示搜索条件
  2140. showSearch: true,
  2141. // 总条数
  2142. total: 0,
  2143. // 仓库主(出入库)表格数据
  2144. goodsTransferList: [],
  2145. // 弹出层标题
  2146. title: '',
  2147. // 是否显示弹出层
  2148. open: false,
  2149. // 货权方(客户数据)
  2150. fMblnoOptions: [],
  2151. // 货权方(客户数据)
  2152. // 客户名称
  2153. KHblnoOptions: [],
  2154. fSbuOptions: [],
  2155. // 操作员
  2156. userOptions: [],
  2157. // 操作员
  2158. goodsOptions: [],
  2159. // 库存明细入账数组
  2160. dataListSelection: [],
  2161. // 库存明细撤回入账数组
  2162. dataWithdrawList: [],
  2163. // 仓库(仓库
  2164. warehouseOptions: [],
  2165. // 仓储类型 入库时选择 产地 规格 品牌 所用,对应storage_type 字典
  2166. fStorageTypeOptions: [],
  2167. kqhouseOptions: [],
  2168. // 贸易方式(数据字典),对应t_trademodels 字典
  2169. fTrademodeidOptions: [],
  2170. // 计费单位(数据字典),下拉选择毛重或净重字典
  2171. fFeetunitOptions: [],
  2172. // 结算方式(数据字典),下拉选择字典
  2173. fStltypeOptions: [],
  2174. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2175. fIfweighOptions: [],
  2176. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  2177. fIfpledgeOptions: [],
  2178. // 是否破损(数据字典),默认F否则T字典
  2179. fIfdamageOptions: [],
  2180. // 单据类型(数据字典)SJRK字典
  2181. fBilltypeOptions: [],
  2182. // 状态(数据字典),N 入字典
  2183. fBillstatusOptions: [],
  2184. //结算方式对应字典表
  2185. fStltypeidOptions:[],
  2186. // 费用名称
  2187. fWbuOptions: [],
  2188. fGrossweight: 0,
  2189. fNetweight: 0,
  2190. fQty: 0,
  2191. // 查询参数
  2192. queryParams: {
  2193. pageNum: 1,
  2194. pageSize: 10,
  2195. fBillno: null,
  2196. createBy: null,
  2197. createTime: null,
  2198. fCustomsdeclartion: null,
  2199. fOriginalbillno: null,
  2200. fDeptid: null,
  2201. fBsdeptid: null,
  2202. fContacts: null,
  2203. fTel: null,
  2204. fCorpid: null,
  2205. fTocorpid: null,
  2206. fStltypeid: null,
  2207. fBscorpno: null,
  2208. fWarehouseid: null,
  2209. fStorekeeper: null,
  2210. fBsdate: null,
  2211. fPlanqty: null,
  2212. fPlangrossweight: null,
  2213. fPlannetweight: null,
  2214. fPlanvolumn: null,
  2215. fQty: null,
  2216. fGrossweight: null,
  2217. fNetweight: null,
  2218. fVolumn: null,
  2219. fTrademodeid: null,
  2220. fSbu: null,
  2221. fFeetunit: null,
  2222. fMblno: null,
  2223. fVslvoy: null,
  2224. fEta: null,
  2225. fCustomno: null,
  2226. fIfweigh: null,
  2227. fIfpledge: null,
  2228. fIfdamage: null,
  2229. fBankcorpid: null,
  2230. fBilltype: null,
  2231. fBillstatus: null,
  2232. fCreateby: null,
  2233. fCreatetime: null,
  2234. fGoodsid: null,
  2235. fCntrtype: null,
  2236. fCntqty: null
  2237. },
  2238. // 日期区间
  2239. orgStorageDate: null,
  2240. // 表单参数
  2241. form: {
  2242. fFeetunit:"2"
  2243. },
  2244. // 库存总账参数
  2245. whgenlegParams: {
  2246. pageNum: 1,
  2247. pageSize: 10,
  2248. fMblno: null,
  2249. fCorpid: null,
  2250. fWarehouseid: null,
  2251. fTrademodeid: null,
  2252. orgStorageDate: null
  2253. },
  2254. // 库存总账表
  2255. whgenlegList: [],
  2256. whgenlegTotal: 0,
  2257. // 弹窗库存总账数据
  2258. dialogWhgenlegList: [],
  2259. // 库存总账对话框
  2260. whgenlegVisible: false,
  2261. // 表单校验
  2262. rules: {
  2263. fBsdeptid: [{ required: true, message: ' ', trigger: 'blur' }],
  2264. fCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  2265. fBsdate: [{ required: true, message: ' ', trigger: 'blur' }],
  2266. fFeetunit: [{ required: true, message: ' ', trigger: 'blur' }],
  2267. fChargedate: [{ required: true, message: ' ', trigger: 'blur' }],
  2268. fTrademodeid: [{ required: true, message: ' ', trigger: 'blur' }],
  2269. fSbu: [{ required: true, message: ' ', trigger: 'blur' }],
  2270. fStorekeeper: {
  2271. required: true,
  2272. message: ' ',
  2273. trigger: 'blur'
  2274. },
  2275. fWarehouseid: [{ required: true, message: ' ', trigger: 'blur' }],
  2276. fbillingway: [
  2277. {
  2278. required: true,
  2279. message: ' ',
  2280. trigger: 'blur'
  2281. }
  2282. ],
  2283. fTocorpid: [
  2284. {
  2285. required: true,
  2286. message: ' ',
  2287. trigger: 'blur'
  2288. }
  2289. ]
  2290. }
  2291. }
  2292. },
  2293. created() {
  2294. this.getList()
  2295. this.getDicts('tax_rate').then((response) => {
  2296. this.fTaxrate = response.data[0].dictValue
  2297. })
  2298. this.getDicts('data_trademodes').then((response) => {
  2299. this.fTrademodeidOptions = response.data
  2300. })
  2301. this.getDicts("storage_type").then((response) => {
  2302. this.fStorageTypeOptions = response.data;
  2303. });
  2304. this.getDicts('data_stltype_type').then((response) => {
  2305. this.fStltypeOptions = response.data
  2306. })
  2307. this.getDicts('data_ifweigh_status').then((response) => {
  2308. this.fIfweighOptions = response.data
  2309. })
  2310. this.getDicts('data_ifpledge_status').then((response) => {
  2311. this.fIfpledgeOptions = response.data
  2312. })
  2313. this.getDicts('data_ifdamage_status').then((response) => {
  2314. this.fIfdamageOptions = response.data
  2315. })
  2316. this.getDicts('data_billtype_type').then((response) => {
  2317. this.fBilltypeOptions = response.data
  2318. })
  2319. this.getDicts('sys_common_status').then((response) => {
  2320. this.fBillstatusOptions = response.data
  2321. })
  2322. this.getDicts('data_unitfees').then((response) => {
  2323. this.fFeetunitOptions = response.data
  2324. })
  2325. this.getDicts("data_stltype_type").then(response => {
  2326. this.fStltypeidOptions = response.data;
  2327. });
  2328. treeselect().then(response => {
  2329. this.fWarehouseidOption = response.data
  2330. })
  2331. this.register()
  2332. this.warehousesssMethod()
  2333. this.getRow();
  2334. let queryParams = { pageNum: 1, fDc:'C'};
  2335. listFees(queryParams).then((response) => {
  2336. this.fCNameOptions = response.rows;
  2337. });
  2338. let query = { pageNum: 1, fDc:'D'};
  2339. listFees(query).then((response) => {
  2340. this.fDNameOptions = response.rows;
  2341. });
  2342. },
  2343. activated(){
  2344. this.Jump()
  2345. },
  2346. methods: {
  2347. full(){
  2348. this.dialogFull = !this.dialogFull
  2349. },
  2350. //列设置全选
  2351. allChecked() {
  2352. if (this.allCheck == true) {
  2353. this.setRowList.map((e) => {
  2354. return (e.checked = 0);
  2355. });
  2356. } else {
  2357. this.setRowList.map((e) => {
  2358. return (e.checked = 1);
  2359. });
  2360. }
  2361. },
  2362. //查询列数据
  2363. getRow() {
  2364. let that = this;
  2365. this.data = {
  2366. tableName: "货转",
  2367. userId: Cookies.get("userName"),
  2368. };
  2369. select(this.data).then((res) => {
  2370. if (res.data.length != 0) {
  2371. this.getRowList = res.data.filter((e) => e.checked == 0);
  2372. this.setRowList = res.data;
  2373. this.setRowList = this.setRowList.reduce((res, item) => {
  2374. res.push({
  2375. surface: item.surface,
  2376. label: item.label,
  2377. name: item.name,
  2378. checked: item.checked,
  2379. width: item.width,
  2380. });
  2381. return res;
  2382. }, []);
  2383. }
  2384. });
  2385. },
  2386. //保存列设置
  2387. save() {
  2388. this.showSetting = false;
  2389. this.data = {
  2390. tableName: "货转",
  2391. userId: Cookies.get("userName"),
  2392. sysTableSetList: this.setRowList,
  2393. };
  2394. addSet(this.data).then((res) => {
  2395. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  2396. });
  2397. },
  2398. //开始拖拽事件
  2399. onStart() {
  2400. this.drag = true;
  2401. },
  2402. //拖拽结束事件
  2403. onEnd() {
  2404. this.drag = false;
  2405. },
  2406. deleteFile(scope){
  2407. this.relevantAttachments[scope.$index].fName = ''
  2408. this.relevantAttachments[scope.$index].fUrl = ''
  2409. this.$message.success("删除成功")
  2410. },
  2411. checkFile(scope){
  2412. if(this.relevantAttachments[scope.$index].fUrl){
  2413. window.open(this.relevantAttachments[scope.$index].fUrl)
  2414. }else{
  2415. this.$message.error("请上传附件")
  2416. }
  2417. },
  2418. handleSucces(scope,res,file){
  2419. this.relevantAttachments[scope.$index].fName = res.fileName
  2420. this.relevantAttachments[scope.$index].fUrl = res.url
  2421. if(this.relevantAttachments[scope.$index].fUrl === ''){
  2422. this.$message.error('上传失败')
  2423. }
  2424. },
  2425. //合计
  2426. getSum(param){
  2427. const { columns, data } = param
  2428. const sums = []
  2429. columns.forEach((column, index) => {
  2430. if (index === 0) {
  2431. sums[index] = '总计'
  2432. } else if ( index ===13 || index ===11 || index ===12 ) {
  2433. const values = data.map(item => Number(item[column.property]))
  2434. if (!values.every(value => isNaN(value))) {
  2435. sums[index] = values.reduce((prev, curr) => {
  2436. const value = Number(curr)
  2437. if (!isNaN(value)) {
  2438. return prev + curr
  2439. } else {
  2440. return prev
  2441. }
  2442. }, 0)
  2443. if(index ===13 || index ===12){
  2444. sums[index] = (sums[index]/1000).toFixed(2) + '(吨)'
  2445. }
  2446. }
  2447. }
  2448. })
  2449. return sums
  2450. },
  2451. /** 查询部门下拉树结构 */
  2452. treeseLect(tree){
  2453. this.queryParams.fWarehouselocid = tree.id
  2454. },
  2455. getTreeselect() {
  2456. treeselect().then(response => {
  2457. this.warehousesOptions = response.data;
  2458. });
  2459. },
  2460. // 撤销审核
  2461. backrRconciliation(){
  2462. this.form.fBillstatus = '1'
  2463. backFee(this.form.fId).then(response=>{
  2464. this.msgSuccess("撤回成功")
  2465. this.getList()
  2466. this.open = false
  2467. this.getList()
  2468. })
  2469. },
  2470. // 默认录入人
  2471. register() {
  2472. queryUserVal().then((response)=>{
  2473. this.Lander = response.user.userName
  2474. })
  2475. },
  2476. // 审批按钮
  2477. goApproval(){
  2478. this.addOrUpdateVisib = true
  2479. this.$nextTick(() => {
  2480. this.$refs.ApprovalComments.init(this.form.fId,this.goodsTransferId)
  2481. })
  2482. },
  2483. Jump(){
  2484. this.approval = this.$route.query.data
  2485. if(this.approval){
  2486. this.getTreeselect()
  2487. this.reset()
  2488. this.colseButton = false
  2489. this.approval = JSON.parse(this.approval)
  2490. this.hide = false
  2491. this.open = true
  2492. this.browseStatus = true
  2493. this.notChange = true
  2494. this.approve = true
  2495. this.disappear = true
  2496. this.cancelButton = false
  2497. getGoodsTransfer(this.approval.billId).then((response) => {
  2498. if (response.data.warehousebills) {
  2499. this.form = response.data.warehousebills;
  2500. if (this.form.fBillstatus > 2) {
  2501. this.approvalStatus = false;
  2502. } else {
  2503. this.approvalStatus = true;
  2504. }
  2505. }
  2506. this.form = response.data.warehousebills
  2507. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2508. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2509. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2510. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2511. this.fMblnoOptions = response.data.corps
  2512. this.KHblnoOptions = response.data.corps
  2513. this.fWbuOptions = response.data.feesList
  2514. this.warehouseOptions = response.data.warehouse
  2515. this.dataList = response.data.warehouseBillsItem
  2516. for (let list in this.dataList) {
  2517. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2518. this.formBrowseStatus = true
  2519. }
  2520. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2521. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2522. }
  2523. this.goodsOptions = response.data.goodsList
  2524. if (response.data.warehousebillsfeesDr) {
  2525. this.warehouseDrList = response.data.warehousebillsfeesDr
  2526. for (let dr in this.warehouseDrList) {
  2527. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  2528. }
  2529. }
  2530. if (response.data.warehousebillsfeesCr) {
  2531. this.warehouseCrList = response.data.warehousebillsfeesCr
  2532. for (let cr in this.warehouseCrList) {
  2533. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  2534. }
  2535. }
  2536. if (response.data.enclosures) {
  2537. this.relevantAttachments = response.data.enclosures;
  2538. }
  2539. this.userOptions = response.data.sysUser
  2540. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2541. this.open = true
  2542. this.title = '修改货存转移'
  2543. })
  2544. }
  2545. },
  2546. homepaGe(){
  2547. let view = {
  2548. fullPath: "/business/goodsTransfer",
  2549. hash: "",
  2550. matched: Array(2),
  2551. meta: Object,
  2552. name: "GoodsTransfer",
  2553. params: Object,
  2554. path: "/business/goodsTransfer",
  2555. query: Object,
  2556. title: "货转"
  2557. }
  2558. this.$router.push({ path: '/index'})
  2559. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2560. if (this.isActive(view)) {
  2561. this.toLastView(visitedViews, view)
  2562. }
  2563. })
  2564. Global.$emit("removeCache", "closeSelectedTag", view);
  2565. },
  2566. homePage() {
  2567. this.open = false
  2568. let view = {
  2569. fullPath: "/business/goodsTransfer",
  2570. hash: "",
  2571. matched: Array(2),
  2572. meta: Object,
  2573. name: "GoodsTransfer",
  2574. params: Object,
  2575. path: "/business/goodsTransfer",
  2576. query: Object,
  2577. title: "货转"
  2578. }
  2579. this.$router.push({ path: '/index' })
  2580. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2581. if (this.isActive(view)) {
  2582. this.toLastView(visitedViews, view)
  2583. }
  2584. })
  2585. Global.$emit("removeCache", "closeSelectedTag", view);
  2586. },
  2587. // 撤销审批
  2588. backApproval(){
  2589. let data = {
  2590. id:this.form.fId,
  2591. actId:this.goodsTransferId,
  2592. billId:this.form.fId
  2593. }
  2594. RevocationApproval(data).then(response => {
  2595. this.msgSuccess("撤销审批成功")
  2596. this.disappear = true
  2597. this.open = false
  2598. this.getList()
  2599. })
  2600. },
  2601. returnData(){
  2602. this.addOrUpdateVisib = false
  2603. this.open = false
  2604. this.homepaGe()
  2605. },
  2606. getDataList(){
  2607. this.addOrUpdateVisible = false
  2608. },
  2609. // 查看审批流
  2610. addOrUpdateHandle(){
  2611. this.addOrUpdateVisible = true
  2612. this.addOrUpdateVisib = false
  2613. let id = '448'
  2614. let actId = '110'
  2615. this.$nextTick(() => {
  2616. this.$refs.addOrUpdate.init(this.form.fId,this.goodsTransferId)
  2617. })
  2618. },
  2619. // 上传成功返回数据
  2620. showFile(row) {
  2621. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  2622. this.$set(this.relevantAttachments[0], 'fUrl', row.url)
  2623. },
  2624. printSomething() {
  2625. // 此处的style即为打印时的样式
  2626. const style =
  2627. '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
  2628. print({
  2629. printable: 'print_area',
  2630. type: 'html',
  2631. style: style, // 亦可使用引入的外部css;
  2632. scanStyles: false
  2633. })
  2634. },
  2635. // 新增附件上传
  2636. addRelevt() {
  2637. this.relevantAttachments.push({
  2638. fUrl: null,
  2639. fName: null,
  2640. createBy: this.form.createBy,
  2641. createTime: Date.parse(new Date())
  2642. })
  2643. },
  2644. // 添加list
  2645. addRelevant() {
  2646. this.$refs['form'].validate((valid) => {
  2647. if (valid) {
  2648. if (!this.form.fCorpid || !this.form.fTrademodeid || !this.form.fWarehouseid) {
  2649. this.$message({ message: '请维护货权方、贸易方式、仓库', type: 'warning' })
  2650. return false
  2651. }
  2652. this.whgenlegList = []
  2653. this.dialogWhgenlegList = []
  2654. this.whgenlegTotal = 0
  2655. this.whgenlegVisible = true
  2656. this.getWhgenlegList()
  2657. }
  2658. })
  2659. },
  2660. // 查询库存总账信息
  2661. getWhgenlegList() {
  2662. this.whgenlegParams.fMblno = this.form.fMblno
  2663. this.whgenlegParams.fCorpid = this.form.fCorpid
  2664. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  2665. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  2666. this.whgenlegParams.orgStorageDate = this.orgStorageDate
  2667. listWhgenleg(this.whgenlegParams).then((response) => {
  2668. this.whgenlegList = response.rows
  2669. this.whgenlegTotal = response.total
  2670. })
  2671. },
  2672. // 库存总账多选框
  2673. whgenlegSelectionChange(selection) {
  2674. this.dialogWhgenlegList = selection
  2675. },
  2676. // 库存总账导出数据
  2677. whgenlegData() {
  2678. if (this.dialogWhgenlegList.length === 0) {
  2679. this.$message({ message: '未勾选信息', type: 'warning' })
  2680. return false
  2681. }
  2682. setTimeout(() => {
  2683. for (let whgen in this.dialogWhgenlegList) {
  2684. this.dataList.push({
  2685. fBsdate:this.form.fBsdate,
  2686. fId: null,
  2687. fQty: 0,
  2688. fCntqty: 1,
  2689. remark: null,
  2690. fGoodsval: 0,
  2691. fNetweight: 0,
  2692. fBillstatus: 1,
  2693. fGrossweight: 0,
  2694. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2695. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  2696. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  2697. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2698. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  2699. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2700. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  2701. fWarehouseInformation: this.dialogWhgenlegList[whgen].fWarehouseids,
  2702. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  2703. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  2704. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  2705. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  2706. fBusinessType: this.dialogWhgenlegList[whgen].fBusinessType + '',
  2707. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  2708. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2709. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids
  2710. })
  2711. }
  2712. }, 100)
  2713. setTimeout(() => {
  2714. this.updateDeduplication()
  2715. }, 300)
  2716. this.whgenlegVisible = false
  2717. },
  2718. // 更新主表品牌、品名并去重
  2719. updateDeduplication: function() {
  2720. if (this.dataList.length === 0) {
  2721. return false
  2722. }
  2723. let fMarks = []
  2724. let fProductName = []
  2725. let fMblno = []
  2726. for (let li in this.dataList) {
  2727. fMarks.push(this.dataList[li].fMarks)
  2728. fProductName.push(this.dataList[li].fGoodsids)
  2729. fMblno.push(this.dataList[li].fMblno)
  2730. }
  2731. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  2732. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  2733. this.$set(this.form, 'fMblno', Array.from(new Set(fMblno)).join(","))
  2734. },
  2735. // 收货单打印界面
  2736. showEditDialog_s() {
  2737. this.editDialogVisible_s = true
  2738. },
  2739. showEditDialog_ss() {
  2740. this.editDialogVisible_ss = true
  2741. },
  2742. // 收款信息
  2743. addCollection() {
  2744. this.$refs['form'].validate((valid) => {
  2745. if (valid) {
  2746. // 获取明细件数
  2747. let fQty = 0;
  2748. for (let li in this.dataList) {
  2749. if (this.dataList[li].fQty) {
  2750. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2751. }
  2752. }
  2753. this.warehouseDrList.push({
  2754. fCorpid: null,
  2755. fFeeid: null,
  2756. fFeeunitid: "1",
  2757. fQty: fQty,
  2758. fUnitprice: 0,
  2759. fAmount: 0,
  2760. fCurrency: null,
  2761. fCxrate: null,
  2762. fTaxrate: this.fTaxrate,
  2763. fRate: null,
  2764. remarks: null,
  2765. fMblno: this.form.fMblno,
  2766. fProductName: this.form.fProductName,
  2767. fMarks: this.form.fMarks
  2768. })
  2769. let queryParams = { pageNum: 1, fDc: 'D' }
  2770. listFees(queryParams).then((response) => {
  2771. this.fDNameOptions = response.rows;
  2772. })
  2773. }
  2774. })
  2775. },
  2776. addpayment() {
  2777. this.$refs['form'].validate((valid) => {
  2778. if (valid) {
  2779. // 获取明细件数
  2780. let fQty = 0;
  2781. for (let li in this.dataList) {
  2782. if (this.dataList[li].fQty) {
  2783. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2784. }
  2785. }
  2786. this.warehouseCrList.push({
  2787. fCorpid: null,
  2788. fFeeid: null,
  2789. fFeeunitid: "1",
  2790. fQty: fQty,
  2791. fUnitprice: 0,
  2792. fAmount: 0,
  2793. fCurrency: null,
  2794. fTaxrate: this.fTaxrate,
  2795. fCxrate: null,
  2796. fRate: null,
  2797. remarks: null,
  2798. fMblno: this.form.fMblno,
  2799. fProductName: this.form.fProductName,
  2800. fMarks: this.form.fMarks
  2801. })
  2802. let queryParams = { pageNum: 1, fDc: 'C' }
  2803. listFees(queryParams).then((response) => {
  2804. this.fCNameOptions = response.rows;
  2805. })
  2806. }
  2807. })
  2808. },
  2809. queryUser() {
  2810. queryUserVal().then((response) => {
  2811. if (response.user !== null) {
  2812. this.userVal = response.user
  2813. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  2814. this.$set(this.form, 'createBy', this.userVal.userName)
  2815. this.$set(this.form,"fStorekeeper",this.userVal.userName)
  2816. this.$set(this.form, 'fTrademodeid', '1')
  2817. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  2818. this.$set(this.form, 'createTime', Date.parse(new Date()))
  2819. }
  2820. })
  2821. },
  2822. /** 查询仓库主(出入库)列表 */
  2823. getList() {
  2824. this.loading = true
  2825. listGoodsTransfer(this.queryParams).then((response) => {
  2826. console.log(response)
  2827. this.goodsTransferList = response.rows
  2828. this.total = response.total
  2829. this.loading = false
  2830. })
  2831. },
  2832. /* 获取所有仓库信息 */
  2833. warehousesssMethod() {
  2834. let queryParams = { pageNum: 1, fStatus: 0, delFlag: 0 };
  2835. listWarehousesss(queryParams).then((response) => {
  2836. this.warehouseOptions = response.rows;
  2837. });
  2838. },
  2839. /* 远程模糊查询库区 */
  2840. kqhouseRemoteMethod(name) {
  2841. if (name == null || name === '') {
  2842. return false
  2843. }
  2844. if (!this.form.fWarehouseid) {
  2845. this.$message.error('请输入仓库!')
  2846. return false
  2847. }
  2848. let queryParams = {
  2849. pageNum: 1,
  2850. fWarehouseid: this.form.fWarehouseid,
  2851. fName: name
  2852. }
  2853. listArea(queryParams).then((response) => {
  2854. this.kqhouseOptions = response.rows
  2855. })
  2856. },
  2857. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  2858. fTrademodeidFormat(row, column) {
  2859. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid)
  2860. },
  2861. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2862. fIfweighFormat(row, column) {
  2863. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh)
  2864. },
  2865. // 编号字典翻译
  2866. fStltypeidFormat(row, column) {
  2867. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid)
  2868. },
  2869. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2870. fIfpledgeFormat(row, column) {
  2871. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge)
  2872. },
  2873. // 是否破损(数据字典),默认F否则T字典翻译
  2874. fIfdamageFormat(row, column) {
  2875. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage)
  2876. },
  2877. // 单据类型(数据字典)SJRK字典翻译
  2878. fBilltypeFormat(row, column) {
  2879. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype)
  2880. },
  2881. // 状态(数据字典),N 入字典翻译
  2882. fBillstatusFormat(row, column) {
  2883. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus)
  2884. },
  2885. // 取消按钮
  2886. cancel() {
  2887. this.reset()
  2888. this.open = false
  2889. this.getList()
  2890. },
  2891. // 表单重置
  2892. reset() {
  2893. this.disappear = false
  2894. this.addOrUpdateVisible = false
  2895. this.addOrUpdateVisib = false
  2896. this.approve = false
  2897. this.formBrowseStatus = false
  2898. this.detailsHidden = false
  2899. this.notChange = false
  2900. this.browseStatus = false
  2901. this.whgenlegVisible = false
  2902. this.editDialogVisible_ss = false
  2903. this.editDialogVisible_s = false
  2904. this.dataList = []
  2905. this.fWbuOptions = []
  2906. this.fWbuOptions = []
  2907. this.resetForm('form')
  2908. this.fMblnoOptions = []
  2909. this.KHblnoOptions = []
  2910. this.KHblnoOptions = []
  2911. this.warehouseDrList = []
  2912. this.warehouseCrList = []
  2913. this.warehouseOptions = []
  2914. this.relevantAttachments = []
  2915. this.form = {
  2916. fCorpid:null,
  2917. fTocorpid:null,
  2918. fBillno:null,
  2919. fBsdate:null,
  2920. fChargedate:null,
  2921. fStltypeid:null,
  2922. fTrademodeid:null,
  2923. fMblno:null,
  2924. fFeetunit: '2',
  2925. fOriginalbillno:null,
  2926. orgStorageDate:null,
  2927. fMarks:null,
  2928. fProductName:null,
  2929. formBrowseStatus:'1'
  2930. }
  2931. },
  2932. /** 搜索按钮操作 */
  2933. handleQuery() {
  2934. this.queryParams.pageNum = 1
  2935. this.getList()
  2936. },
  2937. /** 重置按钮操作 */
  2938. resetQuery() {
  2939. this.queryParams = {
  2940. fBillno:null,
  2941. createBy:null,
  2942. timeInterval:null,
  2943. fTrademodeid:null,
  2944. fCorpid:null,
  2945. fMblno:null,
  2946. fSbu:null,
  2947. fGoodsid:null,
  2948. fWarehouseid:null,
  2949. fMarks:null,
  2950. fBillstatus:null
  2951. }
  2952. this.resetForm('queryForm')
  2953. this.handleQuery()
  2954. },
  2955. // 多选框选中数据
  2956. handleSelectionChange(selection) {
  2957. this.ids = selection.map((item) => item.fId)
  2958. this.idCopy = this.ids[0]
  2959. this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4
  2960. this.multiple = !selection.length
  2961. },
  2962. /** 新增按钮操作 */
  2963. handleAdd() {
  2964. this.reset()
  2965. this.notChange = false
  2966. this.browseStatus = false
  2967. this.queryUser()
  2968. this.warehousesssMethod()
  2969. this.open = true
  2970. this.dataList = []
  2971. this.warehouseCrList = []
  2972. this.warehouseDrList = []
  2973. this.relevantAttachments = []
  2974. this.title = '货权转移'
  2975. },
  2976. check_s(row) {
  2977. let queryParams = { pageNum: 1, fDc:'C'};
  2978. listFees(queryParams).then((response) => {
  2979. this.fCNameOptions = response.rows;
  2980. });
  2981. let query = { pageNum: 1, fDc:'D'};
  2982. listFees(query).then((response) => {
  2983. this.fDNameOptions = response.rows;
  2984. });
  2985. this.disappear = true
  2986. this.notChange = true
  2987. this.browseStatus = true
  2988. const fId = row.fId || this.ids
  2989. getGoodsTransfer(fId).then((response) => {
  2990. this.Operator = response.data.corps[0].createBy
  2991. this.form = response.data.warehousebills
  2992. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2993. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2994. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2995. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2996. this.fMblnoOptions = response.data.corps
  2997. this.KHblnoOptions = response.data.corps
  2998. this.fWbuOptions = response.data.feesList
  2999. this.warehouseOptions = response.data.warehouse
  3000. this.dataList = response.data.warehouseBillsItem
  3001. for (let list in this.dataList) {
  3002. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  3003. this.formBrowseStatus = true
  3004. }
  3005. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  3006. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  3007. }
  3008. this.goodsOptions = response.data.goodsList
  3009. if (response.data.warehousebillsfeesDr) {
  3010. this.warehouseDrList = response.data.warehousebillsfeesDr
  3011. for (let dr in this.warehouseDrList) {
  3012. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  3013. }
  3014. }
  3015. if (response.data.warehousebillsfeesCr) {
  3016. this.warehouseCrList = response.data.warehousebillsfeesCr
  3017. for (let cr in this.warehouseCrList) {
  3018. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  3019. }
  3020. }
  3021. if (response.data.enclosures) {
  3022. this.relevantAttachments = response.data.enclosures;
  3023. }
  3024. this.userOptions = response.data.sysUser
  3025. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3026. this.open = true
  3027. this.title = '修改货存转移'
  3028. })
  3029. },
  3030. // 查看按钮
  3031. check(row) {
  3032. let queryParams = { pageNum: 1, fDc:'C'};
  3033. listFees(queryParams).then((response) => {
  3034. this.fCNameOptions = response.rows;
  3035. });
  3036. let query = { pageNum: 1, fDc:'D'};
  3037. listFees(query).then((response) => {
  3038. this.fDNameOptions = response.rows;
  3039. });
  3040. this.disappear = false
  3041. this.notChange = true
  3042. this.browseStatus = true
  3043. const fId = row.fId || this.ids
  3044. getGoodsTransfer(fId).then((response) => {
  3045. this.Operator = response.data.corps[0].createBy
  3046. this.form = response.data.warehousebills
  3047. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3048. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3049. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3050. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3051. this.fMblnoOptions = response.data.corps
  3052. this.KHblnoOptions = response.data.corps
  3053. this.fWbuOptions = response.data.feesList
  3054. this.warehouseOptions = response.data.warehouse
  3055. this.dataList = response.data.warehouseBillsItem
  3056. for (let list in this.dataList) {
  3057. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  3058. this.formBrowseStatus = true
  3059. }
  3060. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  3061. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  3062. }
  3063. this.goodsOptions = response.data.goodsList
  3064. if (response.data.warehousebillsfeesDr) {
  3065. this.warehouseDrList = response.data.warehousebillsfeesDr
  3066. for (let dr in this.warehouseDrList) {
  3067. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  3068. }
  3069. }
  3070. if (response.data.warehousebillsfeesCr) {
  3071. this.warehouseCrList = response.data.warehousebillsfeesCr
  3072. for (let cr in this.warehouseCrList) {
  3073. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  3074. }
  3075. }
  3076. if (response.data.enclosures) {
  3077. this.relevantAttachments = response.data.enclosures;
  3078. }
  3079. this.userOptions = response.data.sysUser
  3080. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3081. this.open = true
  3082. this.title = '修改货存转移'
  3083. })
  3084. },
  3085. /** 修改按钮操作 */
  3086. handleUpdate(row, status) {
  3087. if(status === 2){
  3088. this.goodsRemoteMethod()
  3089. getGoodsTransfer(this.idCopy).then((response) => {
  3090. if (response.data.warehousebills) {
  3091. this.form = response.data.warehousebills
  3092. queryUserVal().then((response) => {
  3093. this.Lander = response.user.userName
  3094. this.form.fStorekeeper = response.user.nickName
  3095. this.form.createBy = response.user.userName
  3096. this.Operator = this.form.createBy
  3097. })
  3098. this.form.fId = null
  3099. this.form.fBillstatus = 1
  3100. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3101. this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
  3102. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3103. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3104. this.$set(this.form, "fBillno", null);
  3105. }
  3106. this.fMblnoOptions = response.data.corps
  3107. this.KHblnoOptions = response.data.corps
  3108. this.fWbuOptions = response.data.feesList
  3109. this.warehouseOptions = response.data.warehouse
  3110. this.dataList = response.data.warehouseBillsItem
  3111. for (let list in this.dataList) {
  3112. // if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  3113. // this.formBrowseStatus = true
  3114. // }
  3115. this.$set(this.dataList[list], 'fBillstatus', 1)
  3116. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  3117. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  3118. this.$set(this.dataList[list], 'fId', null)
  3119. }
  3120. this.goodsOptions = response.data.goodsList
  3121. if (response.data.warehousebillsfeesDr) {
  3122. this.warehouseDrList = response.data.warehousebillsfeesDr
  3123. for (let dr in this.warehouseDrList) {
  3124. this.$set(this.warehouseDrList[dr], "fBillstatus", 1);
  3125. this.$set(this.warehouseDrList[dr], "fId", null);
  3126. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  3127. }
  3128. }
  3129. if (response.data.warehousebillsfeesCr) {
  3130. this.warehouseCrList = response.data.warehousebillsfeesCr
  3131. for (let cr in this.warehouseCrList) {
  3132. this.$set(this.warehouseCrList[cr], "fBillstatus", 1);
  3133. this.$set(this.warehouseCrList[cr], "fId", null);
  3134. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  3135. }
  3136. }
  3137. if (response.data.enclosures) {
  3138. this.relevantAttachments = response.data.enclosures;
  3139. }
  3140. this.userOptions = response.data.sysUser
  3141. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3142. this.open = true
  3143. this.title = '修改货存转移'
  3144. this.warehousesssMethod()
  3145. })
  3146. }else {
  3147. this.reset()
  3148. this.notChange = false
  3149. this.browseStatus = status
  3150. const fId = row.fId || this.ids
  3151. getGoodsTransfer(fId).then((response) => {
  3152. this.form = response.data.warehousebills
  3153. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3154. this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
  3155. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3156. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3157. this.fMblnoOptions = response.data.corps
  3158. this.KHblnoOptions = response.data.corps
  3159. this.fWbuOptions = response.data.feesList
  3160. this.warehouseOptions = response.data.warehouse
  3161. this.dataList = response.data.warehouseBillsItem
  3162. for (let list in this.dataList) {
  3163. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  3164. this.formBrowseStatus = true
  3165. }
  3166. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  3167. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  3168. }
  3169. this.goodsOptions = response.data.goodsList
  3170. if (response.data.warehousebillsfeesDr) {
  3171. this.warehouseDrList = response.data.warehousebillsfeesDr
  3172. for (let dr in this.warehouseDrList) {
  3173. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  3174. }
  3175. }
  3176. if (response.data.warehousebillsfeesCr) {
  3177. this.warehouseCrList = response.data.warehousebillsfeesCr
  3178. for (let cr in this.warehouseCrList) {
  3179. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  3180. }
  3181. }
  3182. if (response.data.enclosures) {
  3183. this.relevantAttachments = response.data.enclosures;
  3184. }
  3185. this.userOptions = response.data.sysUser
  3186. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3187. this.open = true
  3188. this.title = '修改货存转移'
  3189. this.warehousesssMethod()
  3190. })
  3191. }
  3192. },
  3193. // 库存明细合计
  3194. getSummaries(param) {
  3195. const { columns, data } = param
  3196. const sums = []
  3197. var values = []
  3198. columns.forEach((column, index) => {
  3199. if (index === 0) {
  3200. sums[index] = ''
  3201. return
  3202. }
  3203. if (column.property === 'fPlanqty') {
  3204. values = data.map((item) => Number(item['fPlanqty']))
  3205. }
  3206. if (column.property === 'fPlangrossweight') {
  3207. values = data.map((item) => Number(item['fPlangrossweight']))
  3208. }
  3209. if (column.property === 'fPlannetweight') {
  3210. values = data.map((item) => Number(item['fPlannetweight']))
  3211. }
  3212. if (column.property === 'fQty') {
  3213. values = data.map((item) => Number(item['fQty']))
  3214. }
  3215. if (column.property === 'fGrossweight') {
  3216. values = data.map((item) => Number(item['fGrossweight']))
  3217. }
  3218. if (column.property === 'fNetweight') {
  3219. values = data.map((item) => Number(item['fNetweight']))
  3220. }
  3221. if (column.property === 'fCntqty') {
  3222. values = data.map((item) => Number(item['fCntqty']))
  3223. } // const values = data.map(item => Number(item[column.property]))
  3224. if (
  3225. column.property === 'fPlanqty' ||
  3226. column.property === 'fPlangrossweight' ||
  3227. column.property === 'fPlannetweight' ||
  3228. column.property === 'fQty' ||
  3229. column.property === 'fGrossweight' ||
  3230. column.property === 'fCntqty' ||
  3231. column.property === 'fNetweight'
  3232. ) {
  3233. sums[index] = values.reduce((prev, curr) => {
  3234. const value = Number(curr)
  3235. if (!isNaN(value)) {
  3236. if (column.property === 'fGrossweight') {
  3237. this.form.fGrossweight = prev + curr
  3238. }
  3239. if (column.property === 'fQty') {
  3240. this.form.fQty = prev + curr
  3241. }
  3242. if (column.property === 'fCntqty') {
  3243. this.form.fCntqty = prev + curr
  3244. }
  3245. if (column.property === 'fNetweight') {
  3246. this.form.fNetweight = prev + curr
  3247. }
  3248. return prev + curr
  3249. } else {
  3250. return prev
  3251. }
  3252. }, 0) // sums[index]
  3253. }
  3254. })
  3255. this.sums = sums
  3256. return sums
  3257. },
  3258. // 入账
  3259. creditClick() {
  3260. if (this.dataList.length === 0) {
  3261. this.$message({ message: '未找到货转明细', type: 'warning' })
  3262. return false
  3263. }
  3264. for (let dataSelection in this.dataListSelection) {
  3265. if (!this.dataListSelection[dataSelection].fId) {
  3266. this.$message({ message: '请先点击保存,在进行货转确认', type: 'warning' })
  3267. return false
  3268. }
  3269. }
  3270. this.$refs['form'].validate((valid) => {
  3271. if (valid) {
  3272. for (let li in this.dataList) {
  3273. if(this.form.fFeetunit > 3){
  3274. this.$message.error('请维护主表计费单位为件数、毛重(kg)或净重(kg)')
  3275. return false
  3276. }
  3277. if (!this.dataList[li].fWarehouselocid) {
  3278. this.$message({ message: '请维护第' + Number(li) + 1 + '行库区', type: 'warning' })
  3279. return false
  3280. }
  3281. if (!this.dataList[li].fQty) {
  3282. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转件数', type: 'warning' })
  3283. return false
  3284. }
  3285. if (!this.dataList[li].fGrossweight) {
  3286. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转毛重(kg)', type: 'warning' })
  3287. return false
  3288. }
  3289. if (!this.dataList[li].fNetweight) {
  3290. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转净重(kg)', type: 'warning' })
  3291. return false
  3292. }
  3293. if (!this.dataList[li].fPackagespecs) {
  3294. this.$message({ message: '请维护第' + Number(li) + 1 + '行货包装规格', type: 'warning' })
  3295. return false
  3296. }
  3297. }
  3298. let formData = new window.FormData()
  3299. formData.append("warehouseBills", JSON.stringify(this.form));
  3300. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3301. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3302. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3303. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3304. addWhgenleg(formData).then((response) => {
  3305. this.$refs.tableListRef.clearSelection()
  3306. this.msgSuccess('入账成功')
  3307. let item = response.data.warehouseItem
  3308. for (let li in this.dataList) {
  3309. for (let ite in item) {
  3310. if (this.dataList[li].fId === item[ite].fId) {
  3311. this.$set(this.dataList[li], 'fBillstatus', 6)
  3312. }
  3313. }
  3314. }
  3315. this.formBrowseStatus = true
  3316. this.$refs['form'].validate((valid) => {
  3317. if (this.form.fCorpid === this.form.fTocorpid) {
  3318. this.$message.error('新货权方不得与货权方一致')
  3319. return false
  3320. }
  3321. // if (this.dataList.length === 0) {
  3322. // this.$message.error('请添加库存明细!')
  3323. // return false
  3324. // }
  3325. this.updateDeduplication()
  3326. for (let list in this.dataList) {
  3327. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  3328. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  3329. return false
  3330. }
  3331. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  3332. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重(kg)!')
  3333. return false
  3334. }
  3335. }
  3336. if (valid) {
  3337. this.form.fBillstatus = 2
  3338. let formData = new window.FormData()
  3339. formData.append("warehouseBills", JSON.stringify(this.form));
  3340. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3341. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3342. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3343. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3344. addGoodsTransfer(formData).then((response) => {
  3345. this.form = response.data.warehouseBills
  3346. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3347. this.$set(this.form, 'fFeetunit',this.form.fFeetunit + '')
  3348. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3349. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3350. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3351. this.dataList = response.data.warehousebillsitems
  3352. for (let li in this.dataList) {
  3353. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  3354. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  3355. }
  3356. })
  3357. }
  3358. })
  3359. })
  3360. }
  3361. })
  3362. },
  3363. // 撤回货转
  3364. withdrawClick() {
  3365. // 撤回货转
  3366. let formData = new window.FormData()
  3367. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  3368. formData.append("warehouseBills", JSON.stringify(this.form));
  3369. formData.append("warehousebillsitems", JSON.stringify(withdrawList));
  3370. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3371. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3372. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3373. updateCredit(formData).then((response) => {
  3374. this.fid = response.data
  3375. this.formBrowseStatus = false
  3376. this.msgSuccess('撤销入账成功')
  3377. this.$refs.tableListRef.clearSelection()
  3378. let mun = 0;
  3379. for (let i in this.dataList) {
  3380. for (let li in withdrawList) {
  3381. if (withdrawList[li].fId === this.dataList[i].fId) {
  3382. this.$set(this.dataList[i], 'fBillstatus', 1)
  3383. }
  3384. }
  3385. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus === 6) {
  3386. mun ++;
  3387. }
  3388. }
  3389. if (mun > 0) {
  3390. this.formBrowseStatus = true
  3391. } else {
  3392. this.formBrowseStatus = false
  3393. }
  3394. })
  3395. },
  3396. // 付款合计
  3397. warehouseDrSummaries(param) {
  3398. const { columns, data } = param
  3399. const sums = []
  3400. columns.forEach((column, index) => {
  3401. if (index === 0) {
  3402. sums[index] = '合计'
  3403. return
  3404. }
  3405. const values = data.map((item) => Number(item[column.property]))
  3406. if (
  3407. column.property === 'fUnitprice' ||
  3408. column.property === 'fAmount' ||
  3409. column.property === 'fQty' ||
  3410. column.property === 'fQty'
  3411. ) {
  3412. sums[index] = values.reduce((prev, curr) => {
  3413. const value = Number(curr)
  3414. if (!isNaN(value)) {
  3415. return prev + curr
  3416. } else {
  3417. return prev
  3418. }
  3419. }, 0) // sums[index]
  3420. sums[index] = sums[index].toFixed(2);
  3421. }
  3422. })
  3423. return sums
  3424. },
  3425. // 数量计算
  3426. changeContractAmt(row) {
  3427. let fQty = 0
  3428. let fUnitprice = 0
  3429. if (row.fUnitprice) {
  3430. fUnitprice = row.fUnitprice
  3431. }
  3432. if (row.fQty) {
  3433. fQty = row.fQty
  3434. }
  3435. this.$set(row, 'fAmount', Number(fUnitprice) * Number(fQty)).toFixed(2)
  3436. },
  3437. changefBsdate(row) {
  3438. if (this.dataList.length > 0) {
  3439. for (var i = 0; i < this.dataList.length; i++) {
  3440. this.$set(this.dataList[i], 'fBsdate', row)
  3441. }
  3442. }
  3443. },
  3444. // 库存明细多选
  3445. Selectinventory(selection) {
  3446. this.dataWithdrawList = []
  3447. this.dataListSelection = []
  3448. if (!selection || selection.length === 0) {
  3449. return false
  3450. }
  3451. for (let se in selection) {
  3452. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  3453. this.dataListSelection.push(selection[se])
  3454. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  3455. this.dataWithdrawList.push(selection[se])
  3456. }
  3457. }
  3458. },
  3459. // 库存明细多选框结果
  3460. dataListChange(row) {
  3461. this.dataListSelection = row
  3462. },
  3463. saveForm() {
  3464. this.updateDeduplication()
  3465. this.$refs['form'].validate((valid) => {
  3466. if (this.form.fCorpid === this.form.fTocorpid) {
  3467. this.$message.error('新货权方不得与货权方一致')
  3468. return false
  3469. }
  3470. // if (this.dataList.length === 0) {
  3471. // this.$message.error('请添加库存明细!')
  3472. // return false
  3473. // }
  3474. this.updateDeduplication()
  3475. for (let list in this.dataList) {
  3476. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  3477. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  3478. return false
  3479. }
  3480. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  3481. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重(kg)!')
  3482. return false
  3483. }
  3484. }
  3485. if (valid) {
  3486. this.form.fBillstatus = 2
  3487. // this.form.fNetweight = this.fNetweight
  3488. // this.form.fGrossweight = this.fGrossweight
  3489. // this.form.fQty = this.fQty
  3490. let formData = new window.FormData()
  3491. formData.append("warehouseBills", JSON.stringify(this.form));
  3492. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3493. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3494. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3495. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3496. addGoodsTransfer(formData).then((response) => {
  3497. this.msgSuccess('保存成功')
  3498. this.form = response.data.warehouseBills
  3499. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3500. this.$set(this.form, 'fFeetunit',this.form.fFeetunit + '')
  3501. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3502. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3503. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3504. this.dataList = response.data.warehousebillsitems
  3505. for (let li in this.dataList) {
  3506. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  3507. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  3508. }
  3509. this.getList()
  3510. })
  3511. }
  3512. })
  3513. },
  3514. /** 提交按钮 */
  3515. submitForm() {
  3516. this.$refs['form'].validate((valid) => {
  3517. if (this.form.fCorpid === this.form.fTocorpid) {
  3518. this.$message.error('新货权方不得与货权方一致')
  3519. return false
  3520. }
  3521. if (this.dataList.length === 0) {
  3522. this.$message.error('请添加库存明细!')
  3523. return false
  3524. }
  3525. for (let list in this.dataList) {
  3526. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  3527. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  3528. return false
  3529. }
  3530. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  3531. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重(kg)!')
  3532. return false
  3533. }
  3534. }
  3535. if (this.relevantAttachments.length !== 0) {
  3536. for (let relevant in this.relevantAttachments) {
  3537. if (!this.relevantAttachments[relevant].fName) {
  3538. this.$message.error('请输入附件名称!')
  3539. return false
  3540. }
  3541. }
  3542. }
  3543. if (this.warehouseDrList.length !== 0) {
  3544. for (let warehouseDr in this.warehouseDrList) {
  3545. if (!this.warehouseDrList[warehouseDr].fAmount) {
  3546. this.$message.error('收款信息序号为' + (Number(warehouseDr) + 1) + '的金额异常')
  3547. return false
  3548. }
  3549. }
  3550. }
  3551. if (this.warehouseDrList.length !== 0) {
  3552. for (let warehouseCr in this.warehouseCrList) {
  3553. if (!this.warehouseCrList[warehouseCr].fAmount) {
  3554. this.$message.error(
  3555. '付款信息序号为' + (Number(warehouseCr) + 1) + '的金额异常'
  3556. )
  3557. return false
  3558. }
  3559. }
  3560. }
  3561. if (valid) {
  3562. // this.form.fBillstatus = 4
  3563. let formData = new window.FormData()
  3564. formData.append("warehouseBills", JSON.stringify(this.form));
  3565. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3566. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3567. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3568. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3569. warehouseSubmission(formData).then((response) => {
  3570. this.msgSuccess('提交成功')
  3571. // this.browseStatus = true
  3572. // this.notChange = true
  3573. this.cancel()
  3574. this.getList()
  3575. })
  3576. }
  3577. })
  3578. },
  3579. /** 删除按钮操作 */
  3580. handleDelete(row) {
  3581. const fIds = row.fId || this.ids
  3582. let tips = ''
  3583. delgoodsTransfer_s(fIds).then( data =>{
  3584. switch (data.msg) {
  3585. case '0': {
  3586. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  3587. break
  3588. }
  3589. case '1': {
  3590. tips = '当前主表有数据从表无数据是否删除'
  3591. this.delete_S(fIds, tips)
  3592. break
  3593. }
  3594. case '2': {
  3595. tips = '当前主表有数据从表有数据是否删除'
  3596. this.delete_S(fIds, tips)
  3597. break
  3598. }
  3599. default:{
  3600. return this.$message.error('未知错误,无状态')
  3601. }
  3602. }
  3603. })
  3604. },
  3605. delete_S(fIds,tips){
  3606. this.$confirm(
  3607. tips,
  3608. '警告',
  3609. {
  3610. confirmButtonText: '确定',
  3611. cancelButtonText: '取消',
  3612. type: 'warning'
  3613. }
  3614. )
  3615. .then(function() {
  3616. return delGoodsTransfer(fIds)
  3617. })
  3618. .then(() => {
  3619. this.getList()
  3620. this.msgSuccess('删除成功')
  3621. })
  3622. },
  3623. /** 导出按钮操作 */
  3624. handleExport() {
  3625. const queryParams = this.queryParams
  3626. this.$confirm('是否确认导出所有仓库主(出入库)数据项?', '警告', {
  3627. confirmButtonText: '确定',
  3628. cancelButtonText: '取消',
  3629. type: 'warning'
  3630. })
  3631. .then(function() {
  3632. return exportgoodsTransfer(queryParams)
  3633. })
  3634. .then((response) => {
  3635. this.download(response.msg)
  3636. })
  3637. },
  3638. // 货转件数的计算
  3639. qtyChange(row) {
  3640. if (!row.fQty || row.fQty === '') {
  3641. this.$set(row, 'fNetweight', 0)
  3642. this.$set(row, 'fGrossweight', 0)
  3643. return false
  3644. }
  3645. if (row.fPlanqty < row.fQty) {
  3646. this.$message.error("货转件数超出结余件数!");
  3647. this.$set(row, 'fQty', 0)
  3648. this.$set(row, 'fNetweight', 0)
  3649. this.$set(row, 'fGrossweight', 0)
  3650. return false;
  3651. }
  3652. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2)
  3653. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2)
  3654. this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2))
  3655. this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2))
  3656. },
  3657. // 修改毛重净重
  3658. changeTransfer (row) {
  3659. let fNetweight = 0;
  3660. let fGrossweight = 0;
  3661. if (row.fNetweight) {
  3662. fNetweight = row.fNetweight
  3663. }
  3664. if (row.fGrossweight) {
  3665. fGrossweight = row.fGrossweight
  3666. }
  3667. if (row.fPlannetweight < fNetweight) {
  3668. this.$message({ message: '货转净重(kg)超出结余净重(kg)', type: 'warning' })
  3669. return false
  3670. }
  3671. if (row.fPlangrossweight < fGrossweight) {
  3672. this.$message({ message: '货转毛重(kg)超出结余毛重(kg)', type: 'warning' })
  3673. return false
  3674. }
  3675. },
  3676. deleteRow(index, rows) {
  3677. rows.splice(index, 1)
  3678. this.updateDeduplication()
  3679. },
  3680. // 变更计价单位
  3681. changeFeeUnit(row) {
  3682. if (!row.fFeeunitid) {
  3683. return false
  3684. }
  3685. let fQty = 0;
  3686. let fGrossweight = 0;
  3687. let fNetweight = 0;
  3688. let fCntqty = 0;
  3689. let fixed = 1;
  3690. for (let li in this.dataList) {
  3691. if (this.dataList[li].fQty) {
  3692. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  3693. }
  3694. if (this.dataList[li].fGrossweight) {
  3695. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  3696. }
  3697. if (this.dataList[li].fNetweight) {
  3698. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  3699. }
  3700. if (this.dataList[li].fCntqty) {
  3701. fCntqty = parseFloat(Number(fCntqty) + Number(this.dataList[li].fCntqty))
  3702. }
  3703. }
  3704. if (row.fFeeunitid === "1") {
  3705. this.$set(row, "fQty", fQty);
  3706. } else if (row.fFeeunitid === "2") {
  3707. this.$set(row, 'fQty', (fGrossweight/1000).toFixed(2))
  3708. }else if (row.fFeeunitid === "3") {
  3709. this.$set(row, 'fQty', (fNetweight/1000).toFixed(2))
  3710. }else if (row.fFeeunitid === "7") {
  3711. this.$set(row, "fQty", fCntqty)
  3712. }else {
  3713. this.$set(row, "fQty", 0);
  3714. }
  3715. if (row.fUnitprice) {
  3716. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  3717. }
  3718. },
  3719. // 选择新货权方自动带出结算方式
  3720. changefCorpid(row) {
  3721. this.$set(row, "fSbu", row.fCorpid);
  3722. for (let corp in this.fMblnoOptions) {
  3723. if (row.fTocorpid === this.fMblnoOptions[corp].fId) {
  3724. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + '');
  3725. }
  3726. }
  3727. },
  3728. /* 远程模糊查询用户 */
  3729. corpsRemoteMethod(name) {
  3730. if (name == null || name === '') {
  3731. return false
  3732. }
  3733. let queryParams = { pageNum: 1, fName: name }
  3734. listCorps(queryParams).then((response) => {
  3735. this.fMblnoOptions = response.rows
  3736. this.KHblnoOptions = response.rows
  3737. })
  3738. },
  3739. /* 远程模糊查询商品 */
  3740. goodsRemoteMethod(name) {
  3741. if (name == null || name === '') {
  3742. return false
  3743. }
  3744. let queryParams = { pageNum: 1,fName: name }
  3745. listGoods(queryParams).then((response) => {
  3746. this.goodsOptions = response.rows
  3747. })
  3748. },
  3749. // 选择费用信息时获取计价单位
  3750. changeFeeId (row) {
  3751. for (let li in this.fWbuOptions) {
  3752. if (row.fFeeid === this.fWbuOptions[li].fId) {
  3753. this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
  3754. this.changeFeeUnit(row)
  3755. break
  3756. }
  3757. }
  3758. },
  3759. // 远程模糊查询费用名称
  3760. fWRemoteMethod(name) {
  3761. if (name == null || name === '') {
  3762. return false
  3763. }
  3764. let queryParams = { pageNum: 1, fDc:'C',fName:name};
  3765. listFees(queryParams).then((response) => {
  3766. this.fCNameOptions = response.rows;
  3767. });
  3768. let query = { pageNum: 1, fDc:'D',fName:name};
  3769. listFees(query).then((response) => {
  3770. this.fDNameOptions = response.rows;
  3771. });
  3772. },
  3773. /* 远程模糊查询经营单位 */
  3774. fSbuRemoteMethod(name) {
  3775. if (name == null || name === '') {
  3776. return false
  3777. }
  3778. let queryParams = { pageNum: 1, fName: name }
  3779. listCorps(queryParams).then((response) => {
  3780. this.fSbuOptions = response.rows
  3781. })
  3782. },
  3783. /* 远程模糊查询仓库 */
  3784. warehouseRemoteMethod(name) {
  3785. if (name == null || name === '') {
  3786. return false
  3787. }
  3788. let queryParams = { pageNum: 1, fName: name }
  3789. listWarehouse(queryParams).then((response) => {
  3790. this.warehouseOptions = response.rows
  3791. })
  3792. },
  3793. /* 远程模糊查询操作用户 */
  3794. userRemoteMethod(name) {
  3795. if (name == null || name === '') {
  3796. return false
  3797. }
  3798. let queryParams = { pageNum: 1, userName: name }
  3799. listUser(queryParams).then((response) => {
  3800. this.userOptions = response.rows
  3801. })
  3802. }
  3803. }
  3804. }
  3805. </script>
  3806. <style lang="scss" scoped>
  3807. @import 'src/assets/styles/element-variables.scss';
  3808. .juzhong > th {
  3809. text-align: center;
  3810. }
  3811. .biaoge > tr > td {
  3812. height: 30px;
  3813. text-align: center;
  3814. border-right: 1px solid #dfe6ec !important;
  3815. order-bottom: 1px solid #dfe6ec !important;
  3816. border-bottom: 1px solid #dfe6ec !important;
  3817. }
  3818. .el-table thead th {
  3819. background: #1890ff;
  3820. color: #fff;
  3821. }
  3822. .upload-demo {
  3823. margin-left: 50px;
  3824. }
  3825. .el-form-item {
  3826. margin-bottom: 5px !important;
  3827. }
  3828. .el-form-item__label {
  3829. font-size: 12px !important;
  3830. }
  3831. .el-collapse-item__header{
  3832. font-size: 16px;
  3833. font-weight: bolder;
  3834. padding-left: 5px;
  3835. }
  3836. .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
  3837. padding-right: 5px;
  3838. }
  3839. .el-table {
  3840. .el-table__body-wrapper {
  3841. z-index: 2;
  3842. }
  3843. }
  3844. .tabSetting {
  3845. display: flex;
  3846. justify-content: flex-end;
  3847. }
  3848. .listStyle {
  3849. display: flex;
  3850. border-top: 1px solid #dcdfe6;
  3851. border-left: 1px solid #dcdfe6;
  3852. border-right: 1px solid #dcdfe6;
  3853. }
  3854. .listStyle:last-child {
  3855. border-bottom: 1px solid #dcdfe6;
  3856. }
  3857. .progress {
  3858. display: flex;
  3859. align-items: center;
  3860. padding: 2px;
  3861. background-color: rgba(0, 0, 0, 0.05);
  3862. height: 100%;
  3863. }
  3864. .avue-crud__dialog__header {
  3865. display: -webkit-box;
  3866. display: -ms-flexbox;
  3867. display: flex;
  3868. -webkit-box-align: center;
  3869. -ms-flex-align: center;
  3870. align-items: center;
  3871. -webkit-box-pack: justify;
  3872. -ms-flex-pack: justify;
  3873. justify-content: space-between;
  3874. }
  3875. .el-dialog__title {
  3876. color: rgba(0,0,0,.85);
  3877. font-weight: 500;
  3878. word-wrap: break-word;
  3879. }
  3880. .avue-crud__dialog__menu {
  3881. padding-right: 20px;
  3882. float: left;
  3883. }
  3884. .avue-crud__dialog__menu i {
  3885. color: #909399;
  3886. font-size: 15px;
  3887. }
  3888. .el-icon-full-screen{
  3889. cursor: pointer;
  3890. }
  3891. .el-icon-full-screen:before {
  3892. content: "\e719";
  3893. }
  3894. </style>