index.vue 93 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006
  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. clearable
  15. size="small"
  16. @keyup.enter.native="handleQuery"
  17. />
  18. </el-form-item>
  19. <el-form-item label="制单人" prop="createBy">
  20. <el-select
  21. v-model="queryParams.createBy"
  22. filterable
  23. remote
  24. clearable
  25. style="width: 250px"
  26. :remote-method="userRemoteMethod"
  27. placeholder="请选择制单人"
  28. >
  29. <el-option
  30. v-for="(dict, index) in userOptions"
  31. :key="index.userName"
  32. :label="dict.nickName"
  33. :value="dict.userName"
  34. ></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="出库日期" prop="timeInterval">
  38. <el-date-picker
  39. v-model="queryParams.timeInterval"
  40. type="daterange"
  41. value-format="yyyy-MM-dd"
  42. clearable
  43. range-separator="至"
  44. start-placeholder="开始日期"
  45. end-placeholder="结束日期"
  46. @keyup.enter.native="handleQuery">
  47. </el-date-picker>
  48. </el-form-item>
  49. <el-form-item label="贸易方式" prop="fTrademodeid">
  50. <el-select
  51. v-model="queryParams.fTrademodeid"
  52. placeholder="请选择贸易方式"
  53. clearable
  54. style="width: 250px"
  55. @keyup.enter.native="handleQuery"
  56. >
  57. <el-option
  58. v-for="(dict, index) in fTrademodeidOptions"
  59. :key="index.dictValue"
  60. :label="dict.dictLabel"
  61. :value="dict.dictValue"
  62. />
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item label="货权方" prop="fCorpid">
  66. <el-select
  67. v-model="queryParams.fCorpid"
  68. filterable
  69. remote
  70. clearable
  71. style="width: 250px"
  72. @keyup.enter.native="handleQuery"
  73. :remote-method="corpsRemoteMethod"
  74. placeholder="请选择货权方"
  75. >
  76. <el-option
  77. v-for="(dict, index) in fMblnoOptions"
  78. :key="index.fId"
  79. :label="dict.fName"
  80. :value="dict.fId"
  81. ></el-option>
  82. </el-select>
  83. </el-form-item>
  84. <el-form-item label="提单号" prop="fMblno">
  85. <el-input
  86. v-model="queryParams.fMblno"
  87. placeholder="请输入提单号"
  88. clearable
  89. size="small"
  90. @keyup.enter.native="handleQuery"
  91. />
  92. </el-form-item>
  93. <el-form-item label="经营单位" prop="fSbu">
  94. <el-select
  95. v-model="queryParams.fSbu"
  96. filterable
  97. remote
  98. clearable
  99. :remote-method="fSbuRemoteMethod"
  100. @keyup.enter.native="handleQuery"
  101. style="width: 250px"
  102. placeholder="请选择经营单位"
  103. >
  104. <el-option
  105. v-for="(dict, index) in fSbuOptions"
  106. :key="index.fId"
  107. :label="dict.fName"
  108. :value="dict.fId"
  109. ></el-option>
  110. </el-select>
  111. </el-form-item>
  112. <el-form-item label="货物名称" prop="fGoodsid">
  113. <el-select
  114. v-model="queryParams.fGoodsid"
  115. filterable
  116. remote
  117. clearable
  118. :remote-method="goodsRemoteMethod"
  119. @keyup.enter.native="handleQuery"
  120. placeholder="请选择货物名称"
  121. >
  122. <el-option
  123. v-for="(dict, index) in goodsOptions"
  124. :key="index.fId"
  125. :label="dict.fName"
  126. :value="dict.fId"
  127. ></el-option>
  128. </el-select>
  129. </el-form-item>
  130. <el-form-item label="仓库" prop="fWarehouseid">
  131. <el-select
  132. v-model="queryParams.fWarehouseid"
  133. filterable
  134. :disabled="browseStatus"
  135. remote
  136. clearable
  137. style="width: 250px"
  138. :remote-method="warehouseRemoteMethod"
  139. @keyup.enter.native="handleQuery"
  140. placeholder="请选择仓库"
  141. >
  142. <el-option
  143. v-for="(dict, index) in warehouseOptions"
  144. :key="index.fId"
  145. :label="dict.fName"
  146. :value="dict.fId"
  147. ></el-option>
  148. </el-select>
  149. </el-form-item>
  150. <el-form-item>
  151. <el-button
  152. type="cyan"
  153. icon="el-icon-search"
  154. size="mini"
  155. @click="handleQuery"
  156. >搜索
  157. </el-button>
  158. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  159. >重置
  160. </el-button>
  161. </el-form-item>
  162. </el-form>
  163. <el-row :gutter="10" class="mb8">
  164. <el-col :span="1.5">
  165. <el-button
  166. type="primary"
  167. icon="el-icon-plus"
  168. size="mini"
  169. @click="handleAdd(false)"
  170. v-hasPermi="['warehouseBusiness:warehousebills:add']"
  171. >新增
  172. </el-button>
  173. </el-col>
  174. <el-col :span="1.5">
  175. <el-button
  176. type="success"
  177. icon="el-icon-edit"
  178. size="mini"
  179. :disabled="single"
  180. @click="handleUpdate"
  181. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  182. >修改
  183. </el-button>
  184. </el-col>
  185. <el-col :span="1.5">
  186. <el-button
  187. type="danger"
  188. icon="el-icon-delete"
  189. size="mini"
  190. :disabled="multiple"
  191. @click="handleDelete"
  192. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  193. >删除
  194. </el-button>
  195. </el-col>
  196. <el-col :span="1.5">
  197. <el-button
  198. type="warning"
  199. icon="el-icon-download"
  200. size="mini"
  201. @click="handleExport"
  202. v-hasPermi="['warehouseBusiness:warehousebills:export']"
  203. >导出
  204. </el-button>
  205. </el-col>
  206. <right-toolbar
  207. :showSearch.sync="showSearch"
  208. @queryTable="getList"
  209. ></right-toolbar>
  210. </el-row>
  211. <el-table
  212. v-loading="loading"
  213. :data="warehousebillsList"
  214. @selection-change="handleSelectionChange"
  215. >
  216. <el-table-column type="selection" width="55" align="center" />
  217. <el-table-column type="index" label="行号" align="center" />
  218. <el-table-column label="货权方" align="center" prop="fCorpid" />
  219. <el-table-column label="提单号" align="center" prop="fMblno" />
  220. <el-table-column label="经营单位" align="center" prop="fSbu" />
  221. <el-table-column
  222. label="出库日期"
  223. align="center"
  224. prop="createTime"
  225. width="180"
  226. ><template slot-scope="scope">
  227. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  228. </template>
  229. </el-table-column>
  230. <el-table-column
  231. label="贸易方式"
  232. align="center"
  233. prop="fTrademodeid"
  234. :formatter="fTrademodeidFormat"
  235. />
  236. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  237. <el-table-column label="出库件数" align="center" prop="fQty" />
  238. <!-- <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
  239. <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
  240. <el-table-column label="出库毛重" align="center" prop="fGrossweight" />
  241. <el-table-column label="净重" align="center" prop="fNetweight" />
  242. <el-table-column
  243. label="操作"
  244. align="center"
  245. class-name="small-padding fixed-width"
  246. width="100"
  247. >
  248. <template slot-scope="scope">
  249. <el-button
  250. size="mini"
  251. type="text"
  252. icon="el-icon-edit"
  253. v-if="scope.row.fBillstatus === '6'"
  254. @click="handleUpdate(scope.row, true)"
  255. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  256. >查看
  257. </el-button>
  258. <el-button
  259. size="mini"
  260. type="text"
  261. icon="el-icon-edit"
  262. v-if="scope.row.fBillstatus !== '6'"
  263. @click="handleUpdate(scope.row, false)"
  264. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  265. >修改
  266. </el-button>
  267. <el-button
  268. size="mini"
  269. type="text"
  270. icon="el-icon-delete"
  271. @click="handleDelete(scope.row)"
  272. v-if="scope.row.fBillstatus !== '6'"
  273. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  274. >删除
  275. </el-button>
  276. </template>
  277. </el-table-column>
  278. </el-table>
  279. <pagination
  280. v-show="total > 0"
  281. :total="total"
  282. :page.sync="queryParams.pageNum"
  283. :limit.sync="queryParams.pageSize"
  284. @pagination="getList"
  285. />
  286. <!-- 添加或修改仓库主(出入库)对话框 -->
  287. <el-dialog
  288. :title="title"
  289. :visible.sync="open"
  290. :close-on-click-modal="false"
  291. width="80%"
  292. append-to-body
  293. >
  294. <el-form
  295. ref="form"
  296. :model="form"
  297. :rules="rules"
  298. label-width="120px"
  299. >
  300. <el-row>
  301. <el-col :span="8">
  302. <el-form-item label="原货权方" prop="fCorpid">
  303. <el-select
  304. v-model="form.fCorpid"
  305. filterable
  306. remote
  307. :disabled="browseStatus"
  308. style="width: 250px"
  309. :remote-method="corpsRemoteMethod"
  310. placeholder="请选择原货权方"
  311. >
  312. <el-option
  313. v-for="(dict,index) in fMblnoOptions"
  314. :key="index.fId"
  315. :label="dict.fName"
  316. :value="dict.fId"
  317. ></el-option>
  318. </el-select>
  319. </el-form-item>
  320. </el-col>
  321. <el-col :span="8">
  322. <el-form-item label="结算方式" prop="fstltypeid">
  323. <el-select
  324. v-model="form.fStltypeid"
  325. placeholder="请选择结算方式"
  326. :disabled="browseStatus"
  327. clearable
  328. style="width: 250px"
  329. >
  330. <el-option
  331. v-for="(dict,index) in fStltypeOptions"
  332. :key="index.dictValue"
  333. :label="dict.dictLabel"
  334. :value="dict.dictValue"
  335. />
  336. </el-select>
  337. </el-form-item>
  338. </el-col>
  339. <el-col :span="8">
  340. <el-form-item label="提单号" prop="fMblno">
  341. <el-input
  342. v-model="form.fMblno"
  343. style="width: 250px"
  344. :disabled="browseStatus"
  345. placeholder="手工输入"
  346. />
  347. </el-form-item>
  348. </el-col>
  349. </el-row>
  350. <el-row>
  351. <el-col :span="8">
  352. <el-form-item label="业务日期" prop="fBsdate">
  353. <el-date-picker
  354. v-model="form.fBsdate"
  355. style="width: 250px"
  356. type="date"
  357. :disabled="browseStatus"
  358. @change="changefBsdate"
  359. value-format="timestamp"
  360. placeholder="业务日期"
  361. >
  362. </el-date-picker>
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="8">
  366. <el-form-item label="仓管员" prop="fStorekeeper">
  367. <el-select
  368. v-model="form.fStorekeeper"
  369. filterable
  370. remote
  371. :disabled="browseStatus"
  372. style="width: 250px"
  373. :remote-method="userRemoteMethod"
  374. placeholder="请选择仓管员"
  375. >
  376. <el-option
  377. v-for="dict in userOptions"
  378. :key="dict.userName"
  379. :label="dict.nickName"
  380. :value="dict.userName"
  381. ></el-option>
  382. </el-select>
  383. </el-form-item>
  384. </el-col>
  385. <el-col :span="8">
  386. <el-form-item label="仓库" prop="fWarehouseid">
  387. <el-select
  388. v-model="form.fWarehouseid"
  389. filterable
  390. remote
  391. :disabled="browseStatus"
  392. style="width: 250px"
  393. :remote-method="warehouseRemoteMethod"
  394. placeholder="请选择仓库"
  395. >
  396. <el-option
  397. v-for="(dict,index) in warehouseOptions"
  398. :key="index.fId"
  399. :label="dict.fName"
  400. :value="dict.fId"
  401. ></el-option>
  402. </el-select>
  403. </el-form-item>
  404. </el-col>
  405. </el-row>
  406. <el-row>
  407. <el-col :span="8">
  408. <el-form-item label="存货编号" prop="fBscorpno">
  409. <el-input
  410. disabled
  411. v-model="form.fBscorpno"
  412. style="width: 250px"
  413. laceholder="存货编号"
  414. />
  415. </el-form-item>
  416. </el-col>
  417. <el-col :span="8">
  418. <el-form-item label="破损" prop="fifdamage">
  419. <el-select
  420. v-model="form.fIfdamage"
  421. placeholder="请选择是否破损"
  422. :disabled="browseStatus"
  423. clearable
  424. style="width: 250px"
  425. >
  426. <el-option
  427. v-for="dict in fIfdamageOptions"
  428. :key="dict.dictValue"
  429. :label="dict.dictLabel"
  430. :value="dict.dictValue"
  431. />
  432. </el-select>
  433. </el-form-item>
  434. </el-col>
  435. <el-col :span="8">
  436. <el-form-item label="过磅" prop="fifweigh">
  437. <el-select
  438. v-model="form.fIfweigh"
  439. placeholder="请选择是否过磅"
  440. :disabled="browseStatus"
  441. clearable
  442. style="width: 250px"
  443. >
  444. <el-option
  445. v-for="dict in fIfweighOptions"
  446. :key="dict.dictValue"
  447. :label="dict.dictLabel"
  448. :value="dict.dictValue"
  449. />
  450. </el-select>
  451. </el-form-item>
  452. </el-col>
  453. </el-row>
  454. <el-row>
  455. <el-col :span="8">
  456. <el-form-item label="质押" prop="fifpledge">
  457. <el-select
  458. v-model="form.fIfpledge"
  459. placeholder="请选择是否过磅"
  460. :disabled="browseStatus"
  461. clearable
  462. style="width: 250px"
  463. >
  464. <el-option
  465. v-for="dict in fIfpledgeOptions"
  466. :key="dict.dictValue"
  467. :label="dict.dictLabel"
  468. :value="dict.dictValue"
  469. />
  470. </el-select>
  471. </el-form-item>
  472. </el-col>
  473. <el-col :span="8">
  474. <el-form-item label="质押银行" prop="fbankcorpid">
  475. <el-input
  476. v-model="form.fBankcorpid"
  477. :disabled="browseStatus"
  478. laceholder="质押银行"
  479. style="width: 250px"
  480. />
  481. </el-form-item>
  482. </el-col>
  483. <el-col :span="8">
  484. <el-form-item label="计费单位" prop="ffeetunit">
  485. <el-select
  486. v-model="form.fFeetunit"
  487. placeholder="请选择计费单位"
  488. :disabled="browseStatus"
  489. clearable
  490. style="width: 250px"
  491. >
  492. <el-option
  493. v-for="dict in fFeetunitOptions"
  494. :key="dict.dictValue"
  495. :label="dict.dictLabel"
  496. :value="dict.dictValue"
  497. />
  498. </el-select>
  499. </el-form-item>
  500. </el-col>
  501. </el-row>
  502. <el-row>
  503. <el-form-item label="备注" prop="remark">
  504. <el-input
  505. style="width: 100%"
  506. v-model="form.remark"
  507. :disabled="browseStatus"
  508. type="textarea"
  509. placeholder="请输入内容"
  510. />
  511. </el-form-item>
  512. </el-row>
  513. <!--点击展开-->
  514. <el-button
  515. @click="
  516. detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
  517. "
  518. >展开</el-button
  519. >
  520. <div v-if="detailsHidden">
  521. <el-row style="margin-top: 30px">
  522. <el-col :span="8">
  523. <el-form-item label="仓库联系人" prop="fContacts">
  524. <el-input
  525. v-model="form.fContacts"
  526. style="width: 250px"
  527. placeholder="仓库联系人"
  528. />
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="8">
  532. <el-form-item label="仓库电话" prop="ftel">
  533. <el-input
  534. v-model="form.fTel"
  535. :disabled="browseStatus"
  536. style="width: 250px"
  537. placeholder="请输仓库入电话"
  538. />
  539. </el-form-item>
  540. </el-col>
  541. <el-col :span="8">
  542. <el-form-item label="船名航次" prop="fvslvoy">
  543. <el-input
  544. v-model="form.fVslvoy"
  545. :disabled="browseStatus"
  546. style="width: 250px"
  547. placeholder="船名航次"
  548. />
  549. </el-form-item>
  550. </el-col>
  551. </el-row>
  552. <el-row>
  553. <el-col :span="8">
  554. <el-form-item label="到港日期" prop="feta">
  555. <el-date-picker
  556. v-model="form.fEta"
  557. style="width: 250px"
  558. type="date"
  559. :disabled="browseStatus"
  560. value-format="timestamp"
  561. placeholder="到港日期"
  562. >
  563. </el-date-picker>
  564. </el-form-item>
  565. </el-col>
  566. <el-col :span="8">
  567. <el-form-item label="报关单号" prop="fcustomno">
  568. <el-input
  569. v-model="form.fCustomno"
  570. style="width: 250px"
  571. :disabled="browseStatus"
  572. laceholder="报关单号"
  573. />
  574. </el-form-item>
  575. </el-col>
  576. <el-col :span="8">
  577. <el-form-item label="经营单位" prop="fSbu">
  578. <el-select
  579. v-model="form.fSbu"
  580. filterable
  581. remote
  582. :disabled="browseStatus"
  583. :remote-method="fSbuRemoteMethod"
  584. style="width: 250px"
  585. placeholder="请选择经营单位"
  586. >
  587. <el-option
  588. v-for="(dict,index) in fSbuOptions"
  589. :key="index.fId"
  590. :label="dict.fName"
  591. :value="dict.fId"
  592. ></el-option>
  593. </el-select>
  594. </el-form-item>
  595. </el-col>
  596. </el-row>
  597. <el-row>
  598. <el-col :span="8">
  599. <el-form-item label="单据编号" prop="foriginalbillno">
  600. <el-input
  601. v-model="form.fOriginalbillno"
  602. style="width: 250px"
  603. disabled
  604. placeholder="单据编号"
  605. />
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="8">
  609. <el-form-item label="贸易方式" prop="fTrademodeid">
  610. <el-select
  611. v-model="form.fTrademodeid"
  612. placeholder="请选择贸易方式"
  613. :disabled="browseStatus"
  614. clearable
  615. style="width: 250px"
  616. >
  617. <el-option
  618. v-for="dict in fTrademodeidOptions"
  619. :key="dict.dictValue"
  620. :label="dict.dictLabel"
  621. :value="dict.dictValue"
  622. />
  623. </el-select>
  624. </el-form-item>
  625. </el-col>
  626. <el-col :span="8">
  627. <el-form-item label="制单人" prop="createBy">
  628. <el-input
  629. disabled
  630. v-model="form.createBy"
  631. style="width: 250px"
  632. placeholder="制单人"
  633. />
  634. </el-form-item>
  635. </el-col>
  636. </el-row>
  637. <el-row>
  638. <el-col :span="8">
  639. <el-form-item label="制单部门" prop="fDeptid">
  640. <el-select
  641. v-model="form.fDeptid"
  642. filterable
  643. disabled
  644. style="width: 250px"
  645. remote
  646. >
  647. <el-option
  648. v-for="dict in deptOptions"
  649. :key="dict.deptId"
  650. :label="dict.deptName"
  651. :value="dict.deptId"
  652. ></el-option>
  653. </el-select>
  654. </el-form-item>
  655. </el-col>
  656. <el-col :span="8">
  657. <el-form-item disabled label="制单日期" prop="fbilldate">
  658. <el-date-picker
  659. v-model="form.createTime"
  660. size="large"
  661. type="date"
  662. disabled
  663. value-format="timestamp"
  664. placeholder="制单日期"
  665. >
  666. </el-date-picker>
  667. </el-form-item>
  668. </el-col>
  669. <el-col :span="8">
  670. <el-form-item label="唛头" prop="fbarks">
  671. <el-input
  672. v-model="form.fMarks"
  673. style="width: 250px"
  674. :disabled="browseStatus"
  675. placeholder="唛头"
  676. />
  677. </el-form-item>
  678. </el-col>
  679. </el-row>
  680. </div>
  681. </el-form>
  682. <div class="dialogTableTitle flex a-center jlr">
  683. <h2>库存明细</h2>
  684. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  685. >添加
  686. </el-button>
  687. </div>
  688. <el-table
  689. :data="dataList"
  690. ref="table"
  691. tooltip-effect="dark"
  692. border
  693. stripe
  694. :summary-method="getSummaries"
  695. show-summary
  696. >
  697. <el-table-column label="序号" type="index" width="80">
  698. </el-table-column>
  699. <el-table-column
  700. prop="fMblno"
  701. header-align="center"
  702. align="center"
  703. width="140px"
  704. label="提单号"
  705. >
  706. <template slot-scope="scope">
  707. <el-input
  708. disabled
  709. v-model="scope.row.fMblno"
  710. style="width: 250px"
  711. placeholder="手工输入"
  712. />
  713. </template>
  714. </el-table-column>
  715. <el-table-column
  716. prop="fGoodsid"
  717. header-align="center"
  718. align="center"
  719. width="140px"
  720. label="品名"
  721. >
  722. <template slot-scope="scope">
  723. <el-select
  724. v-model="scope.row.fGoodsids"
  725. filterable
  726. disabled
  727. remote
  728. :remote-method="goodsRemoteMethod"
  729. placeholder="请选择品名"
  730. >
  731. <el-option
  732. v-for="(dict,index) in goodsOptions"
  733. :key="index.fId"
  734. :label="dict.fName"
  735. :value="dict.fId"
  736. ></el-option>
  737. </el-select>
  738. </template>
  739. </el-table-column>
  740. <el-table-column
  741. prop="fcntrtype"
  742. header-align="center"
  743. align="center"
  744. width="140px"
  745. label="箱型"
  746. >
  747. <template slot-scope="scope">
  748. <el-input
  749. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  750. v-model="scope.row.fCntrtype"
  751. :disabled="browseStatus"
  752. placeholder="箱型"
  753. show-word-limit
  754. />
  755. </template>
  756. </el-table-column>
  757. <el-table-column
  758. prop="fCntqty"
  759. header-align="center"
  760. align="center"
  761. width="140px"
  762. label="箱量"
  763. >
  764. <template slot-scope="scope">
  765. <el-input
  766. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  767. v-model="scope.row.fCntqty"
  768. placeholder="箱量"
  769. :disabled="browseStatus"
  770. show-word-limit
  771. />
  772. </template>
  773. </el-table-column>
  774. <el-table-column
  775. prop="fQtyblc"
  776. header-align="center"
  777. align="center"
  778. width="180px"
  779. label="当前库存"
  780. >
  781. </el-table-column>
  782. <el-table-column
  783. prop="fgrossweight"
  784. header-align="center"
  785. width="180px"
  786. align="center"
  787. label="出库毛重"
  788. >
  789. <template slot-scope="scope">
  790. <el-input
  791. :disabled="browseStatus"
  792. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  793. v-model="scope.row.fGrossweight"
  794. placeholder="出库毛重"
  795. show-word-limit
  796. />
  797. </template>
  798. </el-table-column>
  799. <el-table-column
  800. prop="fnetweight"
  801. header-align="center"
  802. width="180px"
  803. align="center"
  804. label="出库净重"
  805. >
  806. <template slot-scope="scope">
  807. <el-input
  808. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  809. v-model="scope.row.fNetweight"
  810. :disabled="browseStatus"
  811. placeholder="出库净重"
  812. show-word-limit
  813. />
  814. </template>
  815. </el-table-column>
  816. <el-table-column
  817. prop="fqty"
  818. header-align="center"
  819. width="180px"
  820. align="center"
  821. label="出库件数"
  822. >
  823. <template slot-scope="scope">
  824. <el-input
  825. oninput='this.value=this.value.replace(/[^\-?\d]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "")'
  826. v-model="scope.row.fQty"
  827. :disabled="browseStatus"
  828. placeholder="出库件数"
  829. show-word-limit
  830. />
  831. </template>
  832. </el-table-column>
  833. <el-table-column
  834. prop="fVolumn"
  835. header-align="center"
  836. width="180px"
  837. align="center"
  838. label="出库尺码"
  839. >
  840. <template slot-scope="scope">
  841. <el-input
  842. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  843. v-model="scope.row.fVolumn"
  844. :disabled="browseStatus"
  845. placeholder="出库尺码"
  846. show-word-limit
  847. />
  848. </template>
  849. </el-table-column>
  850. <el-table-column
  851. prop="fPackagespecs"
  852. header-align="center"
  853. width="180px"
  854. align="center"
  855. label="包装规格"
  856. >
  857. <template slot-scope="scope">
  858. <el-input
  859. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  860. v-model="scope.row.fPackagespecs"
  861. :disabled="browseStatus"
  862. placeholder="包装规格"
  863. show-word-limit
  864. />
  865. </template>
  866. </el-table-column>
  867. <el-table-column
  868. prop="fwarehouselocid"
  869. header-align="center"
  870. width="150px"
  871. align="center"
  872. label="库区"
  873. >
  874. <template slot-scope="scope">
  875. <el-select
  876. v-model="scope.row.fWarehouselocid"
  877. filterable
  878. remote
  879. disabled
  880. :remote-method="kqhouseRemoteMethod"
  881. placeholder="请选择库区"
  882. >
  883. <el-option
  884. v-for="dict in kqhouseOptions"
  885. :key="dict.fId"
  886. :label="dict.fName"
  887. :disabled="browseStatus"
  888. :value="dict.fId"
  889. ></el-option>
  890. </el-select>
  891. </template>
  892. </el-table-column>
  893. <el-table-column
  894. prop="fCntrno"
  895. header-align="center"
  896. width="150px"
  897. align="center"
  898. label="箱号"
  899. >
  900. <template slot-scope="scope">
  901. <el-input
  902. v-model="scope.row.fCntrno"
  903. placeholder="箱号"
  904. :disabled="browseStatus"
  905. show-word-limit
  906. />
  907. </template>
  908. </el-table-column>
  909. <el-table-column
  910. prop="fGoodsval"
  911. header-align="center"
  912. width="150px"
  913. align="center"
  914. label="货值"
  915. >
  916. <template slot-scope="scope">
  917. <el-input
  918. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  919. v-model="scope.row.fGoodsval"
  920. placeholder="货值"
  921. :disabled="browseStatus"
  922. show-word-limit
  923. />
  924. </template>
  925. </el-table-column>
  926. <el-table-column
  927. prop="ftruckno"
  928. header-align="center"
  929. width="150px"
  930. align="center"
  931. label="车号"
  932. >
  933. <template slot-scope="scope">
  934. <el-input
  935. oninput="value=value.replace(/[^\d.]/g,'')"
  936. v-model="scope.row.fTruckno"
  937. placeholder="车号"
  938. :disabled="browseStatus"
  939. show-word-limit
  940. />
  941. </template>
  942. </el-table-column>
  943. <el-table-column
  944. prop="remark"
  945. header-align="center"
  946. width="150px"
  947. align="center"
  948. label="备注"
  949. >
  950. <template slot-scope="scope">
  951. <el-input
  952. v-model="scope.row.remark"
  953. placeholder="备注"
  954. :disabled="browseStatus"
  955. show-word-limit
  956. />
  957. </template>
  958. </el-table-column>
  959. <el-table-column
  960. header-align="center"
  961. align="center"
  962. label="操作"
  963. width="130PX"
  964. >
  965. <template slot-scope="scope">
  966. <el-button
  967. @click.native.prevent="deleteRow(scope.$index, dataList)"
  968. size="small"
  969. >移除</el-button
  970. >
  971. </template>
  972. </el-table-column>
  973. </el-table>
  974. <div class="dialogTableTitle flex a-center jlr">
  975. <h2>附件上传</h2>
  976. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  977. >添加
  978. </el-button>
  979. </div>
  980. <el-table
  981. :data="relevantAttachments"
  982. ref="table"
  983. tooltip-effect="dark"
  984. border
  985. stripe
  986. style="width: 100%"
  987. height="150"
  988. >
  989. <el-table-column label="序号" type="index" width="80">
  990. </el-table-column>
  991. <el-table-column
  992. prop="fName"
  993. header-align="center"
  994. align="center"
  995. label="附件名称"
  996. >
  997. <template slot-scope="scope">
  998. <el-input
  999. v-model="scope.row.fName"
  1000. :disabled="browseStatus"
  1001. placeholder="附件名称"
  1002. show-word-limit
  1003. />
  1004. </template>
  1005. </el-table-column>
  1006. <el-table-column
  1007. prop="createBy"
  1008. header-align="center"
  1009. align="center"
  1010. label="上传人"
  1011. >
  1012. <template slot-scope="scope">
  1013. <el-input
  1014. v-model="scope.row.createBy"
  1015. :disabled="browseStatus"
  1016. placeholder="上传人"
  1017. show-word-limit
  1018. />
  1019. </template>
  1020. </el-table-column>
  1021. <el-table-column
  1022. prop="createTime"
  1023. header-align="center"
  1024. align="center"
  1025. label="上传时间"
  1026. >
  1027. <template slot-scope="scope">
  1028. <el-date-picker
  1029. v-model="scope.row.createTime"
  1030. type="date"
  1031. disabled
  1032. placeholder="上传时间"
  1033. format="yyyy-MM-dd HH:mm"
  1034. value-format="timestamp"
  1035. ></el-date-picker>
  1036. </template>
  1037. </el-table-column>
  1038. <el-table-column
  1039. prop="fUrl"
  1040. header-align="center"
  1041. align="center"
  1042. width="250PX"
  1043. label="上传附件"
  1044. >
  1045. <template slot-scope="scope">
  1046. <uploadFile @input="showFile" v-model="scope.row.fUrl" />
  1047. </template>
  1048. </el-table-column>
  1049. <el-table-column
  1050. header-align="center"
  1051. align="center"
  1052. label="操作"
  1053. width="130PX"
  1054. >
  1055. <template slot-scope="scope">
  1056. <el-button
  1057. @click.native.prevent="
  1058. deleteRow(scope.$index, relevantAttachments)
  1059. "
  1060. :disabled="browseStatus"
  1061. size="small"
  1062. >移除
  1063. </el-button>
  1064. </template>
  1065. </el-table-column>
  1066. </el-table>
  1067. <div class="dialogTableTitle flex a-center jlr">
  1068. <h2>收款信息</h2>
  1069. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1070. >添加
  1071. </el-button>
  1072. </div>
  1073. <el-table
  1074. :data="warehouseDrList"
  1075. ref="table"
  1076. tooltip-effect="dark"
  1077. border
  1078. stripe
  1079. show-summary
  1080. :summary-method="warehouseDrSummaries"
  1081. >
  1082. <el-table-column label="序号" type="index" width="80">
  1083. </el-table-column>
  1084. <el-table-column
  1085. prop="fCorpid"
  1086. header-align="center"
  1087. align="center"
  1088. width="180px"
  1089. label="客户名称"
  1090. >
  1091. <template slot-scope="scope">
  1092. <el-select
  1093. v-model="scope.row.fCorpid"
  1094. filterable
  1095. remote
  1096. :disabled="browseStatus"
  1097. :remote-method="corpsRemoteMethod"
  1098. placeholder="客户名称"
  1099. >
  1100. <el-option
  1101. v-for="(dict,index) in KHblnoOptions"
  1102. :key="index.fId"
  1103. :label="dict.fName"
  1104. :value="dict.fId"
  1105. ></el-option>
  1106. </el-select>
  1107. </template>
  1108. </el-table-column>
  1109. <el-table-column
  1110. prop="fFeeid"
  1111. header-align="center"
  1112. align="center"
  1113. width="180px"
  1114. label="费用名称"
  1115. >
  1116. <template slot-scope="scope">
  1117. <el-select
  1118. v-model="scope.row.fFeeid"
  1119. filterable
  1120. remote
  1121. :disabled="browseStatus"
  1122. :remote-method="fWRemoteMethod"
  1123. placeholder="费用名称"
  1124. >
  1125. <el-option
  1126. v-for="dict in fWbuOptions"
  1127. :key="dict.fId"
  1128. :label="dict.fName"
  1129. :value="dict.fId"
  1130. ></el-option>
  1131. </el-select>
  1132. </template>
  1133. </el-table-column>
  1134. <el-table-column
  1135. prop="ffeeUnitid"
  1136. header-align="center"
  1137. align="center"
  1138. width="180px"
  1139. label="计价单位"
  1140. >
  1141. <template slot-scope="scope">
  1142. <!-- <el-input
  1143. v-model="scope.row.fFeeUnitid"
  1144. placeholder="计价单位"
  1145. show-word-limit
  1146. /> -->
  1147. <el-select
  1148. v-model="scope.row.fFeeUnitid"
  1149. placeholder="请选择计费单位"
  1150. @change="changeFeeUnit(scope.row)"
  1151. :disabled="browseStatus"
  1152. clearable
  1153. >
  1154. <el-option
  1155. v-for="dict in jFeetunitOptions"
  1156. :key="dict.dictValue"
  1157. :label="dict.dictLabel"
  1158. :value="dict.dictValue"
  1159. />
  1160. </el-select>
  1161. </template>
  1162. </el-table-column>
  1163. <el-table-column
  1164. prop="fQty"
  1165. header-align="center"
  1166. align="center"
  1167. width="150px"
  1168. label="数量"
  1169. >
  1170. <template slot-scope="scope">
  1171. <el-input
  1172. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1173. v-model="scope.row.fQty"
  1174. placeholder="数量"
  1175. :disabled="browseStatus"
  1176. @change="changeEstmateAmt(scope.row)"
  1177. show-word-limit
  1178. />
  1179. </template>
  1180. </el-table-column>
  1181. <el-table-column
  1182. prop="funitprice"
  1183. header-align="center"
  1184. align="center"
  1185. width="150px"
  1186. label="单价"
  1187. >
  1188. <template slot-scope="scope">
  1189. <el-input
  1190. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1191. v-model="scope.row.fUnitprice"
  1192. placeholder="单价"
  1193. :disabled="browseStatus"
  1194. @change="changeContractAmt(scope.row)"
  1195. show-word-limit
  1196. />
  1197. </template>
  1198. </el-table-column>
  1199. <el-table-column
  1200. prop="fAmount"
  1201. header-align="center"
  1202. align="center"
  1203. width="150px"
  1204. label="金额"
  1205. >
  1206. <template slot-scope="scope">
  1207. <el-input
  1208. disabled
  1209. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1210. v-model="scope.row.fAmount"
  1211. placeholder="金额"
  1212. show-word-limit
  1213. />
  1214. </template>
  1215. </el-table-column>
  1216. <el-table-column
  1217. prop="fCurrency"
  1218. header-align="center"
  1219. align="center"
  1220. width="150px"
  1221. label="币别"
  1222. >
  1223. <template slot-scope="scope">
  1224. <el-input
  1225. v-model="scope.row.fCurrency"
  1226. :disabled="browseStatus"
  1227. placeholder="币别"
  1228. show-word-limit
  1229. />
  1230. </template>
  1231. </el-table-column>
  1232. <el-table-column
  1233. prop="fCxrate"
  1234. header-align="center"
  1235. align="center"
  1236. width="150px"
  1237. label="汇率"
  1238. >
  1239. <template slot-scope="scope">
  1240. <el-input
  1241. v-model="scope.row.fCxrate"
  1242. :disabled="browseStatus"
  1243. placeholder="汇率"
  1244. show-word-limit
  1245. />
  1246. </template>
  1247. </el-table-column>
  1248. <el-table-column
  1249. prop="fRate"
  1250. header-align="center"
  1251. align="center"
  1252. width="150px"
  1253. label="税率"
  1254. >
  1255. <template slot-scope="scope">
  1256. <el-input
  1257. v-model="scope.row.fRate"
  1258. :disabled="browseStatus"
  1259. placeholder="税率"
  1260. show-word-limit
  1261. />
  1262. </template>
  1263. </el-table-column>
  1264. <el-table-column
  1265. prop="remarks"
  1266. header-align="center"
  1267. align="center"
  1268. width="150px"
  1269. label="备注"
  1270. >
  1271. <template slot-scope="scope">
  1272. <el-input
  1273. v-model="scope.row.remarks"
  1274. :disabled="browseStatus"
  1275. placeholder="备注"
  1276. show-word-limit
  1277. />
  1278. </template>
  1279. </el-table-column>
  1280. <el-table-column
  1281. header-align="center"
  1282. align="center"
  1283. label="操作"
  1284. width="200px"
  1285. >
  1286. <template slot-scope="scope">
  1287. <el-button size="small">审核费用</el-button>
  1288. <el-button
  1289. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1290. size="small"
  1291. >移除</el-button
  1292. >
  1293. </template>
  1294. </el-table-column>
  1295. </el-table>
  1296. <div class="dialogTableTitle flex a-center jlr">
  1297. <h2>付款信息</h2>
  1298. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1299. >添加
  1300. </el-button>
  1301. </div>
  1302. <el-table
  1303. :data="warehouseCrList"
  1304. ref="table"
  1305. tooltip-effect="dark"
  1306. border
  1307. stripe
  1308. show-summary
  1309. :summary-method="warehouseDrSummaries"
  1310. >
  1311. <el-table-column label="序号" type="index" width="80">
  1312. </el-table-column>
  1313. <el-table-column
  1314. prop="fCorpid"
  1315. header-align="center"
  1316. align="center"
  1317. width="180px"
  1318. label="客户名称"
  1319. >
  1320. <template slot-scope="scope">
  1321. <el-select
  1322. v-model="scope.row.fCorpid"
  1323. filterable
  1324. remote
  1325. :disabled="browseStatus"
  1326. :remote-method="corpsRemoteMethod"
  1327. placeholder="客户名称"
  1328. >
  1329. <el-option
  1330. v-for="(dict, index) in KHblnoOptions"
  1331. :key="index.fId"
  1332. :label="dict.fName"
  1333. :value="dict.fId"
  1334. ></el-option>
  1335. </el-select>
  1336. </template>
  1337. </el-table-column>
  1338. <el-table-column
  1339. prop="fFeeid"
  1340. header-align="center"
  1341. align="center"
  1342. width="180px"
  1343. label="费用名称"
  1344. >
  1345. <template slot-scope="scope">
  1346. <el-select
  1347. v-model="scope.row.fFeeid"
  1348. filterable
  1349. remote
  1350. :disabled="browseStatus"
  1351. :remote-method="fWRemoteMethod"
  1352. placeholder="费用名称"
  1353. >
  1354. <el-option
  1355. v-for="dict in fWbuOptions"
  1356. :key="dict.fId"
  1357. :label="dict.fName"
  1358. :value="dict.fId"
  1359. ></el-option>
  1360. </el-select>
  1361. </template>
  1362. </el-table-column>
  1363. <el-table-column
  1364. prop="ffeeUnitid"
  1365. header-align="center"
  1366. align="center"
  1367. width="180px"
  1368. label="计价单位"
  1369. >
  1370. <template slot-scope="scope">
  1371. <el-select
  1372. v-model="scope.row.fFeeUnitid"
  1373. placeholder="请选择计费单位"
  1374. @change="changeFeeUnit(scope.row)"
  1375. :disabled="browseStatus"
  1376. clearable
  1377. >
  1378. <el-option
  1379. v-for="dict in jFeetunitOptions"
  1380. :key="dict.dictValue"
  1381. :label="dict.dictLabel"
  1382. :value="dict.dictValue"
  1383. />
  1384. </el-select>
  1385. </template>
  1386. </el-table-column>
  1387. <el-table-column
  1388. prop="fQty"
  1389. header-align="center"
  1390. align="center"
  1391. width="150px"
  1392. label="数量"
  1393. >
  1394. <template slot-scope="scope">
  1395. <el-input
  1396. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1397. v-model="scope.row.fQty"
  1398. @change="changeEstmateAmt(scope.row)"
  1399. :disabled="browseStatus"
  1400. placeholder="数量"
  1401. show-word-limit
  1402. />
  1403. </template>
  1404. </el-table-column>
  1405. <el-table-column
  1406. prop="funitprice"
  1407. header-align="center"
  1408. align="center"
  1409. width="150px"
  1410. label="单价"
  1411. >
  1412. <template slot-scope="scope">
  1413. <el-input
  1414. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1415. v-model="scope.row.fUnitprice"
  1416. @change="changeContractAmt(scope.row)"
  1417. :disabled="browseStatus"
  1418. placeholder="单价"
  1419. show-word-limit
  1420. />
  1421. </template>
  1422. </el-table-column>
  1423. <el-table-column
  1424. prop="fAmount"
  1425. header-align="center"
  1426. align="center"
  1427. width="150px"
  1428. label="金额"
  1429. >
  1430. <template slot-scope="scope">
  1431. <el-input
  1432. disabled
  1433. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1434. v-model="scope.row.fAmount"
  1435. placeholder="金额"
  1436. show-word-limit
  1437. />
  1438. </template>
  1439. </el-table-column>
  1440. <el-table-column
  1441. prop="fCurrency"
  1442. header-align="center"
  1443. align="center"
  1444. width="150px"
  1445. label="币别"
  1446. >
  1447. <template slot-scope="scope">
  1448. <el-input
  1449. v-model="scope.row.fCurrency"
  1450. :disabled="browseStatus"
  1451. placeholder="币别"
  1452. show-word-limit
  1453. />
  1454. </template>
  1455. </el-table-column>
  1456. <el-table-column
  1457. prop="fCxrate"
  1458. header-align="center"
  1459. align="center"
  1460. width="150px"
  1461. label="汇率"
  1462. >
  1463. <template slot-scope="scope">
  1464. <el-input
  1465. v-model="scope.row.fCxrate"
  1466. :disabled="browseStatus"
  1467. placeholder="汇率"
  1468. show-word-limit
  1469. />
  1470. </template>
  1471. </el-table-column>
  1472. <el-table-column
  1473. prop="fRate"
  1474. header-align="center"
  1475. align="center"
  1476. width="150px"
  1477. label="税率"
  1478. >
  1479. <template slot-scope="scope">
  1480. <el-input
  1481. v-model="scope.row.fRate"
  1482. :disabled="browseStatus"
  1483. placeholder="税率"
  1484. show-word-limit
  1485. />
  1486. </template>
  1487. </el-table-column>
  1488. <el-table-column
  1489. prop="remarks"
  1490. header-align="center"
  1491. align="center"
  1492. width="150px"
  1493. label="备注"
  1494. >
  1495. <template slot-scope="scope">
  1496. <el-input
  1497. v-model="scope.row.remarks"
  1498. :disabled="browseStatus"
  1499. placeholder="备注"
  1500. show-word-limit
  1501. />
  1502. </template>
  1503. </el-table-column>
  1504. <el-table-column
  1505. header-align="center"
  1506. align="center"
  1507. width="200px"
  1508. label="操作"
  1509. >
  1510. <template slot-scope="scope">
  1511. <el-button size="small">审核费用</el-button>
  1512. <el-button
  1513. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1514. size="small"
  1515. >移除</el-button
  1516. >
  1517. </template>
  1518. </el-table-column>
  1519. </el-table>
  1520. <div slot="footer" class="dialog-footer">
  1521. <el-button
  1522. type="danger"
  1523. size="mini"
  1524. prop="打印"
  1525. @click="showEditDialog_ss"
  1526. >收货单
  1527. </el-button>
  1528. <el-button
  1529. type="danger"
  1530. size="mini"
  1531. prop="打印"
  1532. @click="showEditDialog_s"
  1533. >出库单
  1534. </el-button>
  1535. <el-button
  1536. type="danger"
  1537. size="mini"
  1538. prop="打印"
  1539. @click="showEditDialog_sss"
  1540. >作业单
  1541. </el-button>
  1542. <el-button type="primary" @click="submitForm(2)">暂 存</el-button>
  1543. <el-button type="primary" @click="submitForm(6)">确 定</el-button>
  1544. <el-button @click="cancel">取 消</el-button>
  1545. </div>
  1546. <!-- 选择库存总账数据 -->
  1547. <el-dialog
  1548. title="库存总账"
  1549. :modal="false"
  1550. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1551. :visible.sync="whgenlegVisible"
  1552. width="70%"
  1553. >
  1554. <el-table
  1555. :data="whgenlegList"
  1556. ref="table"
  1557. tooltip-effect="dark"
  1558. width="100%"
  1559. border
  1560. stripe
  1561. @selection-change="whgenlegSelectionChange"
  1562. >
  1563. <el-table-column
  1564. type="selection"
  1565. width="55">
  1566. </el-table-column>
  1567. <el-table-column
  1568. prop="fMblno"
  1569. header-align="center"
  1570. align="center"
  1571. label="提单号"
  1572. >
  1573. </el-table-column>
  1574. <el-table-column
  1575. prop="createTime"
  1576. header-align="center"
  1577. align="center"
  1578. width="180px"
  1579. label="入库日期"
  1580. >
  1581. </el-table-column>
  1582. <el-table-column
  1583. prop="fGoodsid"
  1584. header-align="center"
  1585. align="center"
  1586. label="品名"
  1587. >
  1588. </el-table-column>
  1589. <el-table-column
  1590. prop="fQtyblc"
  1591. header-align="center"
  1592. align="center"
  1593. label="结余数量"
  1594. >
  1595. </el-table-column>
  1596. <el-table-column
  1597. prop="fWarehouseLocationid"
  1598. header-align="center"
  1599. align="center"
  1600. label="库区"
  1601. >
  1602. </el-table-column>
  1603. </el-table>
  1604. <pagination
  1605. v-show="whgenlegTotal>0"
  1606. :total="whgenlegTotal"
  1607. :page.sync="whgenlegParams.pageNum"
  1608. :limit.sync="whgenlegParams.pageSize"
  1609. @pagination="getWhgenlegList"
  1610. />
  1611. <div slot="footer" class="dialog-footer">
  1612. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1613. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1614. </div>
  1615. </el-dialog>
  1616. <el-dialog
  1617. title="入库页面"
  1618. :modal="false"
  1619. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1620. :visible.sync="editDialogVisible_s"
  1621. width="70%"
  1622. >
  1623. <table
  1624. id="print_area"
  1625. class="biaoge zzss"
  1626. border="1"
  1627. style="border-collapse: collapse; border: none"
  1628. >
  1629. <tr>
  1630. <td
  1631. width="100"
  1632. colspan="7"
  1633. class="zzss"
  1634. style="font-size: 28px; font-weight: bold; border: none"
  1635. >
  1636. 青岛大木进进仓单
  1637. </td>
  1638. </tr>
  1639. <tr>
  1640. <td
  1641. width="100"
  1642. colspan="7"
  1643. class="zzss"
  1644. style="font-size: 28px; font-weight: bold; border: none"
  1645. >
  1646. &nbsp;
  1647. </td>
  1648. </tr>
  1649. <tr>
  1650. <td width="450" colspan="2" class="zzss">货权方:某某有限公司</td>
  1651. <td width="450" colspan="2" class="zzss">仓库:某某3号大仓</td>
  1652. <td width="450" colspan="3" class="zzss">
  1653. 地址:青岛市市北区郑州路1344号
  1654. </td>
  1655. </tr>
  1656. <tr>
  1657. <td width="200" colspan="2" class="zzss">保管方:某某有限公司</td>
  1658. <td width="200" colspan="2" class="zzss">联系人:张三</td>
  1659. <td width="200" colspan="3" class="zzss">
  1660. 电话:0532-561651561-546
  1661. </td>
  1662. </tr>
  1663. <tr>
  1664. <td width="100" border="1">提单号</td>
  1665. <td width="100">品名</td>
  1666. <td width="100">箱型</td>
  1667. <td width="100">品牌</td>
  1668. <td width="100">件数</td>
  1669. <td width="100">重量</td>
  1670. <td width="100">包装规格</td>
  1671. </tr>
  1672. <tr>
  1673. <td width="100">56165654555</td>
  1674. <td width="100">某某商品</td>
  1675. <td width="100">20GP</td>
  1676. <td width="100">某某</td>
  1677. <td width="100">包</td>
  1678. <td width="100">吨</td>
  1679. <td width="100">50kg</td>
  1680. </tr>
  1681. <tr>
  1682. <td width="100">序号</td>
  1683. <td width="100">入货日期</td>
  1684. <td width="100">箱量(20GP)</td>
  1685. <td width="100">重量</td>
  1686. <td width="100">件数</td>
  1687. <td width="100">入库重量</td>
  1688. <td width="100">入库件数</td>
  1689. </tr>
  1690. <tr>
  1691. <td width="100">1</td>
  1692. <td width="100">2020-11-20</td>
  1693. <td width="100">10</td>
  1694. <td width="100">100</td>
  1695. <td width="100">10000</td>
  1696. <td width="100">20</td>
  1697. <td width="100">3000</td>
  1698. </tr>
  1699. <tr>
  1700. <td width="100">2</td>
  1701. <td width="100">2020-11-20</td>
  1702. <td width="100">10</td>
  1703. <td width="100">100</td>
  1704. <td width="100">10000</td>
  1705. <td width="100">20</td>
  1706. <td width="100">3000</td>
  1707. </tr>
  1708. <tr>
  1709. <td width="100">3</td>
  1710. <td width="100">2020-11-20</td>
  1711. <td width="100">10</td>
  1712. <td width="100">100</td>
  1713. <td width="100">10000</td>
  1714. <td width="100">20</td>
  1715. <td width="100">3000</td>
  1716. </tr>
  1717. <tr>
  1718. <td width="100">4</td>
  1719. <td width="100">2020-11-20</td>
  1720. <td width="100">10</td>
  1721. <td width="100">100</td>
  1722. <td width="100">10000</td>
  1723. <td width="100">20</td>
  1724. <td width="100">3000</td>
  1725. </tr>
  1726. <tr>
  1727. <td width="100">5</td>
  1728. <td width="100">2020-11-20</td>
  1729. <td width="100">10</td>
  1730. <td width="100">100</td>
  1731. <td width="100">10000</td>
  1732. <td width="100">20</td>
  1733. <td width="100">3000</td>
  1734. </tr>
  1735. <tr>
  1736. <td width="100">6</td>
  1737. <td width="100">2020-11-20</td>
  1738. <td width="100">10</td>
  1739. <td width="100">100</td>
  1740. <td width="100">10000</td>
  1741. <td width="100">20</td>
  1742. <td width="100">3000</td>
  1743. </tr>
  1744. <tr>
  1745. <td width="100">7</td>
  1746. <td width="100">2020-11-20</td>
  1747. <td width="100">10</td>
  1748. <td width="100">100</td>
  1749. <td width="100">10000</td>
  1750. <td width="100">20</td>
  1751. <td width="100">3000</td>
  1752. </tr>
  1753. <tr>
  1754. <td width="100" colspan="2">合计:</td>
  1755. <td width="100">10</td>
  1756. <td width="100">100</td>
  1757. <td width="100">10000</td>
  1758. <td width="100">20</td>
  1759. <td width="100">3000</td>
  1760. </tr>
  1761. <tr>
  1762. <td width="100">备注:</td>
  1763. <td width="100" colspan="6"></td>
  1764. </tr>
  1765. <tr>
  1766. <td width="100" colspan="7" class="zzss">
  1767. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  1768. </td>
  1769. </tr>
  1770. <tr style="border: none">
  1771. <td width="100" colspan="2" class="zzss" style="border: none">
  1772. 开单员:
  1773. </td>
  1774. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  1775. <td width="100" colspan="2" class="zzss" style="border: none">
  1776. 仓管员:张三
  1777. </td>
  1778. </tr>
  1779. <tr style="border: none">
  1780. <td width="100" colspan="2" class="zzss" style="border: none">
  1781. 开单时间:
  1782. </td>
  1783. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  1784. <td width="100" colspan="2" class="zzss" style="border: none">
  1785. (盖章)
  1786. </td>
  1787. </tr>
  1788. </table>
  1789. <button @click="printSomething">打印</button>
  1790. </el-dialog>
  1791. <el-dialog
  1792. title="收货单打印"
  1793. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1794. :visible.sync="editDialogVisible_ss"
  1795. width="70%"
  1796. :modal="false"
  1797. >
  1798. <table
  1799. id="print_area"
  1800. class="biaoge zzss"
  1801. border="1"
  1802. style="border-collapse: collapse; border: none"
  1803. >
  1804. <tr>
  1805. <td
  1806. width="1400"
  1807. colspan="6"
  1808. class="zzss"
  1809. style="font-size: 28px; font-weight: bold; border: none"
  1810. >
  1811. 大木国际物流(青岛)有限公司收货单
  1812. </td>
  1813. </tr>
  1814. <tr>
  1815. <td
  1816. width="900"
  1817. colspan="4"
  1818. class="zzss"
  1819. style="font-size: 28px; font-weight: bold"
  1820. >
  1821. &nbsp;
  1822. </td>
  1823. <td
  1824. width="500"
  1825. colspan="2"
  1826. style="padding-bottom: 0px; font-weight: bold; border: none"
  1827. class="zzss"
  1828. >
  1829. 出库日期:2020-11-20
  1830. </td>
  1831. </tr>
  1832. <tr>
  1833. <td width="200">车号</td>
  1834. <td width="200">苏HFN751</td>
  1835. <td width="200">货物品名</td>
  1836. <td width="200" colspan="4" class="zzss">某某商品名</td>
  1837. </tr>
  1838. <tr>
  1839. <td width="1400" colspan="6">&nbsp;</td>
  1840. </tr>
  1841. <tr>
  1842. <td>备注:</td>
  1843. <td colspan="5"></td>
  1844. </tr>
  1845. <tr>
  1846. <td>收费</td>
  1847. <td>装箱费</td>
  1848. <td>100元</td>
  1849. <td colspan="4">办单费:5元,过磅费自理</td>
  1850. </tr>
  1851. <tr>
  1852. <td>司机签字:</td>
  1853. <td></td>
  1854. <td>电话</td>
  1855. <td>15896154516</td>
  1856. <td colspan="2" rowspan="2">
  1857. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  1858. </td>
  1859. </tr>
  1860. <tr>
  1861. <td>制表:</td>
  1862. <td>张三</td>
  1863. <td>机械/人工:</td>
  1864. <td></td>
  1865. </tr>
  1866. <tr>
  1867. <td colspan="6" class="zzss">&nbsp;</td>
  1868. </tr>
  1869. <tr>
  1870. <td width="280" class="zzss"></td>
  1871. <td width="280" class="zzss"></td>
  1872. <td width="280" class="zzss"></td>
  1873. <td width="280" class="zzss"></td>
  1874. <td width="290" class="zzss">地址:淮河东路96号</td>
  1875. <td width="290" class="zzss">电话:18685818919</td>
  1876. </tr>
  1877. </table>
  1878. <button @click="printSomething">打印</button>
  1879. </el-dialog>
  1880. <el-dialog
  1881. title="收货单打印"
  1882. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1883. :visible.sync="editDialogVisible_sss"
  1884. width="70%"
  1885. :modal="false"
  1886. >
  1887. <table
  1888. id="print_area"
  1889. class="biaoge zzss"
  1890. border="1"
  1891. style="border-collapse: collapse; border: none"
  1892. >
  1893. <tr>
  1894. <td
  1895. width="1400"
  1896. colspan="6"
  1897. class="zzss"
  1898. style="font-size: 28px; font-weight: bold; border: none"
  1899. >
  1900. 大木国际物流(青岛)有限公司作业单
  1901. </td>
  1902. </tr>
  1903. <tr>
  1904. <td
  1905. width="900"
  1906. colspan="4"
  1907. class="zzss"
  1908. style="font-size: 28px; font-weight: bold"
  1909. >
  1910. &nbsp;
  1911. </td>
  1912. <td
  1913. width="500"
  1914. colspan="2"
  1915. style="padding-bottom: 0px; font-weight: bold; border: none"
  1916. class="zzss"
  1917. >
  1918. 出库日期:2020-11-20
  1919. </td>
  1920. </tr>
  1921. <tr>
  1922. <td width="200">车号</td>
  1923. <td width="200">苏HFN751</td>
  1924. <td width="200">货物品名</td>
  1925. <td width="200" colspan="4" class="zzss">某某商品名</td>
  1926. </tr>
  1927. <tr>
  1928. <td width="1400" colspan="6">&nbsp;</td>
  1929. </tr>
  1930. <tr>
  1931. <td>备注:</td>
  1932. <td colspan="5"></td>
  1933. </tr>
  1934. <tr>
  1935. <td>收费</td>
  1936. <td>装箱费</td>
  1937. <td>100元</td>
  1938. <td colspan="4">办单费:5元,过磅费自理</td>
  1939. </tr>
  1940. <tr>
  1941. <td>司机签字:</td>
  1942. <td></td>
  1943. <td>电话</td>
  1944. <td>15896154516</td>
  1945. <td colspan="2" rowspan="2">
  1946. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  1947. </td>
  1948. </tr>
  1949. <tr>
  1950. <td>制表:</td>
  1951. <td>张三</td>
  1952. <td>机械/人工:</td>
  1953. <td></td>
  1954. </tr>
  1955. <tr>
  1956. <td colspan="6" class="zzss">&nbsp;</td>
  1957. </tr>
  1958. <tr>
  1959. <td width="280" class="zzss"></td>
  1960. <td width="280" class="zzss"></td>
  1961. <td width="280" class="zzss"></td>
  1962. <td width="280" class="zzss"></td>
  1963. <td width="290" class="zzss">地址:淮河东路96号</td>
  1964. <td width="290" class="zzss">电话:18685818919</td>
  1965. </tr>
  1966. </table>
  1967. <button @click="printSomething">打印</button>
  1968. </el-dialog>
  1969. </el-dialog>
  1970. </div>
  1971. </template>
  1972. <script>
  1973. import print from "print-js";
  1974. import {
  1975. listWarehousebills,
  1976. getWarehousebills,
  1977. delWarehousebills,
  1978. addWarehousebills,
  1979. updateWarehousebills,
  1980. exportWarehousebills,
  1981. } from "@/api/warehouseBusiness/warehouseOutStock";
  1982. import { listCorps } from "@/api/basicdata/corps";
  1983. import { listFees } from "@/api/basicdata/fees";
  1984. import { listWarehouse } from "@/api/basicdata/warehouse";
  1985. import { listArea } from "@/api/basicdata/area";
  1986. import { listGoods } from "@/api/basicdata/goods";
  1987. import { listUser, queryUserVal } from "@/api/system/user";
  1988. import UploadFile from "@/components/Uploadfile";
  1989. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1990. export default {
  1991. name: "Warehousebills",
  1992. components: {
  1993. UploadFile,
  1994. },
  1995. data() {
  1996. return {
  1997. fFeeUnitid: "",
  1998. fFeeUnitids: "",
  1999. browseStatus: false,
  2000. detailsHidden: false,
  2001. fGrossweight: '',
  2002. fNetweight: '',
  2003. fQty: '',
  2004. // 遮罩层
  2005. loading: true,
  2006. // 选中数组
  2007. ids: [],
  2008. userVal: {
  2009. userName: null,
  2010. nickName: null,
  2011. deptId: null,
  2012. },
  2013. queryForm: {},
  2014. // 库存总账表
  2015. whgenlegList: [],
  2016. whgenlegTotal: 0,
  2017. // 弹窗库存总账数据
  2018. dialogWhgenlegList: [],
  2019. // 库存总账对话框
  2020. whgenlegVisible: false,
  2021. // 添加用户对话框
  2022. editDialogVisible_s: false,
  2023. editDialogVisible_ss: false,
  2024. editDialogVisible_sss: false,
  2025. editDialogClosed_ss: false,
  2026. dataList: [],
  2027. warehouseCrList: [],
  2028. warehouseDrList: [],
  2029. browseStatus: false,
  2030. relevantAttachments: [],
  2031. // 非单个禁用
  2032. single: true,
  2033. // 非多个禁用
  2034. multiple: true,
  2035. // 显示搜索条件
  2036. showSearch: true,
  2037. // 总条数
  2038. total: 0,
  2039. // 仓库主(出入库)表格数据
  2040. warehousebillsList: [],
  2041. // 弹出层标题
  2042. title: "",
  2043. // 是否显示弹出层
  2044. open: false,
  2045. // 货权方(客户数据)
  2046. fMblnoOptions: [],
  2047. // 货权方(客户数据)
  2048. // 客户名称
  2049. KHblnoOptions: [],
  2050. fSbuOptions: [],
  2051. // 操作员
  2052. userOptions: [],
  2053. // 操作员
  2054. goodsOptions: [],
  2055. // 制单部门
  2056. deptOptions: [],
  2057. // 仓库(仓库数据)
  2058. warehouseOptions: [],
  2059. kqhouseOptions: [],
  2060. // 贸易方式(数据字典),对应t_trademodels 字典
  2061. fTrademodeidOptions: [],
  2062. // 计费单位(数据字典),下拉选择毛重或净重字典
  2063. fFeetunitOptions: [],
  2064. // 结算方式(数据字典),下拉选择字典
  2065. fStltypeOptions: [],
  2066. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2067. fIfweighOptions: [],
  2068. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  2069. fIfpledgeOptions: [],
  2070. // 是否破损(数据字典),默认F否则T字典
  2071. fIfdamageOptions: [],
  2072. // 单据类型(数据字典)SJRK字典
  2073. fBilltypeOptions: [],
  2074. // 状态(数据字典),N 入字典
  2075. fBillstatusOptions: [],
  2076. // 费用名称
  2077. fWbuOptions: [],
  2078. // 计价单位
  2079. jFeetunitOptions: [],
  2080. // 查询参数
  2081. queryParams: {
  2082. pageNum: 1,
  2083. pageSize: 10,
  2084. fBillno: null,
  2085. createBy: null,
  2086. createTime: null,
  2087. fCustomsdeclartion: null,
  2088. fOriginalbillno: null,
  2089. fDeptid: null,
  2090. fBsdeptid: null,
  2091. fContacts: null,
  2092. fTel: null,
  2093. fCorpid: null,
  2094. fTocorpid: null,
  2095. fStltypeid: null,
  2096. fBscorpno: null,
  2097. fWarehouseid: null,
  2098. fStorekeeper: null,
  2099. fBsdate: null,
  2100. fPlanqty: null,
  2101. fPlangrossweight: null,
  2102. fPlannetweight: null,
  2103. fPlanvolumn: null,
  2104. fQty: null,
  2105. fGrossweight: null,
  2106. fNetweight: null,
  2107. fVolumn: null,
  2108. fTrademodeid: null,
  2109. fSbu: null,
  2110. fFeetunit: null,
  2111. fMblno: null,
  2112. fVslvoy: null,
  2113. fEta: null,
  2114. fCustomno: null,
  2115. fIfweigh: null,
  2116. fIfpledge: null,
  2117. fIfdamage: null,
  2118. fBankcorpid: null,
  2119. fBilltype: null,
  2120. fBillstatus: null,
  2121. fCreateby: null,
  2122. fCreatetime: null,
  2123. fGoodsid: null,
  2124. fCntrtype: null,
  2125. fCntqty: null,
  2126. },
  2127. // 库存总账参数
  2128. whgenlegParams: {
  2129. pageNum: 1,
  2130. pageSize: 10,
  2131. fMblno: null,
  2132. fCorpid: null,
  2133. fWarehouseid: null
  2134. },
  2135. // 表单参数
  2136. form: {
  2137. fMblno: null,
  2138. fCorpid: null,
  2139. fTrademodeid: null,
  2140. fWarehouseid: null
  2141. },
  2142. // 表单校验
  2143. rules: {
  2144. fDeptid: [
  2145. { required: true, message: "制单部门不能为空", trigger: "blur" },
  2146. ],
  2147. fMblno: [{ required: true, message: "请输入提单号", trigger: "blur" }],
  2148. fBsdeptid: [
  2149. { required: true, message: "业务所属部门不能为空", trigger: "blur" },
  2150. ],
  2151. fCorpid: [
  2152. {
  2153. required: true,
  2154. message: "请选择货权方",
  2155. trigger: "blur",
  2156. },
  2157. ],
  2158. fBsdate: [
  2159. { required: true, message: "请选择业务日期", trigger: "blur" },
  2160. ],
  2161. fTrademodeid: [
  2162. { required: true, message: "请选择贸易方式", trigger: "blur" },
  2163. ],
  2164. fSbu: [
  2165. { required: true, message: "请选择经营方式", trigger: "blur" },
  2166. ],
  2167. fStorekeeper: {
  2168. required: true,
  2169. message: "请输入仓管员",
  2170. trigger: "blur",
  2171. },
  2172. fWarehouseid: [
  2173. { required: true, message: "请选择仓库", trigger: "blur" },
  2174. ],
  2175. // fBscorpno: [
  2176. // { required: true, message: "请输入存货编号", trigger: "blur" },
  2177. // ],
  2178. fbillingway: [
  2179. {
  2180. required: true,
  2181. message: "请选择结算方式",
  2182. trigger: "blur",
  2183. },
  2184. ],
  2185. fTocorpid: [
  2186. {
  2187. required: true,
  2188. message:
  2189. "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空",
  2190. trigger: "blur",
  2191. },
  2192. ],
  2193. },
  2194. };
  2195. },
  2196. created() {
  2197. this.getList();
  2198. this.getDicts("data_trademodes").then((response) => {
  2199. this.fTrademodeidOptions = response.data;
  2200. });
  2201. this.getDicts("data_unitfees").then((response) => {
  2202. this.fFeetunitOptions = response.data;
  2203. this.jFeetunitOptions = response.data;
  2204. });
  2205. this.getDicts("data_stltype_type").then((response) => {
  2206. this.fStltypeOptions = response.data;
  2207. });
  2208. this.getDicts("data_ifweigh_status").then((response) => {
  2209. this.fIfweighOptions = response.data;
  2210. });
  2211. this.getDicts("data_ifpledge_status").then((response) => {
  2212. this.fIfpledgeOptions = response.data;
  2213. });
  2214. this.getDicts("data_ifdamage_status").then((response) => {
  2215. this.fIfdamageOptions = response.data;
  2216. });
  2217. this.getDicts("data_billtype_type").then((response) => {
  2218. this.fBilltypeOptions = response.data;
  2219. });
  2220. this.getDicts("sys_common_status").then((response) => {
  2221. this.fBillstatusOptions = response.data;
  2222. });
  2223. },
  2224. methods: {
  2225. // 上传成功返回数据
  2226. showFile(row) {
  2227. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  2228. this.$set(this.relevantAttachments[0], 'fUrl', row.url)
  2229. },
  2230. printSomething() {
  2231. // 此处的style即为打印时的样式
  2232. const style =
  2233. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2234. print({
  2235. printable: "print_area",
  2236. type: "html",
  2237. style: style, // 亦可使用引入的外部css;
  2238. scanStyles: false,
  2239. });
  2240. },
  2241. // 添加附件上传
  2242. addRelevt() {
  2243. this.relevantAttachments.push({
  2244. fUrl: null,
  2245. fName: null,
  2246. createBy: this.queryParams.createBy,
  2247. createTime: Date.parse(new Date()),
  2248. });
  2249. },
  2250. // 添加list
  2251. addRelevant() {
  2252. let corpidStatus = typeof this.form.fCorpid === 'undefined' || this.form.fCorpid == null || this.form.fCorpid === ''
  2253. let ftrademodeids = typeof this.form.fTrademodeid === 'undefined' || this.form.fTrademodeid == null || this.form.fTrademodeid === ''
  2254. let warehouseidStatus = typeof this.form.fWarehouseid === 'undefined' || this.form.fWarehouseid == null || this.form.fWarehouseid === ''
  2255. if (corpidStatus || warehouseidStatus || ftrademodeids) {
  2256. this.$message({ message: '请维护货权方、仓库、贸易方式', type: 'warning' })
  2257. return false
  2258. }
  2259. this.whgenlegList = []
  2260. this.dialogWhgenlegList = []
  2261. this.whgenlegTotal = 0
  2262. this.whgenlegVisible = true
  2263. this.getWhgenlegList()
  2264. },
  2265. // 库存总账导出数据
  2266. whgenlegData () {
  2267. console.log(this.dialogWhgenlegList)
  2268. for (let whgen in this.dialogWhgenlegList) {
  2269. this.dataList.push({
  2270. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2271. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2272. fCntrtype: null,
  2273. fQtyblc: this.dialogWhgenlegList[whgen].fQtyblc,
  2274. fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2275. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2276. fGrossweight: 0,
  2277. fNetweight: 0,
  2278. fQty: 0,
  2279. fCntqty: 1,
  2280. fPackagespecs: null,
  2281. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2282. fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
  2283. fGoodsval: null,
  2284. fTruckno: null,
  2285. remark: null
  2286. })
  2287. }
  2288. this.whgenlegVisible = false
  2289. },
  2290. // 收货单打印界面
  2291. showEditDialog_s() {
  2292. this.editDialogVisible_s = true;
  2293. },
  2294. showEditDialog_ss() {
  2295. this.editDialogVisible_ss = true;
  2296. },
  2297. showEditDialog_sss() {
  2298. this.editDialogVisible_sss = true;
  2299. },
  2300. // 收款信息
  2301. addCollection() {
  2302. this.warehouseDrList.push({
  2303. fcorpid: null,
  2304. ffeeid: null,
  2305. fFeeUnitid: null,
  2306. fQty: null,
  2307. funitprice: null,
  2308. fAmount: null,
  2309. fCurrency: null,
  2310. fCxrate: null,
  2311. fRate: null,
  2312. remarks: null,
  2313. });
  2314. },
  2315. addpayment() {
  2316. this.warehouseCrList.push({
  2317. fcorpid: null,
  2318. ffeeid: null,
  2319. fFeeUnitid: null,
  2320. fQty: null,
  2321. funitprice: null,
  2322. fAmount: null,
  2323. fCurrency: null,
  2324. fCxrate: null,
  2325. fRate: null,
  2326. remarks: null,
  2327. });
  2328. },
  2329. queryUser() {
  2330. queryUserVal().then((response) => {
  2331. if (response.user !== null) {
  2332. this.userVal = response.user;
  2333. this.$set(this.form, "fDeptid", this.userVal.deptId);
  2334. this.$set(this.form, "createBy", this.userVal.userName);
  2335. this.$set(this.form, "createTime", Date.parse(new Date()));
  2336. }
  2337. if (response.dept !== null) {
  2338. this.deptOptions = [];
  2339. this.deptOptions.push(response.dept);
  2340. }
  2341. });
  2342. },
  2343. /** 查询仓库主(出入库)列表 */
  2344. getList() {
  2345. this.loading = true;
  2346. listWarehousebills(this.queryParams).then((response) => {
  2347. this.warehousebillsList = response.rows;
  2348. console.log(response.rows)
  2349. this.total = response.total;
  2350. this.loading = false;
  2351. });
  2352. },
  2353. // 查询库存总账信息
  2354. getWhgenlegList () {
  2355. this.whgenlegParams.fMblno = this.form.fMblno
  2356. this.whgenlegParams.fCorpid = this.form.fCorpid
  2357. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  2358. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  2359. listWhgenleg(this.whgenlegParams).then(response => {
  2360. this.whgenlegList = response.rows
  2361. this.whgenlegTotal = response.total
  2362. })
  2363. },
  2364. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  2365. fTrademodeidFormat(row, column) {
  2366. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  2367. },
  2368. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  2369. fFeetunitFormat(row, column) {
  2370. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  2371. },
  2372. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2373. fIfweighFormat(row, column) {
  2374. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  2375. },
  2376. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2377. fIfpledgeFormat(row, column) {
  2378. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  2379. },
  2380. // 是否破损(数据字典),默认F否则T字典翻译
  2381. fIfdamageFormat(row, column) {
  2382. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  2383. },
  2384. // 单据类型(数据字典)SJRK字典翻译
  2385. fBilltypeFormat(row, column) {
  2386. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  2387. },
  2388. // 状态(数据字典),N 入字典翻译
  2389. fBillstatusFormat(row, column) {
  2390. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  2391. },
  2392. // 取消按钮
  2393. cancel() {
  2394. this.open = false;
  2395. this.reset();
  2396. },
  2397. // 表单重置
  2398. reset() {
  2399. this.form = {
  2400. fId: null,
  2401. fBillno: null,
  2402. fCustomsdeclartion: null,
  2403. fOriginalbillno: null,
  2404. fDeptid: null,
  2405. fBsdeptid: null,
  2406. fContacts: null,
  2407. fTel: null,
  2408. fCorpid: null,
  2409. fTocorpid: null,
  2410. fStltypeid: null,
  2411. fBscorpno: null,
  2412. fWarehouseid: null,
  2413. fStorekeeper: null,
  2414. fBsdate: null,
  2415. fPlanqty: null,
  2416. fPlangrossweight: null,
  2417. fPlannetweight: null,
  2418. fPlanvolumn: null,
  2419. fQty: null,
  2420. fGrossweight: null,
  2421. fNetweight: null,
  2422. fVolumn: null,
  2423. fTrademodeid: null,
  2424. fSbu: null,
  2425. fFeetunit: null,
  2426. fMblno: null,
  2427. fVslvoy: null,
  2428. fEta: null,
  2429. fCustomno: null,
  2430. fIfweigh: null,
  2431. fIfpledge: null,
  2432. fIfdamage: null,
  2433. fBankcorpid: null,
  2434. fBilltype: null,
  2435. fBillstatus: null,
  2436. delFlag: null,
  2437. createBy: null,
  2438. createTime: null,
  2439. updateBy: null,
  2440. updateTime: null,
  2441. remark: null,
  2442. fCreateby: null,
  2443. fCreatetime: null,
  2444. fGoodsid: null,
  2445. fCntrtype: null,
  2446. fCntqty: null,
  2447. };
  2448. this.deptOptions = []
  2449. this.userOptions = []
  2450. this.fSbuOptions = []
  2451. this.fWbuOptions = []
  2452. this.goodsOptions = []
  2453. this.KHblnoOptions = []
  2454. this.fMblnoOptions = []
  2455. this.kqhouseOptions = []
  2456. this.resetForm("form");
  2457. },
  2458. /** 搜索按钮操作 */
  2459. handleQuery() {
  2460. this.queryParams.pageNum = 1;
  2461. this.getList();
  2462. },
  2463. /** 重置按钮操作 */
  2464. resetQuery() {
  2465. this.resetForm("queryForm");
  2466. this.handleQuery();
  2467. },
  2468. // 多选框选中数据
  2469. handleSelectionChange(selection) {
  2470. this.ids = selection.map((item) => item.fId);
  2471. this.single = selection.length !== 1;
  2472. this.multiple = !selection.length;
  2473. },
  2474. // 库存总账多选框
  2475. whgenlegSelectionChange (selection) {
  2476. this.dialogWhgenlegList = selection
  2477. },
  2478. /** 新增按钮操作 */
  2479. handleAdd(status) {
  2480. this.browseStatus = status
  2481. this.reset();
  2482. this.queryUser();
  2483. this.open = true;
  2484. this.dataList = [];
  2485. this.warehouseCrList = [];
  2486. this.warehouseDrList = [];
  2487. this.relevantAttachments = []
  2488. this.title = "出库单";
  2489. },
  2490. /** 修改按钮操作 */
  2491. handleUpdate(row, status) {
  2492. this.browseStatus = status
  2493. this.reset();
  2494. const fId = row.fId || this.ids;
  2495. getWarehousebills(fId).then((response) => {
  2496. if (response.data.warehousebills) {
  2497. this.form = response.data.warehousebills;
  2498. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  2499. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2500. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2501. }
  2502. if (response.data.corps) {
  2503. this.fMblnoOptions = response.data.corps;
  2504. this.KHblnoOptions = response.data.corps;
  2505. this.fSbuOptions = response.data.corps;
  2506. }
  2507. if (response.data.feesList) {
  2508. this.fWbuOptions = response.data.feesList;
  2509. }
  2510. if (response.data.warehouse) {
  2511. this.warehouseOptions = response.data.warehouse;
  2512. }
  2513. if (response.data.warehouseBillsItem) {
  2514. this.dataList = response.data.warehouseBillsItem;
  2515. for (let list in this.dataList) {
  2516. if (!this.form.fMblno) {
  2517. this.$set(this.form, 'fMblno', this.dataList[list].fMblno)
  2518. }
  2519. this.$set(this.dataList[list], 'fGoodsids', this.dataList[list].fGoodsid)
  2520. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2521. }
  2522. }
  2523. if (response.data.enclosures) {
  2524. this.relevantAttachments = response.data.enclosures;
  2525. }
  2526. if (response.data.warehouse) {
  2527. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2528. for (let dr in this.warehouseDrList) {
  2529. this.$set(this.warehouseDrList[dr], 'fFeeUnitid', this.warehouseDrList[dr].fFeeUnitid + "")
  2530. }
  2531. }
  2532. if (response.data.warehousebillsfeesCr) {
  2533. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2534. this.warehouseCrList = response.data.warehousebillsfeesCr
  2535. for (let cr in this.warehouseCrList) {
  2536. this.$set(this.warehouseCrList[cr], 'fFeeUnitid', this.warehouseCrList[cr].fFeeUnitid + "")
  2537. }
  2538. }
  2539. this.fWbuOptions = response.data.feesList;
  2540. this.userOptions = response.data.sysUser;
  2541. this.goodsOptions = response.data.goodsList;
  2542. this.goodsOptions = response.data.goodsList
  2543. this.warehouseOptions = response.data.warehouse;
  2544. this.kqhouseOptions = response.data.warehouseAreas
  2545. this.$set(this.form, "fBsdate", Date.parse(response.data.warehousebills.fBsdate));
  2546. this.open = true;
  2547. this.title = "修改出库";
  2548. });
  2549. },
  2550. // 数量计算
  2551. changeContractAmt(row) {
  2552. if (row.fUnitprice !== "") {
  2553. if (row.fQty !== "") {
  2554. this.$set(
  2555. row,
  2556. "fAmount",
  2557. Number(row.fUnitprice) * Number(row.fQty)
  2558. ).toFixed(2);
  2559. } else {
  2560. this.$set(row, "fAmount", row.fUnitprice);
  2561. }
  2562. }
  2563. },
  2564. changeEstmateAmt(row) {
  2565. if (row.fUnitprice !== "") {
  2566. if (row.fQty !== "") {
  2567. this.$set(
  2568. row,
  2569. "fAmount",
  2570. Number(row.fUnitprice) * Number(row.fQty)
  2571. ).toFixed(2);
  2572. } else {
  2573. this.$set(row, "fAmount", row.fUnitprice);
  2574. }
  2575. }
  2576. },
  2577. changefBsdate(row) {
  2578. if (this.dataList.length > 0) {
  2579. for (var i = 0; i < this.dataList.length; i++) {
  2580. this.$set(this.dataList[i], "fBsdate", row);
  2581. }
  2582. }
  2583. },
  2584. // 合计
  2585. getSummaries (param) {
  2586. console.log(param)
  2587.         const {columns, data} = param
  2588.          const sums = []
  2589.          var values = []
  2590.       columns.forEach((column, index) => {
  2591. if (index === 0) {
  2592. sums[index] = '总价'
  2593. return
  2594. }
  2595.         if (column.property === 'fgrossweight') {
  2596.             values = data.map(item => Number(item['fGrossweight']))
  2597.           }
  2598.           if (column.property === 'fnetweight') {
  2599.             values = data.map(item => Number(item['fNetweight']))
  2600.           }
  2601.           if (column.property === 'fqty') {
  2602.             values = data.map(item => Number(item['fQty']))
  2603.           }
  2604. if (column.property === "fCntqty") {
  2605. values = data.map((item) => Number(item["fCntqty"]));
  2606. }
  2607.       
  2608.         // const values = data.map(item => Number(item[column.property]))
  2609.         if (column.property === 'fgrossweight' || column.property === 'fnetweight' || column.property === 'fqty' ||
  2610. column.property === "fCntqty") {
  2611.           sums[index] = values.reduce((prev, curr) => {
  2612.             const value = Number(curr)
  2613.             if (!isNaN(value)) {
  2614. if (column.property === 'fgrossweight') {
  2615. this.form.fGrossweight = prev + curr
  2616. this.fGrossweight = prev + curr;
  2617. }
  2618. if (column.property === 'fnetweight') {
  2619. this.form.fNetweight = prev + curr
  2620. }
  2621. if (column.property === 'fqty') {
  2622. this.form.fQty = prev + curr
  2623. }
  2624. if (column.property === "fCntqty") {
  2625. this.fCntqty = prev + curr;
  2626. }
  2627.               return prev + curr
  2628.             } else {
  2629.               return prev
  2630.             }
  2631.           }, 0)
  2632.           // sums[index]
  2633.         }
  2634.       })
  2635.     this.sums = sums
  2636.    return sums
  2637. },
  2638. // 付款合计
  2639. warehouseDrSummaries (param) {
  2640.         const {columns, data} = param
  2641.          const sums = []
  2642.       columns.forEach((column, index) => {
  2643. if (index === 0) {
  2644. sums[index] = '合计'
  2645. return
  2646. }
  2647.         const values = data.map(item => Number(item[column.property]))
  2648.         if (column.property === 'fUnitprice' || column.property === 'fAmount'|| column.property === 'fQty'|| column.property === 'fQty') {
  2649.           sums[index] = values.reduce((prev, curr) => {
  2650.             const value = Number(curr)
  2651.             if (!isNaN(value)) {
  2652.               return prev + curr
  2653.             } else {
  2654.               return prev
  2655.             }
  2656.           }, 0)
  2657.           // sums[index]
  2658.         }
  2659.       })
  2660.    return sums
  2661. },
  2662. // 变更计价单位
  2663. changeFeeUnit (row) {
  2664. console.log(this.fCntqty)
  2665. console.log(row)
  2666. if (!row.fFeeUnitid) {
  2667. return false
  2668. }
  2669. if (row.fFeeUnitid === '0') {
  2670. this.$set(row, 'fQty', this.fCntqty)
  2671. } else if (row.fFeeUnitid === '1') {
  2672. this.$set(row, 'fQty', this.fGrossweight)
  2673. }
  2674. if (row.fUnitprice) {
  2675. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  2676. }
  2677. },
  2678. // 付款信息计价单位合计
  2679. getwarehouseCrList(param) {
  2680. console.log(param);
  2681. const { columns, data } = param;
  2682. const sums = [];
  2683. var values = [];
  2684. columns.forEach((column, index) => {
  2685. if (index === 0) {
  2686. sums[index] = "总价";
  2687. return;
  2688. }
  2689. if (index === 3) {
  2690. // values = data.map((item) => Number(item["fFeeUnitid"]));
  2691. sums[index] = this.fFeeUnitids;
  2692. return;
  2693. }
  2694. });
  2695. this.sums = sums;
  2696. return sums;
  2697. },
  2698. // 计价单位选择
  2699. changefFeeunitid(row) {
  2700. console.log(row)
  2701. if(row === "0"){
  2702. console.log(this.fCntqty)
  2703. this.fFeeUnitid = this.fCntqty
  2704. }else{
  2705. console.log(this.fGrossweight)
  2706. this.fFeeUnitid = this.fGrossweight
  2707. }
  2708. },
  2709. // 计价单位选择
  2710. changefFeeunitids(row) {
  2711. console.log(row)
  2712. if(row === "0"){
  2713. console.log(this.fFeeUnitid)
  2714. this.fFeeUnitids = this.fCntqty
  2715. }else{
  2716. this.fFeeUnitids = this.fGrossweight
  2717. }
  2718. },
  2719. /** 提交按钮 */
  2720. submitForm(status) {
  2721. this.$refs["form"].validate((valid) => {
  2722. console.log(this.dataList)
  2723. if(status === 2) {
  2724. if (valid) {
  2725. this.form.fBillstatus = status;
  2726. this.form.fNetweight = this.fNetweight;
  2727. this.form.fPlangrossweight = this.fPlangrossweight;
  2728. this.form.fPlannetweight = this.fPlannetweight;
  2729. this.form.fPlanvolumn = this.fPlanvolumn;
  2730. this.form.fPlanqty = this.fPlanqty;
  2731. this.form.fGrossweight = this.fGrossweight;
  2732. this.form.fQty = this.fQty;
  2733. let formData = new window.FormData();
  2734. // 附件数据
  2735. formData.append("tWarehouseBills", JSON.stringify(this.form));
  2736. // 库存明细
  2737. formData.append(
  2738. "tWarehousebillsitems",
  2739. JSON.stringify(this.dataList)
  2740. );
  2741. // 附件数据
  2742. formData.append(
  2743. "tWhgenleg",
  2744. JSON.stringify(this.relevantAttachments)
  2745. );
  2746. // 费用明细付款
  2747. formData.append(
  2748. "tWarehousebillsfeesCr",
  2749. JSON.stringify(this.warehouseCrList)
  2750. );
  2751. // 收款
  2752. formData.append(
  2753. "tWarehousebillsfeesDr",
  2754. JSON.stringify(this.warehouseDrList)
  2755. );
  2756. addWarehousebills(formData).then((response) => {
  2757. this.msgSuccess("提交成功");
  2758. this.open = false;
  2759. this.getList();
  2760. });
  2761. }
  2762. }else {
  2763. if (this.dataList.length === 0) {
  2764. this.$message.error('请添加库存明细!')
  2765. return false
  2766. }
  2767. if (this.relevantAttachments.length === 0) {
  2768. this.$message.error('请添加附件上传!')
  2769. return false
  2770. }
  2771. if (this.warehouseDrList.length === 0) {
  2772. this.$message.error('请添加收款信息!')
  2773. return false
  2774. }
  2775. if (this.warehouseCrList.length === 0) {
  2776. this.$message.error('请添加付款信息!')
  2777. return false
  2778. }
  2779. for (let list in this.dataList) {
  2780. if (!this.dataList[list].fWarehouselocid) {
  2781. this.$message.error('请输入库区!')
  2782. return false
  2783. }
  2784. }
  2785. for (let list in this.dataList) {
  2786. if (this.dataList[list].fQty === '') {
  2787. this.$message.error('请输入出库件数!')
  2788. return false
  2789. }
  2790. }
  2791. for (let list in this.relevantAttachments) {
  2792. if (this.relevantAttachments[list].fName === null) {
  2793. this.$message.error('请输入附件名称!')
  2794. return false
  2795. }
  2796. }
  2797. for (let list in this.warehouseDrList) {
  2798. if (!this.warehouseDrList[list].fCorpid) {
  2799. this.$message.error('请选择客户名称')
  2800. return false
  2801. }
  2802. }
  2803. for (let list in this.warehouseCrList) {
  2804. if (!this.warehouseCrList[list].fCorpid) {
  2805. this.$message.error('请选择客户名称')
  2806. return false
  2807. }
  2808. }
  2809. if (valid) {
  2810. this.form.fBillstatus = status;
  2811. let formData = new window.FormData();
  2812. // 附件数据
  2813. formData.append("tWarehouseBills", JSON.stringify(this.form));
  2814. // 附件数据
  2815. formData.append("tWhgenleg", JSON.stringify(this.relevantAttachments));
  2816. // // 费用明细付款
  2817. formData.append(
  2818. "tWarehousebillsfeesCr",
  2819. JSON.stringify(this.warehouseCrList)
  2820. );
  2821. // // 收款
  2822. formData.append(
  2823. "tWarehousebillsfeesDr",
  2824. JSON.stringify(this.warehouseDrList)
  2825. );
  2826. // // 库存明细
  2827. formData.append(
  2828. "tWarehousebillsitems",
  2829. JSON.stringify(this.dataList)
  2830. );
  2831. addWarehousebills(formData).then((response) => {
  2832. this.msgSuccess("新增成功");
  2833. this.open = false;
  2834. this.getList();
  2835. });
  2836. }
  2837. }
  2838. });
  2839. },
  2840. /** 删除按钮操作 */
  2841. handleDelete(row) {
  2842. const fIds = row.fId || this.ids;
  2843. this.$confirm(
  2844. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2845. "警告",
  2846. {
  2847. confirmButtonText: "确定",
  2848. cancelButtonText: "取消",
  2849. type: "warning",
  2850. }
  2851. )
  2852. .then(function () {
  2853. return delWarehousebills(fIds);
  2854. })
  2855. .then(() => {
  2856. this.getList();
  2857. this.msgSuccess("删除成功");
  2858. });
  2859. },
  2860. /** 导出按钮操作 */
  2861. handleExport() {
  2862. const queryParams = this.queryParams;
  2863. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  2864. confirmButtonText: "确定",
  2865. cancelButtonText: "取消",
  2866. type: "warning",
  2867. })
  2868. .then(function () {
  2869. return exportWarehousebills(queryParams);
  2870. })
  2871. .then((response) => {
  2872. this.download(response.msg);
  2873. });
  2874. },
  2875. deleteRow(index, rows) {
  2876. rows.splice(index, 1);
  2877. },
  2878. /* 远程模糊查询用户 */
  2879. corpsRemoteMethod(name) {
  2880. if (name == null || name === "") {
  2881. return false;
  2882. }
  2883. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2884. listCorps(queryParams).then((response) => {
  2885. this.fMblnoOptions = response.rows;
  2886. this.KHblnoOptions = response.rows;
  2887. });
  2888. },
  2889. /* 远程模糊查询商品 */
  2890. goodsRemoteMethod(name) {
  2891. if (name == null || name === "") {
  2892. return false;
  2893. }
  2894. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2895. listGoods(queryParams).then((response) => {
  2896. this.goodsOptions = response.rows;
  2897. });
  2898. },
  2899. // 远程模糊查询费用名称
  2900. fWRemoteMethod(name) {
  2901. if (name == null || name === "") {
  2902. return false;
  2903. }
  2904. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2905. listFees(queryParams).then((response) => {
  2906. this.fWbuOptions = response.rows;
  2907. });
  2908. },
  2909. /* 远程模糊查询经营单位 */
  2910. fSbuRemoteMethod(name) {
  2911. if (name == null || name === "") {
  2912. return false;
  2913. }
  2914. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2915. listCorps(queryParams).then((response) => {
  2916. this.fSbuOptions = response.rows;
  2917. });
  2918. },
  2919. /* 远程模糊查询仓库 */
  2920. warehouseRemoteMethod(name) {
  2921. if (name == null || name === "") {
  2922. return false;
  2923. }
  2924. let queryParams = { pageNum: 1, pageSize: 10, fName: name};
  2925. listWarehouse(queryParams).then((response) => {
  2926. this.warehouseOptions = response.rows;
  2927. });
  2928. },
  2929. /* 远程模糊查询库区 */
  2930. kqhouseRemoteMethod(name) {
  2931. if (name == null || name === "") {
  2932. return false;
  2933. }
  2934. if (!this.form.fWarehouseid) {
  2935.         this.$message.error('请输入仓库!')
  2936.         return false
  2937.       }
  2938. let queryParams = { pageNum: 1, pageSize: 10, fWarehouseid:this.form.fWarehouseid , fName: name };
  2939. listArea(queryParams).then((response) => {
  2940. console.log(response);
  2941. this.kqhouseOptions = response.rows;
  2942. });
  2943. },
  2944. /* 远程模糊查询操作用户 */
  2945. userRemoteMethod(name) {
  2946. if (name == null || name === "") {
  2947. return false;
  2948. }
  2949. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  2950. listUser(queryParams).then((response) => {
  2951. this.userOptions = response.rows;
  2952. });
  2953. },
  2954. },
  2955. };
  2956. </script>
  2957. <style lang="scss">
  2958. .juzhong > th {
  2959. text-align: center;
  2960. }
  2961. .biaoge > tr > td {
  2962. height: 30px;
  2963. text-align: center;
  2964. border-right: 1px solid #dfe6ec !important;
  2965. order-bottom: 1px solid #dfe6ec !important;
  2966. border-bottom: 1px solid #dfe6ec !important;
  2967. }
  2968. .el-table thead th {
  2969. background: #1890ff;
  2970. color: #fff;
  2971. }
  2972. .upload-demo {
  2973. margin-left: 50px;
  2974. }
  2975. </style>