retail_examine.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  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="qty"
  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. >
  152. <template slot-scope="scope">
  153. {{ scope.row.payRebateAmount | numToFixed }}
  154. </template>
  155. </el-table-column>
  156. <el-table-column
  157. align="center"
  158. label="格力折扣"
  159. prop="discAmount"
  160. min-width="100"
  161. show-overflow-tooltip
  162. ></el-table-column>
  163. <el-table-column
  164. align="center"
  165. label="现金钱包"
  166. prop="customerWalletName"
  167. min-width="100"
  168. show-overflow-tooltip
  169. >
  170. <template slot-scope="scope">
  171. <!-- v-for="item in scope.row.rebateWallets" -->
  172. <el-tag
  173. type="success"
  174. size="small"
  175. >
  176. {{ scope.row.customerWalletName }}
  177. </el-tag>
  178. </template>
  179. </el-table-column>
  180. <el-table-column
  181. align="center"
  182. label="实付金额"
  183. prop="payAmount"
  184. min-width="100"
  185. show-overflow-tooltip
  186. ></el-table-column>
  187. <!-- <el-table-column
  188. align="center"
  189. label="已退数量"
  190. prop="retiredQty"
  191. min-width="100"
  192. show-overflow-tooltip
  193. ></el-table-column> -->
  194. <el-table-column
  195. align="center"
  196. label="是否直调"
  197. prop="isDirectTransfer"
  198. min-width="100"
  199. show-overflow-tooltip
  200. >
  201. <template slot-scope="scope">
  202. {{ scope.row.isDirectTransfer ? "是" : "否" }}
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. align="center"
  207. label="直调数量"
  208. prop="directTransferQty"
  209. min-width="100"
  210. show-overflow-tooltip
  211. ></el-table-column>
  212. <el-table-column
  213. align="center"
  214. label="原订单数量"
  215. prop="oldQty"
  216. min-width="100"
  217. show-overflow-tooltip
  218. ></el-table-column>
  219. <el-table-column
  220. align="center"
  221. label="备注"
  222. prop="remark"
  223. min-width="160"
  224. show-overflow-tooltip
  225. ></el-table-column>
  226. <el-table-column
  227. align="center"
  228. label="税率"
  229. prop="tax"
  230. min-width="100"
  231. show-overflow-tooltip
  232. ></el-table-column>
  233. </el-table>
  234. </div>
  235. <div class="main-title">
  236. <div class="title">审批信息</div>
  237. </div>
  238. <div class="diy-table-1">
  239. <el-row :gutter="0">
  240. <el-col :span="12" class="item">
  241. <div class="label">审批人</div>
  242. <div class="value">{{ userName }}</div>
  243. </el-col>
  244. <el-col :span="12" class="item">
  245. <div class="label">审批结果</div>
  246. <div class="value">
  247. <el-radio-group v-model="mainForm.status">
  248. <el-radio :label="true">通过</el-radio>
  249. <el-radio :label="false">驳回</el-radio>
  250. </el-radio-group>
  251. </div>
  252. </el-col>
  253. <el-col :span="24" class="item">
  254. <div class="label">审批说明</div>
  255. <div class="value">
  256. <el-input
  257. v-model="mainForm.remark"
  258. placeholder="请输入内容"
  259. ></el-input>
  260. </div>
  261. </el-col>
  262. </el-row>
  263. </div>
  264. <div class="page-footer">
  265. <div class="footer" :class="classObj">
  266. <el-button
  267. type="primary"
  268. @click="clickSubmitForm"
  269. :loading="formLoading"
  270. >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
  271. >
  272. <el-button @click="goBack">关 闭</el-button>
  273. </div>
  274. </div>
  275. </div>
  276. </template>
  277. <script>
  278. import { examineData, getDetail } from '@/api/supply/policy'
  279. export default {
  280. name: "RetailExamine",
  281. componentName: "RetailExamine",
  282. props: ["listItem"],
  283. filters: {
  284. statusFilter(val) {
  285. const statusList = [
  286. { label: "已保存", value: "SAVE" },
  287. { label: "待审核", value: "WAIT" },
  288. { label: "审核通过", value: "OK" },
  289. { label: "审核驳回", value: "FAIL" },
  290. ];
  291. let obj = statusList.find((o) => o.value == val);
  292. return obj ? obj.label : "";
  293. },
  294. },
  295. data() {
  296. return {
  297. detailData: {},
  298. userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
  299. formLoading: false,
  300. mainForm: {
  301. status: true,
  302. remark: "",
  303. theTime:''
  304. },
  305. };
  306. },
  307. computed: {
  308. sidebar() {
  309. return this.$store.state.app.sidebar;
  310. },
  311. classObj() {
  312. return {
  313. hideSidebar: !this.sidebar.opened,
  314. openSidebar: this.sidebar.opened,
  315. };
  316. },
  317. },
  318. created() {
  319. this.getDetail();
  320. },
  321. methods: {
  322. // 返回列表
  323. goBack() {
  324. this.$emit("backListFormDetail");
  325. },
  326. // 获取详情
  327. getDetail() {
  328. getDetail({ id: this.listItem.id }).then((res) => {
  329. this.detailData = res.data;
  330. });
  331. },
  332. // 提交审批
  333. clickSubmitForm() {
  334. this.formLoading = true;
  335. examineData({
  336. id: this.listItem.id,
  337. examineStatus: this.mainForm.status ? "OK" : "FAIL",
  338. examineRemark: this.mainForm.remark,
  339. theTime:this.detailData.theTime
  340. })
  341. .then((res) => {
  342. this.$successMsg("审批成功");
  343. this.goBack();
  344. this.$parent.getList();
  345. })
  346. .finally((res) => {
  347. this.formLoading = false;
  348. });
  349. },
  350. },
  351. };
  352. </script>
  353. <style scoped lang="scss">
  354. ::v-deep .el-input__prefix {
  355. display: none;
  356. left: 65px !important;
  357. -webkit-transition: all 0.3s;
  358. transition: all 0.3s;
  359. }
  360. ::v-deep .el-date-editor.el-input {
  361. width: 100%;
  362. box-sizing: border-box;
  363. padding-left: 10px;
  364. }
  365. .diy-table-1 {
  366. ::v-deep .el-form-item {
  367. margin: 0;
  368. }
  369. ::v-deep .el-input__suffix {
  370. right: -15px;
  371. -webkit-transition: all 0.3s;
  372. transition: all 0.3s;
  373. }
  374. }
  375. .detail-container {
  376. width: 100%;
  377. height: 100%;
  378. }
  379. .main-title {
  380. display: flex;
  381. justify-content: space-between;
  382. align-items: center;
  383. margin-top: 20px;
  384. height: 60px;
  385. border-bottom: 1px solid #dcdfe6;
  386. margin-bottom: 20px;
  387. .title {
  388. font-size: 16px;
  389. font-weight: 600;
  390. padding-left: 10px;
  391. }
  392. }
  393. </style>