modify_list-approval.vue 9.8 KB

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