index.vue 131 KB

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