index.vue 116 KB

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