Examine.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <div>
  3. <el-header height="50px" class="header">
  4. <el-page-header @back="$parent.isShow = 1,$parent.id=''" content="详情页面">
  5. </el-page-header>
  6. </el-header>
  7. <div class="app-container">
  8. <div class="descriptions">
  9. <el-row>
  10. <el-col :span="4">销售政策编号</el-col>
  11. <el-col :span="4">{{ detail.code }}</el-col>
  12. <el-col :span="4">销售政策说明</el-col>
  13. <el-col :span="4">{{ detail.title }}</el-col>
  14. <el-col :span="4">状态</el-col>
  15. <el-col :span="4">{{
  16. detail.status == 1 ? "已生效" : "未生效"
  17. }}</el-col>
  18. </el-row>
  19. <el-row>
  20. <el-col :span="4">销售政策类型</el-col>
  21. <el-col :span="4">{{
  22. detail.type == "PROVISION" ? "配提" : "限量"
  23. }}</el-col>
  24. <el-col :span="4" style="background-color:#fff"></el-col>
  25. <el-col :span="4"></el-col>
  26. <el-col :span="4" style="background-color:#fff"></el-col>
  27. <el-col :span="4"></el-col>
  28. </el-row>
  29. <el-row>
  30. <el-col :span="4">备注</el-col>
  31. <el-col :span="20">{{ detail.remark }}</el-col>
  32. </el-row>
  33. <el-row>
  34. <el-col :span="3">制单人</el-col>
  35. <el-col :span="3">{{ detail.createBy }}</el-col>
  36. <el-col :span="3">制单日期</el-col>
  37. <el-col :span="3">{{ detail.createTime }}</el-col>
  38. <el-col :span="3">生效日期</el-col>
  39. <el-col :span="3">{{ detail.startTime }}</el-col>
  40. <el-col :span="3">失败日期</el-col>
  41. <el-col :span="3">{{ detail.endTime }}</el-col>
  42. </el-row>
  43. <el-row v-if="this.$parent.isShow == 4">
  44. <el-col :span="3">审核人</el-col>
  45. <el-col :span="3">{{ detail.examineBy }}</el-col>
  46. <el-col :span="3">审核日期</el-col>
  47. <el-col :span="3">{{ detail.examineTime }}</el-col>
  48. <el-col :span="3">关闭人</el-col>
  49. <el-col :span="3"></el-col>
  50. <el-col :span="3">关闭日期</el-col>
  51. <el-col :span="3"></el-col>
  52. </el-row>
  53. </div>
  54. <div class="mymain-container">
  55. <el-row>
  56. <el-divider></el-divider>
  57. <el-row type="flex">
  58. <el-col :span="12">
  59. <h4 style="display: inline-block; margin-right: 20px">
  60. 货品信息
  61. </h4>
  62. <!-- <el-button size="small">查看</el-button> -->
  63. </el-col>
  64. <el-col :span="12" class="tr">
  65. <!-- <el-button size="small" @click="$parent.isShow = 10"
  66. >查看条件</el-button
  67. > -->
  68. </el-col>
  69. </el-row>
  70. <el-divider></el-divider>
  71. </el-row>
  72. <el-table
  73. v-loading="listLoading"
  74. :data="dataList"
  75. element-loading-text="Loading"
  76. border
  77. fit
  78. highlight-current-row
  79. stripe
  80. >
  81. <el-table-column
  82. fixed
  83. prop="num"
  84. label="序号"
  85. width="50"
  86. align="center"
  87. >
  88. </el-table-column>
  89. <el-table-column
  90. prop="materialNumber"
  91. label="货品编码"
  92. align="center"
  93. >
  94. </el-table-column>
  95. <el-table-column prop="materialName" label="货品名称" align="center">
  96. </el-table-column>
  97. <el-table-column prop="specification" label="规格型号" align="center">
  98. </el-table-column>
  99. <el-table-column
  100. prop="saleTypeCode"
  101. label="销售类型编码"
  102. width="500"
  103. align="center"
  104. >
  105. </el-table-column>
  106. <el-table-column prop="saleTypeName" label="销售类型" align="center">
  107. </el-table-column>
  108. <el-table-column prop="price" label="单价" align="center">
  109. </el-table-column>
  110. <el-table-column label="支付钱包" align="center">
  111. <template slot-scope="scope">
  112. <el-tag style="margin:5px" type="success" size="small" v-for=" item in scope.row.walletRelaList">{{item.walletName}}</el-tag>
  113. </template>
  114. </el-table-column>
  115. </el-table>
  116. <!-- 分页 -->
  117. <div style="margin: 20px 0">
  118. <el-pagination
  119. @size-change="handleSizeChange"
  120. @current-change="handleCurrentChange"
  121. :current-page="currentPage"
  122. :page-sizes="[10, 20, 30, 50]"
  123. :page-size="10"
  124. layout="total, sizes, prev, pager, next, jumper"
  125. :total="listTotal"
  126. >
  127. </el-pagination>
  128. </div>
  129. <el-row>
  130. <el-divider></el-divider>
  131. <el-row type="flex">
  132. <el-col :span="12">
  133. <h4 style="display: inline-block; margin-right: 20px">
  134. 条件信息
  135. </h4>
  136. </el-col>
  137. </el-row>
  138. <el-divider></el-divider>
  139. </el-row>
  140. <el-table
  141. :data="conditionList"
  142. element-loading-text="Loading"
  143. border
  144. fit
  145. highlight-current-row
  146. stripe
  147. >
  148. <el-table-column
  149. fixed
  150. type="index"
  151. label="序号"
  152. width="50"
  153. align="center"
  154. >
  155. </el-table-column>
  156. <el-table-column prop="name" label="限定条件" align="center">
  157. <template slot-scope="scope">
  158. {{scope.row.name}}
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="操作" align="center" width="80">
  162. <template slot-scope="scope">
  163. <el-button type="text" size="small" @click="$parent.isShow = 10,$parent.policyId=scope.row.id " >查看条件</el-button>
  164. </template>
  165. </el-table-column>
  166. </el-table>
  167. <el-row>
  168. <el-divider></el-divider>
  169. <el-row type="flex">
  170. <el-col :span="12">
  171. <h4 style="display: inline-block; margin-right: 20px">
  172. 经销商使用范围
  173. </h4>
  174. </el-col>
  175. </el-row>
  176. <el-divider></el-divider>
  177. </el-row>
  178. <el-table
  179. v-loading="listLoading"
  180. :data="custoList"
  181. element-loading-text="Loading"
  182. border
  183. fit
  184. highlight-current-row
  185. stripe
  186. >
  187. <el-table-column
  188. fixed
  189. type="index"
  190. label="序号"
  191. width="50"
  192. align="center"
  193. >
  194. </el-table-column>
  195. <el-table-column
  196. prop="customerNumber"
  197. label="经销商编码"
  198. align="center"
  199. >
  200. </el-table-column>
  201. <el-table-column
  202. prop="customerName"
  203. label="经销商名称"
  204. align="center"
  205. >
  206. </el-table-column>
  207. </el-table>
  208. <!-- 分页 -->
  209. <div style="margin: 20px 0">
  210. <el-pagination
  211. @size-change="handleSizeChanges"
  212. @current-change="handleCurrentChanges"
  213. :current-page="currentPages"
  214. :page-sizes="[10, 20, 30, 50]"
  215. :page-size="10"
  216. layout="total, sizes, prev, pager, next, jumper"
  217. :total="clistTotal"
  218. >
  219. </el-pagination>
  220. </div>
  221. <div class="descriptions" v-if="$parent.isShow == 8 && detail.examineStatus == 'WAIT'">
  222. <el-row>
  223. <el-col :span="6">审核人</el-col>
  224. <el-col :span="6">{{$store.getters.name}}</el-col>
  225. <el-col :span="6">审核结果</el-col>
  226. <el-col :span="6">
  227. <template>
  228. <el-radio-group v-model="examineStatus">
  229. <el-radio :label="'OK'">通过</el-radio>
  230. <el-radio :label="'FAIL'">驳回</el-radio>
  231. </el-radio-group>
  232. </template>
  233. </el-col>
  234. </el-row>
  235. <el-row>
  236. <el-col :span="4">审批说明</el-col>
  237. <el-col :span="20" class="col value" style="padding: 0" >
  238. <el-input
  239. size="small"
  240. placeholder="请输入内容"
  241. v-model="remark"
  242. >
  243. </el-input>
  244. </el-col>
  245. </el-row>
  246. <el-row>
  247. <el-button type="primary" size="small" @click="handleSubmit"
  248. >审核通过</el-button
  249. >
  250. </el-row>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. </template>
  256. <script>
  257. import {
  258. getPolicyDetail,
  259. getMaterialList,
  260. getCustomerList,
  261. getConditionList,
  262. toExamine,
  263. } from "@/api/policy_list";
  264. import Minxin from "@/mixin";
  265. import { ok } from "assert";
  266. export default {
  267. mixins: [Minxin],
  268. name: "examine",
  269. data() {
  270. return {
  271. currentPages: 1, // 当前页码
  272. pageSizes: 10, // 每页数量
  273. clistTotal: 0,
  274. input: "",
  275. remark: "",
  276. fileList: [],
  277. listLoading: false,
  278. imageUrl: "",
  279. dataList: [],
  280. examineStatus: "OK",
  281. options: {},
  282. value: "",
  283. detail: {},
  284. screenForm: {
  285. code: "",
  286. createBy: "",
  287. endCreateTime: "",
  288. endTime1: "",
  289. endTime2: "",
  290. examineBy: "",
  291. remark: "",
  292. startCreateTime: "",
  293. startTime1: "",
  294. startTime2: "",
  295. status: "",
  296. title: "",
  297. type: "",
  298. },
  299. conditionList: [],
  300. custoList: [],
  301. };
  302. },
  303. created() {
  304. },
  305. methods: {
  306. getList() {
  307. this.listLoading = true;
  308. getPolicyDetail({ policyId: this.$parent.id }).then((res) => {
  309. this.detail = res.data;
  310. const condParams = {
  311. policyId: this.detail.code,
  312. };
  313. // 获取条件政策
  314. getConditionList(condParams).then((res) => {
  315. this.conditionList = res.data;
  316. });
  317. const paramss = {
  318. pageNum: this.currentPage,
  319. pageSize: this.pageSize,
  320. policyId: this.detail.code,
  321. saleTypeCode: "",
  322. };
  323. getMaterialList(paramss).then((res) => {
  324. this.dataList = res.data.records;
  325. this.listTotal = res.data.total;
  326. this.listLoading = false;
  327. });
  328. this.getCond();
  329. });
  330. },
  331. // 更改每页数量
  332. handleSizeChanges(val) {
  333. this.pageSizes = val;
  334. this.currentPages = 1;
  335. this.getCond();
  336. },
  337. // 更改当前页
  338. handleCurrentChanges(val) {
  339. this.currentPages = val;
  340. this.getCond();
  341. },
  342. getCond() {
  343. this.listLoading = true;
  344. const custoParams = {
  345. pageNum: this.currentPages,
  346. pageSize: this.pageSizes,
  347. policyId: this.detail.code,
  348. };
  349. getCustomerList(custoParams).then((res) => {
  350. this.custoList = res.data.records;
  351. this.clistTotal = res.data.total;
  352. this.listLoading = false;
  353. });
  354. },
  355. handleSubmit() {
  356. toExamine({
  357. examineStatus: this.examineStatus,
  358. policyId: this.$parent.id ,
  359. examineRemark: this.remark,
  360. }).then((res) => {
  361. this.$successMsg("已提交审核");
  362. this.$parent.isShow = 1;
  363. this.$parent.getList()
  364. });
  365. },
  366. },
  367. };
  368. </script>
  369. <style lang="scss" scoped>
  370. .el-col {
  371. overflow: hidden;
  372. }
  373. .descriptions {
  374. // border: #EBEEF5;
  375. border: 1px solid #ebeef5;
  376. border-bottom: none;
  377. .el-row {
  378. height: 40px;
  379. line-height: 40px;
  380. }
  381. .el-col:nth-child(odd) {
  382. background-color: #ebeef5;
  383. }
  384. .el-col {
  385. padding: 0 15px;
  386. height: 100%;
  387. border-bottom: 1px solid #ebeef5;
  388. }
  389. }
  390. .el-divider--horizontal {
  391. margin: 20px 0;
  392. }
  393. .col {
  394. height: 100px;
  395. }
  396. ::v-deep .enterpriseName .el-input__inner {
  397. width:100%;
  398. background-color: #e8e8e8;
  399. text-align: center;
  400. border-color: #c0c4cc;
  401. color:#000
  402. }
  403. ::v-deep .el-input--small .el-input__inner{
  404. height: 40px;
  405. border: none;
  406. }
  407. ::v-deep.el-input__inner:focus{
  408. border-color:#fff !important;
  409. }
  410. </style>