index.vue 74 KB

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