index.vue 80 KB

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