modify_list-approval.vue 9.9 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. import Mixin from "@/mixin/index";
  255. export default {
  256. // mixins: [Mixin],
  257. props: {
  258. detail: {
  259. type: Object,
  260. default: {},
  261. },
  262. },
  263. data() {
  264. return {
  265. radio: 'OK',
  266. dataList: [
  267. ],
  268. typeList: [],
  269. userList:[],
  270. men:'',
  271. ren:''
  272. };
  273. },
  274. created() {
  275. let params = {
  276. pageNum: 1,
  277. pageSize: -1,
  278. saleCode: "",
  279. saleName: "",
  280. status: "",
  281. };
  282. getTypeList(params).then((res) => {
  283. this.typeList = res.data.records;
  284. });
  285. getUserList({
  286. pageNum: 1,
  287. pageSize: -1,
  288. adminWebsitId: "",
  289. isCustomer: 0,
  290. roleId: "",
  291. status: "",
  292. userName: "",
  293. }).then((res) => {
  294. this.userList = res.data.records;
  295. });
  296. },
  297. methods: {
  298. formatterType(row) {
  299. return this.typeList.filter((k) => {
  300. return k.id == row.saleTypeId;
  301. })[0]?.saleName;
  302. },
  303. goBack() {
  304. console.log(this.$parent);
  305. this.$parent.show = 1;
  306. },
  307. onSubmit() {
  308. console.log(this.radio);
  309. const params = {
  310. ...this.detail,
  311. examineStatus:this.radio
  312. };
  313. getProductRriceConfirm(params).then((res) => {
  314. this.$successMsg("已提交审核");
  315. this.$parent.show = 1
  316. this.$parent.getList()
  317. });
  318. },
  319. resetScreenForm() {
  320. this.detail = {};
  321. },
  322. },
  323. };
  324. </script>
  325. <style lang="scss" scoped>
  326. ::v-deep .el-date-editor--date {
  327. width: 100%;
  328. }
  329. ::v-deep .el-select {
  330. width: 100%;
  331. }
  332. </style>