index.vue 94 KB

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