index.vue 76 KB

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