index.vue 81 KB

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