index.vue 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091
  1. <template>
  2. <!-- 仓储费计算列表 + 弹窗页面 -->
  3. <div class="app-container">
  4. <el-form
  5. :model="queryParams"
  6. ref="queryForm"
  7. :inline="true"
  8. v-show="showSearch"
  9. label-width="88px"
  10. >
  11. <el-form-item label="业务编号" prop="fBillno">
  12. <el-input
  13. v-model="queryParams.fBillno"
  14. placeholder="请输入业务编号"
  15. clearable
  16. style="width: 200px"
  17. size="small"
  18. @keyup.enter.native="handleQuery"
  19. />
  20. </el-form-item>
  21. <el-form-item label="制单人" prop="createBy">
  22. <el-select
  23. v-model="queryParams.createBy"
  24. filterable
  25. remote
  26. clearable
  27. style="width: 200px"
  28. :remote-method="userRemoteMethod"
  29. placeholder="请选择制单人"
  30. >
  31. <el-option
  32. v-for="(dict, index) in userOptions"
  33. :key="index.userName"
  34. :label="dict.nickName"
  35. :value="dict.userName"
  36. ></el-option>
  37. </el-select>
  38. </el-form-item>
  39. <el-form-item label="货权方" prop="fCorpid">
  40. <el-select
  41. v-model="queryParams.fCorpid"
  42. filterable
  43. remote
  44. clearable
  45. style="width: 200px"
  46. @keyup.enter.native="handleQuery"
  47. :remote-method="corpsRemoteMethod"
  48. placeholder="请选择货权方"
  49. >
  50. <el-option
  51. v-for="(dict, index) in fMblnoOptions"
  52. :key="index.fId"
  53. :label="dict.fName"
  54. :value="dict.fId"
  55. ></el-option>
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="提单号" prop="fMblno">
  59. <el-input
  60. v-model="queryParams.fMblno"
  61. placeholder="请输入提单号"
  62. clearable
  63. size="small"
  64. @keyup.enter.native="handleQuery"
  65. />
  66. </el-form-item>
  67. <el-form-item label="唛头" prop="fMarks">
  68. <el-input
  69. v-model="queryParams.fMarks"
  70. placeholder="请输入唛头"
  71. clearable
  72. size="small"
  73. style="width: 200px"
  74. @keyup.enter.native="handleQuery"
  75. />
  76. </el-form-item>
  77. <el-form-item label="单据状态" prop="fBillstatus">
  78. <el-select
  79. style="width:200px"
  80. v-model="queryParams.fBillstatus"
  81. placeholder="请输入单据状态"
  82. >
  83. <el-option label="新建" value="1"></el-option>
  84. <el-option label="暂存" value="2"></el-option>
  85. <el-option label="审核驳回" value="3"></el-option>
  86. <el-option label="提交审核" value="4"></el-option>
  87. <el-option label="审核中" value="5"></el-option>
  88. <el-option label="审核通过" value="6"></el-option>
  89. </el-select>
  90. </el-form-item>
  91. <el-form-item label="出库日期" prop="timeInterval">
  92. <el-date-picker
  93. v-model="queryParams.timeInterval"
  94. type="daterange"
  95. value-format="yyyy-MM-dd"
  96. clearable
  97. style="width: 240px"
  98. range-separator="至"
  99. start-placeholder="开始日期"
  100. end-placeholder="结束日期"
  101. @keyup.enter.native="handleQuery"
  102. >
  103. </el-date-picker>
  104. </el-form-item>
  105. <el-form-item>
  106. <el-button
  107. type="cyan"
  108. icon="el-icon-search"
  109. size="mini"
  110. @click="handleQuery"
  111. >搜索
  112. </el-button>
  113. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  114. >重置
  115. </el-button>
  116. </el-form-item>
  117. </el-form>
  118. <el-row :gutter="10" class="mb8">
  119. <el-col :span="1.5">
  120. <el-button
  121. type="primary"
  122. icon="el-icon-plus"
  123. size="mini"
  124. @click="handleAdd(false)"
  125. v-hasPermi="['warehouseBusiness:storageFeeCalculation:add']"
  126. >新增
  127. </el-button>
  128. </el-col>
  129. <el-col :span="1.5">
  130. <el-button
  131. type="success"
  132. icon="el-icon-edit"
  133. size="mini"
  134. :disabled="single"
  135. @click="handleUpdate"
  136. v-hasPermi="['warehouseBusiness:storageFeeCalculation:edit']"
  137. >修改
  138. </el-button>
  139. </el-col>
  140. <el-col :span="1.5">
  141. <el-button
  142. type="danger"
  143. icon="el-icon-delete"
  144. size="mini"
  145. :disabled="multiple"
  146. @click="handleDelete"
  147. v-hasPermi="['warehouseBusiness:storageFeeCalculation:remove']"
  148. >删除
  149. </el-button>
  150. </el-col>
  151. <el-col :span="1.5">
  152. <el-button
  153. type="warning"
  154. icon="el-icon-download"
  155. size="mini"
  156. @click="handleExport"
  157. v-hasPermi="['warehouseBusiness:storageFeeCalculation:export']"
  158. >导出
  159. </el-button>
  160. </el-col>
  161. <el-col :span="1.5">
  162. <el-button
  163. type="warning"
  164. icon="el-icon-download"
  165. size="mini"
  166. @click="handleExport"
  167. :disabled="multiple"
  168. v-hasPermi="['warehouseBusiness:storageFeeCalculation:export']"
  169. >导入
  170. </el-button>
  171. </el-col>
  172. <div class="tabSetting">
  173. <right-toolbar
  174. :showSearch.sync="showSearch"
  175. @queryTable="getList"
  176. ></right-toolbar>
  177. <div style="margin: 0 12px">
  178. <el-button
  179. icon="el-icon-setting"
  180. size="mini"
  181. circle
  182. @click="showSetting = !showSetting"
  183. ></el-button>
  184. </div>
  185. </div>
  186. </el-row>
  187. <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
  188. <template slot="title">
  189. <div class="avue-crud__dialog__header">
  190. <span class="el-dialog__title">
  191. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  192. </span>
  193. </div>
  194. </template>
  195. <div>配置排序列数据(拖动调整顺序)</div>
  196. <div style="margin-left: 17px">
  197. <el-checkbox
  198. v-model="allCheck"
  199. label="全选"
  200. @change="allChecked"
  201. ></el-checkbox>
  202. </div>
  203. <div style="padding: 4px; display: flex; justify-content: center">
  204. <draggable
  205. v-model="setRowList"
  206. group="site"
  207. animation="300"
  208. @start="onStart"
  209. @end="onEnd"
  210. handle=".indraggable"
  211. >
  212. <transition-group>
  213. <div
  214. v-for="item in setRowList"
  215. :key="item.surface"
  216. class="listStyle"
  217. >
  218. <div style="width: 500px" class="indraggable">
  219. <div class="progress" :style="{ width: item.width + 'px' }">
  220. <el-checkbox
  221. :label="item.name"
  222. v-model="item.checked"
  223. :true-label="0"
  224. :false-label="1"
  225. >{{ item.name }}
  226. </el-checkbox>
  227. </div>
  228. </div>
  229. <el-input-number
  230. v-model.number="item.width"
  231. controls-position="right"
  232. :min="1"
  233. :max="500"
  234. size="mini"
  235. ></el-input-number>
  236. </div>
  237. </transition-group>
  238. </draggable>
  239. </div>
  240. <span slot="footer" class="dialog-footer">
  241. <el-button @click="showSetting = false">取 消</el-button>
  242. <el-button type="primary" @click="save()">确 定</el-button>
  243. </span>
  244. </el-dialog>
  245. <el-table
  246. v-loading="loading"
  247. :data="warehousebillsList"
  248. @selection-change="handleSelectionChange"
  249. >
  250. <el-table-column type="selection" width="55" align="center"/>
  251. <el-table-column type="index" label="行号" align="center"/>
  252. <el-table-column
  253. :show-overflow-tooltip="true"
  254. label="单据编号"
  255. align="center"
  256. width="160"
  257. prop="fBillno"
  258. />
  259. <el-table-column label="客户名称" align="center" width="300" sortable prop="fCorpid" show-overflow-tooltip/>
  260. <el-table-column
  261. label="计费日期"
  262. align="center"
  263. sortable
  264. prop="fBillingDeadline"
  265. width="180"
  266. >
  267. <template slot-scope="scope">
  268. <span>{{ parseTime(scope.row.fBillingDeadline, "{y}-{m}-{d}") }}</span>
  269. </template>
  270. </el-table-column>
  271. <el-table-column
  272. label="备注"
  273. align="center"
  274. prop="remark"
  275. />
  276. <el-table-column
  277. label="单据状态"
  278. align="center"
  279. sortable
  280. prop="fBillstatus"
  281. >
  282. <template slot-scope="scope">
  283. <span v-if="scope.row.fBillstatus === 1">新建</span>
  284. <span v-if="scope.row.fBillstatus === 2">暂存</span>
  285. <span v-if="scope.row.fBillstatus === 3">审核驳回</span>
  286. <span v-if="scope.row.fBillstatus === 4">提交审核</span>
  287. <span v-if="scope.row.fBillstatus === 5">审核中</span>
  288. <span v-if="scope.row.fBillstatus === 6">审核通过</span>
  289. </template>
  290. </el-table-column>
  291. <el-table-column
  292. label="制单人"
  293. align="center"
  294. prop="createBy"
  295. />
  296. <el-table-column
  297. label="制单日期"
  298. align="center"
  299. prop="createTime"
  300. width="160"
  301. >
  302. <template slot-scope="scope">
  303. {{scope.row.createTime.slice(0, 10)}}
  304. </template>
  305. </el-table-column>
  306. <el-table-column
  307. label="操作"
  308. align="center"
  309. class-name="small-padding fixed-width"
  310. min-width="180"
  311. >
  312. <template slot-scope="scope">
  313. <el-button
  314. size="mini"
  315. type="text"
  316. icon="el-icon-edit"
  317. @click="handleUpdate_s(scope.row, true)"
  318. v-hasPermi="['warehouseBusiness:storageFeeCalculation:edit']"
  319. >查看
  320. </el-button>
  321. <el-button
  322. size="mini"
  323. type="text"
  324. icon="el-icon-view"
  325. @click="handleUpdate(scope.row, true)"
  326. v-hasPermi="['warehouseBusiness:storageFeeCalculation:edit']"
  327. v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
  328. >审批进度</el-button
  329. >
  330. <el-button
  331. size="mini"
  332. type="text"
  333. icon="el-icon-edit"
  334. v-if="scope.row.fBillstatus <= 3"
  335. @click="handleUpdate(scope.row, false)"
  336. v-hasPermi="['warehouseBusiness:storageFeeCalculation:edit']"
  337. >修改
  338. </el-button>
  339. <el-button
  340. size="mini"
  341. type="text"
  342. icon="el-icon-delete"
  343. v-if="scope.row.fBillstatus <= 3"
  344. @click="handleDelete(scope.row)"
  345. v-hasPermi="['warehouseBusiness:storageFeeCalculation:remove']"
  346. >删除
  347. </el-button>
  348. </template>
  349. </el-table-column>
  350. </el-table>
  351. <pagination
  352. v-show="total > 0"
  353. :total="total"
  354. :page.sync="queryParams.pageNum"
  355. :limit.sync="queryParams.pageSize"
  356. @pagination="getList"
  357. />
  358. <!-- 新增或修改仓储费计算对话框 -->
  359. <el-dialog
  360. :visible.sync="open"
  361. :close-on-click-modal="false"
  362. width="80%"
  363. append-to-body
  364. :show-close="Xbutton"
  365. >
  366. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  367. <el-row>
  368. <el-col :span="8">
  369. <el-form-item label="客户名称" prop="fCorpid">
  370. <el-select
  371. v-model="form.fCorpid"
  372. filterable
  373. remote
  374. :disabled="browseStatus"
  375. style="width:80%"
  376. :remote-method="corpsRemoteMethod"
  377. placeholder="请输入模糊查找"
  378. >
  379. <el-option
  380. v-for="(dict, index) in fMblnoOptions"
  381. :key="index.fId"
  382. :label="dict.fName"
  383. :value="dict.fId"
  384. ></el-option>
  385. </el-select>
  386. </el-form-item>
  387. </el-col>
  388. <el-col :span="8">
  389. <el-form-item label="货品名称" prop="fGoodsid">
  390. <el-select
  391. v-model="form.fGoodsid"
  392. filterable
  393. style="width:80%"
  394. :disabled="browseStatus"
  395. remote
  396. :remote-method="goodsRemoteMethod"
  397. placeholder="请选择品名"
  398. >
  399. <el-option
  400. v-for="(dict, index) in goodsOptions"
  401. :key="index.fId"
  402. :label="dict.fName"
  403. :value="dict.fId"
  404. ></el-option>
  405. </el-select>
  406. </el-form-item>
  407. </el-col>
  408. <el-col :span="8">
  409. <el-form-item label="提单号" prop="fMblno">
  410. <el-input
  411. v-model="form.fMblno"
  412. style="width:80%"
  413. :disabled="browseStatus"
  414. placeholder="手工输入"
  415. />
  416. </el-form-item>
  417. </el-col>
  418. </el-row>
  419. <el-row>
  420. <el-col :span="8">
  421. <el-form-item disabled label="仓储费截止日期" prop="fBillingDeadline">
  422. <el-date-picker
  423. v-model="form.fBillingDeadline"
  424. size="large"
  425. type="date"
  426. style="width:80%"
  427. :disabled="browseStatus"
  428. value-format="timestamp"
  429. placeholder="仓储费计算截止日期"
  430. >
  431. </el-date-picker>
  432. </el-form-item>
  433. </el-col>
  434. <el-col :span="8">
  435. <el-form-item label="业务编号" prop="fBillno">
  436. <el-input
  437. disabled
  438. v-model="form.fBillno"
  439. style="width:80%"
  440. placeholder="业务编号"
  441. />
  442. </el-form-item>
  443. </el-col>
  444. <el-col :span="8">
  445. <el-form-item label="制单人" prop="createBy">
  446. <el-input
  447. disabled
  448. v-model="form.createBy"
  449. style="width:80%"
  450. placeholder="制单人"
  451. />
  452. </el-form-item>
  453. </el-col>
  454. </el-row>
  455. <el-row>
  456. <el-col :span="8">
  457. <el-form-item disabled label="制单日期" prop="fbilldate">
  458. <el-date-picker
  459. v-model="form.createTime"
  460. size="large"
  461. type="date"
  462. disabled
  463. style="width:80%"
  464. value-format="timestamp"
  465. placeholder="制单日期"
  466. >
  467. </el-date-picker>
  468. </el-form-item>
  469. </el-col>
  470. <el-col :span="8">
  471. <el-form-item disabled label="备注" prop="remark">
  472. <el-input
  473. style="width:80%"
  474. :disabled="browseStatus"
  475. v-model="form.remark"
  476. placeholder=""
  477. />
  478. </el-form-item>
  479. </el-col>
  480. </el-row>
  481. </el-form>
  482. <div style="font-size:18px; padding-top:8px">
  483. 计费物资明细
  484. <el-button :disabled="browseStatus" @click="calculateCost">计算仓储费</el-button>
  485. <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
  486. <el-button
  487. type="warning"
  488. icon="el-icon-download"
  489. @click="handleExportItems"
  490. >导出
  491. </el-button>
  492. </div>
  493. <div class="dialogTableTitle flex a-center jlr"
  494. style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
  495. <el-table
  496. :data="dataList"
  497. ref="tableList"
  498. tooltip-effect="dark"
  499. border
  500. stripe
  501. :summary-method="getSummaries"
  502. show-summary
  503. >
  504. <el-table-column label="序号" type="index" width="80">
  505. </el-table-column>
  506. <el-table-column
  507. prop="fBilltype"
  508. header-align="center"
  509. align="center"
  510. width="140px"
  511. label="业务来源"
  512. >
  513. <template slot-scope="scope">
  514. <span v-if="scope.row.fBilltype === 'SJRK'">入库</span>
  515. <span v-if="scope.row.fBilltype === 'SJCK'">出库</span>
  516. <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
  517. </template>
  518. </el-table-column>
  519. <el-table-column
  520. prop="srcBillNo"
  521. header-align="center"
  522. align="center"
  523. width="140px"
  524. label="业务单号"
  525. >
  526. </el-table-column>
  527. <el-table-column
  528. prop="fProductName"
  529. header-align="center"
  530. align="center"
  531. width="140px"
  532. label="货物名称"
  533. >
  534. </el-table-column>
  535. <el-table-column
  536. prop="fMarks"
  537. header-align="center"
  538. align="center"
  539. width="140px"
  540. label="唛头"
  541. />
  542. <el-table-column
  543. prop="fBsdate"
  544. header-align="center"
  545. align="center"
  546. width="140px"
  547. label="业务日期"
  548. >
  549. <template slot-scope="scope">
  550. <el-date-picker
  551. v-model="scope.row.fBsdate"
  552. size="large"
  553. type="date"
  554. disabled
  555. value-format="timestamp"
  556. placeholder="业务日期"
  557. >
  558. </el-date-picker>
  559. </template>
  560. </el-table-column>
  561. <el-table-column
  562. prop="fBillingway"
  563. header-align="center"
  564. align="center"
  565. width="180px"
  566. label="计费单位"
  567. >
  568. <template slot-scope="scope">
  569. <el-select
  570. v-model="scope.row.fBillingway"
  571. placeholder="请选择计费单位"
  572. disabled
  573. clearable
  574. >
  575. <el-option
  576. v-for="dict in fFeetunitOptions"
  577. :key="dict.dictValue"
  578. :label="dict.dictLabel"
  579. :value="dict.dictValue"
  580. />
  581. </el-select>
  582. </template>
  583. </el-table-column>
  584. <el-table-column
  585. prop="fBillingQty"
  586. header-align="center"
  587. align="center"
  588. width="140px"
  589. label="计费数量"
  590. >
  591. </el-table-column>
  592. <el-table-column
  593. prop="fChargedate"
  594. header-align="center"
  595. align="center"
  596. width="140px"
  597. label="计费起始日期"
  598. >
  599. <template slot-scope="scope">
  600. <el-date-picker
  601. v-model="scope.row.fChargedate"
  602. size="large"
  603. type="date"
  604. disabled
  605. value-format="timestamp"
  606. placeholder="计费起始日期"
  607. >
  608. </el-date-picker>
  609. </template>
  610. </el-table-column>
  611. <el-table-column
  612. prop="fBillingDeadline"
  613. header-align="center"
  614. align="center"
  615. width="140px"
  616. label="计费截止日期"
  617. >
  618. <template slot-scope="scope">
  619. <el-date-picker
  620. v-model="scope.row.fBillingDeadline"
  621. size="large"
  622. type="date"
  623. disabled
  624. value-format="timestamp"
  625. placeholder="计费截止日期"
  626. >
  627. </el-date-picker>
  628. </template>
  629. </el-table-column>
  630. <el-table-column
  631. prop="fBillingDays"
  632. header-align="center"
  633. align="center"
  634. width="140px"
  635. label="计费天数"
  636. >
  637. </el-table-column>
  638. <el-table-column
  639. prop="fInventoryDays"
  640. header-align="center"
  641. align="center"
  642. width="140px"
  643. label="库存天数"
  644. >
  645. </el-table-column>
  646. <el-table-column
  647. prop="fAmt"
  648. header-align="center"
  649. align="center"
  650. width="140px"
  651. label="计费金额"
  652. >
  653. </el-table-column>
  654. <el-table-column
  655. prop="remark"
  656. header-align="center"
  657. width="150px"
  658. align="center"
  659. label="备注"
  660. >
  661. <template slot-scope="scope">
  662. <el-input
  663. v-model="scope.row.remark"
  664. placeholder="备注"
  665. :disabled="browseStatus"
  666. show-word-limit
  667. />
  668. </template>
  669. </el-table-column>
  670. <el-table-column
  671. header-align="center"
  672. align="center"
  673. label="操作"
  674. width="130PX"
  675. >
  676. <template slot-scope="scope">
  677. <el-button
  678. @click.native.prevent="
  679. deleteRow(scope.$index, dataList)
  680. "
  681. :disabled="browseStatus"
  682. size="small"
  683. >移除
  684. </el-button>
  685. </template>
  686. </el-table-column>
  687. </el-table>
  688. </div>
  689. <!-- <div>-->
  690. <!-- <el-button :disabled="browseStatus" @click.prevent="addCollection()"-->
  691. <!-- >新行-->
  692. <!-- </el-button>-->
  693. <!-- <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>-->
  694. <!-- </div>-->
  695. <!-- <div style="font-size:18px">应收款明细</div>-->
  696. <!-- <div class="dialogTableTitle flex a-center jlr"-->
  697. <!-- style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">-->
  698. <!-- <el-table-->
  699. <!-- :data="warehouseDrList"-->
  700. <!-- ref="table"-->
  701. <!-- tooltip-effect="dark"-->
  702. <!-- border-->
  703. <!-- stripe-->
  704. <!-- show-summary-->
  705. <!-- :summary-method="warehouseDrSummaries"-->
  706. <!-- >-->
  707. <!-- <el-table-column label="序号" type="index" width="80">-->
  708. <!-- </el-table-column>-->
  709. <!-- <el-table-column-->
  710. <!-- prop="fCorpid"-->
  711. <!-- header-align="center"-->
  712. <!-- align="center"-->
  713. <!-- width="180px"-->
  714. <!-- label="客户名称"-->
  715. <!-- >-->
  716. <!-- <template slot-scope="scope">-->
  717. <!-- <el-select-->
  718. <!-- v-model="scope.row.fCorpid"-->
  719. <!-- filterable-->
  720. <!-- remote-->
  721. <!-- :disabled="browseStatus"-->
  722. <!-- :remote-method="corpsRemoteMethod"-->
  723. <!-- placeholder="客户名称"-->
  724. <!-- >-->
  725. <!-- <el-option-->
  726. <!-- v-for="(dict, index) in fMblnoOptions"-->
  727. <!-- :key="index.fId"-->
  728. <!-- :label="dict.fName"-->
  729. <!-- :value="dict.fId"-->
  730. <!-- ></el-option>-->
  731. <!-- </el-select>-->
  732. <!-- </template>-->
  733. <!-- </el-table-column>-->
  734. <!-- <el-table-column-->
  735. <!-- prop="fFeeid"-->
  736. <!-- header-align="center"-->
  737. <!-- align="center"-->
  738. <!-- width="180px"-->
  739. <!-- label="费用名称"-->
  740. <!-- >-->
  741. <!-- <template slot-scope="scope">-->
  742. <!-- <el-select-->
  743. <!-- v-model="scope.row.fFeeid"-->
  744. <!-- filterable-->
  745. <!-- remote-->
  746. <!-- :disabled="browseStatus"-->
  747. <!-- :remote-method="fWRemoteMethod"-->
  748. <!-- placeholder="费用名称"-->
  749. <!-- >-->
  750. <!-- <el-option-->
  751. <!-- v-for="dict in fWbuOptions"-->
  752. <!-- :key="dict.fId"-->
  753. <!-- :label="dict.fName"-->
  754. <!-- :value="dict.fId"-->
  755. <!-- ></el-option>-->
  756. <!-- </el-select>-->
  757. <!-- </template>-->
  758. <!-- </el-table-column>-->
  759. <!-- <el-table-column-->
  760. <!-- prop="fFeeunitid"-->
  761. <!-- header-align="center"-->
  762. <!-- align="center"-->
  763. <!-- width="180px"-->
  764. <!-- label="计价单位"-->
  765. <!-- >-->
  766. <!-- <template slot-scope="scope">-->
  767. <!-- <el-select-->
  768. <!-- v-model="scope.row.fFeeunitid"-->
  769. <!-- placeholder="请选择计价单位"-->
  770. <!-- :disabled="browseStatus"-->
  771. <!-- clearable-->
  772. <!-- >-->
  773. <!-- <el-option-->
  774. <!-- v-for="dict in fFeetunitOptions"-->
  775. <!-- :key="dict.dictValue"-->
  776. <!-- :label="dict.dictLabel"-->
  777. <!-- :value="dict.dictValue"-->
  778. <!-- />-->
  779. <!-- </el-select>-->
  780. <!-- </template>-->
  781. <!-- </el-table-column>-->
  782. <!-- <el-table-column-->
  783. <!-- prop="fQty"-->
  784. <!-- header-align="center"-->
  785. <!-- align="center"-->
  786. <!-- width="150px"-->
  787. <!-- label="数量"-->
  788. <!-- >-->
  789. <!-- <template slot-scope="scope">-->
  790. <!-- <el-input-->
  791. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'-->
  792. <!-- v-model="scope.row.fQty"-->
  793. <!-- @change="changeEstmateAmt(scope.row)"-->
  794. <!-- :disabled="browseStatus"-->
  795. <!-- placeholder="数量"-->
  796. <!-- show-word-limit-->
  797. <!-- />-->
  798. <!-- </template>-->
  799. <!-- </el-table-column>-->
  800. <!-- <el-table-column-->
  801. <!-- prop="fUnitprice"-->
  802. <!-- header-align="center"-->
  803. <!-- align="center"-->
  804. <!-- width="150px"-->
  805. <!-- label="单价"-->
  806. <!-- >-->
  807. <!-- <template slot-scope="scope">-->
  808. <!-- <el-input-->
  809. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  810. <!-- v-model="scope.row.fUnitprice"-->
  811. <!-- @change="changeEstmateAmt(scope.row)"-->
  812. <!-- :disabled="browseStatus"-->
  813. <!-- placeholder="单价"-->
  814. <!-- show-word-limit-->
  815. <!-- />-->
  816. <!-- </template>-->
  817. <!-- </el-table-column>-->
  818. <!-- <el-table-column-->
  819. <!-- prop="fAmount"-->
  820. <!-- header-align="center"-->
  821. <!-- align="center"-->
  822. <!-- width="150px"-->
  823. <!-- label="金额"-->
  824. <!-- >-->
  825. <!-- <template slot-scope="scope">-->
  826. <!-- <el-input-->
  827. <!-- disabled-->
  828. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  829. <!-- v-model="scope.row.fAmount"-->
  830. <!-- placeholder="金额"-->
  831. <!-- show-word-limit-->
  832. <!-- />-->
  833. <!-- </template>-->
  834. <!-- </el-table-column>-->
  835. <!-- <el-table-column-->
  836. <!-- prop="fCurrency"-->
  837. <!-- header-align="center"-->
  838. <!-- align="center"-->
  839. <!-- width="150px"-->
  840. <!-- label="币别"-->
  841. <!-- >-->
  842. <!-- <template slot-scope="scope">-->
  843. <!-- <el-input-->
  844. <!-- v-model="scope.row.fCurrency"-->
  845. <!-- :disabled="browseStatus"-->
  846. <!-- placeholder="币别"-->
  847. <!-- show-word-limit-->
  848. <!-- />-->
  849. <!-- </template>-->
  850. <!-- </el-table-column>-->
  851. <!-- <el-table-column-->
  852. <!-- prop="fExrate"-->
  853. <!-- header-align="center"-->
  854. <!-- align="center"-->
  855. <!-- width="150px"-->
  856. <!-- label="汇率"-->
  857. <!-- >-->
  858. <!-- <template slot-scope="scope">-->
  859. <!-- <el-input-->
  860. <!-- v-model="scope.row.fExrate"-->
  861. <!-- :disabled="browseStatus"-->
  862. <!-- placeholder="汇率"-->
  863. <!-- show-word-limit-->
  864. <!-- />-->
  865. <!-- </template>-->
  866. <!-- </el-table-column>-->
  867. <!-- <el-table-column-->
  868. <!-- prop="fTaxrate"-->
  869. <!-- header-align="center"-->
  870. <!-- align="center"-->
  871. <!-- width="150px"-->
  872. <!-- label="税率"-->
  873. <!-- >-->
  874. <!-- <template slot-scope="scope">-->
  875. <!-- <el-input-->
  876. <!-- v-model="scope.row.fTaxrate"-->
  877. <!-- :disabled="browseStatus"-->
  878. <!-- placeholder="税率"-->
  879. <!-- show-word-limit-->
  880. <!-- />-->
  881. <!-- </template>-->
  882. <!-- </el-table-column>-->
  883. <!-- <el-table-column-->
  884. <!-- prop="fMblno"-->
  885. <!-- header-align="center"-->
  886. <!-- align="center"-->
  887. <!-- width="130px"-->
  888. <!-- label="提单号"-->
  889. <!-- >-->
  890. <!-- <template slot-scope="scope">-->
  891. <!-- <el-input-->
  892. <!-- v-model="scope.row.fMblno"-->
  893. <!-- :disabled="browseStatus"-->
  894. <!-- placeholder="提单号"-->
  895. <!-- show-word-limit-->
  896. <!-- />-->
  897. <!-- </template>-->
  898. <!-- </el-table-column>-->
  899. <!-- <el-table-column-->
  900. <!-- prop="fProductName"-->
  901. <!-- header-align="center"-->
  902. <!-- align="center"-->
  903. <!-- width="140px"-->
  904. <!-- label="品名"-->
  905. <!-- >-->
  906. <!-- <template slot-scope="scope">-->
  907. <!-- <el-input-->
  908. <!-- v-model="scope.row.fProductName"-->
  909. <!-- :disabled="browseStatus"-->
  910. <!-- placeholder="品名"-->
  911. <!-- show-word-limit-->
  912. <!-- />-->
  913. <!-- </template>-->
  914. <!-- </el-table-column>-->
  915. <!-- <el-table-column-->
  916. <!-- prop="fMarks"-->
  917. <!-- header-align="center"-->
  918. <!-- align="center"-->
  919. <!-- width="130px"-->
  920. <!-- label="品牌"-->
  921. <!-- >-->
  922. <!-- <template slot-scope="scope">-->
  923. <!-- <el-input-->
  924. <!-- v-model="scope.row.fMarks"-->
  925. <!-- :disabled="browseStatus"-->
  926. <!-- placeholder="品牌"-->
  927. <!-- show-word-limit-->
  928. <!-- />-->
  929. <!-- </template>-->
  930. <!-- </el-table-column>-->
  931. <!-- <el-table-column-->
  932. <!-- prop="remark"-->
  933. <!-- header-align="center"-->
  934. <!-- align="center"-->
  935. <!-- width="150px"-->
  936. <!-- label="备注"-->
  937. <!-- >-->
  938. <!-- <template slot-scope="scope">-->
  939. <!-- <el-input-->
  940. <!-- v-model="scope.row.remark"-->
  941. <!-- :disabled="browseStatus"-->
  942. <!-- placeholder="备注"-->
  943. <!-- show-word-limit-->
  944. <!-- />-->
  945. <!-- </template>-->
  946. <!-- </el-table-column>-->
  947. <!-- <el-table-column-->
  948. <!-- header-align="center"-->
  949. <!-- align="center"-->
  950. <!-- width="200px"-->
  951. <!-- label="操作"-->
  952. <!-- >-->
  953. <!-- <template slot-scope="scope">-->
  954. <!-- <el-button-->
  955. <!-- @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"-->
  956. <!-- size="small"-->
  957. <!-- >移除-->
  958. <!-- </el-button-->
  959. <!-- >-->
  960. <!-- </template>-->
  961. <!-- </el-table-column>-->
  962. <!-- </el-table>-->
  963. <!-- </div>-->
  964. <div slot="footer" class="dialog-footer">
  965. <el-button type="success" v-if="form.fBillstatus === 6" @click="backrRconciliation">撤销请核</el-button>
  966. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  967. <el-button type="primary" v-if="form.fBillstatus > 3" @click="addOrUpdateHandle">查看审批流</el-button>
  968. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  969. <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>
  970. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus === '4' && Operator === Lander" @click="backApproval">撤销审批</el-button>
  971. <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
  972. <el-button
  973. :disabled="browseStatus"
  974. style="background-color: #008000; color: #fff"
  975. @click="submitForm(4)"
  976. >请 核</el-button>
  977. </div>
  978. </el-dialog>
  979. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  980. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  981. </div>
  982. </template>
  983. <script>
  984. import {
  985. backFee,
  986. calculateStorageFees,
  987. getStorageFeeCalculation,
  988. delStorageFeeCalculation,
  989. addStorageFeeCalculation,
  990. listStorageFeeCalculation,
  991. updateStorageFeeCalculation,
  992. exportStorageFeeCalculation,
  993. exportWarehousebillsitems,
  994. delstorageFeeCalculation_s
  995. } from "@/api/warehouseBusiness/storageFeeCalculation";
  996. import { listUser, queryUserVal } from "@/api/system/user";
  997. import { listGoods } from "@/api/basicdata/goods";
  998. import { listFees } from "@/api/basicdata/fees";
  999. import { listCorps } from "@/api/basicdata/corps";
  1000. import moment from 'moment'
  1001. import AddOrUpdate from '@/views/viewApproval'
  1002. import ApprovalComments from '@/views/startApproval'
  1003. import Global from '@/layout/components/global'
  1004. import { getCharge } from '@/api/finance/charge'
  1005. import { RevocationApproval } from '@/api/finance/contrast'
  1006. import Vue from 'vue'
  1007. import UploadFile from '@/components/Uploadfile'
  1008. import draggable from "vuedraggable";
  1009. import Cookies from 'js-cookie'
  1010. import { addSet, select } from '@/api/system/set'
  1011. Vue.directive('dialogDrag', {
  1012. bind(el, binding, vnode, oldVnode) {
  1013. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  1014. const dragDom = el.querySelector('.el-dialog')
  1015. const enlarge = el.querySelector('.enlarge')
  1016. dialogHeaderEl.style.cursor = 'move'
  1017. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1018. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  1019. if(enlarge){
  1020. enlarge.onclick = (e) => {
  1021. dragDom.style.top = '0px'
  1022. dragDom.style.left = '0px'
  1023. }
  1024. }
  1025. dialogHeaderEl.onmousedown = (e) => {
  1026. // 鼠标按下,计算当前元素距离可视区的距离
  1027. const disX = e.clientX - dialogHeaderEl.offsetLeft
  1028. const disY = e.clientY - dialogHeaderEl.offsetTop
  1029. // 获取到的值带px 正则匹配替换
  1030. let styL, styT
  1031. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1032. if (sty.left.includes('%')) {
  1033. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  1034. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  1035. } else {
  1036. styL = +sty.left.replace(/\px/g, '')
  1037. styT = +sty.top.replace(/\px/g, '')
  1038. }
  1039. document.onmousemove = function(e) {
  1040. // 通过事件委托,计算移动的距离
  1041. const l = e.clientX - disX
  1042. const t = e.clientY - disY
  1043. // 移动当前元素
  1044. if ((t + styT) >= 0){
  1045. dragDom.style.top = `${t + styT}px`
  1046. }
  1047. dragDom.style.left = `${l + styL}px`
  1048. // 将此时的位置传出去
  1049. // binding.value({x:e.pageX,y:e.pageY})
  1050. }
  1051. document.onmouseup = function(e) {
  1052. document.onmousemove = null
  1053. document.onmouseup = null
  1054. }
  1055. }
  1056. }
  1057. })
  1058. export default {
  1059. name: "StorageFeeCalculation",
  1060. components: {
  1061. UploadFile,
  1062. AddOrUpdate,
  1063. ApprovalComments,
  1064. draggable,
  1065. },
  1066. data() {
  1067. return {
  1068. dialogFull:false,
  1069. drag: false,
  1070. setRowList: [
  1071. {
  1072. surface: "1",
  1073. label: "createBy",
  1074. name: "制单人",
  1075. checked: 0,
  1076. width: null,
  1077. },
  1078. {
  1079. surface: "2",
  1080. label: "fBillno",
  1081. name: "单据编号",
  1082. checked: 0,
  1083. width: null,
  1084. },
  1085. {
  1086. surface: "3",
  1087. label: "fCorpid",
  1088. name: "客户名称",
  1089. checked: 0,
  1090. width: null,
  1091. },
  1092. {
  1093. surface: "4",
  1094. label: "fBillingDeadline",
  1095. name: "计费日期",
  1096. checked: 0,
  1097. width: null,
  1098. },
  1099. {
  1100. surface: "5",
  1101. label: "remark",
  1102. name: "备注",
  1103. checked: 0,
  1104. width: null,
  1105. },
  1106. {
  1107. surface: "6",
  1108. label: "fBillstatus",
  1109. name: "单据状态",
  1110. checked: 0,
  1111. width: null,
  1112. },
  1113. {
  1114. surface: "7",
  1115. label: "createTime",
  1116. name: "制单日期",
  1117. checked: 0,
  1118. width: null,
  1119. },
  1120. ],
  1121. getRowList: [
  1122. {
  1123. surface: "1",
  1124. label: "createBy",
  1125. name: "制单人",
  1126. checked: 0,
  1127. width: null,
  1128. },
  1129. {
  1130. surface: "2",
  1131. label: "fBillno",
  1132. name: "单据编号",
  1133. checked: 0,
  1134. width: null,
  1135. },
  1136. {
  1137. surface: "3",
  1138. label: "fCorpid",
  1139. name: "客户名称",
  1140. checked: 0,
  1141. width: null,
  1142. },
  1143. {
  1144. surface: "4",
  1145. label: "fBillingDeadline",
  1146. name: "计费日期",
  1147. checked: 0,
  1148. width: null,
  1149. },
  1150. {
  1151. surface: "5",
  1152. label: "remark",
  1153. name: "备注",
  1154. checked: 0,
  1155. width: null,
  1156. },
  1157. {
  1158. surface: "6",
  1159. label: "fBillstatus",
  1160. name: "单据状态",
  1161. checked: 0,
  1162. width: null,
  1163. },
  1164. {
  1165. surface: "7",
  1166. label: "createTime",
  1167. name: "制单日期",
  1168. checked: 0,
  1169. width: null,
  1170. },
  1171. ],
  1172. allCheck: false,
  1173. showSetting:false,
  1174. Lander:'',
  1175. Operator:'',
  1176. actId: 150,
  1177. disappear:false,
  1178. cancelButton:true,
  1179. Xbutton:true,
  1180. approve:false,
  1181. addOrUpdateVisib: false,
  1182. addOrUpdateVisible:false,
  1183. notChange:false,
  1184. // 遮罩层
  1185. loading: true,
  1186. // 选中数组
  1187. ids: [],
  1188. userVal: {
  1189. userName: null,
  1190. nickName: null,
  1191. deptId: null,
  1192. },
  1193. queryForm: {},
  1194. // 库存总账表
  1195. whgenlegList: [],
  1196. dataList: [],
  1197. warehouseDrList: [],
  1198. browseStatus: false,
  1199. // 非单个禁用
  1200. single: true,
  1201. // 非多个禁用
  1202. multiple: true,
  1203. // 显示搜索条件
  1204. showSearch: true,
  1205. // 总条数
  1206. total: 0,
  1207. // 仓库主(出入库)表格数据
  1208. warehousebillsList: [],
  1209. // 弹出层标题
  1210. title: "",
  1211. // 是否显示弹出层
  1212. open: false,
  1213. // 货品名
  1214. goodsOptions: [],
  1215. // 货权方(客户数据)
  1216. fMblnoOptions: [],
  1217. // 操作员
  1218. userOptions: [],
  1219. // 制单部门
  1220. deptOptions: [],
  1221. // 计费单位(数据字典),下拉选择毛重或净重字典
  1222. fFeetunitOptions: [/*{
  1223. dictLabel: '件数',
  1224. dictValue: 1
  1225. }, {
  1226. dictLabel: '毛重',
  1227. dictValue: 2
  1228. }, {
  1229. dictLabel: '净重',
  1230. dictValue: 3
  1231. }, {
  1232. dictLabel: '尺码',
  1233. dictValue: 4
  1234. }, {
  1235. dictLabel: '固定',
  1236. dictValue: 5
  1237. }*/],
  1238. fTaxrate: 0,
  1239. // 费用名称
  1240. fWbuOptions: [],
  1241. // 查询参数
  1242. queryParams: {
  1243. pageNum: 1,
  1244. pageSize: 10,
  1245. fBillno: null,
  1246. createBy: null,
  1247. createTime: null,
  1248. fCustomsdeclartion: null,
  1249. fOriginalbillno: null,
  1250. fDeptid: null,
  1251. fBsdeptid: null,
  1252. fContacts: null,
  1253. fTel: null,
  1254. fCorpid: null,
  1255. fTocorpid: null,
  1256. fStltypeid: null,
  1257. fBscorpno: null,
  1258. fWarehouseid: null,
  1259. fStorekeeper: null,
  1260. fBsdate: null,
  1261. fPlanqty: null,
  1262. fPlangrossweight: null,
  1263. fPlannetweight: null,
  1264. fPlanvolumn: null,
  1265. fQty: null,
  1266. fGrossweight: null,
  1267. fNetweight: null,
  1268. fVolumn: null,
  1269. fTrademodeid: null,
  1270. fSbu: null,
  1271. fFeetunit: null,
  1272. fMblno: null,
  1273. fVslvoy: null,
  1274. fEta: null,
  1275. fCustomno: null,
  1276. fIfweigh: null,
  1277. fIfpledge: null,
  1278. fIfdamage: null,
  1279. fBankcorpid: null,
  1280. fBilltype: null,
  1281. fBillstatus: null,
  1282. fCreateby: null,
  1283. fCreatetime: null,
  1284. fGoodsid: null,
  1285. fCntrtype: null,
  1286. fCntqty: null,
  1287. },
  1288. // 表单参数
  1289. form: {},
  1290. // 表单校验
  1291. rules: {
  1292. fCorpid: [{required: true, message: " ", trigger: "blur",}],
  1293. fBillingDeadline: [{required: true, message: " ", trigger: "blur",}]
  1294. }
  1295. };
  1296. },
  1297. created() {
  1298. this.getList();
  1299. this.getDicts("tax_rate").then((response) => {
  1300. this.fTaxrate = response.data[0].dictValue
  1301. });
  1302. this.getDicts('data_unitfees').then((response) => {
  1303. this.fFeetunitOptions = response.data
  1304. })
  1305. this.register()
  1306. },
  1307. activated(){
  1308. this.Jump()
  1309. },
  1310. methods: {
  1311. full(){
  1312. this.dialogFull = !this.dialogFull
  1313. },
  1314. //列设置全选
  1315. allChecked() {
  1316. if (this.allCheck == true) {
  1317. this.setRowList.map((e) => {
  1318. return (e.checked = 0);
  1319. });
  1320. } else {
  1321. this.setRowList.map((e) => {
  1322. return (e.checked = 1);
  1323. });
  1324. }
  1325. },
  1326. //查询列数据
  1327. getRow() {
  1328. let that = this;
  1329. this.data = {
  1330. tableName: "货转",
  1331. userId: Cookies.get("userName"),
  1332. };
  1333. select(this.data).then((res) => {
  1334. if (res.data.length != 0) {
  1335. this.getRowList = res.data.filter((e) => e.checked == 0);
  1336. this.setRowList = res.data;
  1337. this.setRowList = this.setRowList.reduce((res, item) => {
  1338. res.push({
  1339. surface: item.surface,
  1340. label: item.label,
  1341. name: item.name,
  1342. checked: item.checked,
  1343. width: item.width,
  1344. });
  1345. return res;
  1346. }, []);
  1347. }
  1348. });
  1349. },
  1350. //保存列设置
  1351. save() {
  1352. this.showSetting = false;
  1353. this.data = {
  1354. tableName: "货转",
  1355. userId: Cookies.get("userName"),
  1356. sysTableSetList: this.setRowList,
  1357. };
  1358. addSet(this.data).then((res) => {
  1359. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1360. });
  1361. },
  1362. //开始拖拽事件
  1363. onStart() {
  1364. this.drag = true;
  1365. },
  1366. //拖拽结束事件
  1367. onEnd() {
  1368. this.drag = false;
  1369. },
  1370. // 撤销审核
  1371. backrRconciliation(){
  1372. // this.form.fBillstatus = '1'
  1373. backFee(this.form.fId).then(response=>{
  1374. this.msgSuccess("撤回成功")
  1375. this.getList()
  1376. this.open = false
  1377. this.getList()
  1378. })
  1379. },
  1380. // 默认录入人
  1381. register() {
  1382. queryUserVal().then((response)=>{
  1383. this.Lander = response.user.userName
  1384. })
  1385. },
  1386. // 撤销审批
  1387. backApproval(){
  1388. let data = {
  1389. id:this.form.fId,
  1390. actId:150,
  1391. billId:this.form.fId
  1392. }
  1393. RevocationApproval(data).then(response => {
  1394. this.msgSuccess("撤销审批成功")
  1395. this.disappear = true
  1396. this.open = false
  1397. this.getList()
  1398. })
  1399. },
  1400. homepaGe(){
  1401. let view = {
  1402. fullPath: "/business/agreement",
  1403. hash: "",
  1404. matched: Array(2),
  1405. meta: Object,
  1406. name: "Agreement",
  1407. params: Object,
  1408. path: "/business/agreement",
  1409. query: Object,
  1410. title: "仓储费"
  1411. }
  1412. this.$router.push({ path: '/index'})
  1413. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1414. if (this.isActive(view)) {
  1415. this.toLastView(visitedViews, view)
  1416. }
  1417. })
  1418. Global.$emit("removeCache", "closeSelectedTag", view);
  1419. },
  1420. Jump(){
  1421. this.approval = this.$route.query.data
  1422. if (this.approval){
  1423. this.reset()
  1424. this.browseStatus = status;
  1425. this.Xbutton = false
  1426. this.approval = JSON.parse(this.approval)
  1427. // this.hide = false
  1428. this.notChange = true
  1429. this.approve = true
  1430. this.cancelButton = false
  1431. getStorageFeeCalculation(this.approval.billId).then(response => {
  1432. this.fMblnoOptions = []
  1433. if (response.data.corps) {
  1434. this.fMblnoOptions.push(response.data.corps)
  1435. }
  1436. if (response.data.warehouse) {
  1437. this.form = response.data.warehouse
  1438. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  1439. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  1440. }
  1441. if (response.data.warehouseItemsList) {
  1442. this.dataList = response.data.warehouseItemsList
  1443. for (let li in this.dataList) {
  1444. this.$set(this.dataList[li], 'fBillingway',this.dataList[li].fBillingway + '')
  1445. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1446. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1447. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1448. this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
  1449. }
  1450. }
  1451. if (response.data.warehouseFeesList) {
  1452. this.warehouseDrList = response.data.warehouseFeesList
  1453. for (let dr in this.warehouseDrList) {
  1454. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  1455. }
  1456. }
  1457. if (response.data.feesList) {
  1458. this.fWbuOptions = response.data.feesList
  1459. }
  1460. this.userOptions = response.data.sysUser;
  1461. this.open = true;
  1462. this.title = "编辑仓储费计算";
  1463. });
  1464. }
  1465. },
  1466. // 审批按钮
  1467. goApproval(){
  1468. this.addOrUpdateVisib = true
  1469. this.$nextTick(() => {
  1470. this.$refs.ApprovalComments.init(this.form.fId,this.actId)
  1471. })
  1472. },
  1473. homePage(){
  1474. this.open = false
  1475. let view = {
  1476. fullPath: "/business/agreement",
  1477. hash: "",
  1478. matched: Array(2),
  1479. meta: Object,
  1480. name: "Agreement",
  1481. params: Object,
  1482. path: "/business/agreement",
  1483. query: Object,
  1484. title: "仓储费"
  1485. }
  1486. this.$router.push({ path: '/index'})
  1487. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1488. if (this.isActive(view)) {
  1489. this.toLastView(visitedViews, view)
  1490. }
  1491. })
  1492. Global.$emit("removeCache", "closeSelectedTag", view);
  1493. },
  1494. // 查看审批流
  1495. addOrUpdateHandle(){
  1496. this.addOrUpdateVisible = true
  1497. this.addOrUpdateVisib = false
  1498. let id = '448'
  1499. let actId = '110'
  1500. this.$nextTick(() => {
  1501. this.$refs.addOrUpdate.init(this.form.fId,this.actId)
  1502. })
  1503. },
  1504. returnData(){
  1505. this.addOrUpdateVisib = false
  1506. this.open = false
  1507. this.homepaGe()
  1508. },
  1509. getDataList(){
  1510. this.addOrUpdateVisible = false
  1511. },
  1512. queryUser() {
  1513. queryUserVal().then((response) => {
  1514. if (response.user !== null) {
  1515. this.userVal = response.user;
  1516. this.$set(this.form, "fDeptid", this.userVal.deptId);
  1517. this.$set(this.form, "createBy", this.userVal.userName);
  1518. this.$set(this.form, "fIfdamage", "1");
  1519. this.$set(this.form, "fIfweigh", "1");
  1520. this.$set(this.form, "fTrademodeid", "1");
  1521. this.$set(this.form, "createTime", Date.parse(new Date()));
  1522. }
  1523. if (response.dept !== null) {
  1524. this.deptOptions = [];
  1525. this.deptOptions.push(response.dept);
  1526. }
  1527. });
  1528. },
  1529. /** 查询仓库主(出入库)列表 */
  1530. getList() {
  1531. this.loading = true;
  1532. listStorageFeeCalculation(this.queryParams).then((response) => {
  1533. this.warehousebillsList = response.rows;
  1534. this.$set(this.form, 'createTime', moment(Date.parse(this.warehousebillsList.createTime)).format("YYYY-MM-DD HH:mm:ss"))
  1535. this.total = response.total;
  1536. this.loading = false;
  1537. });
  1538. },
  1539. // 取消按钮
  1540. cancel() {
  1541. this.open = false;
  1542. this.reset();
  1543. this.getList();
  1544. },
  1545. // 计算仓储费
  1546. calculateCost() {
  1547. if (!this.form.fCorpid || !this.form.fBillingDeadline) {
  1548. this.$message({message: '请维护货权方以及,仓储费计算截止日期', type: 'warning'})
  1549. return false
  1550. }
  1551. if (this.dataList.length !== 0) {
  1552. this.$confirm(`仓储费已经存在,确定要删除重新计算吗?`, '提示', {
  1553. confirmButtonText: '确定',
  1554. cancelButtonText: '取消',
  1555. type: 'warning'
  1556. }).then(() => {
  1557. this.dataList = []
  1558. this.getStorageFee()
  1559. }).catch(() => {
  1560. return false
  1561. })
  1562. } else {
  1563. this.dataList = []
  1564. this.getStorageFee()
  1565. }
  1566. },
  1567. // 添加费用新行
  1568. // 收款信息
  1569. addCollection() {
  1570. this.warehouseDrList.push({
  1571. fCorpid: null,
  1572. fFeeid: null,
  1573. fFeeunitid: "2",
  1574. fQty: 0,
  1575. fUnitprice: 0,
  1576. fAmount: 0,
  1577. fCurrency: "RMB",
  1578. fExrate: "1",
  1579. fTaxrate: this.fTaxrate,
  1580. fCxrate: "1",
  1581. fRate: null,
  1582. remark: null,
  1583. });
  1584. },
  1585. getStorageFee () {
  1586. calculateStorageFees(this.form).then((response) => {
  1587. this.dataList = []
  1588. this.warehouseDrList = []
  1589. this.form.fId = response.data.warehouseBills.fId
  1590. this.form.fBillno = response.data.warehouseBills.fBillno
  1591. if (response.data.warehouseFeesList) {
  1592. this.warehouseDrList = response.data.warehouseFeesList
  1593. }
  1594. if (response.data.warehouseItemList) {
  1595. this.dataList = response.data.warehouseItemList
  1596. for (let li in this.dataList) {
  1597. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1598. this.$set(this.dataList[li], 'fBillingway', this.dataList[li].fBillingway + '')
  1599. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1600. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1601. this.$set(this.dataList[li], 'fOriginalbilldate', Date.parse(this.dataList[li].fOriginalbilldate))
  1602. this.$set(this.dataList[li], 'fBillingway', this.dataList[li].fBillingway + '')
  1603. }
  1604. }
  1605. if (response.data.feesList) {
  1606. this.fWbuOptions = response.data.feesList
  1607. }
  1608. });
  1609. },
  1610. /* 远程模糊查询商品 */
  1611. goodsRemoteMethod(name) {
  1612. if (name == null || name === "") {
  1613. return false;
  1614. }
  1615. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  1616. listGoods(queryParams).then((response) => {
  1617. this.goodsOptions = response.rows;
  1618. });
  1619. },
  1620. // 表单重置
  1621. reset() {
  1622. this.form = {
  1623. fId: null,
  1624. fBillno: null,
  1625. fCustomsdeclartion: null,
  1626. fOriginalbillno: null,
  1627. fDeptid: null,
  1628. fBsdeptid: null,
  1629. fContacts: null,
  1630. fTel: null,
  1631. fCorpid: null,
  1632. fTocorpid: null,
  1633. fStltypeid: null,
  1634. fBscorpno: null,
  1635. fWarehouseid: null,
  1636. fStorekeeper: null,
  1637. fBsdate: null,
  1638. fPlanqty: null,
  1639. fPlangrossweight: null,
  1640. fPlannetweight: null,
  1641. fPlanvolumn: null,
  1642. fQty: null,
  1643. fGrossweight: null,
  1644. fNetweight: null,
  1645. fVolumn: null,
  1646. fTrademodeid: null,
  1647. fSbu: null,
  1648. fFeetunit: null,
  1649. fMblno: null,
  1650. fVslvoy: null,
  1651. fEta: null,
  1652. fCustomno: null,
  1653. fIfweigh: null,
  1654. fIfpledge: null,
  1655. fIfdamage: null,
  1656. fBankcorpid: null,
  1657. fBilltype: null,
  1658. fBillstatus: null,
  1659. delFlag: null,
  1660. createBy: null,
  1661. createTime: null,
  1662. updateBy: null,
  1663. updateTime: null,
  1664. remark: null,
  1665. fCreateby: null,
  1666. fCreatetime: null,
  1667. fGoodsid: null,
  1668. fCntrtype: null,
  1669. fCntqty: null,
  1670. };
  1671. this.deptOptions = [];
  1672. this.userOptions = [];
  1673. this.fWbuOptions = [];
  1674. this.fMblnoOptions = [];
  1675. this.disappear = false
  1676. this.addOrUpdateVisib = false
  1677. this.addOrUpdateVisible = false
  1678. this.notChange = false
  1679. this.loading = false
  1680. this.browseStatus = false
  1681. this.resetForm("form");
  1682. },
  1683. /** 搜索按钮操作 */
  1684. handleQuery() {
  1685. this.queryParams.pageNum = 1;
  1686. this.getList();
  1687. },
  1688. /** 重置按钮操作 */
  1689. resetQuery() {
  1690. this.queryParams = {
  1691. fBillstatus:null,
  1692. fBillno:null,
  1693. createBy:null,
  1694. timeInterval:null,
  1695. fCorpid:null,
  1696. fMblno:null,
  1697. fSbu:null,
  1698. fGoodsid:null,
  1699. fWarehouseid:null,
  1700. fMarks:null,
  1701. }
  1702. this.resetForm("queryForm");
  1703. this.handleQuery();
  1704. },
  1705. // 多选框选中数据
  1706. handleSelectionChange(selection) {
  1707. this.ids = selection;
  1708. // this.ids = selection.map((item) => item.fId);
  1709. this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
  1710. this.multiple = !selection.length;
  1711. },
  1712. /** 新增按钮操作 */
  1713. handleAdd(status) {
  1714. this.reset();
  1715. this.browseStatus = status;
  1716. this.queryUser();
  1717. this.open = true;
  1718. this.dataList = [];
  1719. this.warehouseCrList = [];
  1720. this.warehouseDrList = [];
  1721. this.relevantAttachments = [];
  1722. this.title = "出库单";
  1723. },
  1724. handleUpdate_s(row, status) {
  1725. this.reset();
  1726. this.notChange = true
  1727. this.browseStatus = status;
  1728. let data = row || this.ids;
  1729. getStorageFeeCalculation(data.fId).then((response) => {
  1730. this.fMblnoOptions = []
  1731. if (response.data.corps) {
  1732. this.fMblnoOptions.push(response.data.corps)
  1733. }
  1734. if (response.data.warehouse) {
  1735. this.form = response.data.warehouse
  1736. this.Operator = this.form.createBy
  1737. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  1738. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  1739. }
  1740. if (response.data.warehouseItemsList) {
  1741. this.dataList = response.data.warehouseItemsList
  1742. for (let li in this.dataList) {
  1743. this.$set(this.dataList[li], 'fBillingway',this.dataList[li].fBillingway + '')
  1744. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1745. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1746. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1747. this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
  1748. }
  1749. }
  1750. if (response.data.warehouseFeesList) {
  1751. this.warehouseDrList = response.data.warehouseFeesList
  1752. for (let dr in this.warehouseDrList) {
  1753. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  1754. }
  1755. }
  1756. if (response.data.feesList) {
  1757. this.fWbuOptions = response.data.feesList
  1758. }
  1759. this.userOptions = response.data.sysUser;
  1760. this.open = true;
  1761. this.title = "编辑仓储费计算";
  1762. });
  1763. },
  1764. /** 修改按钮操作 */
  1765. handleUpdate(row, status) {
  1766. this.reset();
  1767. this.disappear = false
  1768. this.notChange = true
  1769. this.browseStatus = status;
  1770. let fId = row.fId || this.ids;
  1771. if (fId.length === 1){
  1772. fId = fId[0].fId
  1773. }
  1774. getStorageFeeCalculation(fId).then((response) => {
  1775. this.fMblnoOptions = []
  1776. if (response.data.corps) {
  1777. this.fMblnoOptions.push(response.data.corps)
  1778. }
  1779. if (response.data.warehouse) {
  1780. this.form = response.data.warehouse
  1781. this.Operator = this.form.createBy
  1782. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  1783. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  1784. }
  1785. if (response.data.warehouseItemsList) {
  1786. this.dataList = response.data.warehouseItemsList
  1787. for (let li in this.dataList) {
  1788. this.$set(this.dataList[li], 'fBillingway',this.dataList[li].fBillingway + '')
  1789. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1790. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1791. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1792. this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
  1793. }
  1794. }
  1795. if (response.data.warehouseFeesList) {
  1796. this.warehouseDrList = response.data.warehouseFeesList
  1797. for (let dr in this.warehouseDrList) {
  1798. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  1799. }
  1800. }
  1801. if (response.data.feesList) {
  1802. this.fWbuOptions = response.data.feesList
  1803. }
  1804. this.userOptions = response.data.sysUser;
  1805. this.open = true;
  1806. this.title = "编辑仓储费计算";
  1807. });
  1808. },
  1809. changeEstmateAmt(row) {
  1810. let fQty = 0
  1811. let fUnitprice = 0
  1812. if (row.fUnitprice && row.fUnitprice !== "") {
  1813. fUnitprice = row.fUnitprice
  1814. }
  1815. if (row.fQty && row.fQty !== "") {
  1816. fQty = row.fQty
  1817. }
  1818. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  1819. },
  1820. changefBsdate(row) {
  1821. if (this.dataList.length > 0) {
  1822. for (var i = 0; i < this.dataList.length; i++) {
  1823. this.$set(this.dataList[i], "fBsdate", row);
  1824. }
  1825. }
  1826. },
  1827. // 合计
  1828. getSummaries(param) {
  1829. const {columns, data} = param;
  1830. const sums = [];
  1831. var values = [];
  1832. columns.forEach((column, index) => {
  1833. if (index === 0) {
  1834. sums[index] = "合计";
  1835. return;
  1836. }
  1837. if (column.property === "fBillingQty") {
  1838. values = data.map((item) => Number(item["fBillingQty"]));
  1839. }
  1840. if (column.property === "fAmt") {
  1841. values = data.map((item) => Number(item["fAmt"]));
  1842. }
  1843. // const values = data.map(item => Number(item[column.property]))
  1844. if (column.property === "fBillingQty" || column.property === "fAmt") {
  1845. sums[index] = values.reduce((prev, curr) => {
  1846. const value = Number(curr);
  1847. if (!isNaN(value)) {
  1848. return prev + curr;
  1849. } else {
  1850. return prev;
  1851. }
  1852. }, 0);
  1853. sums[index] = sums[index].toFixed(2)
  1854. } else {
  1855. sums[index] = '-'
  1856. }
  1857. });
  1858. return sums;
  1859. },
  1860. // 付款合计
  1861. warehouseDrSummaries(param) {
  1862. const {columns, data} = param;
  1863. const sums = [];
  1864. columns.forEach((column, index) => {
  1865. if (index === 0) {
  1866. sums[index] = "合计";
  1867. return;
  1868. }
  1869. const values = data.map((item) => Number(item[column.property]));
  1870. if (column.property === "fAmount") {
  1871. sums[index] = values.reduce((prev, curr) => {
  1872. const value = Number(curr);
  1873. if (!isNaN(value)) {
  1874. return prev + curr;
  1875. } else {
  1876. return prev;
  1877. }
  1878. }, 0); // sums[index]
  1879. sums[index] = sums[index].toFixed(2)
  1880. } else {
  1881. sums[index] = '-'
  1882. }
  1883. });
  1884. return sums;
  1885. },
  1886. /** 删除按钮操作 */
  1887. handleDelete(row) {
  1888. const fIds = row.fId || this.ids.fId;
  1889. let tips = ''
  1890. delstorageFeeCalculation_s(fIds).then( data =>{
  1891. switch (data.msg) {
  1892. case '0': {
  1893. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  1894. break
  1895. }
  1896. case '1': {
  1897. tips = '当前主表有数据从表无数据是否删除'
  1898. this.delete_S(fIds, tips)
  1899. break
  1900. }
  1901. case '2': {
  1902. tips = '当前主表有数据从表有数据是否删除'
  1903. this.delete_S(fIds, tips)
  1904. break
  1905. }
  1906. default:{
  1907. return this.$message.error('未知错误,无状态')
  1908. }
  1909. }
  1910. })
  1911. },
  1912. delete_s(fIds,tips){
  1913. this.$confirm(
  1914. tips,
  1915. "警告",
  1916. {
  1917. confirmButtonText: "确定",
  1918. cancelButtonText: "取消",
  1919. type: "warning",
  1920. }
  1921. )
  1922. .then(function () {
  1923. return delStorageFeeCalculation(fIds);
  1924. })
  1925. .then(() => {
  1926. this.getList();
  1927. this.msgSuccess("删除成功");
  1928. });
  1929. },
  1930. /** 导出按钮操作 */
  1931. handleExport() {
  1932. const queryParams = this.queryParams;
  1933. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  1934. confirmButtonText: "确定",
  1935. cancelButtonText: "取消",
  1936. type: "warning",
  1937. })
  1938. .then(function () {
  1939. return exportWarehousebills(queryParams);
  1940. })
  1941. .then((response) => {
  1942. this.download(response.msg);
  1943. });
  1944. },
  1945. handleExportItems() {
  1946. const fIds = this.form.fId
  1947. if(fIds !== null){
  1948. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  1949. confirmButtonText: "确定",
  1950. cancelButtonText: "取消",
  1951. type: "warning",
  1952. })
  1953. .then(function () {
  1954. return exportWarehousebillsitems(fIds);
  1955. })
  1956. .then((response) => {
  1957. this.download(response.msg);
  1958. });
  1959. }else{
  1960. this.$message("请先保存")
  1961. }
  1962. },
  1963. deleteRow(index, rows) {
  1964. rows.splice(index, 1);
  1965. },
  1966. /* 远程模糊查询用户 */
  1967. corpsRemoteMethod(name) {
  1968. if (name == null || name === "") {
  1969. return false;
  1970. }
  1971. let queryParams = {pageNum: 1, pageSize: 10, fName: name};
  1972. listCorps(queryParams).then((response) => {
  1973. this.fMblnoOptions = response.rows;
  1974. });
  1975. },
  1976. // 远程模糊查询费用名称
  1977. fWRemoteMethod(name) {
  1978. if (name == null || name === "") {
  1979. return false;
  1980. }
  1981. let queryParams = {pageNum: 1, pageSize: 10, fName: name};
  1982. listFees(queryParams).then((response) => {
  1983. this.fWbuOptions = response.rows;
  1984. });
  1985. },
  1986. /* 远程模糊查询操作用户 */
  1987. userRemoteMethod(name) {
  1988. if (name == null || name === "") {
  1989. return false;
  1990. }
  1991. let queryParams = {pageNum: 1, pageSize: 10, userName: name};
  1992. listUser(queryParams).then((response) => {
  1993. this.userOptions = response.rows;
  1994. });
  1995. },
  1996. /** 提交按钮 */
  1997. submitForm(status) {
  1998. this.$refs["form"].validate((valid) => {
  1999. if (valid) {
  2000. if (status !== 2) {
  2001. if (this.dataList.length === 0) {
  2002. this.$message.error("请维护计费物资明细!");
  2003. return false;
  2004. }
  2005. }
  2006. if (!this.form.fCorpid) {
  2007. this.$message({message: '请维护货权方', type: 'warning'})
  2008. return false
  2009. }
  2010. if (!this.form.fBillingDeadline) {
  2011. this.$message({message: '请维护仓储费计算截止日期', type: 'warning'})
  2012. return false
  2013. }
  2014. if (this.form.fBillstatus !== 4) {
  2015. this.form.fBillstatus = status
  2016. }
  2017. let formData = new window.FormData();
  2018. formData.append("warehouseBills", JSON.stringify(this.form));
  2019. formData.append("warehouseItems", JSON.stringify(this.dataList));
  2020. formData.append("warehouseFees", JSON.stringify(this.warehouseDrList));
  2021. addStorageFeeCalculation(formData).then((response) => {
  2022. this.msgSuccess("操作成功");
  2023. if (status !== 2) {
  2024. this.open = false;
  2025. this.reset()
  2026. this.getList();
  2027. } else {
  2028. this.form = response.data
  2029. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  2030. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  2031. }
  2032. })
  2033. }
  2034. });
  2035. }
  2036. }
  2037. };
  2038. </script>
  2039. <style lang="scss">
  2040. .juzhong > th {
  2041. text-align: center;
  2042. }
  2043. .biaoge > tr > td {
  2044. height: 30px;
  2045. text-align: center;
  2046. border-right: 1px solid #dfe6ec !important;
  2047. order-bottom: 1px solid #dfe6ec !important;
  2048. border-bottom: 1px solid #dfe6ec !important;
  2049. }
  2050. .el-table thead th {
  2051. background: #1890ff;
  2052. color: #fff;
  2053. }
  2054. .upload-demo {
  2055. margin-left: 50px;
  2056. }
  2057. .el-form-item {
  2058. margin-bottom: 5px !important;
  2059. }
  2060. .el-form-item__label {
  2061. font-size: 12px !important;
  2062. }
  2063. </style>