index.vue 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448
  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="fBsdate">
  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"
  170. v-hasPermi="['warehouseBusiness:goodsTransfer: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:goodsTransfer: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:goodsTransfer: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:goodsTransfer: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="goodsTransferList"
  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="fTocorpid" />
  220. <el-table-column label="提单号" align="center" prop="fMblno" />
  221. <el-table-column label="经营单位" align="center" prop="fSbu" />
  222. <el-table-column
  223. label="货转日期"
  224. align="center"
  225. prop="fBsdate"
  226. width="180"
  227. ><template slot-scope="scope">
  228. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column
  232. label="贸易方式"
  233. align="center"
  234. prop="fTrademodeid"
  235. :formatter="fTrademodeidFormat"
  236. />
  237. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  238. <el-table-column label="件数" align="center" prop="fQty" />
  239. <el-table-column label="毛重" align="center" prop="fGrossweight" />
  240. <el-table-column label="净重" align="center" prop="fNetweight" />
  241. <el-table-column
  242. label="操作"
  243. align="center"
  244. class-name="small-padding fixed-width"
  245. width="100"
  246. >
  247. <template slot-scope="scope">
  248. <el-button
  249. size="mini"
  250. type="text"
  251. icon="el-icon-edit"
  252. @click="handleUpdate(scope.row, true)"
  253. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  254. >查看
  255. </el-button>
  256. <el-button
  257. size="mini"
  258. type="text"
  259. icon="el-icon-edit"
  260. @click="handleUpdate(scope.row, false)"
  261. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  262. >修改
  263. </el-button>
  264. <el-button
  265. size="mini"
  266. type="text"
  267. icon="el-icon-delete"
  268. v-if="scope.row.fBillstatus !== '6'"
  269. @click="handleDelete(scope.row)"
  270. v-hasPermi="['warehouseBusiness:goodsTransfer:remove']"
  271. >删除
  272. </el-button>
  273. </template>
  274. </el-table-column>
  275. </el-table>
  276. <pagination
  277. v-show="total > 0"
  278. :total="total"
  279. :page.sync="queryParams.pageNum"
  280. :limit.sync="queryParams.pageSize"
  281. @pagination="getList"
  282. />
  283. <!-- 添加或修改仓库主(出入库)对话框 -->
  284. <el-dialog
  285. :title="title"
  286. :visible.sync="open"
  287. :close-on-click-modal="false"
  288. width="80%"
  289. append-to-body
  290. >
  291. <el-form
  292. style="height: 300px"
  293. ref="form"
  294. :model="form"
  295. :rules="rules"
  296. label-width="120px"
  297. >
  298. <el-row>
  299. <el-col :span="8">
  300. <el-form-item label="货权方" prop="fCorpid">
  301. <el-select
  302. v-model="form.fCorpid"
  303. filterable
  304. remote
  305. style="width: 250px"
  306. :remote-method="corpsRemoteMethod"
  307. placeholder="请选择货权方"
  308. >
  309. <el-option
  310. v-for="(dict,index) in fMblnoOptions"
  311. :key="index.fId"
  312. :label="dict.fName"
  313. :value="dict.fId"
  314. ></el-option>
  315. </el-select>
  316. </el-form-item>
  317. </el-col>
  318. <el-col :span="8">
  319. <el-form-item label="新货权方" prop="fTocorpid">
  320. <el-select
  321. v-model="form.fTocorpid"
  322. filterable
  323. remote
  324. style="width: 250px"
  325. :remote-method="corpsRemoteMethod"
  326. placeholder="请选择新货权方"
  327. >
  328. <el-option
  329. v-for="(dict,index) in fMblnoOptions"
  330. :key="index.fId"
  331. :label="dict.fName"
  332. :value="dict.fId"
  333. ></el-option>
  334. </el-select>
  335. </el-form-item>
  336. </el-col>
  337. <el-col :span="8">
  338. <el-form-item label="制单人" prop="createBy">
  339. <el-input
  340. disabled
  341. v-model="form.createBy"
  342. style="width: 250px"
  343. placeholder="制单人"
  344. />
  345. </el-form-item>
  346. </el-col>
  347. <el-col :span="8">
  348. <el-form-item label="制单部门" prop="fDeptid">
  349. <el-select
  350. v-model="form.fDeptid"
  351. filterable
  352. disabled
  353. style="width: 250px"
  354. remote
  355. >
  356. <el-option
  357. v-for="(dict,index) in deptOptions"
  358. :key="index.deptId"
  359. :label="dict.deptName"
  360. :value="dict.deptId"
  361. ></el-option>
  362. </el-select>
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="8">
  366. <el-form-item label="货转日期" prop="fBsdate">
  367. <el-date-picker
  368. v-model="form.fBsdate"
  369. style="width: 250px"
  370. type="date"
  371. value-format="timestamp"
  372. placeholder="货转日期"
  373. >
  374. </el-date-picker>
  375. </el-form-item>
  376. </el-col>
  377. <el-col :span="8">
  378. <el-form-item label="仓储计费日期" prop="fChargedate">
  379. <el-date-picker
  380. v-model="form.fChargedate"
  381. style="width: 250px"
  382. type="date"
  383. value-format="timestamp"
  384. placeholder="仓储计费日期"
  385. >
  386. </el-date-picker>
  387. </el-form-item>
  388. </el-col>
  389. </el-row>
  390. <el-row>
  391. <el-col :span="8">
  392. <el-form-item label="结算方式" prop="fStltypeid">
  393. <el-select
  394. v-model="form.fStltypeid"
  395. placeholder="请选择结算方式"
  396. clearable
  397. style="width: 250px"
  398. >
  399. <el-option
  400. v-for="(dict,index) in fStltypeOptions"
  401. :key="index.dictValue"
  402. :label="dict.dictLabel"
  403. :value="dict.dictValue"
  404. />
  405. </el-select>
  406. </el-form-item>
  407. </el-col>
  408. <el-col :span="8">
  409. <el-form-item label="计费单位" prop="fFeetunit">
  410. <el-select
  411. v-model="form.fFeetunit"
  412. placeholder="请选择计费单位"
  413. clearable
  414. style="width: 250px"
  415. >
  416. <el-option
  417. v-for="(dict,index) in fFeetunitOptions"
  418. :key="index.dictValue"
  419. :label="dict.dictLabel"
  420. :value="dict.dictValue"
  421. />
  422. </el-select>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="8">
  426. <el-form-item label="贸易方式" prop="fTrademodeid">
  427. <el-select
  428. v-model="form.fTrademodeid"
  429. placeholder="请选择贸易方式"
  430. clearable
  431. style="width: 250px"
  432. >
  433. <el-option
  434. v-for="(dict,index) in fTrademodeidOptions"
  435. :key="index.dictValue"
  436. :label="dict.dictLabel"
  437. :value="dict.dictValue"
  438. />
  439. </el-select>
  440. </el-form-item>
  441. </el-col>
  442. </el-row>
  443. <el-row>
  444. <el-col :span="8">
  445. <el-form-item label="提单号" prop="fMblno">
  446. <el-input
  447. v-model="form.fMblno"
  448. style="width: 250px"
  449. placeholder="手工输入"
  450. />
  451. </el-form-item>
  452. </el-col>
  453. <el-col :span="8">
  454. <el-form-item label="原始入库单号" prop="fOriginalbillno">
  455. <el-input
  456. v-model="form.fOriginalbillno"
  457. style="width: 250px"
  458. placeholder="原始入库单号"
  459. />
  460. </el-form-item>
  461. </el-col>
  462. <el-col :span="8">
  463. <el-form-item label="原始入库日期" prop="orgStorageDate">
  464. <el-date-picker
  465. v-model="orgStorageDate"
  466. type="daterange"
  467. value-format="yyyy-MM-dd"
  468. range-separator="至"
  469. start-placeholder="开始日期"
  470. end-placeholder="结束日期">
  471. </el-date-picker>
  472. </el-form-item>
  473. </el-col>
  474. </el-row>
  475. <el-row>
  476. <el-col :span="8">
  477. <el-form-item label="仓库" prop="fWarehouseid">
  478. <el-select
  479. v-model="form.fWarehouseid"
  480. filterable
  481. :disabled="browseStatus"
  482. remote
  483. style="width: 250px"
  484. :remote-method="warehouseRemoteMethod"
  485. placeholder="请选择仓库"
  486. >
  487. <el-option
  488. v-for="(dict,index) in warehouseOptions"
  489. :key="index.fId"
  490. :label="dict.fName"
  491. :value="dict.fId"
  492. ></el-option>
  493. </el-select>
  494. </el-form-item>
  495. </el-col>
  496. </el-row>
  497. </el-form>
  498. <div class="dialogTableTitle flex a-center jlr">
  499. <h2>库存明细</h2>
  500. <el-button :disabled="browseStatus" @click.prevent="addRelevant()">显示库存</el-button>
  501. </div>
  502. <el-table
  503. :data="dataList"
  504. ref="table"
  505. tooltip-effect="dark"
  506. border
  507. stripe
  508. :summary-method="getSummaries"
  509. show-summary
  510. >
  511. <el-table-column label="序号" type="index" width="80">
  512. </el-table-column>
  513. <el-table-column
  514. prop="fGoodsids"
  515. header-align="center"
  516. align="center"
  517. width="140px"
  518. label="品名"
  519. >
  520. </el-table-column>
  521. <el-table-column
  522. prop="fMarks"
  523. header-align="center"
  524. align="center"
  525. width="140px"
  526. label="唛头"
  527. >
  528. </el-table-column>
  529. <el-table-column
  530. prop="fMblno"
  531. header-align="center"
  532. align="center"
  533. width="140px"
  534. label="提单号"
  535. >
  536. </el-table-column>
  537. <el-table-column
  538. prop="fOriginalbillno"
  539. header-align="center"
  540. align="center"
  541. width="140px"
  542. label="原始入库单号"
  543. >
  544. </el-table-column>
  545. <el-table-column
  546. prop="fWarehouselocids"
  547. header-align="center"
  548. width="150px"
  549. align="center"
  550. label="库区"
  551. >
  552. </el-table-column>
  553. <el-table-column
  554. prop="fPlanqty"
  555. header-align="center"
  556. align="center"
  557. width="180px"
  558. label="库存件数"
  559. >
  560. </el-table-column>
  561. <el-table-column
  562. prop="fPlangrossweight"
  563. header-align="center"
  564. align="center"
  565. width="180px"
  566. label="库存毛重"
  567. >
  568. </el-table-column>
  569. <el-table-column
  570. prop="fQty"
  571. header-align="center"
  572. width="180px"
  573. align="center"
  574. label="货转件数"
  575. >
  576. <template slot-scope="scope">
  577. <el-input
  578. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  579. v-model="scope.row.fQty"
  580. placeholder="货转件数"
  581. :disabled="browseStatus"
  582. show-word-limit
  583. />
  584. </template>
  585. </el-table-column>
  586. <el-table-column
  587. prop="fGrossweight"
  588. header-align="center"
  589. width="180px"
  590. align="center"
  591. label="货转毛重"
  592. >
  593. <template slot-scope="scope">
  594. <el-input
  595. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  596. v-model="scope.row.fGrossweight"
  597. placeholder="货转毛重"
  598. :disabled="browseStatus"
  599. show-word-limit
  600. />
  601. </template>
  602. </el-table-column>
  603. <el-table-column
  604. prop="fCntqty"
  605. header-align="center"
  606. width="180px"
  607. align="center"
  608. label="箱量"
  609. >
  610. <template slot-scope="scope">
  611. <el-input
  612. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  613. v-model="scope.row.fCntqty"
  614. placeholder="箱量"
  615. :disabled="browseStatus"
  616. show-word-limit
  617. />
  618. </template>
  619. </el-table-column>
  620. <el-table-column
  621. prop="fPackagespecs"
  622. header-align="center"
  623. width="180px"
  624. align="center"
  625. label="包装规格"
  626. >
  627. <template slot-scope="scope">
  628. <el-input
  629. oninput="value=value.replace(/[^\d.]/g,'')"
  630. v-model="scope.row.fPackagespecs"
  631. :disabled="browseStatus"
  632. placeholder="包装规格"
  633. show-word-limit
  634. />
  635. </template>
  636. </el-table-column>
  637. <el-table-column
  638. prop="fGoodsval"
  639. header-align="center"
  640. width="150px"
  641. align="center"
  642. label="货值"
  643. >
  644. <template slot-scope="scope">
  645. <el-input
  646. oninput="value=value.replace(/[^\d.]/g,'')"
  647. v-model="scope.row.fGoodsval"
  648. placeholder="货值"
  649. :disabled="browseStatus"
  650. show-word-limit
  651. />
  652. </template>
  653. </el-table-column>
  654. <el-table-column
  655. prop="remark"
  656. header-align="center"
  657. width="150px"
  658. align="center"
  659. label="备注"
  660. >
  661. <template slot-scope="scope">
  662. <el-input
  663. v-model="scope.row.remark"
  664. placeholder="备注"
  665. show-word-limit
  666. />
  667. </template>
  668. </el-table-column>
  669. <el-table-column
  670. header-align="center"
  671. align="center"
  672. label="操作"
  673. width="130PX"
  674. >
  675. <template slot-scope="scope">
  676. <el-button
  677. @click.native.prevent="deleteRow(scope.$index, dataList)"
  678. size="small"
  679. >移除</el-button
  680. >
  681. </template>
  682. </el-table-column>
  683. </el-table>
  684. <div class="dialogTableTitle flex a-center jlr">
  685. <h2>附件上传</h2>
  686. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  687. >添加
  688. </el-button>
  689. </div>
  690. <el-table
  691. :data="relevantAttachments"
  692. ref="table"
  693. tooltip-effect="dark"
  694. border
  695. stripe
  696. style="width: 100%"
  697. height="150"
  698. >
  699. <el-table-column label="序号" type="index" width="80">
  700. </el-table-column>
  701. <el-table-column
  702. prop="fName"
  703. header-align="center"
  704. align="center"
  705. label="附件名称"
  706. >
  707. <template slot-scope="scope">
  708. <el-input
  709. v-model="scope.row.fName"
  710. :disabled="browseStatus"
  711. placeholder="附件名称"
  712. show-word-limit
  713. />
  714. </template>
  715. </el-table-column>
  716. <el-table-column
  717. prop="createBy"
  718. header-align="center"
  719. align="center"
  720. label="上传人"
  721. >
  722. <template slot-scope="scope">
  723. <el-input
  724. v-model="scope.row.createBy"
  725. :disabled="browseStatus"
  726. placeholder="上传人"
  727. show-word-limit
  728. />
  729. </template>
  730. </el-table-column>
  731. <el-table-column
  732. prop="createTime"
  733. header-align="center"
  734. align="center"
  735. label="上传时间"
  736. >
  737. <template slot-scope="scope">
  738. <el-date-picker
  739. v-model="scope.row.createTime"
  740. type="date"
  741. disabled
  742. placeholder="上传时间"
  743. format="yyyy-MM-dd HH:mm"
  744. value-format="timestamp"
  745. ></el-date-picker>
  746. </template>
  747. </el-table-column>
  748. <el-table-column
  749. prop="fUrl"
  750. header-align="center"
  751. align="center"
  752. width="250PX"
  753. label="上传附件"
  754. >
  755. <template slot-scope="scope">
  756. <uploadFile @input="showFile" v-model="scope.row.fUrl" />
  757. </template>
  758. </el-table-column>
  759. <el-table-column
  760. header-align="center"
  761. align="center"
  762. label="操作"
  763. width="130PX"
  764. >
  765. <template slot-scope="scope">
  766. <el-button
  767. @click.native.prevent="
  768. deleteRow(scope.$index, relevantAttachments)
  769. "
  770. :disabled="browseStatus"
  771. size="small"
  772. >移除
  773. </el-button>
  774. </template>
  775. </el-table-column>
  776. </el-table>
  777. <div class="dialogTableTitle flex a-center jlr">
  778. <h2>收款信息</h2>
  779. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  780. >添加
  781. </el-button>
  782. </div>
  783. <el-table
  784. :data="warehouseDrList"
  785. ref="table"
  786. tooltip-effect="dark"
  787. border
  788. stripe
  789. :summary-method="warehouseDrSummaries"
  790. show-summary
  791. >
  792. <el-table-column label="序号" type="index" width="80">
  793. </el-table-column>
  794. <el-table-column
  795. prop="fCorpid"
  796. header-align="center"
  797. align="center"
  798. width="180px"
  799. label="客户名称"
  800. >
  801. <template slot-scope="scope">
  802. <el-select
  803. v-model="scope.row.fCorpid"
  804. filterable
  805. remote
  806. :disabled="browseStatus"
  807. :remote-method="corpsRemoteMethod"
  808. placeholder="客户名称"
  809. >
  810. <el-option
  811. v-for="(dict,index) in KHblnoOptions"
  812. :key="index.fId"
  813. :label="dict.fName"
  814. :value="dict.fId"
  815. ></el-option>
  816. </el-select>
  817. </template>
  818. </el-table-column>
  819. <el-table-column
  820. prop="fFeeid"
  821. header-align="center"
  822. align="center"
  823. width="180px"
  824. label="费用名称"
  825. >
  826. <template slot-scope="scope">
  827. <el-select
  828. :disabled="browseStatus"
  829. v-model="scope.row.fFeeid"
  830. filterable
  831. remote
  832. :remote-method="fWRemoteMethod"
  833. placeholder="费用名称"
  834. >
  835. <el-option
  836. v-for="(dict,index) in fWbuOptions"
  837. :key="index.fId"
  838. :label="dict.fName"
  839. :value="dict.fId"
  840. ></el-option>
  841. </el-select>
  842. </template>
  843. </el-table-column>
  844. <el-table-column
  845. prop="fFeeunitid"
  846. header-align="center"
  847. align="center"
  848. width="180px"
  849. label="计价单位"
  850. >
  851. <template slot-scope="scope">
  852. <el-select
  853. v-model="scope.row.fFeeUnitid"
  854. placeholder="请选择计价单位"
  855. :disabled="browseStatus"
  856. @change="changeFeeUnit(scope.row)"
  857. clearable
  858. >
  859. <el-option
  860. v-for="(dict,index) in jFeetunitOptions"
  861. :key="index.dictValue"
  862. :label="dict.dictLabel"
  863. :value="dict.dictValue"
  864. />
  865. </el-select>
  866. </template>
  867. </el-table-column>
  868. <el-table-column
  869. prop="fQty"
  870. header-align="center"
  871. align="center"
  872. width="150px"
  873. label="数量"
  874. >
  875. <template slot-scope="scope">
  876. <el-input
  877. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  878. v-model="scope.row.fQty"
  879. placeholder="数量"
  880. :disabled="browseStatus"
  881. @change="changeEstmateAmt(scope.row)"
  882. show-word-limit
  883. />
  884. </template>
  885. </el-table-column>
  886. <el-table-column
  887. prop="fUnitprice"
  888. header-align="center"
  889. align="center"
  890. width="150px"
  891. label="单价"
  892. >
  893. <template slot-scope="scope">
  894. <el-input
  895. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  896. v-model="scope.row.fUnitprice"
  897. placeholder="单价"
  898. :disabled="browseStatus"
  899. @change="changeContractAmt(scope.row)"
  900. show-word-limit
  901. />
  902. </template>
  903. </el-table-column>
  904. <el-table-column
  905. prop="fAmount"
  906. header-align="center"
  907. align="center"
  908. width="150px"
  909. label="金额"
  910. >
  911. <template slot-scope="scope">
  912. <el-input
  913. disabled
  914. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  915. v-model="scope.row.fAmount"
  916. placeholder="金额"
  917. show-word-limit
  918. />
  919. </template>
  920. </el-table-column>
  921. <el-table-column
  922. prop="fCurrency"
  923. header-align="center"
  924. align="center"
  925. width="150px"
  926. label="币别"
  927. >
  928. <template slot-scope="scope">
  929. <el-input
  930. v-model="scope.row.fCurrency"
  931. :disabled="browseStatus"
  932. placeholder="币别"
  933. show-word-limit
  934. />
  935. </template>
  936. </el-table-column>
  937. <el-table-column
  938. prop="fExrate"
  939. header-align="center"
  940. align="center"
  941. width="150px"
  942. label="汇率"
  943. >
  944. <template slot-scope="scope">
  945. <el-input
  946. v-model="scope.row.fExrate"
  947. :disabled="browseStatus"
  948. placeholder="汇率"
  949. show-word-limit
  950. />
  951. </template>
  952. </el-table-column>
  953. <el-table-column
  954. prop="fTaxrate"
  955. header-align="center"
  956. align="center"
  957. width="150px"
  958. label="税率"
  959. >
  960. <template slot-scope="scope">
  961. <el-input
  962. v-model="scope.row.fTaxrate"
  963. :disabled="browseStatus"
  964. placeholder="税率"
  965. show-word-limit
  966. />
  967. </template>
  968. </el-table-column>
  969. <el-table-column
  970. prop="remarks"
  971. header-align="center"
  972. align="center"
  973. width="150px"
  974. label="备注"
  975. >
  976. <template slot-scope="scope">
  977. <el-input
  978. v-model="scope.row.remarks"
  979. :disabled="browseStatus"
  980. placeholder="备注"
  981. show-word-limit
  982. />
  983. </template>
  984. </el-table-column>
  985. <el-table-column
  986. header-align="center"
  987. align="center"
  988. label="操作"
  989. width="150px"
  990. >
  991. <template slot-scope="scope">
  992. <el-button size="small">审核费用</el-button>
  993. <el-button
  994. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  995. size="small"
  996. >移除</el-button
  997. >
  998. </template>
  999. </el-table-column>
  1000. </el-table>
  1001. <div class="dialogTableTitle flex a-center jlr">
  1002. <h2>付款信息</h2>
  1003. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1004. >添加
  1005. </el-button>
  1006. </div>
  1007. <el-table
  1008. :data="warehouseCrList"
  1009. ref="table"
  1010. tooltip-effect="dark"
  1011. border
  1012. stripe
  1013. :summary-method="warehouseDrSummaries"
  1014. show-summary
  1015. >
  1016. <el-table-column label="序号" type="index" width="80">
  1017. </el-table-column>
  1018. <el-table-column
  1019. prop="fCorpid"
  1020. header-align="center"
  1021. align="center"
  1022. width="180px"
  1023. label="客户名称"
  1024. >
  1025. <template slot-scope="scope">
  1026. <el-select
  1027. v-model="scope.row.fCorpid"
  1028. filterable
  1029. remote
  1030. :disabled="browseStatus"
  1031. :remote-method="corpsRemoteMethod"
  1032. placeholder="客户名称"
  1033. >
  1034. <el-option
  1035. v-for="(dict, index) in KHblnoOptions"
  1036. :key="index.fId"
  1037. :label="dict.fName"
  1038. :value="dict.fId"
  1039. ></el-option>
  1040. </el-select>
  1041. </template>
  1042. </el-table-column>
  1043. <el-table-column
  1044. prop="fFeeid"
  1045. header-align="center"
  1046. align="center"
  1047. width="180px"
  1048. label="费用名称"
  1049. >
  1050. <template slot-scope="scope">
  1051. <el-select
  1052. v-model="scope.row.fFeeid"
  1053. filterable
  1054. remote
  1055. :disabled="browseStatus"
  1056. :remote-method="fWRemoteMethod"
  1057. placeholder="费用名称"
  1058. >
  1059. <el-option
  1060. v-for="(dict,index) in fWbuOptions"
  1061. :key="index.fId"
  1062. :label="dict.fName"
  1063. :value="dict.fId"
  1064. ></el-option>
  1065. </el-select>
  1066. </template>
  1067. </el-table-column>
  1068. <el-table-column
  1069. prop="fFeeUnitid"
  1070. header-align="center"
  1071. align="center"
  1072. width="180px"
  1073. label="计价单位"
  1074. >
  1075. <template slot-scope="scope">
  1076. <el-select
  1077. v-model="scope.row.fFeeUnitid"
  1078. filterable
  1079. remote
  1080. :disabled="browseStatus"
  1081. @change="changeFeeUnit(scope.row)"
  1082. :remote-method="corpsRemoteMethod"
  1083. placeholder="计价单位"
  1084. >
  1085. <el-option
  1086. v-for="(dict, index) in jFeetunitOptions"
  1087. :key="index.dictValue"
  1088. :label="dict.dictLabel"
  1089. :value="dict.dictValue"
  1090. ></el-option>
  1091. </el-select>
  1092. </template>
  1093. </el-table-column>
  1094. <el-table-column
  1095. prop="fQty"
  1096. header-align="center"
  1097. align="center"
  1098. width="150px"
  1099. label="数量"
  1100. >
  1101. <template slot-scope="scope">
  1102. <el-input
  1103. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1104. v-model="scope.row.fQty"
  1105. :disabled="browseStatus"
  1106. @change="changeContractAmt(scope.row)"
  1107. placeholder="数量"
  1108. show-word-limit
  1109. />
  1110. </template>
  1111. </el-table-column>
  1112. <el-table-column
  1113. prop="fUnitprice"
  1114. header-align="center"
  1115. align="center"
  1116. width="150px"
  1117. label="单价"
  1118. >
  1119. <template slot-scope="scope">
  1120. <el-input
  1121. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1122. v-model="scope.row.fUnitprice"
  1123. :disabled="browseStatus"
  1124. @change="changeContractAmt(scope.row)"
  1125. placeholder="单价"
  1126. show-word-limit
  1127. />
  1128. </template>
  1129. </el-table-column>
  1130. <el-table-column
  1131. prop="fAmount"
  1132. header-align="center"
  1133. align="center"
  1134. width="150px"
  1135. label="金额"
  1136. >
  1137. <template slot-scope="scope">
  1138. <el-input
  1139. disabled
  1140. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1141. v-model="scope.row.fAmount"
  1142. placeholder="金额"
  1143. show-word-limit
  1144. />
  1145. </template>
  1146. </el-table-column>
  1147. <el-table-column
  1148. prop="fCurrency"
  1149. header-align="center"
  1150. align="center"
  1151. width="150px"
  1152. label="币别"
  1153. >
  1154. <template slot-scope="scope">
  1155. <el-input
  1156. v-model="scope.row.fCurrency"
  1157. :disabled="browseStatus"
  1158. placeholder="币别"
  1159. show-word-limit
  1160. />
  1161. </template>
  1162. </el-table-column>
  1163. <el-table-column
  1164. prop="fExrate"
  1165. header-align="center"
  1166. align="center"
  1167. width="150px"
  1168. label="汇率"
  1169. >
  1170. <template slot-scope="scope">
  1171. <el-input
  1172. v-model="scope.row.fExrate"
  1173. :disabled="browseStatus"
  1174. placeholder="汇率"
  1175. show-word-limit
  1176. />
  1177. </template>
  1178. </el-table-column>
  1179. <el-table-column
  1180. prop="fTaxrate"
  1181. header-align="center"
  1182. align="center"
  1183. width="150px"
  1184. label="税率"
  1185. >
  1186. <template slot-scope="scope">
  1187. <el-input
  1188. v-model="scope.row.fTaxrate"
  1189. :disabled="browseStatus"
  1190. placeholder="税率"
  1191. show-word-limit
  1192. />
  1193. </template>
  1194. </el-table-column>
  1195. <el-table-column
  1196. prop="remarks"
  1197. header-align="center"
  1198. align="center"
  1199. width="150px"
  1200. label="备注"
  1201. >
  1202. <template slot-scope="scope">
  1203. <el-input
  1204. v-model="scope.row.remarks"
  1205. :disabled="browseStatus"
  1206. placeholder="备注"
  1207. show-word-limit
  1208. />
  1209. </template>
  1210. </el-table-column>
  1211. <el-table-column
  1212. header-align="center"
  1213. align="center"
  1214. width="150px"
  1215. label="操作"
  1216. >
  1217. <template slot-scope="scope">
  1218. <el-button size="small">审核费用</el-button>
  1219. <el-button
  1220. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1221. :disabled="browseStatus"
  1222. size="small"
  1223. >移除</el-button
  1224. >
  1225. </template>
  1226. </el-table-column>
  1227. </el-table>
  1228. <div slot="footer" class="dialog-footer">
  1229. <el-button
  1230. type="danger"
  1231. size="mini"
  1232. prop="打印"
  1233. @click="showEditDialog_ss"
  1234. >收货单
  1235. </el-button>
  1236. <el-button
  1237. type="danger"
  1238. size="mini"
  1239. prop="打印"
  1240. @click="showEditDialog_s"
  1241. >入库单
  1242. </el-button>
  1243. <el-button type="primary" @click="submitForm(2)">暂 存</el-button>
  1244. <el-button type="primary" @click="submitForm(6)">提 交</el-button>
  1245. <el-button @click="cancel">取 消</el-button>
  1246. </div>
  1247. <!-- 选择库存总账数据 -->
  1248. <el-dialog
  1249. title="库存总账"
  1250. :modal="false"
  1251. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1252. :visible.sync="whgenlegVisible"
  1253. width="70%"
  1254. >
  1255. <el-table
  1256. :data="whgenlegList"
  1257. ref="table"
  1258. tooltip-effect="dark"
  1259. width="100%"
  1260. border
  1261. stripe
  1262. @selection-change="whgenlegSelectionChange"
  1263. >
  1264. <el-table-column
  1265. type="selection"
  1266. width="55">
  1267. </el-table-column>
  1268. <el-table-column
  1269. prop="fMblno"
  1270. header-align="center"
  1271. align="center"
  1272. label="提单号"
  1273. >
  1274. </el-table-column>
  1275. <el-table-column
  1276. prop="createTime"
  1277. header-align="center"
  1278. align="center"
  1279. width="180px"
  1280. label="入库日期"
  1281. >
  1282. </el-table-column>
  1283. <el-table-column
  1284. prop="fGoodsid"
  1285. header-align="center"
  1286. align="center"
  1287. label="品名"
  1288. >
  1289. </el-table-column>
  1290. <el-table-column
  1291. prop="fQtyblc"
  1292. header-align="center"
  1293. align="center"
  1294. label="结余数量"
  1295. >
  1296. </el-table-column>
  1297. <el-table-column
  1298. prop="fWarehouseLocationid"
  1299. header-align="center"
  1300. align="center"
  1301. label="库区"
  1302. >
  1303. </el-table-column>
  1304. </el-table>
  1305. <pagination
  1306. v-show="whgenlegTotal>0"
  1307. :total="whgenlegTotal"
  1308. :page.sync="whgenlegParams.pageNum"
  1309. :limit.sync="whgenlegParams.pageSize"
  1310. @pagination="getWhgenlegList"
  1311. />
  1312. <div slot="footer" class="dialog-footer">
  1313. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1314. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1315. </div>
  1316. </el-dialog>
  1317. <el-dialog
  1318. title="入库页面"
  1319. :modal="false"
  1320. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1321. :visible.sync="editDialogVisible_s"
  1322. width="70%"
  1323. >
  1324. <table
  1325. id="print_area"
  1326. class="biaoge zzss"
  1327. border="1"
  1328. style="border-collapse: collapse; border: none"
  1329. >
  1330. <tr>
  1331. <td
  1332. width="100"
  1333. colspan="7"
  1334. class="zzss"
  1335. style="font-size: 28px; font-weight: bold; border: none"
  1336. >
  1337. 青岛大木进进仓单
  1338. </td>
  1339. </tr>
  1340. <tr>
  1341. <td
  1342. width="100"
  1343. colspan="7"
  1344. class="zzss"
  1345. style="font-size: 28px; font-weight: bold; border: none"
  1346. >
  1347. &nbsp;
  1348. </td>
  1349. </tr>
  1350. <tr>
  1351. <td width="450" colspan="2" class="zzss">货权方:某某有限公司</td>
  1352. <td width="450" colspan="2" class="zzss">仓库:某某3号大仓</td>
  1353. <td width="450" colspan="3" class="zzss">
  1354. 地址:青岛市市北区郑州路1344号
  1355. </td>
  1356. </tr>
  1357. <tr>
  1358. <td width="200" colspan="2" class="zzss">保管方:某某有限公司</td>
  1359. <td width="200" colspan="2" class="zzss">联系人:张三</td>
  1360. <td width="200" colspan="3" class="zzss">
  1361. 电话:0532-561651561-546
  1362. </td>
  1363. </tr>
  1364. <tr>
  1365. <td width="100" border="1">提单号</td>
  1366. <td width="100">品名</td>
  1367. <td width="100">箱型</td>
  1368. <td width="100">品牌</td>
  1369. <td width="100">件数</td>
  1370. <td width="100">重量</td>
  1371. <td width="100">包装规格</td>
  1372. </tr>
  1373. <tr>
  1374. <td width="100">56165654555</td>
  1375. <td width="100">某某商品</td>
  1376. <td width="100">20GP</td>
  1377. <td width="100">某某</td>
  1378. <td width="100">包</td>
  1379. <td width="100">吨</td>
  1380. <td width="100">50kg</td>
  1381. </tr>
  1382. <tr>
  1383. <td width="100">序号</td>
  1384. <td width="100">入货日期</td>
  1385. <td width="100">箱量(20GP)</td>
  1386. <td width="100">重量</td>
  1387. <td width="100">件数</td>
  1388. <td width="100">入库重量</td>
  1389. <td width="100">入库件数</td>
  1390. </tr>
  1391. <tr>
  1392. <td width="100">1</td>
  1393. <td width="100">2020-11-20</td>
  1394. <td width="100">10</td>
  1395. <td width="100">100</td>
  1396. <td width="100">10000</td>
  1397. <td width="100">20</td>
  1398. <td width="100">3000</td>
  1399. </tr>
  1400. <tr>
  1401. <td width="100">2</td>
  1402. <td width="100">2020-11-20</td>
  1403. <td width="100">10</td>
  1404. <td width="100">100</td>
  1405. <td width="100">10000</td>
  1406. <td width="100">20</td>
  1407. <td width="100">3000</td>
  1408. </tr>
  1409. <tr>
  1410. <td width="100">3</td>
  1411. <td width="100">2020-11-20</td>
  1412. <td width="100">10</td>
  1413. <td width="100">100</td>
  1414. <td width="100">10000</td>
  1415. <td width="100">20</td>
  1416. <td width="100">3000</td>
  1417. </tr>
  1418. <tr>
  1419. <td width="100">4</td>
  1420. <td width="100">2020-11-20</td>
  1421. <td width="100">10</td>
  1422. <td width="100">100</td>
  1423. <td width="100">10000</td>
  1424. <td width="100">20</td>
  1425. <td width="100">3000</td>
  1426. </tr>
  1427. <tr>
  1428. <td width="100">5</td>
  1429. <td width="100">2020-11-20</td>
  1430. <td width="100">10</td>
  1431. <td width="100">100</td>
  1432. <td width="100">10000</td>
  1433. <td width="100">20</td>
  1434. <td width="100">3000</td>
  1435. </tr>
  1436. <tr>
  1437. <td width="100">6</td>
  1438. <td width="100">2020-11-20</td>
  1439. <td width="100">10</td>
  1440. <td width="100">100</td>
  1441. <td width="100">10000</td>
  1442. <td width="100">20</td>
  1443. <td width="100">3000</td>
  1444. </tr>
  1445. <tr>
  1446. <td width="100">7</td>
  1447. <td width="100">2020-11-20</td>
  1448. <td width="100">10</td>
  1449. <td width="100">100</td>
  1450. <td width="100">10000</td>
  1451. <td width="100">20</td>
  1452. <td width="100">3000</td>
  1453. </tr>
  1454. <tr>
  1455. <td width="100" colspan="2">合计:</td>
  1456. <td width="100">10</td>
  1457. <td width="100">100</td>
  1458. <td width="100">10000</td>
  1459. <td width="100">20</td>
  1460. <td width="100">3000</td>
  1461. </tr>
  1462. <tr>
  1463. <td width="100">备注:</td>
  1464. <td width="100" colspan="6"></td>
  1465. </tr>
  1466. <tr>
  1467. <td width="100" colspan="7" class="zzss">
  1468. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  1469. </td>
  1470. </tr>
  1471. <tr style="border: none">
  1472. <td width="100" colspan="2" class="zzss" style="border: none">
  1473. 开单员:
  1474. </td>
  1475. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  1476. <td width="100" colspan="2" class="zzss" style="border: none">
  1477. 仓管员:张三
  1478. </td>
  1479. </tr>
  1480. <tr style="border: none">
  1481. <td width="100" colspan="2" class="zzss" style="border: none">
  1482. 开单时间:
  1483. </td>
  1484. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  1485. <td width="100" colspan="2" class="zzss" style="border: none">
  1486. (盖章)
  1487. </td>
  1488. </tr>
  1489. </table>
  1490. <button @click="printSomething">打印</button>
  1491. </el-dialog>
  1492. <el-dialog
  1493. title="收货单打印"
  1494. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1495. :visible.sync="editDialogVisible_ss"
  1496. width="70%"
  1497. :modal="false"
  1498. >
  1499. <table
  1500. id="print_area"
  1501. class="biaoge zzss"
  1502. border="1"
  1503. style="border-collapse: collapse; border: none"
  1504. >
  1505. <tr>
  1506. <td
  1507. width="1400"
  1508. colspan="6"
  1509. class="zzss"
  1510. style="font-size: 28px; font-weight: bold; border: none"
  1511. >
  1512. 大木国际物流(青岛)有限公司收货单
  1513. </td>
  1514. </tr>
  1515. <tr>
  1516. <td
  1517. width="900"
  1518. colspan="4"
  1519. class="zzss"
  1520. style="font-size: 28px; font-weight: bold"
  1521. >
  1522. &nbsp;
  1523. </td>
  1524. <td
  1525. width="500"
  1526. colspan="2"
  1527. style="padding-bottom: 0px; font-weight: bold; border: none"
  1528. class="zzss"
  1529. >
  1530. 出库日期:2020-11-20
  1531. </td>
  1532. </tr>
  1533. <tr>
  1534. <td width="200">车号</td>
  1535. <td width="200">苏HFN751</td>
  1536. <td width="200">货物品名</td>
  1537. <td width="200" colspan="4" class="zzss">某某商品名</td>
  1538. </tr>
  1539. <tr>
  1540. <td width="1400" colspan="6">&nbsp;</td>
  1541. </tr>
  1542. <tr>
  1543. <td>备注:</td>
  1544. <td colspan="5"></td>
  1545. </tr>
  1546. <tr>
  1547. <td>收费</td>
  1548. <td>装箱费</td>
  1549. <td>100元</td>
  1550. <td colspan="4">办单费:5元,过磅费自理</td>
  1551. </tr>
  1552. <tr>
  1553. <td>司机签字:</td>
  1554. <td></td>
  1555. <td>电话</td>
  1556. <td>15896154516</td>
  1557. <td colspan="2" rowspan="2">
  1558. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  1559. </td>
  1560. </tr>
  1561. <tr>
  1562. <td>制表:</td>
  1563. <td>张三</td>
  1564. <td>机械/人工:</td>
  1565. <td></td>
  1566. </tr>
  1567. <tr>
  1568. <td colspan="6" class="zzss">&nbsp;</td>
  1569. </tr>
  1570. <tr>
  1571. <td width="280" class="zzss"></td>
  1572. <td width="280" class="zzss"></td>
  1573. <td width="280" class="zzss"></td>
  1574. <td width="280" class="zzss"></td>
  1575. <td width="290" class="zzss">地址:淮河东路96号</td>
  1576. <td width="290" class="zzss">电话:18685818919</td>
  1577. </tr>
  1578. </table>
  1579. <button @click="printSomething">打印</button>
  1580. </el-dialog>
  1581. </el-dialog>
  1582. </div>
  1583. </template>
  1584. <script>
  1585. import print from "print-js";
  1586. import {
  1587. listGoodsTransfer,
  1588. getGoodsTransfer,
  1589. addGoodsTransfer,
  1590. updateGoodsTransfer,
  1591. delGoodsTransfer,
  1592. exportGoodsTransfer
  1593. } from "@/api/warehouseBusiness/goodsTransfer";
  1594. import { listCorps } from "@/api/basicdata/corps";
  1595. import { listFees } from "@/api/basicdata/fees";
  1596. import { listWarehouse } from "@/api/basicdata/warehouse";
  1597. import { listArea } from "@/api/basicdata/area";
  1598. import { listGoods } from "@/api/basicdata/goods";
  1599. import { listUser, queryUserVal } from "@/api/system/user";
  1600. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1601. import UploadFile from "@/components/Uploadfile";
  1602. export default {
  1603. name: "goodsTransfer",
  1604. components: {
  1605. UploadFile,
  1606. },
  1607. data() {
  1608. return {
  1609. // 修改查看状态
  1610. browseStatus: false,
  1611. // 遮罩层
  1612. loading: true,
  1613. // 选中数组
  1614. ids: [],
  1615. userVal: {
  1616. userName: null,
  1617. nickName: null,
  1618. deptId: null,
  1619. },
  1620. queryForm: {},
  1621. // 添加用户对话框
  1622. editDialogVisible_s: false,
  1623. editDialogVisible_ss: false,
  1624. editDialogClosed_ss: false,
  1625. dataList: [],
  1626. warehouseCrList: [],
  1627. warehouseDrList: [],
  1628. relevantAttachments: [],
  1629. // 非单个禁用
  1630. single: true,
  1631. // 非多个禁用
  1632. multiple: true,
  1633. // 显示搜索条件
  1634. showSearch: true,
  1635. // 总条数
  1636. total: 0,
  1637. // 仓库主(出入库)表格数据
  1638. goodsTransferList: [],
  1639. // 弹出层标题
  1640. title: "",
  1641. // 是否显示弹出层
  1642. open: false,
  1643. // 货权方(客户数据)
  1644. fMblnoOptions: [],
  1645. // 货权方(客户数据)
  1646. // 客户名称
  1647. KHblnoOptions: [],
  1648. fSbuOptions: [],
  1649. // 操作员
  1650. userOptions: [],
  1651. // 操作员
  1652. goodsOptions: [],
  1653. // 制单部门
  1654. deptOptions: [],
  1655. // 仓库(仓库数据)
  1656. warehouseOptions: [],
  1657. // 贸易方式(数据字典),对应t_trademodels 字典
  1658. fTrademodeidOptions: [],
  1659. // 计费单位(数据字典),下拉选择毛重或净重字典
  1660. fFeetunitOptions: [],
  1661. // 结算方式(数据字典),下拉选择字典
  1662. fStltypeOptions: [],
  1663. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1664. fIfweighOptions: [],
  1665. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1666. fIfpledgeOptions: [],
  1667. // 是否破损(数据字典),默认F否则T字典
  1668. fIfdamageOptions: [],
  1669. // 单据类型(数据字典)SJRK字典
  1670. fBilltypeOptions: [],
  1671. // 状态(数据字典),N 入字典
  1672. fBillstatusOptions: [],
  1673. // 费用名称
  1674. fWbuOptions: [],
  1675. // 计价单位
  1676. jFeetunitOptions: [],
  1677. // 查询参数
  1678. queryParams: {
  1679. pageNum: 1,
  1680. pageSize: 10,
  1681. fBillno: null,
  1682. createBy: null,
  1683. createTime: null,
  1684. fCustomsdeclartion: null,
  1685. fOriginalbillno: null,
  1686. fDeptid: null,
  1687. fBsdeptid: null,
  1688. fContacts: null,
  1689. fTel: null,
  1690. fCorpid: null,
  1691. fTocorpid: null,
  1692. fStltypeid: null,
  1693. fBscorpno: null,
  1694. fWarehouseid: null,
  1695. fStorekeeper: null,
  1696. fBsdate: null,
  1697. fPlanqty: null,
  1698. fPlangrossweight: null,
  1699. fPlannetweight: null,
  1700. fPlanvolumn: null,
  1701. fQty: null,
  1702. fGrossweight: null,
  1703. fNetweight: null,
  1704. fVolumn: null,
  1705. fTrademodeid: null,
  1706. fSbu: null,
  1707. fFeetunit: null,
  1708. fMblno: null,
  1709. fVslvoy: null,
  1710. fEta: null,
  1711. fCustomno: null,
  1712. fIfweigh: null,
  1713. fIfpledge: null,
  1714. fIfdamage: null,
  1715. fBankcorpid: null,
  1716. fBilltype: null,
  1717. fBillstatus: null,
  1718. fCreateby: null,
  1719. fCreatetime: null,
  1720. fGoodsid: null,
  1721. fCntrtype: null,
  1722. fCntqty: null,
  1723. },
  1724. // 日期区间
  1725. orgStorageDate: null,
  1726. // 表单参数
  1727. form: {},
  1728. // 库存总账参数
  1729. whgenlegParams: {
  1730. pageNum: 1,
  1731. pageSize: 10,
  1732. fMblno: null,
  1733. fCorpid: null,
  1734. fWarehouseid: null,
  1735. fTrademodeid: null,
  1736. orgStorageDate: null
  1737. },
  1738. // 库存总账表
  1739. whgenlegList: [],
  1740. whgenlegTotal: 0,
  1741. // 弹窗库存总账数据
  1742. dialogWhgenlegList: [],
  1743. // 库存总账对话框
  1744. whgenlegVisible: false,
  1745. // 表单校验
  1746. rules: {
  1747. fDeptid: [
  1748. { required: true, message: "制单部门不能为空", trigger: "blur" },
  1749. ],
  1750. fMblno: [{ required: true, message: "请输入提单号", trigger: "blur" }],
  1751. fBsdeptid: [
  1752. { required: true, message: "业务所属部门不能为空", trigger: "blur" },
  1753. ],
  1754. fCorpid: [
  1755. {
  1756. required: true,
  1757. message: "请选择货权方",
  1758. trigger: "blur",
  1759. },
  1760. ],
  1761. fBsdate: [
  1762. { required: true, message: "请选择业务日期", trigger: "blur" },
  1763. ],
  1764. fTrademodeid: [
  1765. { required: true, message: "请选择贸易方式", trigger: "blur" },
  1766. ],
  1767. fSbu: [
  1768. { required: true, message: "请选择经营单位", trigger: "blur" },
  1769. ],
  1770. fStorekeeper: {
  1771. required: true,
  1772. message: "请输入仓管员",
  1773. trigger: "blur",
  1774. },
  1775. fWarehouseid: [
  1776. { required: true, message: "请选择仓库", trigger: "blur" },
  1777. ],
  1778. fbillingway: [
  1779. {
  1780. required: true,
  1781. message: "请选择结算方式",
  1782. trigger: "blur",
  1783. },
  1784. ],
  1785. fTocorpid: [
  1786. {
  1787. required: true,
  1788. message:
  1789. "请选择新货转货权方",
  1790. trigger: "blur",
  1791. },
  1792. ],
  1793. },
  1794. };
  1795. },
  1796. created() {
  1797. this.getList();
  1798. this.getDicts("data_trademodes").then((response) => {
  1799. this.fTrademodeidOptions = response.data;
  1800. });
  1801. this.getDicts("data_unitfees").then((response) => {
  1802. this.fFeetunitOptions = response.data;
  1803. this.jFeetunitOptions = JSON.parse(JSON.stringify(response.data))
  1804. });
  1805. this.getDicts("data_stltype_type").then((response) => {
  1806. this.fStltypeOptions = response.data;
  1807. });
  1808. this.getDicts("data_ifweigh_status").then((response) => {
  1809. this.fIfweighOptions = response.data;
  1810. });
  1811. this.getDicts("data_ifpledge_status").then((response) => {
  1812. this.fIfpledgeOptions = response.data;
  1813. });
  1814. this.getDicts("data_ifdamage_status").then((response) => {
  1815. this.fIfdamageOptions = response.data;
  1816. });
  1817. this.getDicts("data_billtype_type").then((response) => {
  1818. this.fBilltypeOptions = response.data;
  1819. });
  1820. this.getDicts("sys_common_status").then((response) => {
  1821. this.fBillstatusOptions = response.data;
  1822. });
  1823. },
  1824. methods: {
  1825. // 上传成功返回数据
  1826. showFile(row) {
  1827. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  1828. this.$set(this.relevantAttachments[0], "fUrl", row.url);
  1829. },
  1830. printSomething() {
  1831. // 此处的style即为打印时的样式
  1832. const style =
  1833. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  1834. print({
  1835. printable: "print_area",
  1836. type: "html",
  1837. style: style, // 亦可使用引入的外部css;
  1838. scanStyles: false,
  1839. });
  1840. },
  1841. // 添加附件上传
  1842. addRelevt() {
  1843. this.relevantAttachments.push({
  1844. fUrl: null,
  1845. fName: null,
  1846. createBy: this.queryParams.createBy,
  1847. createTime: Date.parse(new Date()),
  1848. });
  1849. },
  1850. // 添加list
  1851. addRelevant() {
  1852. if (!this.form.fCorpid || !this.form.fTrademodeid || !this.form.fWarehouseid) {
  1853. this.$message({ message: '请维护货权方、贸易方式、仓库', type: 'warning' })
  1854. return false
  1855. }
  1856. this.whgenlegList = []
  1857. this.dialogWhgenlegList = []
  1858. this.whgenlegTotal = 0
  1859. this.whgenlegVisible = true
  1860. this.getWhgenlegList()
  1861. },
  1862. // 查询库存总账信息
  1863. getWhgenlegList () {
  1864. this.whgenlegParams.fMblno = this.form.fMblno
  1865. this.whgenlegParams.fCorpid = this.form.fCorpid
  1866. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  1867. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  1868. this.whgenlegParams.orgStorageDate = this.orgStorageDate
  1869. listWhgenleg(this.whgenlegParams).then(response => {
  1870. this.whgenlegList = response.rows
  1871. this.whgenlegTotal = response.total
  1872. })
  1873. },
  1874. // 库存总账多选框
  1875. whgenlegSelectionChange (selection) {
  1876. this.dialogWhgenlegList = selection
  1877. },
  1878. // 库存总账导出数据
  1879. whgenlegData () {
  1880. for (let whgen in this.dialogWhgenlegList) {
  1881. if (!this.form.fMblno) {
  1882. this.$set(this.form, 'fMblno', this.dialogWhgenlegList[whgen].fMblno)
  1883. }
  1884. this.dataList.push({
  1885. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  1886. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  1887. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  1888. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  1889. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  1890. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  1891. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  1892. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  1893. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  1894. fQty: 0,
  1895. fCntqty: 1,
  1896. fGrossweight: 0,
  1897. fPackagespecs: null,
  1898. fGoodsval: null,
  1899. remark: null
  1900. })
  1901. }
  1902. this.whgenlegVisible = false
  1903. },
  1904. // 收货单打印界面
  1905. showEditDialog_s() {
  1906. this.editDialogVisible_s = true;
  1907. },
  1908. showEditDialog_ss() {
  1909. this.editDialogVisible_ss = true;
  1910. },
  1911. // 收款信息
  1912. addCollection() {
  1913. this.warehouseDrList.push({
  1914. fCorpid: null,
  1915. fFeeid: null,
  1916. fFeeUnitid: null,
  1917. fQty: 0,
  1918. fUnitprice: 0,
  1919. fAmount: 0,
  1920. fCurrency: null,
  1921. fCxrate: null,
  1922. fRate: null,
  1923. remarks: null,
  1924. });
  1925. },
  1926. addpayment() {
  1927. this.warehouseCrList.push({
  1928. fCorpid: null,
  1929. fFeeid: null,
  1930. fFeeUnitid: null,
  1931. fQty: 0,
  1932. fUnitprice: 0,
  1933. fAmount: 0,
  1934. fCurrency: null,
  1935. fCxrate: null,
  1936. fRate: null,
  1937. remarks: null,
  1938. })
  1939. },
  1940. queryUser() {
  1941. queryUserVal().then((response) => {
  1942. if (response.user !== null) {
  1943. this.userVal = response.user;
  1944. this.$set(this.form, "fDeptid", this.userVal.deptId);
  1945. this.$set(this.form, "createBy", this.userVal.userName);
  1946. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  1947. this.$set(this.form, "createTime", Date.parse(new Date()));
  1948. }
  1949. if (response.dept !== null) {
  1950. this.deptOptions = [];
  1951. this.deptOptions.push(response.dept);
  1952. }
  1953. });
  1954. },
  1955. /** 查询仓库主(出入库)列表 */
  1956. getList() {
  1957. this.loading = true;
  1958. listGoodsTransfer(this.queryParams).then((response) => {
  1959. this.goodsTransferList = response.rows
  1960. this.total = response.total
  1961. this.loading = false
  1962. });
  1963. },
  1964. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  1965. fTrademodeidFormat(row, column) {
  1966. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  1967. },
  1968. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  1969. fFeetunitFormat(row, column) {
  1970. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  1971. },
  1972. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  1973. fIfweighFormat(row, column) {
  1974. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  1975. },
  1976. // 编号字典翻译
  1977. fStltypeidFormat(row, column) {
  1978. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid);
  1979. },
  1980. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  1981. fIfpledgeFormat(row, column) {
  1982. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  1983. },
  1984. // 是否破损(数据字典),默认F否则T字典翻译
  1985. fIfdamageFormat(row, column) {
  1986. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  1987. },
  1988. // 单据类型(数据字典)SJRK字典翻译
  1989. fBilltypeFormat(row, column) {
  1990. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  1991. },
  1992. // 状态(数据字典),N 入字典翻译
  1993. fBillstatusFormat(row, column) {
  1994. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  1995. },
  1996. // 取消按钮
  1997. cancel() {
  1998. this.open = false;
  1999. this.reset();
  2000. },
  2001. // 表单重置
  2002. reset() {
  2003. this.form = {
  2004. fId: null,
  2005. fBillno: null,
  2006. fCustomsdeclartion: null,
  2007. fOriginalbillno: null,
  2008. fDeptid: null,
  2009. fBsdeptid: null,
  2010. fContacts: null,
  2011. fTel: null,
  2012. fCorpid: null,
  2013. fTocorpid: null,
  2014. fStltypeid: null,
  2015. fBscorpno: null,
  2016. fWarehouseid: null,
  2017. fStorekeeper: null,
  2018. fBsdate: null,
  2019. fPlanqty: null,
  2020. fPlangrossweight: null,
  2021. fPlannetweight: null,
  2022. fPlanvolumn: null,
  2023. fQty: null,
  2024. fGrossweight: null,
  2025. fNetweight: null,
  2026. fVolumn: null,
  2027. fTrademodeid: null,
  2028. fSbu: null,
  2029. fFeetunit: null,
  2030. fMblno: null,
  2031. fVslvoy: null,
  2032. fEta: null,
  2033. fCustomno: null,
  2034. fIfweigh: null,
  2035. fIfpledge: null,
  2036. fIfdamage: null,
  2037. fBankcorpid: null,
  2038. fBilltype: null,
  2039. fBillstatus: null,
  2040. delFlag: null,
  2041. createBy: null,
  2042. createTime: null,
  2043. updateBy: null,
  2044. updateTime: null,
  2045. remark: null,
  2046. fCreateby: null,
  2047. fCreatetime: null,
  2048. fGoodsid: null,
  2049. fCntrtype: null,
  2050. fCntqty: null,
  2051. };
  2052. this.deptOptions = []
  2053. this.fWbuOptions = []
  2054. this.fWbuOptions = []
  2055. this.fMblnoOptions = []
  2056. this.KHblnoOptions = []
  2057. this.KHblnoOptions = []
  2058. this.warehouseOptions = []
  2059. this.resetForm("form");
  2060. },
  2061. /** 搜索按钮操作 */
  2062. handleQuery() {
  2063. this.queryParams.pageNum = 1;
  2064. this.getList();
  2065. },
  2066. /** 重置按钮操作 */
  2067. resetQuery() {
  2068. this.resetForm("queryForm");
  2069. this.handleQuery();
  2070. },
  2071. // 多选框选中数据
  2072. handleSelectionChange(selection) {
  2073. this.ids = selection.map((item) => item.fId);
  2074. this.single = selection.length !== 1;
  2075. this.multiple = !selection.length;
  2076. },
  2077. /** 新增按钮操作 */
  2078. handleAdd() {
  2079. this.reset();
  2080. this.queryUser();
  2081. this.open = true;
  2082. this.dataList = [];
  2083. this.warehouseCrList = [];
  2084. this.warehouseDrList = [];
  2085. this.relevantAttachments = [];
  2086. this.title = "货权转移";
  2087. },
  2088. /** 修改按钮操作 */
  2089. handleUpdate(row, status) {
  2090. this.browseStatus = status
  2091. this.reset();
  2092. const fId = row.fId || this.ids;
  2093. getGoodsTransfer(fId).then((response) => {
  2094. this.form = response.data.warehousebills
  2095. if (this.form.fStltypeid) {
  2096. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2097. }
  2098. if (this.form.fChargedate) {
  2099. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2100. }
  2101. if (this.form.fTrademodeid) {
  2102. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2103. }
  2104. this.fMblnoOptions = response.data.corps
  2105. this.KHblnoOptions = response.data.corps
  2106. this.fWbuOptions = response.data.feesList
  2107. this.warehouseOptions = response.data.warehouse;
  2108. if (response.data.dept) {
  2109. this.deptOptions = [];
  2110. this.deptOptions.push(response.data.dept);
  2111. }
  2112. this.dataList = response.data.warehouseBillsItem;
  2113. for (let list in this.dataList) {
  2114. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2115. }
  2116. this.goodsOptions = response.data.goodsList
  2117. this.relevantAttachments = response.data.enclosures
  2118. this.warehouseDrList = response.data.warehousebillsfeesDr
  2119. for (let dr in this.warehouseDrList) {
  2120. this.$set(this.warehouseDrList[dr], 'fFeeUnitid', this.warehouseDrList[dr].fFeeUnitid + "")
  2121. }
  2122. this.warehouseCrList = response.data.warehousebillsfeesCr
  2123. for (let cr in this.warehouseCrList) {
  2124. this.$set(this.warehouseCrList[cr], 'fFeeUnitid', this.warehouseCrList[cr].fFeeUnitid + "")
  2125. }
  2126. this.userOptions = response.data.sysUser;
  2127. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate))
  2128. this.open = true;
  2129. this.title = "修改仓入库)";
  2130. });
  2131. },
  2132. // 库存明细合计
  2133. getSummaries (param) {
  2134.         const {columns, data} = param
  2135.          const sums = []
  2136.          var values = []
  2137.       columns.forEach((column, index) => {
  2138. if (index === 0) {
  2139. sums[index] = '总价'
  2140. return
  2141. }
  2142.         if (column.property === 'fPlanqty') {
  2143.             values = data.map(item => Number(item['fPlanqty']))
  2144.           }
  2145.           if (column.property === 'fPlangrossweight') {
  2146.             values = data.map(item => Number(item['fPlangrossweight']))
  2147.           }
  2148.           if (column.property === 'fQty') {
  2149.             values = data.map(item => Number(item['fQty']))
  2150.           }
  2151.           if (column.property === 'fGrossweight') {
  2152.             values = data.map(item => Number(item['fGrossweight']))
  2153.           }
  2154.           if (column.property === 'fCntqty') {
  2155.             values = data.map(item => Number(item['fCntqty']))
  2156.           }
  2157.         // const values = data.map(item => Number(item[column.property]))
  2158.         if (column.property === 'fPlanqty' || column.property === 'fPlangrossweight'|| column.property === 'fQty'|| column.property === 'fGrossweight'|| column.property === 'fCntqty') {
  2159.           sums[index] = values.reduce((prev, curr) => {
  2160.             const value = Number(curr)
  2161.             if (!isNaN(value)) {
  2162. if (column.property === 'fGrossweight') {
  2163. this.form.fGrossweight = prev + curr
  2164. }
  2165. if (column.property === 'fQty') {
  2166. this.form.fQty = prev + curr
  2167. }
  2168. if (column.property === 'fCntqty') {
  2169. this.form.fCntqty = prev + curr
  2170. }
  2171.               return prev + curr
  2172.             } else {
  2173.               return prev
  2174.             }
  2175.           }, 0)
  2176.           // sums[index]
  2177.         }
  2178.       })
  2179.     this.sums = sums
  2180.    return sums
  2181. },
  2182. // 付款合计
  2183. warehouseDrSummaries (param) {
  2184.         const {columns, data} = param
  2185.          const sums = []
  2186.       columns.forEach((column, index) => {
  2187. if (index === 0) {
  2188. sums[index] = '合计'
  2189. return
  2190. }
  2191.         const values = data.map(item => Number(item[column.property]))
  2192.         if (column.property === 'fUnitprice' || column.property === 'fAmount'|| column.property === 'fQty'|| column.property === 'fQty') {
  2193.           sums[index] = values.reduce((prev, curr) => {
  2194.             const value = Number(curr)
  2195.             if (!isNaN(value)) {
  2196.               return prev + curr
  2197.             } else {
  2198.               return prev
  2199.             }
  2200.           }, 0)
  2201.           // sums[index]
  2202.         }
  2203.       })
  2204.    return sums
  2205. },
  2206. // 数量计算
  2207. changeContractAmt(row) {
  2208. let fQty = 0
  2209. let fUnitprice = 0
  2210. if (row.fUnitprice) {
  2211. fUnitprice = row.fUnitprice
  2212. }
  2213. if (row.fQty) {
  2214. fQty = row.fQty
  2215. }
  2216. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  2217. },
  2218. changefBsdate(row) {
  2219. if (this.dataList.length > 0) {
  2220. for (var i = 0; i < this.dataList.length; i++) {
  2221. this.$set(this.dataList[i], "fBsdate", row);
  2222. }
  2223. }
  2224. },
  2225. /** 提交按钮 */
  2226. submitForm(status) {
  2227. this.$refs["form"].validate((valid) => {
  2228. if (this.form.fCorpid === this.form.fTocorpid) {
  2229. this.$message.error('新货权方不得与货权方一致')
  2230. return false
  2231. }
  2232. if (this.dataList.length === 0) {
  2233. this.$message.error('请添加库存明细!')
  2234. return false
  2235. }
  2236. if (this.relevantAttachments.length === 0) {
  2237. this.$message.error('请添加附件上传!')
  2238. return false
  2239. }
  2240. if (this.warehouseDrList.length === 0) {
  2241. this.$message.error('请添加收款信息!')
  2242. return false
  2243. }
  2244. if (this.warehouseCrList.length === 0) {
  2245. this.$message.error('请添加付款信息!')
  2246. return false
  2247. }
  2248. for (let list in this.dataList) {
  2249. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2250. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2251. return false
  2252. }
  2253. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2254. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2255. return false
  2256. }
  2257. }
  2258. for (let relevant in this.relevantAttachments) {
  2259. if (!this.relevantAttachments[relevant].fName) {
  2260. this.$message.error('请输入附件名称!')
  2261. return false
  2262. }
  2263. }
  2264. for (let warehouseDr in this.warehouseDrList) {
  2265. if (!this.warehouseDrList[warehouseDr].fAmount) {
  2266. this.$message.error('收款信息序号为' + (Number(warehouseDr) + 1) + '的金额异常')
  2267. return false
  2268. }
  2269. }
  2270. for (let warehouseCr in this.warehouseCrList) {
  2271. if (!this.warehouseCrList[warehouseCr].fAmount) {
  2272. this.$message.error('付款信息序号为' + (Number(warehouseCr) + 1) + '的金额异常')
  2273. return false
  2274. }
  2275. }
  2276. if (valid) {
  2277. this.form.fBillstatus = status;
  2278. let formData = new window.FormData();
  2279. // 附件数据
  2280. formData.append("tWarehouseBills", JSON.stringify(this.form))
  2281. // 库存明细
  2282. formData.append("tWarehousebillsitems", JSON.stringify(this.dataList))
  2283. // 附件数据
  2284. formData.append("tWhgenleg", JSON.stringify(this.relevantAttachments))
  2285. // 费用明细付款
  2286. formData.append("tWarehousebillsfeesCr", JSON.stringify(this.warehouseCrList))
  2287. // 收款
  2288. formData.append("tWarehousebillsfeesDr", JSON.stringify(this.warehouseDrList))
  2289. addGoodsTransfer(formData).then((response) => {
  2290. this.msgSuccess("提交成功");
  2291. this.open = false;
  2292. this.getList();
  2293. })
  2294. }
  2295. })
  2296. },
  2297. /** 删除按钮操作 */
  2298. handleDelete(row) {
  2299. const fIds = row.fId || this.ids;
  2300. this.$confirm(
  2301. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2302. "警告",
  2303. {
  2304. confirmButtonText: "确定",
  2305. cancelButtonText: "取消",
  2306. type: "warning",
  2307. }
  2308. )
  2309. .then(function () {
  2310. return delgoodsTransfer(fIds);
  2311. })
  2312. .then(() => {
  2313. this.getList();
  2314. this.msgSuccess("删除成功");
  2315. });
  2316. },
  2317. /** 导出按钮操作 */
  2318. handleExport() {
  2319. const queryParams = this.queryParams;
  2320. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  2321. confirmButtonText: "确定",
  2322. cancelButtonText: "取消",
  2323. type: "warning",
  2324. })
  2325. .then(function () {
  2326. return exportgoodsTransfer(queryParams);
  2327. })
  2328. .then((response) => {
  2329. this.download(response.msg);
  2330. });
  2331. },
  2332. deleteRow(index, rows) {
  2333. rows.splice(index, 1);
  2334. },
  2335. // 变更计价单位
  2336. changeFeeUnit (row) {
  2337. console.log(row)
  2338. console.log(this.form.fCntqty)
  2339. if (!row.fFeeUnitid) {
  2340. return false
  2341. }
  2342. if (row.fFeeUnitid === '0') {
  2343. console.log(this.form.fCntqty)
  2344. this.$set(row, 'fQty', this.form.fCntqty)
  2345. } else if (row.fFeeUnitid === '1') {
  2346. this.$set(row, 'fQty', this.form.fGrossweight)
  2347. }
  2348. if (row.fUnitprice) {
  2349. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  2350. }
  2351. },
  2352. /* 远程模糊查询用户 */
  2353. corpsRemoteMethod(name) {
  2354. if (name == null || name === "") {
  2355. return false;
  2356. }
  2357. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2358. listCorps(queryParams).then((response) => {
  2359. this.fMblnoOptions = response.rows;
  2360. this.KHblnoOptions = response.rows;
  2361. });
  2362. },
  2363. /* 远程模糊查询商品 */
  2364. goodsRemoteMethod(name) {
  2365. if (name == null || name === "") {
  2366. return false;
  2367. }
  2368. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2369. listGoods(queryParams).then((response) => {
  2370. this.goodsOptions = response.rows;
  2371. });
  2372. },
  2373. // 远程模糊查询费用名称
  2374. fWRemoteMethod(name) {
  2375. if (name == null || name === "") {
  2376. return false;
  2377. }
  2378. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2379. listFees(queryParams).then((response) => {
  2380. this.fWbuOptions = response.rows;
  2381. });
  2382. },
  2383. /* 远程模糊查询经营单位 */
  2384. fSbuRemoteMethod(name) {
  2385. if (name == null || name === "") {
  2386. return false;
  2387. }
  2388. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2389. listCorps(queryParams).then((response) => {
  2390. this.fSbuOptions = response.rows;
  2391. });
  2392. },
  2393. /* 远程模糊查询仓库 */
  2394. warehouseRemoteMethod(name) {
  2395. if (name == null || name === "") {
  2396. return false;
  2397. }
  2398. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2399. listWarehouse(queryParams).then((response) => {
  2400. this.warehouseOptions = response.rows;
  2401. });
  2402. },
  2403. /* 远程模糊查询操作用户 */
  2404. userRemoteMethod(name) {
  2405. if (name == null || name === "") {
  2406. return false;
  2407. }
  2408. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  2409. listUser(queryParams).then((response) => {
  2410. this.userOptions = response.rows;
  2411. });
  2412. },
  2413. },
  2414. };
  2415. </script>
  2416. <style lang="scss">
  2417. .juzhong > th {
  2418. text-align: center;
  2419. }
  2420. .biaoge > tr > td {
  2421. height: 30px;
  2422. text-align: center;
  2423. border-right: 1px solid #dfe6ec !important;
  2424. order-bottom: 1px solid #dfe6ec !important;
  2425. border-bottom: 1px solid #dfe6ec !important;
  2426. }
  2427. .el-table thead th {
  2428. background: #1890ff;
  2429. color: #fff;
  2430. }
  2431. .upload-demo {
  2432. margin-left: 50px;
  2433. }
  2434. </style>