index.vue 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142
  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" @click="calculateCost">计算仓储费</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="srcBillNo"
  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. setRowList: [
  1092. {
  1093. surface: "1",
  1094. label: "createBy",
  1095. name: "制单人",
  1096. checked: 0,
  1097. width: null,
  1098. },
  1099. {
  1100. surface: "2",
  1101. label: "fBillno",
  1102. name: "单据编号",
  1103. checked: 0,
  1104. width: null,
  1105. },
  1106. {
  1107. surface: "3",
  1108. label: "fCorpid",
  1109. name: "客户名称",
  1110. checked: 0,
  1111. width: null,
  1112. },
  1113. {
  1114. surface: "4",
  1115. label: "fBillingDeadline",
  1116. name: "计费日期",
  1117. checked: 0,
  1118. width: null,
  1119. },
  1120. {
  1121. surface: "5",
  1122. label: "remark",
  1123. name: "备注",
  1124. checked: 0,
  1125. width: null,
  1126. },
  1127. {
  1128. surface: "6",
  1129. label: "fBillstatus",
  1130. name: "单据状态",
  1131. checked: 0,
  1132. width: null,
  1133. },
  1134. {
  1135. surface: "7",
  1136. label: "createTime",
  1137. name: "制单日期",
  1138. checked: 0,
  1139. width: null,
  1140. },
  1141. ],
  1142. getRowList: [
  1143. {
  1144. surface: "1",
  1145. label: "createBy",
  1146. name: "制单人",
  1147. checked: 0,
  1148. width: null,
  1149. },
  1150. {
  1151. surface: "2",
  1152. label: "fBillno",
  1153. name: "单据编号",
  1154. checked: 0,
  1155. width: null,
  1156. },
  1157. {
  1158. surface: "3",
  1159. label: "fCorpid",
  1160. name: "客户名称",
  1161. checked: 0,
  1162. width: null,
  1163. },
  1164. {
  1165. surface: "4",
  1166. label: "fBillingDeadline",
  1167. name: "计费日期",
  1168. checked: 0,
  1169. width: null,
  1170. },
  1171. {
  1172. surface: "5",
  1173. label: "remark",
  1174. name: "备注",
  1175. checked: 0,
  1176. width: null,
  1177. },
  1178. {
  1179. surface: "6",
  1180. label: "fBillstatus",
  1181. name: "单据状态",
  1182. checked: 0,
  1183. width: null,
  1184. },
  1185. {
  1186. surface: "7",
  1187. label: "createTime",
  1188. name: "制单日期",
  1189. checked: 0,
  1190. width: null,
  1191. },
  1192. ],
  1193. allCheck: false,
  1194. showSetting:false,
  1195. Lander:'',
  1196. Operator:'',
  1197. actId: 150,
  1198. disappear:false,
  1199. cancelButton:true,
  1200. Xbutton:true,
  1201. approve:false,
  1202. addOrUpdateVisib: false,
  1203. addOrUpdateVisible:false,
  1204. notChange:false,
  1205. // 遮罩层
  1206. loading: true,
  1207. // 选中数组
  1208. ids: [],
  1209. userVal: {
  1210. userName: null,
  1211. nickName: null,
  1212. deptId: null,
  1213. },
  1214. queryForm: {},
  1215. // 库存总账表
  1216. whgenlegList: [],
  1217. dataList: [],
  1218. warehouseDrList: [],
  1219. browseStatus: false,
  1220. // 非单个禁用
  1221. single: true,
  1222. // 非多个禁用
  1223. multiple: true,
  1224. // 显示搜索条件
  1225. showSearch: true,
  1226. // 总条数
  1227. total: 0,
  1228. // 仓库主(出入库)表格数据
  1229. warehousebillsList: [],
  1230. // 弹出层标题
  1231. title: "",
  1232. // 是否显示弹出层
  1233. open: false,
  1234. // 货品名
  1235. goodsOptions: [],
  1236. // 货权方(客户数据)
  1237. fMblnoOptions: [],
  1238. // 操作员
  1239. userOptions: [],
  1240. // 制单部门
  1241. deptOptions: [],
  1242. // 计费单位(数据字典),下拉选择毛重或净重字典
  1243. fFeetunitOptions: [/*{
  1244. dictLabel: '件数',
  1245. dictValue: 1
  1246. }, {
  1247. dictLabel: '毛重',
  1248. dictValue: 2
  1249. }, {
  1250. dictLabel: '净重',
  1251. dictValue: 3
  1252. }, {
  1253. dictLabel: '尺码',
  1254. dictValue: 4
  1255. }, {
  1256. dictLabel: '固定',
  1257. dictValue: 5
  1258. }*/],
  1259. fTaxrate: 0,
  1260. // 费用名称
  1261. fWbuOptions: [],
  1262. // 查询参数
  1263. queryParams: {
  1264. pageNum: 1,
  1265. pageSize: 10,
  1266. fBillno: null,
  1267. createBy: null,
  1268. createTime: null,
  1269. fCustomsdeclartion: null,
  1270. fOriginalbillno: null,
  1271. fDeptid: null,
  1272. fBsdeptid: null,
  1273. fContacts: null,
  1274. fTel: null,
  1275. fCorpid: null,
  1276. fTocorpid: null,
  1277. fStltypeid: null,
  1278. fBscorpno: null,
  1279. fWarehouseid: null,
  1280. fStorekeeper: null,
  1281. fBsdate: null,
  1282. fPlanqty: null,
  1283. fPlangrossweight: null,
  1284. fPlannetweight: null,
  1285. fPlanvolumn: null,
  1286. fQty: null,
  1287. fGrossweight: null,
  1288. fNetweight: null,
  1289. fVolumn: null,
  1290. fTrademodeid: null,
  1291. fSbu: null,
  1292. fFeetunit: null,
  1293. fMblno: null,
  1294. fVslvoy: null,
  1295. fEta: null,
  1296. fCustomno: null,
  1297. fIfweigh: null,
  1298. fIfpledge: null,
  1299. fIfdamage: null,
  1300. fBankcorpid: null,
  1301. fBilltype: null,
  1302. fBillstatus: null,
  1303. fCreateby: null,
  1304. fCreatetime: null,
  1305. fGoodsid: null,
  1306. fCntrtype: null,
  1307. fCntqty: null,
  1308. },
  1309. // 表单参数
  1310. form: {},
  1311. // 表单校验
  1312. rules: {
  1313. fCorpid: [{required: true, message: " ", trigger: "blur",}],
  1314. fBillingDeadline: [{required: true, message: " ", trigger: "blur",}]
  1315. }
  1316. };
  1317. },
  1318. created() {
  1319. this.getList();
  1320. this.getDicts("tax_rate").then((response) => {
  1321. this.fTaxrate = response.data[0].dictValue
  1322. });
  1323. this.getDicts('data_unitfees').then((response) => {
  1324. this.fFeetunitOptions = response.data
  1325. })
  1326. this.register()
  1327. },
  1328. activated(){
  1329. this.Jump()
  1330. },
  1331. methods: {
  1332. full(){
  1333. this.dialogFull = !this.dialogFull
  1334. },
  1335. //列设置全选
  1336. allChecked() {
  1337. if (this.allCheck == true) {
  1338. this.setRowList.map((e) => {
  1339. return (e.checked = 0);
  1340. });
  1341. } else {
  1342. this.setRowList.map((e) => {
  1343. return (e.checked = 1);
  1344. });
  1345. }
  1346. },
  1347. //查询列数据
  1348. getRow() {
  1349. let that = this;
  1350. this.data = {
  1351. tableName: "货转",
  1352. userId: Cookies.get("userName"),
  1353. };
  1354. select(this.data).then((res) => {
  1355. if (res.data.length != 0) {
  1356. this.getRowList = res.data.filter((e) => e.checked == 0);
  1357. this.setRowList = res.data;
  1358. this.setRowList = this.setRowList.reduce((res, item) => {
  1359. res.push({
  1360. surface: item.surface,
  1361. label: item.label,
  1362. name: item.name,
  1363. checked: item.checked,
  1364. width: item.width,
  1365. });
  1366. return res;
  1367. }, []);
  1368. }
  1369. });
  1370. },
  1371. //保存列设置
  1372. save() {
  1373. this.showSetting = false;
  1374. this.data = {
  1375. tableName: "货转",
  1376. userId: Cookies.get("userName"),
  1377. sysTableSetList: this.setRowList,
  1378. };
  1379. addSet(this.data).then((res) => {
  1380. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1381. });
  1382. },
  1383. //开始拖拽事件
  1384. onStart() {
  1385. this.drag = true;
  1386. },
  1387. //拖拽结束事件
  1388. onEnd() {
  1389. this.drag = false;
  1390. },
  1391. // 撤销审核
  1392. backrRconciliation(){
  1393. // this.form.fBillstatus = '1'
  1394. backFee(this.form.fId).then(response=>{
  1395. this.msgSuccess("撤回成功")
  1396. this.getList()
  1397. this.open = false
  1398. this.getList()
  1399. })
  1400. },
  1401. // 默认录入人
  1402. register() {
  1403. queryUserVal().then((response)=>{
  1404. this.Lander = response.user.userName
  1405. })
  1406. },
  1407. // 撤销审批
  1408. backApproval(){
  1409. let data = {
  1410. id:this.form.fId,
  1411. actId:150,
  1412. billId:this.form.fId
  1413. }
  1414. RevocationApproval(data).then(response => {
  1415. this.msgSuccess("撤销审批成功")
  1416. this.disappear = true
  1417. this.open = false
  1418. this.getList()
  1419. })
  1420. },
  1421. homepaGe(){
  1422. let view = {
  1423. fullPath: "/business/agreement",
  1424. hash: "",
  1425. matched: Array(2),
  1426. meta: Object,
  1427. name: "Agreement",
  1428. params: Object,
  1429. path: "/business/agreement",
  1430. query: Object,
  1431. title: "仓储费"
  1432. }
  1433. this.$router.push({ path: '/index'})
  1434. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1435. if (this.isActive(view)) {
  1436. this.toLastView(visitedViews, view)
  1437. }
  1438. })
  1439. Global.$emit("removeCache", "closeSelectedTag", view);
  1440. },
  1441. Jump(){
  1442. this.approval = this.$route.query.data
  1443. if (this.approval){
  1444. this.reset()
  1445. this.browseStatus = status;
  1446. this.Xbutton = false
  1447. this.approval = JSON.parse(this.approval)
  1448. // this.hide = false
  1449. this.notChange = true
  1450. this.approve = true
  1451. this.cancelButton = false
  1452. getStorageFeeCalculation(this.approval.billId).then(response => {
  1453. this.fMblnoOptions = []
  1454. if (response.data.corps) {
  1455. this.fMblnoOptions.push(response.data.corps)
  1456. }
  1457. if (response.data.warehouse) {
  1458. this.form = response.data.warehouse
  1459. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  1460. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  1461. }
  1462. if (response.data.warehouseItemsList) {
  1463. this.dataList = response.data.warehouseItemsList
  1464. for (let li in this.dataList) {
  1465. this.$set(this.dataList[li], 'fBillingway',this.dataList[li].fBillingway + '')
  1466. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1467. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1468. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1469. this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
  1470. }
  1471. }
  1472. if (response.data.warehouseFeesList) {
  1473. this.warehouseDrList = response.data.warehouseFeesList
  1474. for (let dr in this.warehouseDrList) {
  1475. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  1476. }
  1477. }
  1478. if (response.data.feesList) {
  1479. this.fWbuOptions = response.data.feesList
  1480. }
  1481. this.userOptions = response.data.sysUser;
  1482. this.open = true;
  1483. this.title = "编辑仓储费计算";
  1484. });
  1485. }
  1486. },
  1487. // 审批按钮
  1488. goApproval(){
  1489. this.addOrUpdateVisib = true
  1490. this.$nextTick(() => {
  1491. this.$refs.ApprovalComments.init(this.form.fId,this.actId)
  1492. })
  1493. },
  1494. homePage(){
  1495. this.open = false
  1496. let view = {
  1497. fullPath: "/business/agreement",
  1498. hash: "",
  1499. matched: Array(2),
  1500. meta: Object,
  1501. name: "Agreement",
  1502. params: Object,
  1503. path: "/business/agreement",
  1504. query: Object,
  1505. title: "仓储费"
  1506. }
  1507. this.$router.push({ path: '/index'})
  1508. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1509. if (this.isActive(view)) {
  1510. this.toLastView(visitedViews, view)
  1511. }
  1512. })
  1513. Global.$emit("removeCache", "closeSelectedTag", view);
  1514. },
  1515. // 查看审批流
  1516. addOrUpdateHandle(){
  1517. this.addOrUpdateVisible = true
  1518. this.addOrUpdateVisib = false
  1519. let id = '448'
  1520. let actId = '110'
  1521. this.$nextTick(() => {
  1522. this.$refs.addOrUpdate.init(this.form.fId,this.actId)
  1523. })
  1524. },
  1525. returnData(){
  1526. this.addOrUpdateVisib = false
  1527. this.open = false
  1528. this.homepaGe()
  1529. },
  1530. getDataList(){
  1531. this.addOrUpdateVisible = false
  1532. },
  1533. queryUser() {
  1534. queryUserVal().then((response) => {
  1535. if (response.user !== null) {
  1536. this.userVal = response.user;
  1537. this.$set(this.form, "fDeptid", this.userVal.deptId);
  1538. this.$set(this.form, "createBy", this.userVal.userName);
  1539. this.$set(this.form, "fIfdamage", "1");
  1540. this.$set(this.form, "fIfweigh", "1");
  1541. this.$set(this.form, "fTrademodeid", "1");
  1542. this.$set(this.form, "createTime", Date.parse(new Date()));
  1543. }
  1544. if (response.dept !== null) {
  1545. this.deptOptions = [];
  1546. this.deptOptions.push(response.dept);
  1547. }
  1548. });
  1549. },
  1550. /** 查询仓库主(出入库)列表 */
  1551. getList() {
  1552. this.loading = true;
  1553. listStorageFeeCalculation(this.queryParams).then((response) => {
  1554. this.warehousebillsList = response.rows;
  1555. this.$set(this.form, 'createTime', moment(Date.parse(this.warehousebillsList.createTime)).format("YYYY-MM-DD HH:mm:ss"))
  1556. this.total = response.total;
  1557. this.loading = false;
  1558. });
  1559. },
  1560. // 取消按钮
  1561. cancel() {
  1562. this.open = false;
  1563. this.reset();
  1564. this.getList();
  1565. },
  1566. // 计算仓储费
  1567. calculateCost() {
  1568. if (!this.form.fCorpid || !this.form.fBillingDeadline) {
  1569. this.$message({message: '请维护货权方以及,仓储费计算截止日期', type: 'warning'})
  1570. return false
  1571. }
  1572. if (this.dataList.length !== 0) {
  1573. this.$confirm(`仓储费已经存在,确定要删除重新计算吗?`, '提示', {
  1574. confirmButtonText: '确定',
  1575. cancelButtonText: '取消',
  1576. type: 'warning'
  1577. }).then(() => {
  1578. this.dataList = []
  1579. this.getStorageFee()
  1580. }).catch(() => {
  1581. return false
  1582. })
  1583. } else {
  1584. this.dataList = []
  1585. this.getStorageFee()
  1586. }
  1587. },
  1588. // 添加费用新行
  1589. // 收款信息
  1590. addCollection() {
  1591. this.warehouseDrList.push({
  1592. fCorpid: null,
  1593. fFeeid: null,
  1594. fFeeunitid: "2",
  1595. fQty: 0,
  1596. fUnitprice: 0,
  1597. fAmount: 0,
  1598. fCurrency: "RMB",
  1599. fExrate: "1",
  1600. fTaxrate: this.fTaxrate,
  1601. fCxrate: "1",
  1602. fRate: null,
  1603. remark: null,
  1604. });
  1605. },
  1606. getStorageFee () {
  1607. calculateStorageFees(this.form).then((response) => {
  1608. this.dataList = []
  1609. this.warehouseDrList = []
  1610. this.form.fId = response.data.warehouseBills.fId
  1611. this.form.fBillno = response.data.warehouseBills.fBillno
  1612. if (response.data.warehouseFeesList) {
  1613. this.warehouseDrList = response.data.warehouseFeesList
  1614. }
  1615. if (response.data.warehouseItemList) {
  1616. this.dataList = response.data.warehouseItemList
  1617. for (let li in this.dataList) {
  1618. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1619. this.$set(this.dataList[li], 'fBillingway', this.dataList[li].fBillingway + '')
  1620. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1621. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1622. this.$set(this.dataList[li], 'fOriginalbilldate', Date.parse(this.dataList[li].fOriginalbilldate))
  1623. this.$set(this.dataList[li], 'fBillingway', this.dataList[li].fBillingway + '')
  1624. }
  1625. }
  1626. if (response.data.feesList) {
  1627. this.fWbuOptions = response.data.feesList
  1628. }
  1629. });
  1630. },
  1631. /* 远程模糊查询商品 */
  1632. goodsRemoteMethod(name) {
  1633. if (name == null || name === "") {
  1634. return false;
  1635. }
  1636. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  1637. listGoods(queryParams).then((response) => {
  1638. this.goodsOptions = response.rows;
  1639. });
  1640. },
  1641. // 表单重置
  1642. reset() {
  1643. this.form = {
  1644. fId: null,
  1645. fBillno: null,
  1646. fCustomsdeclartion: null,
  1647. fOriginalbillno: null,
  1648. fDeptid: null,
  1649. fBsdeptid: null,
  1650. fContacts: null,
  1651. fTel: null,
  1652. fCorpid: null,
  1653. fTocorpid: null,
  1654. fStltypeid: null,
  1655. fBscorpno: null,
  1656. fWarehouseid: null,
  1657. fStorekeeper: null,
  1658. fBsdate: null,
  1659. fPlanqty: null,
  1660. fPlangrossweight: null,
  1661. fPlannetweight: null,
  1662. fPlanvolumn: null,
  1663. fQty: null,
  1664. fGrossweight: null,
  1665. fNetweight: null,
  1666. fVolumn: null,
  1667. fTrademodeid: null,
  1668. fSbu: null,
  1669. fFeetunit: null,
  1670. fMblno: null,
  1671. fVslvoy: null,
  1672. fEta: null,
  1673. fCustomno: null,
  1674. fIfweigh: null,
  1675. fIfpledge: null,
  1676. fIfdamage: null,
  1677. fBankcorpid: null,
  1678. fBilltype: null,
  1679. fBillstatus: null,
  1680. delFlag: null,
  1681. createBy: null,
  1682. createTime: null,
  1683. updateBy: null,
  1684. updateTime: null,
  1685. remark: null,
  1686. fCreateby: null,
  1687. fCreatetime: null,
  1688. fGoodsid: null,
  1689. fCntrtype: null,
  1690. fCntqty: null,
  1691. };
  1692. this.deptOptions = [];
  1693. this.userOptions = [];
  1694. this.fWbuOptions = [];
  1695. this.fMblnoOptions = [];
  1696. this.disappear = false
  1697. this.addOrUpdateVisib = false
  1698. this.addOrUpdateVisible = false
  1699. this.notChange = false
  1700. this.loading = false
  1701. this.browseStatus = false
  1702. this.resetForm("form");
  1703. },
  1704. /** 搜索按钮操作 */
  1705. handleQuery() {
  1706. this.queryParams.pageNum = 1;
  1707. this.getList();
  1708. },
  1709. /** 重置按钮操作 */
  1710. resetQuery() {
  1711. this.queryParams = {
  1712. fBillstatus:null,
  1713. fBillno:null,
  1714. createBy:null,
  1715. timeInterval:null,
  1716. fCorpid:null,
  1717. fMblno:null,
  1718. fSbu:null,
  1719. fGoodsid:null,
  1720. fWarehouseid:null,
  1721. fMarks:null,
  1722. }
  1723. this.resetForm("queryForm");
  1724. this.handleQuery();
  1725. },
  1726. // 多选框选中数据
  1727. handleSelectionChange(selection) {
  1728. this.ids = selection;
  1729. // this.ids = selection.map((item) => item.fId);
  1730. this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
  1731. this.multiple = !selection.length;
  1732. },
  1733. /** 新增按钮操作 */
  1734. handleAdd(status) {
  1735. this.reset();
  1736. this.browseStatus = status;
  1737. this.queryUser();
  1738. this.open = true;
  1739. this.dataList = [];
  1740. this.warehouseCrList = [];
  1741. this.warehouseDrList = [];
  1742. this.relevantAttachments = [];
  1743. this.title = "出库单";
  1744. },
  1745. handleUpdate_s(row, status) {
  1746. this.reset();
  1747. this.notChange = true
  1748. this.browseStatus = status;
  1749. let data = row || this.ids;
  1750. getStorageFeeCalculation(data.fId).then((response) => {
  1751. this.fMblnoOptions = []
  1752. if (response.data.corps) {
  1753. this.fMblnoOptions.push(response.data.corps)
  1754. }
  1755. if (response.data.warehouse) {
  1756. this.form = response.data.warehouse
  1757. this.Operator = this.form.createBy
  1758. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  1759. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  1760. }
  1761. if (response.data.warehouseItemsList) {
  1762. this.dataList = response.data.warehouseItemsList
  1763. for (let li in this.dataList) {
  1764. this.$set(this.dataList[li], 'fBillingway',this.dataList[li].fBillingway + '')
  1765. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1766. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1767. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1768. this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
  1769. }
  1770. }
  1771. if (response.data.warehouseFeesList) {
  1772. this.warehouseDrList = response.data.warehouseFeesList
  1773. for (let dr in this.warehouseDrList) {
  1774. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  1775. }
  1776. }
  1777. if (response.data.feesList) {
  1778. this.fWbuOptions = response.data.feesList
  1779. }
  1780. this.userOptions = response.data.sysUser;
  1781. this.open = true;
  1782. this.title = "编辑仓储费计算";
  1783. });
  1784. },
  1785. /** 修改按钮操作 */
  1786. handleUpdate(row, status) {
  1787. this.reset();
  1788. this.disappear = false
  1789. this.notChange = true
  1790. this.browseStatus = status;
  1791. let fId = row.fId || this.ids;
  1792. if (fId.length === 1){
  1793. fId = fId[0].fId
  1794. }
  1795. getStorageFeeCalculation(fId).then((response) => {
  1796. this.fMblnoOptions = []
  1797. if (response.data.corps) {
  1798. this.fMblnoOptions.push(response.data.corps)
  1799. }
  1800. if (response.data.warehouse) {
  1801. this.form = response.data.warehouse
  1802. this.Operator = this.form.createBy
  1803. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  1804. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  1805. }
  1806. if (response.data.warehouseItemsList) {
  1807. this.dataList = response.data.warehouseItemsList
  1808. for (let li in this.dataList) {
  1809. this.$set(this.dataList[li], 'fBillingway',this.dataList[li].fBillingway + '')
  1810. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  1811. this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
  1812. this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
  1813. this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
  1814. }
  1815. }
  1816. if (response.data.warehouseFeesList) {
  1817. this.warehouseDrList = response.data.warehouseFeesList
  1818. for (let dr in this.warehouseDrList) {
  1819. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  1820. }
  1821. }
  1822. if (response.data.feesList) {
  1823. this.fWbuOptions = response.data.feesList
  1824. }
  1825. this.userOptions = response.data.sysUser;
  1826. this.open = true;
  1827. this.title = "编辑仓储费计算";
  1828. });
  1829. },
  1830. changeEstmateAmt(row) {
  1831. let fQty = 0
  1832. let fUnitprice = 0
  1833. if (row.fUnitprice && row.fUnitprice !== "") {
  1834. fUnitprice = row.fUnitprice
  1835. }
  1836. if (row.fQty && row.fQty !== "") {
  1837. fQty = row.fQty
  1838. }
  1839. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  1840. },
  1841. changefBsdate(row) {
  1842. if (this.dataList.length > 0) {
  1843. for (var i = 0; i < this.dataList.length; i++) {
  1844. this.$set(this.dataList[i], "fBsdate", row);
  1845. }
  1846. }
  1847. },
  1848. // 合计
  1849. getSummaries(param) {
  1850. const {columns, data} = param;
  1851. const sums = [];
  1852. var values = [];
  1853. columns.forEach((column, index) => {
  1854. if (index === 0) {
  1855. sums[index] = "合计";
  1856. return;
  1857. }
  1858. if (column.property === "fBillingQty") {
  1859. values = data.map((item) => Number(item["fBillingQty"]));
  1860. }
  1861. if (column.property === "fAmt") {
  1862. values = data.map((item) => Number(item["fAmt"]));
  1863. }
  1864. // const values = data.map(item => Number(item[column.property]))
  1865. if (column.property === "fBillingQty" || column.property === "fAmt") {
  1866. sums[index] = values.reduce((prev, curr) => {
  1867. const value = Number(curr);
  1868. if (!isNaN(value)) {
  1869. return prev + curr;
  1870. } else {
  1871. return prev;
  1872. }
  1873. }, 0);
  1874. sums[index] = sums[index].toFixed(2)
  1875. } else {
  1876. sums[index] = '-'
  1877. }
  1878. });
  1879. return sums;
  1880. },
  1881. // 付款合计
  1882. warehouseDrSummaries(param) {
  1883. const {columns, data} = param;
  1884. const sums = [];
  1885. columns.forEach((column, index) => {
  1886. if (index === 0) {
  1887. sums[index] = "合计";
  1888. return;
  1889. }
  1890. const values = data.map((item) => Number(item[column.property]));
  1891. if (column.property === "fAmount") {
  1892. sums[index] = values.reduce((prev, curr) => {
  1893. const value = Number(curr);
  1894. if (!isNaN(value)) {
  1895. return prev + curr;
  1896. } else {
  1897. return prev;
  1898. }
  1899. }, 0); // sums[index]
  1900. sums[index] = sums[index].toFixed(2)
  1901. } else {
  1902. sums[index] = '-'
  1903. }
  1904. });
  1905. return sums;
  1906. },
  1907. /** 删除按钮操作 */
  1908. handleDelete(row) {
  1909. const fIds = row.fId || this.ids.fId;
  1910. let tips = ''
  1911. delstorageFeeCalculation_s(fIds).then( data =>{
  1912. switch (data.msg) {
  1913. case '0': {
  1914. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  1915. break
  1916. }
  1917. case '1': {
  1918. tips = '当前主表有数据从表无数据是否删除'
  1919. this.delete_S(fIds, tips)
  1920. break
  1921. }
  1922. case '2': {
  1923. tips = '当前主表有数据从表有数据是否删除'
  1924. this.delete_S(fIds, tips)
  1925. break
  1926. }
  1927. default:{
  1928. return this.$message.error('未知错误,无状态')
  1929. }
  1930. }
  1931. })
  1932. },
  1933. delete_s(fIds,tips){
  1934. this.$confirm(
  1935. tips,
  1936. "警告",
  1937. {
  1938. confirmButtonText: "确定",
  1939. cancelButtonText: "取消",
  1940. type: "warning",
  1941. }
  1942. )
  1943. .then(function () {
  1944. return delStorageFeeCalculation(fIds);
  1945. })
  1946. .then(() => {
  1947. this.getList();
  1948. this.msgSuccess("删除成功");
  1949. });
  1950. },
  1951. /** 导出按钮操作 */
  1952. handleExport() {
  1953. const queryParams = this.queryParams;
  1954. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  1955. confirmButtonText: "确定",
  1956. cancelButtonText: "取消",
  1957. type: "warning",
  1958. })
  1959. .then(function () {
  1960. return exportWarehousebills(queryParams);
  1961. })
  1962. .then((response) => {
  1963. this.download(response.msg);
  1964. });
  1965. },
  1966. handleExportItems() {
  1967. const fIds = this.form.fId
  1968. if(fIds !== null){
  1969. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  1970. confirmButtonText: "确定",
  1971. cancelButtonText: "取消",
  1972. type: "warning",
  1973. })
  1974. .then(function () {
  1975. return exportWarehousebillsitems(fIds);
  1976. })
  1977. .then((response) => {
  1978. this.download(response.msg);
  1979. });
  1980. }else{
  1981. this.$message("请先保存")
  1982. }
  1983. },
  1984. deleteRow(index, rows) {
  1985. rows.splice(index, 1);
  1986. },
  1987. /* 远程模糊查询用户 */
  1988. corpsRemoteMethod(name) {
  1989. if (name == null || name === "") {
  1990. return false;
  1991. }
  1992. let queryParams = {pageNum: 1, pageSize: 10, fName: name};
  1993. listCorps(queryParams).then((response) => {
  1994. this.fMblnoOptions = response.rows;
  1995. });
  1996. },
  1997. // 远程模糊查询费用名称
  1998. fWRemoteMethod(name) {
  1999. if (name == null || name === "") {
  2000. return false;
  2001. }
  2002. let queryParams = {pageNum: 1, pageSize: 10, fName: name};
  2003. listFees(queryParams).then((response) => {
  2004. this.fWbuOptions = response.rows;
  2005. });
  2006. },
  2007. /* 远程模糊查询操作用户 */
  2008. userRemoteMethod(name) {
  2009. if (name == null || name === "") {
  2010. return false;
  2011. }
  2012. let queryParams = {pageNum: 1, pageSize: 10, userName: name};
  2013. listUser(queryParams).then((response) => {
  2014. this.userOptions = response.rows;
  2015. });
  2016. },
  2017. /** 提交按钮 */
  2018. submitForm(status) {
  2019. this.$refs["form"].validate((valid) => {
  2020. if (valid) {
  2021. if (status !== 2) {
  2022. if (this.dataList.length === 0) {
  2023. this.$message.error("请维护计费物资明细!");
  2024. return false;
  2025. }
  2026. }
  2027. if (!this.form.fCorpid) {
  2028. this.$message({message: '请维护货权方', type: 'warning'})
  2029. return false
  2030. }
  2031. if (!this.form.fBillingDeadline) {
  2032. this.$message({message: '请维护仓储费计算截止日期', type: 'warning'})
  2033. return false
  2034. }
  2035. if (this.form.fBillstatus !== 4) {
  2036. this.form.fBillstatus = status
  2037. }
  2038. let formData = new window.FormData();
  2039. formData.append("warehouseBills", JSON.stringify(this.form));
  2040. formData.append("warehouseItems", JSON.stringify(this.dataList));
  2041. formData.append("warehouseFees", JSON.stringify(this.warehouseDrList));
  2042. addStorageFeeCalculation(formData).then((response) => {
  2043. this.msgSuccess("操作成功");
  2044. if (status !== 2) {
  2045. this.open = false;
  2046. this.reset()
  2047. this.getList();
  2048. } else {
  2049. this.form = response.data
  2050. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  2051. this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
  2052. }
  2053. })
  2054. }
  2055. });
  2056. }
  2057. }
  2058. };
  2059. </script>
  2060. <style lang="scss">
  2061. .juzhong > th {
  2062. text-align: center;
  2063. }
  2064. .biaoge > tr > td {
  2065. height: 30px;
  2066. text-align: center;
  2067. border-right: 1px solid #dfe6ec !important;
  2068. order-bottom: 1px solid #dfe6ec !important;
  2069. border-bottom: 1px solid #dfe6ec !important;
  2070. }
  2071. .el-table thead th {
  2072. background: #1890ff;
  2073. color: #fff;
  2074. }
  2075. .upload-demo {
  2076. margin-left: 50px;
  2077. }
  2078. .el-form-item {
  2079. margin-bottom: 5px !important;
  2080. }
  2081. .el-form-item__label {
  2082. font-size: 12px !important;
  2083. }
  2084. .avue-crud__dialog__header {
  2085. display: -webkit-box;
  2086. display: -ms-flexbox;
  2087. display: flex;
  2088. -webkit-box-align: center;
  2089. -ms-flex-align: center;
  2090. align-items: center;
  2091. -webkit-box-pack: justify;
  2092. -ms-flex-pack: justify;
  2093. justify-content: space-between;
  2094. }
  2095. .el-dialog__title {
  2096. color: rgba(0,0,0,.85);
  2097. font-weight: 500;
  2098. word-wrap: break-word;
  2099. }
  2100. .avue-crud__dialog__menu {
  2101. padding-right: 20px;
  2102. float: left;
  2103. }
  2104. .avue-crud__dialog__menu i {
  2105. color: #909399;
  2106. font-size: 15px;
  2107. }
  2108. .el-icon-full-screen{
  2109. cursor: pointer;
  2110. }
  2111. .el-icon-full-screen:before {
  2112. content: "\e719";
  2113. }
  2114. </style>