index.vue 68 KB

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