retail_examine.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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">{{detailData.theTime}}</div>
  16. </el-col>
  17. <el-col :span="8" class="item">
  18. <div class="label">单据状态</div>
  19. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  20. </el-col>
  21. <el-col :span="16" class="item">
  22. <div class="label">备注</div>
  23. <div class="value">{{detailData.remark}}</div>
  24. </el-col>
  25. <el-col :span="8" class="item">
  26. <div class="label">业务员</div>
  27. <div class="value">{{detailData.serviceName}}</div>
  28. </el-col>
  29. <el-col :span="8" class="item">
  30. <div class="label">制单人</div>
  31. <div class="value">{{detailData.createName}}</div>
  32. </el-col>
  33. <el-col :span="8" class="item">
  34. <div class="label">审核人</div>
  35. <div class="value">{{detailData.examineName}}</div>
  36. </el-col>
  37. <el-col :span="8" class="item">
  38. <div class="label">关闭人</div>
  39. <div class="value">{{detailData.closeName}}</div>
  40. </el-col>
  41. </el-row>
  42. </div>
  43. <div class="main-title">
  44. <div class="title">货品信息</div>
  45. </div>
  46. <div class="table" style="margin-top: 20px">
  47. <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  48. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  49. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  50. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  51. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  52. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  53. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  54. <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
  55. <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  56. <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
  57. <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
  58. <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
  59. <el-table-column align="center" label="格力折扣" prop="deductAmount" min-width="100" show-overflow-tooltip></el-table-column>
  60. <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
  61. <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
  62. <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  63. <template slot-scope="scope">
  64. {{scope.row.isDirectTransfer ? '是':'否'}}
  65. </template>
  66. </el-table-column>
  67. <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
  68. <el-table-column align="center" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
  69. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  70. <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
  71. </el-table>
  72. </div>
  73. <div class="main-title">
  74. <div class="title">审批信息</div>
  75. </div>
  76. <div class="diy-table-1">
  77. <el-row :gutter="0">
  78. <el-col :span="12" class="item">
  79. <div class="label">审批人</div>
  80. <div class="value">{{userName}}</div>
  81. </el-col>
  82. <el-col :span="12" class="item">
  83. <div class="label">审批结果</div>
  84. <div class="value">
  85. <el-radio-group v-model="mainForm.status">
  86. <el-radio :label="true">通过</el-radio>
  87. <el-radio :label="false">驳回</el-radio>
  88. </el-radio-group>
  89. </div>
  90. </el-col>
  91. <el-col :span="24" class="item">
  92. <div class="label">审批说明</div>
  93. <div class="value"><el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input></div>
  94. </el-col>
  95. </el-row>
  96. </div>
  97. <div class="page-footer">
  98. <div class="footer" :class="classObj">
  99. <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
  100. <el-button @click="goBack">关 闭</el-button>
  101. </div>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. import { getDetail, examineData } from "@/api/supply/retail";
  107. export default {
  108. name: 'RetailExamine',
  109. componentName: 'RetailExamine',
  110. props: ['listItem'],
  111. filters: {
  112. statusFilter(val) {
  113. const statusList = [
  114. { label: '已保存', value: 'SAVE' },
  115. { label: '待审核', value: 'WAIT' },
  116. { label: '审核通过', value: 'OK' },
  117. { label: '审核驳回', value: 'FAIL' },
  118. ];
  119. let obj = statusList.find(o => o.value == val);
  120. return obj ? obj.label : ''
  121. }
  122. },
  123. data() {
  124. return {
  125. detailData: {},
  126. userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
  127. formLoading: false,
  128. mainForm: {
  129. status: true,
  130. remark: '',
  131. }
  132. }
  133. },
  134. computed: {
  135. sidebar() {
  136. return this.$store.state.app.sidebar
  137. },
  138. classObj() {
  139. return {
  140. hideSidebar: !this.sidebar.opened,
  141. openSidebar: this.sidebar.opened
  142. }
  143. },
  144. },
  145. created() {
  146. this.getDetail();
  147. },
  148. methods: {
  149. // 返回列表
  150. goBack() {
  151. this.$emit('backListFormDetail');
  152. },
  153. // 获取详情
  154. getDetail() {
  155. getDetail({id: this.listItem.id}).then(res => {
  156. this.detailData = res.data;
  157. })
  158. },
  159. // 提交审批
  160. clickSubmitForm() {
  161. this.formLoading = true;
  162. examineData({
  163. id: this.listItem.id,
  164. examineStatus: this.mainForm.status ? 'OK' : 'FAIL',
  165. examineRemark: this.mainForm.remark,
  166. }).then(res => {
  167. this.$successMsg('审批成功');
  168. this.goBack();
  169. this.$parent.getList();
  170. }).finally(res => {
  171. this.formLoading = false;
  172. })
  173. },
  174. }
  175. }
  176. </script>
  177. <style scoped lang="scss">
  178. .detail-container {
  179. width: 100%;
  180. height: 100%;
  181. }
  182. .main-title {
  183. display: flex;
  184. justify-content: space-between;
  185. align-items: center;
  186. margin-top: 20px;
  187. height: 60px;
  188. border-bottom: 1px solid #DCDFE6;
  189. margin-bottom: 20px;
  190. .title {
  191. font-size: 16px;
  192. font-weight: 600;
  193. padding-left: 10px;
  194. }
  195. }
  196. </style>