index.vue 133 KB

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