index.vue 69 KB

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