index.vue 69 KB

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