modify_list-approval.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <div>
  3. <div>
  4. <el-page-header @back="goBack" content="审批"> </el-page-header>
  5. </div>
  6. <br />
  7. <br />
  8. <div>
  9. <el-form ref="screenForm" :model="detail" label-width="120px" size="small" label-position="left">
  10. <el-row :gutter="20">
  11. <el-col :xs="24" :sm="12" :lg="6">
  12. <el-form-item label="单据编号" prop="billId">
  13. <el-input placeholder="请输入" disabled v-model="detail.updPriceBillId"></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :xs="24" :sm="12" :lg="6">
  17. <el-form-item label="调价部门" prop="account">
  18. <el-input placeholder="请输入" v-model="detail.adminWebsitName" disabled></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :xs="24" :sm="12" :lg="6">
  22. <el-form-item label="调价业务员" prop="operatorName">
  23. <el-input disabled placeholder="请输入" v-model="detail.serviceName"></el-input>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :xs="24" :sm="12" :lg="6">
  27. <el-form-item label="备注" prop="operatorName">
  28. <el-input disabled placeholder="请输入" v-model="detail.remark"></el-input>
  29. </el-form-item>
  30. </el-col>
  31. </el-row>
  32. <div class="mymain-container">
  33. <!-- 列表 -->
  34. <div class="table">
  35. <el-table :data="detail.items" element-loading-text="Loading" border fit highlight-current-row stripe>
  36. <el-table-column
  37. align="center"
  38. label="销售类型"
  39. prop="saleTypeId"
  40. min-width="160"
  41. :formatter="formatterType"
  42. show-overflow-tooltip
  43. >
  44. </el-table-column>
  45. <el-table-column
  46. align="center"
  47. label="物料编码"
  48. prop="materialId"
  49. min-width="160"
  50. show-overflow-tooltip
  51. ></el-table-column>
  52. <el-table-column
  53. align="center"
  54. label="产品名称"
  55. prop="materialName"
  56. min-width="160"
  57. show-overflow-tooltip
  58. ></el-table-column>
  59. <el-table-column
  60. align="center"
  61. label="规格型号"
  62. prop="specification"
  63. min-width="160"
  64. show-overflow-tooltip
  65. ></el-table-column>
  66. <el-table-column
  67. align="center"
  68. label="计量单位"
  69. prop="unit"
  70. min-width="160"
  71. show-overflow-tooltip
  72. ></el-table-column>
  73. <el-table-column
  74. align="center"
  75. label="批发价"
  76. prop="batchPrice"
  77. min-width="160"
  78. show-overflow-tooltip
  79. ></el-table-column>
  80. <el-table-column align="center" label="格力折扣" prop="discAmount" min-width="160" show-overflow-tooltip>
  81. </el-table-column>
  82. <el-table-column
  83. align="center"
  84. label="返利类型(钱包)"
  85. prop="wallets2"
  86. min-width="200"
  87. show-overflow-tooltip
  88. >
  89. <template slot-scope="scope">
  90. <template v-for="(item, index) in scope.row.wallets2">
  91. <template v-if="item.type === 'REBATE'">
  92. <el-tag type="success" style="margin: 0 10px" size="small" :key="index">
  93. {{ item.walletName }}
  94. </el-tag>
  95. </template>
  96. </template>
  97. </template>
  98. </el-table-column>
  99. <el-table-column align="center" label="现金钱包" prop="wallets2" min-width="200" show-overflow-tooltip>
  100. <template slot-scope="scope">
  101. <template v-for="(item, index) in scope.row.wallets2">
  102. <template v-if="item.type === 'COMMONLY'">
  103. <el-tag type="success" style="margin: 0 10px" size="small" :key="index">
  104. {{ item.walletName }}
  105. </el-tag>
  106. </template>
  107. </template>
  108. </template>
  109. </el-table-column>
  110. <el-table-column align="center" label="生效日期" prop="startDate" min-width="160" show-overflow-tooltip>
  111. </el-table-column>
  112. <el-table-column align="center" label="失效日期" prop="endDate" min-width="160" show-overflow-tooltip>
  113. </el-table-column>
  114. <!-- <el-table-column
  115. align="center"
  116. label="是否促销价"
  117. prop="isPromote"
  118. min-width="160"
  119. show-overflow-tooltip
  120. >
  121. <template slot-scope="scope">
  122. <el-tag type="success" v-if="scope.row.isPromote">是</el-tag>
  123. <el-tag type="danger" v-else>否</el-tag>
  124. </template>
  125. </el-table-column> -->
  126. <el-table-column align="center" label="数量" prop="qty" min-width="160" show-overflow-tooltip>
  127. </el-table-column>
  128. <el-table-column align="center" label="发布" prop="isPublish" min-width="160" show-overflow-tooltip>
  129. <template slot-scope="scope">
  130. <el-tag type="success" v-if="scope.row.isPublish">是</el-tag>
  131. <el-tag type="danger" v-else>否</el-tag>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. </div>
  136. </div>
  137. <el-row>
  138. <el-col :xs="24" :sm="24" :lg="24">
  139. <h3>审批</h3>
  140. <hr />
  141. </el-col>
  142. </el-row>
  143. <div class="diy-table-1">
  144. <el-row :gutter="0">
  145. <el-col :xs="12" :sm="12" :lg="12" class="item">
  146. <div class="label">审批人</div>
  147. <div class="value">{{ this.$store.getters.name }}</div>
  148. </el-col>
  149. <el-col :xs="12" :sm="12" :lg="12" class="item">
  150. <div class="label">审批结果</div>
  151. <div class="value">
  152. <el-radio-group v-model="radio">
  153. <el-radio label="OK">通过</el-radio>
  154. <el-radio label="FAIL">驳回</el-radio>
  155. </el-radio-group>
  156. </div>
  157. </el-col>
  158. <el-col :xs="24" :sm="24" :lg="24" class="item">
  159. <div class="label">审批说明</div>
  160. <div class="value">
  161. <el-input v-model="detail.examineNote" size="small"></el-input>
  162. </div>
  163. </el-col>
  164. </el-row>
  165. </div>
  166. <br />
  167. <div class="btn-group clearfix">
  168. <div class="fl">
  169. <el-button type="primary" size="small" @click="onSubmit">提交审批</el-button>
  170. <!-- <el-button type="primary" size="small" @click="resetScreenForm"
  171. >重置</el-button
  172. > -->
  173. </div>
  174. </div>
  175. </el-form>
  176. </div>
  177. </div>
  178. </template>
  179. <script>
  180. import { getProductRriceConfirm, getTypeList, getUserList } from '@/api/basic_data/material'
  181. export default {
  182. // mixins: [Mixin],
  183. props: {
  184. detail: {
  185. type: Object,
  186. default: {}
  187. }
  188. },
  189. data() {
  190. return {
  191. radio: 'OK',
  192. dataList: [],
  193. typeList: [],
  194. userList: [],
  195. men: '',
  196. ren: ''
  197. }
  198. },
  199. created() {
  200. let params = {
  201. pageNum: 1,
  202. pageSize: -1,
  203. saleCode: '',
  204. saleName: '',
  205. status: ''
  206. }
  207. getTypeList(params).then(res => {
  208. this.typeList = res.data.records
  209. })
  210. getUserList({
  211. pageNum: 1,
  212. pageSize: -1,
  213. adminWebsitId: '',
  214. isCustomer: 0,
  215. roleId: '',
  216. status: '',
  217. userName: ''
  218. }).then(res => {
  219. this.userList = res.data.records
  220. })
  221. },
  222. methods: {
  223. formatterType(row) {
  224. return this.typeList.filter(k => {
  225. return k.id == row.saleTypeId
  226. })[0]?.saleName
  227. },
  228. goBack() {
  229. // console.log(this.$parent)
  230. // this.$parent.show = 1
  231. this.$emit('back')
  232. },
  233. onSubmit() {
  234. const params = {
  235. ids: this.detail.updPriceBillId,
  236. examineNote: this.detail.examineNote,
  237. examineStatus: this.radio
  238. }
  239. getProductRriceConfirm(params).then(res => {
  240. this.$successMsg('已提交审核')
  241. // this.$parent.show = 1
  242. // this.$parent.getList()
  243. this.goBack()
  244. })
  245. },
  246. resetScreenForm() {
  247. this.detail = {}
  248. }
  249. }
  250. }
  251. </script>
  252. <style lang="scss" scoped>
  253. ::v-deep .el-date-editor--date {
  254. width: 100%;
  255. }
  256. ::v-deep .el-select {
  257. width: 100%;
  258. }
  259. </style>