index.vue 81 KB

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