index.vue 73 KB

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