modify_list-approval.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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.billId"
  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="men" 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="ren"
  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="billId"
  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="baseUnitId"
  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="retailPrice"
  109. min-width="160"
  110. show-overflow-tooltip
  111. >
  112. </el-table-column>
  113. <el-table-column
  114. align="center"
  115. label="返利使用比例"
  116. prop="rebateRate"
  117. min-width="160"
  118. show-overflow-tooltip
  119. >
  120. </el-table-column>
  121. <el-table-column
  122. align="center"
  123. label="生效日期"
  124. prop="startDate"
  125. min-width="160"
  126. show-overflow-tooltip
  127. >
  128. </el-table-column>
  129. <el-table-column
  130. align="center"
  131. label="失效日期"
  132. prop="endDate"
  133. min-width="160"
  134. show-overflow-tooltip
  135. >
  136. </el-table-column>
  137. <el-table-column
  138. align="center"
  139. label="是否促销价"
  140. prop="isPromote"
  141. min-width="160"
  142. show-overflow-tooltip
  143. >
  144. <template slot-scope="scope">
  145. <el-tag type="success" v-if="scope.row.isPromote">是</el-tag>
  146. <el-tag type="danger" v-else>否</el-tag>
  147. </template>
  148. </el-table-column>
  149. <el-table-column
  150. align="center"
  151. label="数量"
  152. prop="qty"
  153. min-width="160"
  154. show-overflow-tooltip
  155. >
  156. </el-table-column>
  157. <el-table-column
  158. align="center"
  159. label="发布"
  160. prop="isPublish"
  161. min-width="160"
  162. show-overflow-tooltip
  163. >
  164. <template slot-scope="scope">
  165. <el-tag type="success" v-if="scope.row.isPublish">是</el-tag>
  166. <el-tag type="danger" v-else>否</el-tag>
  167. </template>
  168. </el-table-column>
  169. </el-table>
  170. </div>
  171. </div>
  172. <el-row>
  173. <el-col :xs="24" :sm="24" :lg="24">
  174. <h3>审批</h3>
  175. <hr />
  176. </el-col>
  177. </el-row>
  178. <div class="diy-table-1">
  179. <el-row :gutter="0">
  180. <el-col :xs="12" :sm="12" :lg="12" class="item">
  181. <div class="label">审批人</div>
  182. <div class="value">{{ this.$store.getters.name }}</div>
  183. </el-col>
  184. <el-col :xs="12" :sm="12" :lg="12" class="item">
  185. <div class="label">审批结果</div>
  186. <div class="value">
  187. <el-radio-group v-model="detail.examineResult">
  188. <el-radio label="通过" :value="true"></el-radio>
  189. <el-radio label="驳回" :value="false"></el-radio>
  190. </el-radio-group>
  191. </div>
  192. </el-col>
  193. <el-col :xs="24" :sm="24" :lg="24" class="item">
  194. <div class="label">审批说明</div>
  195. <div class="value">
  196. <el-input v-model="detail.examineNote" size="small"></el-input>
  197. </div>
  198. </el-col>
  199. </el-row>
  200. </div>
  201. <br />
  202. <div class="btn-group clearfix">
  203. <div class="fl">
  204. <el-button type="primary" size="small" @click="onSubmit"
  205. >提交审批</el-button
  206. >
  207. <!-- <el-button type="primary" size="small" @click="resetScreenForm"
  208. >重置</el-button
  209. > -->
  210. </div>
  211. </div>
  212. </el-form>
  213. </div>
  214. </div>
  215. </template>
  216. <script>
  217. import { getProductRriceConfirm, getTypeList,getUserList } from "@/api/basic_data/material";
  218. import Mixin from "@/mixin/index";
  219. export default {
  220. // mixins: [Mixin],
  221. props: {
  222. detail: {
  223. type: Object,
  224. default: {},
  225. },
  226. },
  227. data() {
  228. return {
  229. radio: "",
  230. dataList: [
  231. {
  232. SalesType: "*一票机*",
  233. code: "23022051775",
  234. name: "夏之凉变频1",
  235. model: "KFR-26GW",
  236. company: "套",
  237. wholesale: "2999",
  238. retail: "2899",
  239. rebate: "0.8",
  240. effectiveDate: "2021-11-02",
  241. expiryDate: "2021-11-02",
  242. promotion: "否",
  243. number: "51",
  244. release: "是",
  245. },
  246. ],
  247. typeList: [],
  248. userList:[],
  249. men:'',
  250. ren:''
  251. };
  252. },
  253. created() {
  254. let params = {
  255. pageNum: 1,
  256. pageSize: -1,
  257. saleCode: "",
  258. saleName: "",
  259. status: "",
  260. };
  261. getTypeList(params).then((res) => {
  262. this.typeList = res.data.records;
  263. });
  264. getUserList({
  265. pageNum: 1,
  266. pageSize: -1,
  267. adminWebsitId: "",
  268. isCustomer: 0,
  269. roleId: "",
  270. status: "",
  271. userName: "",
  272. }).then((res) => {
  273. this.userList = res.data.records;
  274. var a= this.userList.filter(k=>{
  275. return k.roleId == this.detail.serviceId
  276. })[0]
  277. this.men = a.adminCompanyName
  278. this.ren = a.nickName
  279. });
  280. },
  281. methods: {
  282. formatterType(row) {
  283. return this.typeList.filter((k) => {
  284. return k.id == row.saleTypeId;
  285. })[0]?.saleName;
  286. },
  287. goBack() {
  288. console.log(this.$parent);
  289. this.$parent.show = 1;
  290. },
  291. onSubmit() {
  292. const params = {
  293. ...this.detail,
  294. };
  295. params.examineResult = params.examineResult == "通过" ? true : false ;
  296. getProductRriceConfirm(params).then((res) => {
  297. this.$successMsg("已提交审核");
  298. });
  299. },
  300. resetScreenForm() {
  301. this.detail = {};
  302. },
  303. },
  304. };
  305. </script>
  306. <style lang="scss" scoped>
  307. ::v-deep .el-date-editor--date {
  308. width: 100%;
  309. }
  310. ::v-deep .el-select {
  311. width: 100%;
  312. }
  313. </style>