Examine.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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">现金钱包</el-col>
  25. <el-col :span="4"></el-col>
  26. <el-col :span="4"></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.$index+1}}
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. <el-row>
  163. <el-divider></el-divider>
  164. <el-row type="flex">
  165. <el-col :span="12">
  166. <h4 style="display: inline-block; margin-right: 20px">
  167. 经销商使用范围
  168. </h4>
  169. </el-col>
  170. </el-row>
  171. <el-divider></el-divider>
  172. </el-row>
  173. <el-table
  174. v-loading="listLoading"
  175. :data="custoList"
  176. element-loading-text="Loading"
  177. border
  178. fit
  179. highlight-current-row
  180. stripe
  181. >
  182. <el-table-column
  183. fixed
  184. type="index"
  185. label="序号"
  186. width="50"
  187. align="center"
  188. >
  189. </el-table-column>
  190. <el-table-column
  191. prop="customerNumber"
  192. label="经销商编码"
  193. align="center"
  194. >
  195. </el-table-column>
  196. <el-table-column
  197. prop="customerName"
  198. label="经销商名称"
  199. align="center"
  200. >
  201. </el-table-column>
  202. </el-table>
  203. <!-- 分页 -->
  204. <div style="margin: 20px 0">
  205. <el-pagination
  206. @size-change="handleSizeChanges"
  207. @current-change="handleCurrentChanges"
  208. :current-page="currentPages"
  209. :page-sizes="[10, 20, 30, 50]"
  210. :page-size="10"
  211. layout="total, sizes, prev, pager, next, jumper"
  212. :total="clistTotal"
  213. >
  214. </el-pagination>
  215. </div>
  216. <div class="descriptions" v-if="$parent.isShow == 8 && detail.examineStatus == 'SAVE'">
  217. <el-row>
  218. <el-col :span="6">审核人</el-col>
  219. <el-col :span="6">{{$store.getters.name}}</el-col>
  220. <el-col :span="6">审核结果</el-col>
  221. <el-col :span="6">
  222. <template>
  223. <el-radio-group v-model="examineStatus">
  224. <el-radio :label="'OK'">通过</el-radio>
  225. <el-radio :label="'FAIL'">驳回</el-radio>
  226. </el-radio-group>
  227. </template>
  228. </el-col>
  229. </el-row>
  230. <el-row>
  231. <el-col :span="4">审批说明</el-col>
  232. <el-col :span="20" class="col" style="padding: 0">
  233. <el-input
  234. size="small"
  235. placeholder="请输入内容"
  236. v-model="remark"
  237. >
  238. </el-input>
  239. </el-col>
  240. </el-row>
  241. <el-row>
  242. <el-button type="primary" size="small" @click="handleSubmit"
  243. >审核</el-button
  244. >
  245. </el-row>
  246. </div>
  247. </div>
  248. </div>
  249. </div>
  250. </template>
  251. <script>
  252. import {
  253. getPolicyDetail,
  254. getMaterialList,
  255. getCustomerList,
  256. getConditionList,
  257. toExamine,
  258. } from "@/api/supply/sales";
  259. import Minxin from "@/mixin";
  260. import { ok } from "assert";
  261. export default {
  262. mixins: [Minxin],
  263. name: "examine",
  264. data() {
  265. return {
  266. currentPages: 1, // 当前页码
  267. pageSizes: 10, // 每页数量
  268. clistTotal: 0,
  269. input: "",
  270. remark: "",
  271. fileList: [],
  272. listLoading: false,
  273. imageUrl: "",
  274. dataList: [],
  275. examineStatus: "OK",
  276. options: {},
  277. value: "",
  278. detail: {},
  279. screenForm: {
  280. code: "",
  281. createBy: "",
  282. endCreateTime: "",
  283. endTime1: "",
  284. endTime2: "",
  285. examineBy: "",
  286. remark: "",
  287. startCreateTime: "",
  288. startTime1: "",
  289. startTime2: "",
  290. status: "",
  291. title: "",
  292. type: "",
  293. },
  294. conditionList: [],
  295. custoList: [],
  296. };
  297. },
  298. created() {
  299. },
  300. methods: {
  301. getList() {
  302. this.listLoading = true;
  303. getPolicyDetail({ policyId: this.$parent.id }).then((res) => {
  304. this.detail = res.data;
  305. const condParams = {
  306. policyId: this.detail.code,
  307. };
  308. // 获取条件政策
  309. getConditionList(condParams).then((res) => {
  310. this.conditionList = res.data;
  311. });
  312. const paramss = {
  313. pageNum: this.currentPage,
  314. pageSize: this.pageSize,
  315. policyId: this.detail.code,
  316. saleTypeCode: "",
  317. };
  318. getMaterialList(paramss).then((res) => {
  319. this.dataList = res.data.records;
  320. this.listTotal = res.data.total;
  321. this.listLoading = false;
  322. });
  323. this.getCond();
  324. });
  325. },
  326. // 更改每页数量
  327. handleSizeChanges(val) {
  328. this.pageSizes = val;
  329. this.currentPages = 1;
  330. this.getCond();
  331. },
  332. // 更改当前页
  333. handleCurrentChanges(val) {
  334. this.currentPages = val;
  335. this.getCond();
  336. },
  337. getCond() {
  338. this.listLoading = true;
  339. const custoParams = {
  340. pageNum: this.currentPages,
  341. pageSize: this.pageSizes,
  342. policyId: this.detail.code,
  343. };
  344. getCustomerList(custoParams).then((res) => {
  345. this.custoList = res.data.records;
  346. this.clistTotal = res.data.total;
  347. this.listLoading = false;
  348. });
  349. },
  350. handleSubmit() {
  351. toExamine({
  352. examineStatus: this.examineStatus,
  353. policyId: this.$parent.id ,
  354. examineRemark: this.remark,
  355. }).then((res) => {
  356. this.$successMsg("已提交审核");
  357. this.isShow = 1;
  358. });
  359. },
  360. },
  361. };
  362. </script>
  363. <style lang="scss" scoped>
  364. .el-col {
  365. overflow: hidden;
  366. }
  367. .descriptions {
  368. // border: #EBEEF5;
  369. border: 1px solid #ebeef5;
  370. border-bottom: none;
  371. .el-row {
  372. height: 40px;
  373. line-height: 40px;
  374. }
  375. .el-col:nth-child(odd) {
  376. background-color: #ebeef5;
  377. }
  378. .el-col {
  379. padding: 0 15px;
  380. height: 100%;
  381. border-bottom: 1px solid #ebeef5;
  382. }
  383. }
  384. .el-divider--horizontal {
  385. margin: 20px 0;
  386. }
  387. .col {
  388. height: 100px;
  389. }
  390. .el-input.is-active .el-input__inner, .el-input__inner:focus {
  391. border-color: #fff;
  392. outline: 0;
  393. }
  394. </style>