retail_examine.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header @back="goBack" content="审批"></el-page-header>
  4. <div class="main-title">
  5. <div class="title">订单信息</div>
  6. </div>
  7. <div class="diy-table-1">
  8. <el-row>
  9. <el-col :span="8" class="item">
  10. <div class="label">订单号</div>
  11. <div class="value">{{ detailData.id }}</div>
  12. </el-col>
  13. <el-col :span="8" class="item">
  14. <div class="label">订单日期</div>
  15. <div class="value">
  16. <el-date-picker
  17. v-model="detailData.theTime"
  18. type="datetime"
  19. value-format="yyyy-MM-dd HH:mm:ss"
  20. style="width: 100%"
  21. placeholder="选择日期"
  22. >
  23. </el-date-picker>
  24. </div>
  25. </el-col>
  26. <el-col :span="8" class="item">
  27. <div class="label">单据状态</div>
  28. <div class="value">{{ detailData.examineStatus | statusFilter }}</div>
  29. </el-col>
  30. <el-col :span="16" class="item">
  31. <div class="label">备注</div>
  32. <div class="value">{{ detailData.remark }}</div>
  33. </el-col>
  34. <el-col :span="8" class="item">
  35. <div class="label">业务员</div>
  36. <div class="value">
  37. <el-select
  38. v-model="detailData.k3ServiceName"
  39. placeholder="选择业务员"
  40. style="width: 100%"
  41. @change="handleUser"
  42. >
  43. <el-option
  44. v-for="item in userList"
  45. :key="item.adminUserId"
  46. :label="item.nickName"
  47. :value="item.adminUserId"
  48. />
  49. </el-select>
  50. </div>
  51. </el-col>
  52. <el-col :span="8" class="item">
  53. <div class="label">制单人</div>
  54. <div class="value">{{ detailData.createName }}</div>
  55. </el-col>
  56. <el-col :span="8" class="item">
  57. <div class="label">审核人</div>
  58. <div class="value">{{ detailData.examineName }}</div>
  59. </el-col>
  60. <el-col :span="8" class="item">
  61. <div class="label">关闭人</div>
  62. <div class="value">{{ detailData.closeName }}</div>
  63. </el-col>
  64. </el-row>
  65. </div>
  66. <div class="main-title">
  67. <div class="title">货品信息</div>
  68. </div>
  69. <div class="table" style="margin-top: 20px">
  70. <el-table
  71. :data="detailData.retailOrderItemList"
  72. element-loading-text="Loading"
  73. border
  74. fit
  75. highlight-current-row
  76. stripe
  77. max-height="400"
  78. >
  79. <el-table-column
  80. align="center"
  81. label="序号"
  82. type="index"
  83. width="50"
  84. ></el-table-column>
  85. <el-table-column
  86. align="center"
  87. label="销售类型"
  88. prop="saleTypeName"
  89. min-width="100"
  90. show-overflow-tooltip
  91. ></el-table-column>
  92. <el-table-column
  93. align="center"
  94. label="物料编码"
  95. prop="materialCode"
  96. min-width="160"
  97. show-overflow-tooltip
  98. ></el-table-column>
  99. <el-table-column
  100. align="center"
  101. label="产品名称"
  102. prop="materialName"
  103. min-width="160"
  104. show-overflow-tooltip
  105. ></el-table-column>
  106. <el-table-column
  107. align="center"
  108. label="规格型号"
  109. prop="specification"
  110. min-width="160"
  111. show-overflow-tooltip
  112. ></el-table-column>
  113. <el-table-column
  114. align="center"
  115. label="单位"
  116. prop="unit"
  117. min-width="100"
  118. show-overflow-tooltip
  119. ></el-table-column>
  120. <el-table-column
  121. align="center"
  122. label="单价"
  123. prop="price"
  124. min-width="100"
  125. show-overflow-tooltip
  126. ></el-table-column>
  127. <el-table-column
  128. align="center"
  129. label="数量"
  130. prop="qty"
  131. min-width="100"
  132. show-overflow-tooltip
  133. ></el-table-column>
  134. <el-table-column
  135. align="center"
  136. label="订单金额"
  137. prop="totalAmount"
  138. min-width="100"
  139. show-overflow-tooltip
  140. ></el-table-column>
  141. <el-table-column
  142. align="center"
  143. label="返利类型"
  144. prop="customerWalletName2"
  145. min-width="100"
  146. show-overflow-tooltip
  147. >
  148. <template slot-scope="scope">
  149. <!-- v-for="item in scope.row.rebateWallets" -->
  150. <el-tag
  151. v-if="scope.row.customerWalletName2"
  152. type="success"
  153. size="small"
  154. >
  155. {{ scope.row.customerWalletName2 }}
  156. </el-tag>
  157. </template>
  158. </el-table-column>
  159. <el-table-column
  160. align="center"
  161. label="返利金额"
  162. prop="payRebateAmount"
  163. min-width="100"
  164. show-overflow-tooltip
  165. >
  166. <template slot-scope="scope">
  167. {{ scope.row.payRebateAmount | numToFixed }}
  168. </template>
  169. </el-table-column>
  170. <el-table-column
  171. align="center"
  172. label="格力折扣"
  173. prop="discAmount"
  174. min-width="100"
  175. show-overflow-tooltip
  176. ></el-table-column>
  177. <el-table-column
  178. align="center"
  179. label="现金钱包"
  180. prop="customerWalletName"
  181. min-width="100"
  182. show-overflow-tooltip
  183. >
  184. <template slot-scope="scope">
  185. <!-- v-for="item in scope.row.rebateWallets" -->
  186. <el-tag
  187. type="success"
  188. size="small"
  189. >
  190. {{ scope.row.customerWalletName }}
  191. </el-tag>
  192. </template>
  193. </el-table-column>
  194. <el-table-column
  195. align="center"
  196. label="实付金额"
  197. prop="payAmount"
  198. min-width="100"
  199. show-overflow-tooltip
  200. ></el-table-column>
  201. <!-- <el-table-column
  202. align="center"
  203. label="已退数量"
  204. prop="retiredQty"
  205. min-width="100"
  206. show-overflow-tooltip
  207. ></el-table-column> -->
  208. <el-table-column
  209. align="center"
  210. label="是否直调"
  211. prop="isDirectTransfer"
  212. min-width="100"
  213. show-overflow-tooltip
  214. >
  215. <template slot-scope="scope">
  216. {{ scope.row.isDirectTransfer ? "是" : "否" }}
  217. </template>
  218. </el-table-column>
  219. <el-table-column
  220. align="center"
  221. label="直调数量"
  222. prop="directTransferQty"
  223. min-width="100"
  224. show-overflow-tooltip
  225. ></el-table-column>
  226. <el-table-column
  227. align="center"
  228. label="原订单数量"
  229. prop="oldQty"
  230. min-width="100"
  231. show-overflow-tooltip
  232. ></el-table-column>
  233. <el-table-column
  234. align="center"
  235. label="备注"
  236. prop="remark"
  237. min-width="160"
  238. show-overflow-tooltip
  239. ></el-table-column>
  240. <el-table-column
  241. align="center"
  242. label="税率"
  243. prop="tax"
  244. min-width="100"
  245. show-overflow-tooltip
  246. ></el-table-column>
  247. </el-table>
  248. </div>
  249. <div class="main-title">
  250. <div class="title">审批信息</div>
  251. </div>
  252. <div class="diy-table-1">
  253. <el-row :gutter="0">
  254. <el-col :span="12" class="item">
  255. <div class="label">审批人</div>
  256. <div class="value">{{ userName }}</div>
  257. </el-col>
  258. <el-col :span="12" class="item">
  259. <div class="label">审批结果</div>
  260. <div class="value">
  261. <el-radio-group v-model="mainForm.status">
  262. <el-radio :label="true">通过</el-radio>
  263. <el-radio :label="false">驳回</el-radio>
  264. </el-radio-group>
  265. </div>
  266. </el-col>
  267. <el-col :span="24" class="item">
  268. <div class="label">审批说明</div>
  269. <div class="value">
  270. <el-input
  271. v-model="mainForm.remark"
  272. placeholder="请输入内容"
  273. ></el-input>
  274. </div>
  275. </el-col>
  276. </el-row>
  277. </div>
  278. <div class="page-footer">
  279. <div class="footer" :class="classObj">
  280. <el-button
  281. type="primary"
  282. @click="clickSubmitForm"
  283. :loading="formLoading"
  284. >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
  285. >
  286. <el-button @click="goBack">关 闭</el-button>
  287. </div>
  288. </div>
  289. </div>
  290. </template>
  291. <script>
  292. import { examineData, getDetail, getUserList } from '@/api/supply/policy'
  293. export default {
  294. name: "RetailExamine",
  295. componentName: "RetailExamine",
  296. props: ["listItem"],
  297. filters: {
  298. statusFilter(val) {
  299. const statusList = [
  300. { label: "已保存", value: "SAVE" },
  301. { label: "待审核", value: "WAIT" },
  302. { label: "审核通过", value: "OK" },
  303. { label: "审核驳回", value: "FAIL" },
  304. ];
  305. let obj = statusList.find((o) => o.value == val);
  306. return obj ? obj.label : "";
  307. },
  308. },
  309. data() {
  310. return {
  311. detailData: {},
  312. userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
  313. userList:[],
  314. formLoading: false,
  315. mainForm: {
  316. status: true,
  317. remark: "",
  318. theTime:''
  319. },
  320. };
  321. },
  322. computed: {
  323. sidebar() {
  324. return this.$store.state.app.sidebar;
  325. },
  326. classObj() {
  327. return {
  328. hideSidebar: !this.sidebar.opened,
  329. openSidebar: this.sidebar.opened,
  330. };
  331. },
  332. },
  333. created() {
  334. this.getDetail();
  335. },
  336. methods: {
  337. // 返回列表
  338. goBack() {
  339. this.$emit("backListFormDetail");
  340. },
  341. // 获取详情
  342. getDetail() {
  343. getDetail({ id: this.listItem.id }).then((res) => {
  344. this.detailData = res.data;
  345. });
  346. getUserList({
  347. pageNum: 1,
  348. pageSize: -1,
  349. adminWebsitId: '',
  350. isCustomer: 0,
  351. roleId: '',
  352. status: true,
  353. userName: ''
  354. }).then((res) => {
  355. this.userList = res.data.records
  356. })
  357. },
  358. handleUser(e) {
  359. const user = this.userList.filter(k => {
  360. return k.adminUserId === e
  361. })[0]
  362. this.detailData.k3ServiceId = user.adminUserId
  363. this.detailData.k3ServiceName = user.nickName
  364. },
  365. // 提交审批
  366. clickSubmitForm() {
  367. this.formLoading = true;
  368. examineData({
  369. id: this.listItem.id,
  370. examineStatus: this.mainForm.status ? "OK" : "FAIL",
  371. examineRemark: this.mainForm.remark,
  372. theTime:this.detailData.theTime,
  373. serviceId:this.detailData.k3ServiceId
  374. })
  375. .then((res) => {
  376. this.$successMsg("审批成功");
  377. this.goBack();
  378. this.$parent.getList();
  379. })
  380. .finally((res) => {
  381. this.formLoading = false;
  382. });
  383. },
  384. },
  385. };
  386. </script>
  387. <style scoped lang="scss">
  388. ::v-deep .el-input__prefix {
  389. display: none;
  390. left: 65px !important;
  391. -webkit-transition: all 0.3s;
  392. transition: all 0.3s;
  393. }
  394. ::v-deep .el-date-editor.el-input {
  395. width: 100%;
  396. box-sizing: border-box;
  397. padding-left: 10px;
  398. }
  399. .diy-table-1 {
  400. ::v-deep .el-form-item {
  401. margin: 0;
  402. }
  403. ::v-deep .el-input__suffix {
  404. right: -15px;
  405. -webkit-transition: all 0.3s;
  406. transition: all 0.3s;
  407. }
  408. }
  409. .detail-container {
  410. width: 100%;
  411. height: 100%;
  412. margin-bottom: 30px;
  413. }
  414. .main-title {
  415. display: flex;
  416. justify-content: space-between;
  417. align-items: center;
  418. margin-top: 20px;
  419. height: 60px;
  420. border-bottom: 1px solid #dcdfe6;
  421. margin-bottom: 20px;
  422. .title {
  423. font-size: 16px;
  424. font-weight: 600;
  425. padding-left: 10px;
  426. }
  427. }
  428. </style>