grainPulseDynamic.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. <!--粮脉动态审核-->
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="15">
  5. <template slot="right">
  6. <ws-select
  7. v-model="searchTypeText"
  8. placeholder=""
  9. class="typeselect"
  10. @change="selectExamineType"
  11. :value="searchType"
  12. >
  13. <ws-option
  14. v-for="item in searchTypeList"
  15. :key="item.value"
  16. :label="item.value"
  17. :value="item.value"
  18. style="color: #8890b1"
  19. />
  20. </ws-select>
  21. <ws-input
  22. v-model="searchKeyWord"
  23. placeholder="可按账号、发布主体查找"
  24. clearable
  25. maxlength="500"
  26. type="input"
  27. ></ws-input>
  28. <ws-button class="find" type="primary" @click="lookUp()"
  29. ><img
  30. width="16"
  31. height="16"
  32. style="
  33. vertical-align: text-top;
  34. position: relative;
  35. top: 0px;
  36. left: -5px;
  37. "
  38. src="../../../public/img/sousuo.png"
  39. alt=""
  40. /></ws-button>
  41. <!-- </div> -->
  42. </template>
  43. </BaseHeaderLayout>
  44. <div class="container">
  45. <el-table
  46. class="wenzi"
  47. :data="tranManagementList.records"
  48. style="width: 100%"
  49. height="680"
  50. >
  51. <el-table-column type="index" label="序号" width="50">
  52. <template scope="scope">
  53. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  54. <span v-else>{{ scope.$index + 1 }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="salePlanNo" label="昵称"> </el-table-column>
  58. <el-table-column prop="seller" label="账号"></el-table-column>
  59. <el-table-column prop="goodsName" label="发布主体"> </el-table-column>
  60. <el-table-column prop="plannedSaleVolume" label="标题">
  61. </el-table-column>
  62. <el-table-column prop="updateDate" label="更新时间" width="140">
  63. </el-table-column>
  64. <el-table-column prop="" label="操作" width="180">
  65. <template slot-scope="scope">
  66. <div
  67. class="record"
  68. @click="nocomplete(scope.row)"
  69. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  70. >
  71. 查看
  72. </div>
  73. <div
  74. class="record"
  75. @click="deleteclick(scope.row)"
  76. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  77. >
  78. 删除
  79. </div>
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="address" label="审核">
  83. <template slot-scope="scope">
  84. <el-button
  85. size="medium"
  86. type="text"
  87. class="record"
  88. v-if="scope.row.statusFlag == 1"
  89. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  90. @click="reject(scope.row)"
  91. >驳回</el-button
  92. >
  93. <el-button
  94. size="medium"
  95. type="text"
  96. class="record"
  97. v-if="scope.row.statusFlag == 1"
  98. @click="adopt(scope.row)"
  99. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  100. >通过</el-button
  101. >
  102. <template
  103. v-else
  104. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  105. slot-scope="scope"
  106. >
  107. {{ scope.row.status }}
  108. </template>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <el-pagination
  113. @size-change="handleSizeChange"
  114. @current-change="handleCurrentChange"
  115. :current-page="currentPage"
  116. :page-size="deptCircularPage.pageSize"
  117. layout="total, sizes, prev, pager, next, jumper"
  118. :total="deptBudgetTotal"
  119. >
  120. </el-pagination>
  121. </div>
  122. <!--动态信息-->
  123. <el-dialog
  124. width="30%"
  125. title="查看动态信息"
  126. :visible.sync="dialogFormVisible"
  127. :append-to-body="true"
  128. >
  129. <el-form class="customer" :model="form">
  130. <el-form-item label="发布主体" :label-width="formLabelWidth">
  131. {{ 111111 }}
  132. </el-form-item>
  133. <el-form-item label="标题" :label-width="formLabelWidth">
  134. {{ 11111111 }}
  135. </el-form-item>
  136. <el-form-item label="内容" :label-width="formLabelWidth">
  137. <el-input>{{ 111111111 }}</el-input>
  138. </el-form-item>
  139. <el-form-item label="定位" :label-width="formLabelWidth">
  140. <span>营口市</span>
  141. </el-form-item>
  142. <!-- <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  143. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  144. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  145. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  146. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  147. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  148. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  149. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  150. <img width="100%" :src="customerlist.cardAddressUrl2" alt /> -->
  151. </el-form>
  152. <div slot="footer" class="dialog-footer">
  153. <!-- <span v-if="scope.row.status == '待审核'"> -->
  154. <el-button @click="reject()">驳回</el-button>
  155. <el-button @click="adopt()">通过</el-button>
  156. <!-- </span>
  157. <span v-if="scope.row.status == '已审核'"
  158. ><el-button @click="dialogFormVisible = fase">关闭</el-button>
  159. </span> -->
  160. </div>
  161. </el-dialog>
  162. </div>
  163. </template>
  164. <script>
  165. import { saleList, deletesale, saleexamine } from '@/model/platformaudit/index'
  166. import Pagination from '@/components/Pagination'
  167. import WsUpload from '@/components/WsUpload'
  168. import { EventBus } from 'base-core-lib'
  169. export default {
  170. name: 'viewSpareMoney',
  171. components: {
  172. WsUpload,
  173. Pagination,
  174. },
  175. watch: {
  176. vesselId(val) {
  177. this.getList()
  178. },
  179. isShow(val) {
  180. this.showType = val
  181. },
  182. },
  183. data() {
  184. return {
  185. //弹出框
  186. dialogFormVisible: false,
  187. dialogViewSpareMoney: false,
  188. // 表格显示数据
  189. tableDate: [],
  190. // 是否显示
  191. showType: true,
  192. // 年
  193. year: '',
  194. currentPage: 1,
  195. pageSize: 10,
  196. deptBudgetTotal: 0,
  197. searchTypeText: '待审核',
  198. searchKeyWord: '',
  199. // 提交类型
  200. submitType: true,
  201. size: 10,
  202. spanArr: [],
  203. searchType: 1,
  204. compId: sessionStorage.getItem('ws-pf_compId'),
  205. deptCircularPage: {},
  206. tranManagementList: [],
  207. id:'',
  208. deptBudgetList: {},
  209. searchTypeList: [
  210. { value: '待审核', type: 1 },
  211. { value: '已通过', type: 2 },
  212. { value: '全部', type: '' },
  213. ],
  214. salePlanInfo: {
  215. id: '',
  216. flag: '',
  217. },
  218. accessoryTFs: false,
  219. }
  220. },
  221. activated() {
  222. this.getList()
  223. this.showType = this.isShow
  224. },
  225. methods: {
  226. getSpanArr(data) {
  227. let that = this
  228. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  229. that.spanArr = []
  230. that.pos = 0
  231. //遍历数据
  232. data.forEach((item, index) => {
  233. //判断是否是第一项
  234. // if (index === 0) {
  235. // this.spanArr.push(1)
  236. // this.pos = 0
  237. // } else {
  238. //不是第一项时,就根据标识去存储
  239. if (data[index].warehouseNumViewList.length > 1) {
  240. // 查找到符合条件的数据时每次要把之前存储的数据+1
  241. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  242. this.spanArr.push(0)
  243. } else {
  244. // 没有符合的数据时,要记住当前的index
  245. this.spanArr.push(1)
  246. this.pos = index
  247. }
  248. // }
  249. })
  250. },
  251. //删除
  252. deleteclick(row) {
  253. this.$confirm(`动态信息删除后不可恢复,是否确定删除?`, {
  254. confirmButtonText: '确定',
  255. cancelButtonText: '取消',
  256. type: 'warning',
  257. })
  258. .then(() => {
  259. deletesale({
  260. id: row.id,
  261. })
  262. .toPromise()
  263. .then((response) => {
  264. this.getList()
  265. })
  266. })
  267. .catch(() => {
  268. return false
  269. })
  270. },
  271. //查看//传参
  272. nocomplete(row) {
  273. this.id = row.id
  274. this.dialogFormVisible = true
  275. },
  276. //查找
  277. lookUp() {
  278. this.currentPage = 1
  279. this.getList()
  280. },
  281. selectExamineType(e) {
  282. for (var i = 0; i < this.searchTypeList.length; i++) {
  283. if (this.searchTypeList[i].value == e) {
  284. this.searchType = this.searchTypeList[i].type
  285. }
  286. }
  287. this.currentPage = 1
  288. this.getList()
  289. },
  290. //审核通过
  291. adopt() {
  292. this.salePlanInfo.id = this.id
  293. this.salePlanInfo.flag = 1
  294. this.$confirm(`确定通过该动态信息?`, '提示', {
  295. confirmButtonText: '通过',
  296. cancelButtonText: '取消',
  297. type: 'warning',
  298. })
  299. .then(() => {
  300. saleexamine(this.salePlanInfo)
  301. .toPromise()
  302. .then((response) => {
  303. this.$notify.success({
  304. title: '成功',
  305. message: '通过成功',
  306. })
  307. this.getList()
  308. })
  309. .catch((response) => {
  310. EventBus.$emit('error', response.message)
  311. })
  312. })
  313. .catch(() => {
  314. return false
  315. })
  316. },
  317. //审核驳回
  318. reject() {
  319. this.salePlanInfo.id = this.id
  320. this.salePlanInfo.flag = 2
  321. this.$confirm(`确定驳回该动态信息?`, '提示', {
  322. confirmButtonText: '驳回',
  323. cancelButtonText: '取消',
  324. type: 'warning',
  325. })
  326. .then(() => {
  327. saleexamine(this.salePlanInfo)
  328. .toPromise()
  329. .then((response) => {
  330. this.$notify.success({
  331. title: '成功',
  332. message: '驳回成功',
  333. })
  334. this.getList()
  335. })
  336. .catch((response) => {
  337. console.log(response)
  338. EventBus.$emit('error', response.message)
  339. })
  340. })
  341. .catch(() => {
  342. return false
  343. })
  344. },
  345. dateFormat(fmt, date) {
  346. let ret
  347. const opt = {
  348. 'Y+': date.getFullYear().toString(), // 年
  349. 'm+': (date.getMonth() + 1).toString(), // 月
  350. 'd+': date.getDate().toString(), // 日
  351. 'H+': date.getHours().toString(), // 时
  352. // "M+": date.getMinutes().toString(), // 分
  353. // "S+": date.getSeconds().toString() // 秒
  354. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  355. }
  356. for (let k in opt) {
  357. ret = new RegExp('(' + k + ')').exec(fmt)
  358. if (ret) {
  359. fmt = fmt.replace(
  360. ret[1],
  361. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  362. )
  363. }
  364. }
  365. return fmt
  366. },
  367. handleClose() {
  368. this.accessoryTFs = false
  369. },
  370. handleSizeChange(val) {
  371. console.log(`每页 ${val} 条`)
  372. this.pageSize = val
  373. this.getList()
  374. },
  375. handleCurrentChange(val) {
  376. this.currentPage = val
  377. console.log(`当前页: ${val}`)
  378. this.getList()
  379. },
  380. //销售列表
  381. getList() {
  382. saleList({
  383. compId: sessionStorage.getItem('ws-pf_compId'),
  384. searchType: this.searchType,
  385. currentPage: this.currentPage,
  386. pageSize: this.pageSize,
  387. searchKeyWord: this.searchKeyWord,
  388. })
  389. .toPromise()
  390. .then((response) => {
  391. this.tranManagementList = response
  392. this.deptCircularPage.currentPage = response.current
  393. this.deptCircularPage.pageSize = response.size
  394. this.deptBudgetTotal = response.total
  395. })
  396. },
  397. // fujian(row) {
  398. // if (
  399. // row.receiveAttachmentPath === null ||
  400. // row.receiveAttachmentPath === ''
  401. // ) {
  402. // EventBus.$emit(
  403. // 'warning',
  404. // this.$t('system.noticeCircular.NoInformation')
  405. // )
  406. // } else {
  407. // this.accessoryTFs = true
  408. // }
  409. // this.appendixIdss = row.receiveAttachmentPath
  410. // },
  411. // 关闭 dialog时 处理文件url 初始化upload组件
  412. handleCloe() {
  413. this.dialogViewSpareMoney = false
  414. },
  415. },
  416. }
  417. </script>
  418. <style lang="scss" scoped>
  419. .container {
  420. width: 100%;
  421. margin: 0 auto;
  422. }
  423. .vertical-text-left {
  424. width: 62px;
  425. text-align: right;
  426. }
  427. .el-button--primary {
  428. background-color: #5878e8;
  429. border-color: #5878e8;
  430. }
  431. .el-button--default {
  432. color: #8890b1;
  433. border-color: #e8eaf1;
  434. }
  435. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  436. width: 30px;
  437. margin-left: 0;
  438. border-top-left-radius: 0px;
  439. border-bottom-left-radius: 0px;
  440. }
  441. /deep/.findValue .el-input__inner {
  442. border-top-right-radius: 0px;
  443. border-bottom-right-radius: 0px;
  444. }
  445. //操作按钮
  446. .record,
  447. .adjustment {
  448. display: inline-block;
  449. color: #5878e8;
  450. padding: 0 4px !important;
  451. position: relative;
  452. font-size: 14px;
  453. }
  454. .record:after {
  455. position: absolute;
  456. content: '';
  457. display: block;
  458. top: 5px;
  459. right: -2px;
  460. width: 1px;
  461. height: 12px;
  462. background: #e9ecf7;
  463. }
  464. //状态样式
  465. .executory,
  466. .inExecution,
  467. .done {
  468. width: 6px;
  469. height: 6px;
  470. display: inline-block;
  471. border-radius: 50%;
  472. position: relative;
  473. top: -1px;
  474. font-size: 14px;
  475. }
  476. .executory {
  477. background: #ff9f24;
  478. }
  479. .inExecution {
  480. background: #5878e8;
  481. }
  482. .done {
  483. background: #50cad4;
  484. }
  485. .putstorage.el-button--default,
  486. .deliverystorage.el-button--default {
  487. border-color: #8890b1;
  488. background-color: #fff;
  489. color: #8890b1;
  490. }
  491. /deep/.el-table td,
  492. /deep/.el-table th.is-leaf {
  493. border-right: 1px solid #e9ecf7;
  494. text-align: center;
  495. }
  496. /deep/.el-table tr td:first-child,
  497. /deep/.el-table tr th.is-leaf:first-child {
  498. border-left: 1px solid #e9ecf7;
  499. }
  500. .el-row {
  501. height: 60px;
  502. }
  503. .base_header_layout .grid-content {
  504. margin-top: 80px;
  505. }
  506. .el-input--small .el-input__inner {
  507. margin-left: 20px;
  508. }
  509. .el-range-editor--small.el-input__inner {
  510. height: 32px;
  511. margin: 0 10px;
  512. }
  513. /deep/.el-pagination {
  514. text-align: center;
  515. white-space: nowrap;
  516. padding: 2px 5px;
  517. color: #303133;
  518. font-weight: 700;
  519. margin-bottom: 20px;
  520. }
  521. .el-select {
  522. width: 30%;
  523. margin-right: 10px;
  524. }
  525. /deep/.typeselect .el-input__inner {
  526. color: #8890b1;
  527. }
  528. </style>