boxLine.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <div class="box-line-new">
  3. <div class="item">
  4. <div class="title inline-16">
  5. {{ $t(title) }}
  6. </div>
  7. <el-tooltip effect="dark" placement="top-start">
  8. <div slot="content">
  9. {{
  10. $t(
  11. "①累计目标金额:到当前时间为止的累计的目标金额,不计算未经历时间的目标金额;"
  12. )
  13. }}
  14. <br />{{
  15. $t(
  16. "②同比增长率:同比增长率是指本期和上一年同期相比较的增长率,计算公式为:同比增长率=(本期数-同期数)÷同期数×100%。"
  17. )
  18. }}
  19. <br />{{
  20. $t(
  21. "③环比增长率:环比增长率是指本期和上期相比较的增长率,计算公式为:环比增长率 =(本期数-上期数)÷上期数 ×100%。"
  22. )
  23. }}
  24. <br />{{ $t("④目标达成率=实际金额÷目标金额×100%") }}
  25. </div>
  26. <!-- <i class="el-icon-question" style="color: #afb0be;float: right"></i>-->
  27. <img
  28. width="14px"
  29. height="14px"
  30. src="../../../assets/icons/prompt_icon.svg"
  31. style="float: right"
  32. />
  33. </el-tooltip>
  34. <div class="content-new">
  35. <div style="width: 18%">
  36. <div
  37. style="
  38. display: flex;
  39. justify-content: center;
  40. align-items: center;
  41. height: 150px;
  42. "
  43. >
  44. <el-progress
  45. color="#6395fa"
  46. type="circle"
  47. :percentage="percentage"
  48. :stroke-width="15"
  49. :width="150"
  50. :format="format"
  51. ></el-progress>
  52. </div>
  53. </div>
  54. <div style="width: 20%; height: 150px; margin-left: 16px" @click="onClick">
  55. <div style="display: inline-block; height: 120px; margin-top: 16px">
  56. <p class="box-title">{{ $t("实际金额") }}</p>
  57. <p style="font-size: 26px; color: #4f7bfd">
  58. <span style="font-size: 14px">¥</span>
  59. <!-- {{list.amount > 10000?tool.formatAmount(tool.unitConversion(list.amount,10000),2) +this.$t('万'):tool.formatAmount(list.amount,2)}}</p>-->
  60. <span v-if="list.amount > 10000"
  61. >{{
  62. tool.formatAmount(tool.unitConversion(list.amount, 10000), 2)
  63. }}<span style="font-size: 14px">{{ $t("万") }}</span></span
  64. >
  65. <span v-else>{{
  66. tool.formatAmount(tool.unitConversion(list.amount, 10000), 2)
  67. }}</span>
  68. </p>
  69. <p class="box-title" style="color: #929292" v-if="list.tbxsje > 0">
  70. <span
  71. v-if="
  72. param.content.dateType == '本年' ||
  73. param.content.dateType == '去年'
  74. "
  75. >{{ $t("年同比") }}</span
  76. >
  77. <span v-else-if="param.content.dateType == '本季'">{{
  78. $t("季同比")
  79. }}</span>
  80. <span v-else-if="param.content.dateType == '本月'">{{
  81. $t("月同比")
  82. }}</span>
  83. <i class="el-icon-caret-top" style="color: #2ad72a"></i
  84. ><span class="box-size-color"
  85. >{{ Math.round(list.tbxsje * 100 * 100) / 100 }}%</span
  86. >
  87. </p>
  88. <p class="box-title" style="color: #929292" v-if="list.tbxsje == 0">
  89. <span
  90. v-if="
  91. param.content.dateType == '本年' ||
  92. param.content.dateType == '去年'
  93. "
  94. >{{ $t("年同比") }}</span
  95. >
  96. <span v-else-if="param.content.dateType == '本季'">{{
  97. $t("季同比")
  98. }}</span>
  99. <span v-else-if="param.content.dateType == '本月'">{{
  100. $t("月同比")
  101. }}</span>
  102. <span class="box-size-color" style="margin-left: 10px"
  103. >{{ Math.round(list.tbxsje * 100 * 100) / 100 }}%</span
  104. >
  105. </p>
  106. <p class="box-title" style="color: #929292" v-if="list.tbxsje < 0">
  107. <span
  108. v-if="
  109. param.content.dateType == '本年' ||
  110. param.content.dateType == '去年'
  111. "
  112. >{{ $t("年同比") }}</span
  113. >
  114. <span v-else-if="param.content.dateType == '本季'">{{
  115. $t("季同比")
  116. }}</span>
  117. <span v-else-if="param.content.dateType == '本月'">{{
  118. $t("月同比")
  119. }}</span>
  120. <i class="el-icon-caret-bottom" style="color: red"></i
  121. ><span class="box-size-color"
  122. >{{ Math.round(list.tbxsje * 100 * 100) / 100 }}%</span
  123. >
  124. </p>
  125. <p class="box-title" style="color: #929292" v-if="list.hbxsje > 0">
  126. <span
  127. v-if="
  128. param.content.dateType == '本年' ||
  129. param.content.dateType == '去年'
  130. "
  131. >{{ $t("年环比") }}</span
  132. >
  133. <span v-else-if="param.content.dateType == '本季'">{{
  134. $t("季环比")
  135. }}</span>
  136. <span v-else-if="param.content.dateType == '本月'">{{
  137. $t("月环比")
  138. }}</span>
  139. <i class="el-icon-caret-top" style="color: #2ad72a"></i
  140. ><span class="box-size-color"
  141. >{{ Math.round(list.hbxsje * 100 * 100) / 100 }}%</span
  142. >
  143. </p>
  144. <p class="box-title" style="color: #929292" v-if="list.hbxsje == 0">
  145. <span
  146. v-if="
  147. param.content.dateType == '本年' ||
  148. param.content.dateType == '去年'
  149. "
  150. >{{ $t("年环比") }}</span
  151. >
  152. <span v-else-if="param.content.dateType == '本季'">{{
  153. $t("季环比")
  154. }}</span>
  155. <span v-else-if="param.content.dateType == '本月'">{{
  156. $t("月环比")
  157. }}</span>
  158. <span class="box-size-color" style="margin-left: 10px"
  159. >{{ Math.round(list.hbxsje * 100 * 100) / 100 }}%</span
  160. >
  161. </p>
  162. <p class="box-title" style="color: #929292" v-if="list.hbxsje < 0">
  163. <span
  164. v-if="
  165. param.content.dateType == '本年' ||
  166. param.content.dateType == '去年'
  167. "
  168. >{{ $t("年环比") }}</span
  169. >
  170. <span v-else-if="param.content.dateType == '本季'">{{
  171. $t("季环比")
  172. }}</span>
  173. <span v-else-if="param.content.dateType == '本月'">{{
  174. $t("月环比")
  175. }}</span>
  176. <i class="el-icon-caret-bottom" style="color: red"></i
  177. ><span class="box-size-color"
  178. >{{ Math.round(list.hbxsje * 100 * 100) / 100 }}%</span
  179. >
  180. </p>
  181. </div>
  182. </div>
  183. <div style="width: 30%; height: 150px">
  184. <div style="display: inline-block; height: 120px; margin-top: 16px">
  185. <p class="box-title">{{ $t("目标金额") }}</p>
  186. <p style="font-size: 26px; color: #0c0c0c">
  187. <span style="font-size: 14px">¥</span>
  188. <!-- {{list.target_l > 10000?tool.formatAmount( tool.unitConversion(list.target_l,10000),2) +this.$t('万'):tool.formatAmount(list.target_l,2)}}</p>-->
  189. <span v-if="list.target_l > 10000"
  190. >{{
  191. tool.formatAmount(
  192. tool.unitConversion(list.target_l, 10000),
  193. 2
  194. )
  195. }}<span style="font-size: 14px">{{ $t("万") }}</span></span
  196. >
  197. <span v-else>{{
  198. tool.formatAmount(tool.unitConversion(list.target_l, 10000), 2)
  199. }}</span>
  200. </p>
  201. <p class="box-title" style="color: #929292">
  202. {{ $t("目标达成率")
  203. }}<span class="box-size-color" style="margin-left: 40px"
  204. >{{ Math.round(list.wcamount * 100 * 100) / 100 }}%</span
  205. >
  206. </p>
  207. <p
  208. class="box-title"
  209. style="color: #929292"
  210. v-if="list.unamount >= 0"
  211. >
  212. {{ $t("实际与目标差额")
  213. }}<span class="box-size-color" style="margin-left: 10px"
  214. >¥{{
  215. list.unamount > 10000
  216. ? tool.formatAmount(
  217. tool.unitConversion(list.unamount, 10000),
  218. 2
  219. ) + $t("万")
  220. : tool.formatAmount(list.unamount, 2)
  221. }}</span
  222. >
  223. </p>
  224. <p class="box-title" style="color: #929292" v-else>
  225. {{ $t("实际与目标差额")
  226. }}<span class="box-size-color" style="margin-left: 10px"
  227. >¥{{
  228. list.unamount < 10000
  229. ? tool.formatAmount(
  230. tool.unitConversion(list.unamount, 10000),
  231. 2
  232. ) + $t("万")
  233. : tool.formatAmount(list.unamount, 2)
  234. }}</span
  235. >
  236. </p>
  237. </div>
  238. </div>
  239. <div style="width: 30%; height: 150px">
  240. <div style="display: inline-block; height: 120px; margin-top: 16px">
  241. <p class="box-title">{{ $t("累计目标金额") }}</p>
  242. <p style="font-size: 26px; color: #0c0c0c">
  243. <span style="font-size: 16px">¥</span>
  244. <!-- {{list.target_l > 10000?tool.formatAmount( tool.unitConversion(list.nowTarget_l,10000),2) +this.$t('万'):tool.formatAmount(list.nowTarget_l,2)}}</p>-->
  245. <span v-if="list.nowTarget_l > 10000"
  246. >{{
  247. tool.formatAmount(
  248. tool.unitConversion(list.nowTarget_l, 10000),
  249. 2
  250. )
  251. }}<span style="font-size: 14px">{{ $t("万") }}</span></span
  252. >
  253. <span v-else>{{
  254. tool.formatAmount(
  255. tool.unitConversion(list.nowTarget_l, 10000),
  256. 2
  257. )
  258. }}</span>
  259. </p>
  260. <p class="box-title" style="color: #929292">
  261. {{ $t("累计目标达成率")
  262. }}<span class="box-size-color" style="margin-left: 40px"
  263. >{{ Math.round(list.wcnowTarget_l * 100 * 100) / 100 }}%</span
  264. >
  265. </p>
  266. <p
  267. class="box-title"
  268. style="color: #929292"
  269. v-if="list.unnowTarget_l >= 0"
  270. >
  271. {{ $t("实际与累计目标差额")
  272. }}<span class="box-size-color" style="margin-left: 10px"
  273. >¥{{
  274. list.unnowTarget_l > 10000
  275. ? tool.formatAmount(
  276. tool.unitConversion(list.unnowTarget_l, 10000),
  277. 2
  278. ) + $t("万")
  279. : tool.formatAmount(list.unnowTarget_l, 2)
  280. }}</span
  281. >
  282. </p>
  283. <p class="box-title" style="color: #929292" v-else>
  284. {{ $t("实际与累计目标差额")
  285. }}<span class="box-size-color" style="margin-left: 10px"
  286. >¥{{
  287. list.unnowTarget_l < 10000
  288. ? tool.formatAmount(
  289. tool.unitConversion(list.unnowTarget_l, 10000),
  290. 2
  291. ) + $t("万")
  292. : tool.formatAmount(list.unnowTarget_l, 2)
  293. }}</span
  294. >
  295. </p>
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. <el-drawer
  301. :title="$t(this.typeDate) + '_' + $t(this.title) + $t('明细')"
  302. :visible.sync="visibleShow"
  303. size="90%"
  304. direction="rtl"
  305. append-to-body
  306. @close="onClose"
  307. >
  308. <div class="drawer__panel_new">
  309. <div>
  310. <div class="mt-10 inline-16">
  311. <span class="search__label" >{{$t('部门')}}:</span>
  312. <el-cascader disabled :placeholder="$t('请选择')" class="inline-16" ref="selectdep" size="small" v-model="depment" :options="deplist" :props="{emitPath:true,expandTrigger:'hover',checkStrictly:true,label:'label',value:'departmentid',children:'children'}" @change="selectDep" ></el-cascader>
  313. </div>
  314. <div class="mt-10 inline-16">
  315. <span class="search__label" >{{$t('业务员')}}:</span>
  316. <el-select disabled class="inline-16" v-model="person" filterable :placeholder="$t('请选择')" size="small" @change="selectPerson" >
  317. <el-option
  318. v-for="item in personnelList"
  319. :key="item.index"
  320. :label="$t(item.name)"
  321. :value="item.userid">
  322. </el-option>
  323. </el-select>
  324. </div>
  325. <div class="mt-10 inline-16">
  326. <span class="search__label" >{{$t('订单类型')}}:</span>
  327. <el-select class="inline-16" v-model="orderType" filterable :placeholder="$t('请选择')" size="small" clearable @change="selectOrderType" >
  328. <el-option
  329. v-for="item in orderTypes"
  330. :key="item.index"
  331. :label="$t(item.value)"
  332. :value="item.value">
  333. </el-option>
  334. </el-select>
  335. </div>
  336. <div class="mt-10 inline-16">
  337. <span class="search__label" >{{$t('领域')}}:</span>
  338. <el-select class="inline-16" v-model="tradefield" filterable :placeholder="$t('请选择')" size="small" clearable @focus="queryTradefield" @change="selectTradefield" >
  339. <el-option
  340. v-for="item in tradefieldList"
  341. :key="item.index"
  342. :label="$t(item.value)"
  343. :value="item.value">
  344. </el-option>
  345. </el-select>
  346. </div>
  347. <div class="mt-10 inline-16">
  348. <el-input style="width:200px;!important;" :placeholder="$t(`搜索`)" :suffix-icon="paramDetail.content.where.condition?paramDetail.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="paramDetail.content.where.condition" @keyup.native.enter="listDataInfo(paramDetail.content.pageNUmber = 1)" @clear="listDataInfo(paramDetail.content.pageNUmber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
  349. </el-input>
  350. </div>
  351. <div class="mt-10 inline-16">
  352. <exportFile :param="paramDetail" :columns="tablecols" :fileName="$t(this.typeDate) + '_' + $t(this.title) + $t('明细')"></exportFile>
  353. </div>
  354. </div>
  355. <tableTemplate style="margin-top: 10px" ref="table" :layout="tablecols" :data="listInfo" :opwidth="200" :custom="true" :height="height" fixedName="operation">
  356. <template v-slot:customcol="scope">
  357. <div v-if="scope.column.columnname === 'nominalpressure'">
  358. {{tool.nominalPressureSet(scope.column.data.nominalpressure)}}
  359. </div>
  360. <div v-else-if="scope.column.columnname === 'marketprice'">
  361. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  362. </div>
  363. <div v-else-if="scope.column.columnname === 'price'">
  364. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  365. </div>
  366. <div v-else-if="scope.column.columnname === 'amount'">
  367. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  368. </div>
  369. <div v-else-if="scope.column.columnname === 'invoiceamount'">
  370. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  371. </div>
  372. <div v-else-if="scope.column.columnname === 'writeoffamount'">
  373. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  374. </div>
  375. <div v-else-if="scope.column.columnname === 'returnamount'">
  376. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  377. </div>
  378. <div v-else-if="scope.column.columnname === 'logisticsamount'">
  379. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  380. </div>
  381. <div v-else-if="scope.column.columnname === 'uninvoiceamount'">
  382. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  383. </div>
  384. <div v-else-if="scope.column.columnname === 'unwriteoffamount'">
  385. {{scope.column.data[scope.column.columnname]?tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥'):'¥0.00'}}
  386. </div>
  387. <div v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</div>
  388. </template>
  389. </tableTemplate>
  390. <div class="container normal-panel" style="text-align:right;float: right">
  391. <el-pagination
  392. background
  393. @size-change="handleSizeChange"
  394. @current-change="handleCurrentChange"
  395. :current-page="currentPage"
  396. :pager-count="5"
  397. :page-sizes="[100,150, 200]"
  398. :page-size="100"
  399. layout="total,sizes, prev, pager, next, jumper"
  400. :total="total">
  401. </el-pagination>
  402. </div>
  403. </div>
  404. </el-drawer>
  405. </div>
  406. </template>
  407. <script>
  408. import tableTemplate from './table';
  409. import exportFile from '@/components/export_file/index5'
  410. export default {
  411. name: "boxLine",
  412. props: ["title", "typeDate", "index"],
  413. components:{tableTemplate,exportFile},
  414. data() {
  415. return {
  416. list: [],
  417. percentage: 0,
  418. param: {
  419. id: 20231009125304,
  420. content: {
  421. type: 1, // 0人员 1部门
  422. dataid: 103,
  423. dateType: "本年", // 本年 本季 本月
  424. datatype: 2, // 1-订单 2-出货 3-开票 4-回款
  425. where: {
  426. isleave: "",
  427. },
  428. },
  429. },
  430. visibleShow:false,
  431. depmentid:'',
  432. deplist:[],
  433. personnelList:[],
  434. depment:'',
  435. person:'',
  436. depParam:{
  437. "id": 20230620102004,
  438. "content": {
  439. }
  440. },
  441. orderTypes:[
  442. {
  443. value:'标准订单'
  444. },
  445. {
  446. value:'特殊订单'
  447. },
  448. {
  449. value:'项目订单'
  450. },
  451. {
  452. value:'促销订单'
  453. },
  454. {
  455. value:'工具订单'
  456. }
  457. ],
  458. orderType:'',
  459. tradefield:'',
  460. tradefieldList:[],
  461. paramDetail:{
  462. "id": 2025032613405702,
  463. "content": {
  464. "type": "1",
  465. "dataid": 58,
  466. "dateType": "去年", //去年,本年,本季,本月
  467. "pageNumber":1,
  468. "pageSize":100,
  469. "where": {
  470. "condition": "",
  471. "type": "",
  472. "tradefield": ""
  473. }
  474. }
  475. },
  476. tablecols:[],
  477. listInfo:[],
  478. height:'calc(100vh - 195px)',
  479. currentPage:0,
  480. total:0
  481. };
  482. },
  483. methods: {
  484. format(percentage) {
  485. return this.$t("目标达成率") + "\n\n" + percentage + "%";
  486. },
  487. async listData() {
  488. this.title === "订单"
  489. ? (this.param.content.datatype = 1)
  490. : this.title === "出货"
  491. ? (this.param.content.datatype = 2)
  492. : this.title === "开票"
  493. ? (this.param.content.datatype = 3)
  494. : (this.param.content.datatype = 4);
  495. const res = await this.$api.requested(this.param);
  496. this.list = res.data;
  497. this.percentage = Math.round(this.list.wcamount * 100 * 100) / 100;
  498. },
  499. onClick(){
  500. console.log('点击',this.title)
  501. this.orderType = ''
  502. this.tradefield = ''
  503. this.paramDetail.content.where.condition = ''
  504. this.paramDetail.content.pageNUmber = 1
  505. this.paramDetail.content.where.type = ''
  506. this.paramDetail.content.where.tradefield = ''
  507. this.visibleShow = true
  508. if (this.title == '订单'){
  509. this.tablecols = this.tool.tabelCol(this.$route.name).orderDetailsTable.tablecols
  510. }else if (this.title == '出货'){
  511. this.tablecols = this.tool.tabelCol(this.$route.name).shippingDetailsTable.tablecols
  512. }else if (this.title == '开票'){
  513. this.tablecols = this.tool.tabelCol(this.$route.name).billingDetailsTable.tablecols
  514. }else if (this.title == '回款'){
  515. this.tablecols = this.tool.tabelCol(this.$route.name).paymentScheduleTable.tablecols
  516. }
  517. this.queryDep()
  518. this.paramDetail.content.pageNUmber = 1
  519. this.listDataInfo()
  520. },
  521. onClose(){
  522. this.visibleShow = false
  523. },
  524. /*获取部门*/
  525. async queryDep(){
  526. const res = await this.$api.requested(this.depParam)
  527. this.deplist = this.createMenu(res.data.dep)
  528. this.personnelList = res.data.hr
  529. const usertype = JSON.parse(sessionStorage.getItem('active_account')).usertype
  530. const userName = JSON.parse(sessionStorage.getItem('active_account')).name
  531. const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
  532. if (this.param.content.type == 1){
  533. this.depment = this.param.content.dataid
  534. this.person = ''
  535. }else {
  536. console.log(usertype,userName,'eeeeee',userid,this.param.content.dataid)
  537. this.person = userid === this.param.content.dataid?userName:this.param.content.dataid
  538. console.log(this.person,'person')
  539. this.depment = ''
  540. }
  541. },
  542. createMenu (array) {
  543. var that = this
  544. let arr = []
  545. function convertToElementTree(node) {
  546. // 新节点
  547. if (node.subdep.length === 0){
  548. var elNode = {
  549. label: node["depname"],
  550. parentid:node['parentid'],
  551. parentname:node['parentname'],
  552. departmentid:node["departmentid"],
  553. value:node["departmentid"],
  554. remarks:node["remarks"],
  555. isused:node["isused"],
  556. changedate:node['changedate'],
  557. changeby:node['changeby'],
  558. createdate:node['createdate'],
  559. createby:node['createby'],
  560. depno:node['depno'],
  561. disabled:that.pageOnlyRead,
  562. }
  563. }else {
  564. var elNode = {
  565. label: node["depname"],
  566. parentid:node['parentid'],
  567. parentname:node['parentname'],
  568. departmentid:node["departmentid"],
  569. value:node["departmentid"],
  570. remarks:node["remarks"],
  571. isused:node["isused"],
  572. changedate:node['changedate'],
  573. changeby:node['changeby'],
  574. createdate:node['createdate'],
  575. createby:node['createby'],
  576. depno:node['depno'],
  577. disabled:that.pageOnlyRead,
  578. children: []
  579. }
  580. }
  581. if (node.subdep && node.subdep.length > 0) {
  582. // 如果存在子节点
  583. for (var index = 0; index < node.subdep.length; index++) {
  584. // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
  585. elNode.children.push(convertToElementTree(node.subdep[index]));
  586. }
  587. }
  588. return elNode;
  589. }
  590. array.forEach((element) => {
  591. arr.push(convertToElementTree(element))
  592. });
  593. return arr
  594. },
  595. /*选择部门*/
  596. selectDep(val){
  597. this.person = ''
  598. this.depmentid = val[val.length -1]
  599. this.param.content.pageNumber = 1
  600. this.listData(1,val[val.length -1],this.nowEndDate)
  601. },
  602. /*选择业务员*/
  603. selectPerson(val){
  604. this.depment = ''
  605. this.depmentid = val
  606. this.param.content.pageNumber = 1
  607. this.listData(0,val,this.nowEndDate)
  608. },
  609. /*选择订单类型*/
  610. selectOrderType(){
  611. this.paramDetail.content.pageNUmber = 1
  612. this.paramDetail.content.type = this.orderType
  613. this.listDataInfo()
  614. },
  615. async queryTradefield(){
  616. if (this.tradefieldList.length < 1){
  617. const res = await this.$store.dispatch('optiontypeselect','tradefield')
  618. this.tradefieldList = res.data
  619. }
  620. },
  621. /*选择领域*/
  622. selectTradefield(){
  623. this.paramDetail.content.pageNUmber = 1
  624. this.listDataInfo()
  625. },
  626. async listDataInfo(){
  627. if (this.title == '订单'){
  628. this.paramDetail.id = 2025032613405702
  629. }else if (this.title == '出货'){
  630. this.paramDetail.id = 2025032615330102
  631. }else if (this.title == '开票'){
  632. this.paramDetail.id = 2025032616343302
  633. }else if (this.title == '回款'){
  634. this.paramDetail.id = 2025032616352402
  635. }
  636. this.paramDetail.content.type = this.param.content.type
  637. this.paramDetail.content.dataid = this.param.content.dataid
  638. this.paramDetail.content.dateType = this.param.content.dateType
  639. this.paramDetail.content.where.type = this.orderType
  640. this.paramDetail.content.where.tradefield = this.tradefield
  641. const res = await this.$api.requested(this.paramDetail)
  642. this.listInfo = res.data
  643. this.total = res.total
  644. this.currentPage = res.pageNumber
  645. console.log(res.data,'数据1111')
  646. },
  647. handleSizeChange(val) {
  648. // console.log(`每页 ${val} 条`);
  649. this.paramDetail.content.pageSize = val
  650. this.listDataInfo()
  651. },
  652. handleCurrentChange(val) {
  653. // console.log(`当前页: ${val}`);
  654. this.paramDetail.content.pageNumber = val
  655. this.listDataInfo()
  656. },
  657. },
  658. };
  659. </script>
  660. <style scoped>
  661. .box-line-new {
  662. display: flex;
  663. flex-wrap: wrap;
  664. /* min-width: 900px;*/
  665. }
  666. .item {
  667. /* width: 900px;*/
  668. width: 100%;
  669. height: 210px;
  670. padding: 10px;
  671. border-radius: 2px;
  672. border: 1px solid #e9e9e9;
  673. background-color: #ffffff;
  674. box-sizing: border-box;
  675. box-shadow: -1px -1px 5px 0px rgba(0, 0, 0, 0.2);
  676. }
  677. .item .title {
  678. display: flex;
  679. flex-wrap: nowrap;
  680. font-size: 16px;
  681. }
  682. .item .content-new {
  683. display: flex;
  684. width: 100%;
  685. height: 300px;
  686. margin-top: 10px;
  687. }
  688. .item .content-new .left {
  689. width: 160px;
  690. }
  691. .item .content-new .right {
  692. width: 188px;
  693. }
  694. .item .content-new .top {
  695. width: 100%;
  696. height: 150px;
  697. padding-top: 20px;
  698. margin-bottom: -20px;
  699. }
  700. .item .content-new .bottom {
  701. width: 100%;
  702. height: 150px;
  703. }
  704. .box-title {
  705. font-size: 14px;
  706. }
  707. .box-size-color {
  708. color: #5a5a5a;
  709. font-size: 14px;
  710. }
  711. /deep/ .el-progress__text {
  712. white-space: pre;
  713. font-size: 14px !important;
  714. }
  715. </style>