retail_examine.vue 11 KB

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