receivable_list-approval.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <div>
  3. <div class="sty">
  4. <el-page-header @back="goBack"> </el-page-header>
  5. </div>
  6. <br />
  7. <span>基本信息</span>
  8. <el-divider></el-divider>
  9. <!-- 表头 -->
  10. <div>
  11. <el-form
  12. ref="searchForm"
  13. :model="searchForm"
  14. label-width="100px"
  15. size="small"
  16. label-position="left"
  17. >
  18. <el-row :gutter="20">
  19. <el-col :xs="24" :sm="12" :lg="6">
  20. <el-form-item label="单据类型" prop="">
  21. <el-input
  22. disabled
  23. v-model="searchForm.billType"
  24. placeholder="请输入"
  25. ></el-input>
  26. </el-form-item>
  27. </el-col>
  28. <el-col :xs="24" :sm="12" :lg="6">
  29. <el-form-item label="单据编号" prop="">
  30. <el-input
  31. disabled
  32. v-model="searchForm.code"
  33. placeholder="请输入"
  34. ></el-input>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :xs="24" :sm="12" :lg="6">
  38. <el-form-item label="单据来源" prop="">
  39. <el-input
  40. disabled
  41. v-model="searchForm.source"
  42. placeholder="请输入"
  43. ></el-input>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :xs="24" :sm="12" :lg="6">
  47. <el-form-item label="业务日期" prop="">
  48. <el-input
  49. disabled
  50. v-model="searchForm.theTime"
  51. placeholder="请输入"
  52. ></el-input>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :xs="24" :sm="12" :lg="6">
  56. <el-form-item label="到期日" prop="">
  57. <el-input
  58. disabled
  59. v-model="searchForm.endTime"
  60. placeholder="请输入"
  61. ></el-input>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :xs="24" :sm="12" :lg="6">
  65. <el-form-item label="总金额" prop="">
  66. <el-input
  67. disabled
  68. v-model="searchForm.totalAmount"
  69. placeholder="请输入"
  70. ></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :xs="24" :sm="12" :lg="6">
  74. <el-form-item label="制单人" prop="">
  75. <el-input
  76. disabled
  77. v-model="searchForm.createBy"
  78. placeholder="请输入"
  79. ></el-input>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :xs="24" :sm="12" :lg="6">
  83. <el-form-item label="制单日期" prop="">
  84. <el-input
  85. disabled
  86. v-model="searchForm.createTime"
  87. placeholder="请输入"
  88. ></el-input>
  89. </el-form-item>
  90. </el-col>
  91. <el-col :xs="24" :sm="12" :lg="6">
  92. <el-form-item label="单据状态" prop="">
  93. <el-input
  94. disabled
  95. v-model="searchForm.examineStatus"
  96. placeholder="请输入"
  97. ></el-input>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :xs="24" :sm="12" :lg="6">
  101. <el-form-item label="备注" prop="">
  102. <el-input
  103. disabled
  104. v-model="searchForm.remark"
  105. placeholder="请输入"
  106. ></el-input>
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. </el-form>
  111. </div>
  112. <span>明细</span>
  113. <el-divider></el-divider>
  114. <!-- 列表 -->
  115. <div class="mymain-container">
  116. <div class="table">
  117. <el-table
  118. v-loading="listLoading"
  119. :data="dataList"
  120. element-loading-text="Loading"
  121. border
  122. fit
  123. highlight-current-row
  124. stripe
  125. >
  126. <el-table-column
  127. label="序号"
  128. align="center"
  129. type="index"
  130. width="100"
  131. show-overflow-tooltip
  132. ></el-table-column>
  133. <el-table-column
  134. align="center"
  135. label="经销商编号"
  136. prop="customerNumber"
  137. min-width="160"
  138. show-overflow-tooltip
  139. ></el-table-column>
  140. <el-table-column
  141. align="center"
  142. label="经销商名称"
  143. prop="customerName"
  144. min-width="160"
  145. show-overflow-tooltip
  146. ></el-table-column>
  147. <el-table-column
  148. align="center"
  149. label="*费用项目编码"
  150. prop="projectCode"
  151. min-width="160"
  152. show-overflow-tooltip
  153. ></el-table-column>
  154. <el-table-column
  155. align="center"
  156. label="项目费用名称"
  157. prop="projectName"
  158. min-width="160"
  159. show-overflow-tooltip
  160. ></el-table-column>
  161. <el-table-column
  162. align="center"
  163. label="*费用承担部门"
  164. prop="departmentId"
  165. min-width="160"
  166. show-overflow-tooltip
  167. ></el-table-column>
  168. <el-table-column
  169. align="center"
  170. label="现金钱包"
  171. prop="customerWalletName"
  172. min-width="160"
  173. show-overflow-tooltip
  174. ></el-table-column>
  175. <el-table-column
  176. align="center"
  177. label="*发票类型"
  178. prop="invoiceType"
  179. min-width="160"
  180. show-overflow-tooltip
  181. ></el-table-column>
  182. <el-table-column
  183. align="center"
  184. label="不含税金额"
  185. prop="afterTaxAmount"
  186. min-width="160"
  187. show-overflow-tooltip
  188. ></el-table-column>
  189. <el-table-column
  190. align="center"
  191. label="税额"
  192. prop="tax"
  193. min-width="160"
  194. show-overflow-tooltip
  195. ></el-table-column>
  196. <el-table-column
  197. align="center"
  198. label="总金额"
  199. prop="totalAmount"
  200. min-width="160"
  201. show-overflow-tooltip
  202. ></el-table-column>
  203. <el-table-column
  204. align="center"
  205. label="备注"
  206. prop="remark"
  207. min-width="160"
  208. show-overflow-tooltip
  209. ></el-table-column>
  210. </el-table>
  211. </div>
  212. </div>
  213. <span>审批信息</span>
  214. <el-divider></el-divider>
  215. <div class="diy-table-1">
  216. <el-row :gutter="0">
  217. <el-col :span="12" class="item">
  218. <div class="label">审批人</div>
  219. <div class="value">{{ this.name }}</div>
  220. </el-col>
  221. <el-col :span="12" class="item">
  222. <div class="label">审批结果</div>
  223. <div class="value">
  224. <div class="value">
  225. <el-radio v-model="examineStatus" label="OK">通过</el-radio>
  226. <el-radio v-model="examineStatus" label="FAIL">驳回</el-radio>
  227. </div>
  228. </div>
  229. </el-col>
  230. <el-col :span="24" class="item">
  231. <div class="label">审批说明</div>
  232. <div class="value">
  233. <el-input
  234. v-model="examineRemark"
  235. placeholder="请输入内容"
  236. ></el-input>
  237. </div>
  238. </el-col>
  239. </el-row>
  240. </div>
  241. <br />
  242. <!-- 按钮 -->
  243. <div class="btn-group clearfix">
  244. <div class="fl">
  245. <el-button type="primary" size="small" @click="btnOK"
  246. >提交审批</el-button
  247. >
  248. <el-button type="primary" size="small" @click="resetFn">重置</el-button>
  249. </div>
  250. </div>
  251. </div>
  252. </template>
  253. <script>
  254. import {
  255. getFinanceOtherReceDetail,
  256. getFinanceOtherReceExamine,
  257. } from "@/api/finance/receivable_list";
  258. import { mapGetters } from "vuex";
  259. export default {
  260. props: {
  261. approvalId: {
  262. type: String,
  263. required: true,
  264. },
  265. },
  266. data() {
  267. return {
  268. examineRemark: "",
  269. examineStatus: "OK",
  270. dataList: [],
  271. listLoading: false, // 列表加载loading
  272. searchForm: {
  273. billType: "",
  274. code: "",
  275. source: "",
  276. theTime: "",
  277. endTime: "",
  278. totalAmount: "",
  279. create: "",
  280. createTime: "",
  281. examineStatus: "",
  282. remark: "",
  283. },
  284. };
  285. },
  286. computed: { ...mapGetters(["name"]) },
  287. created() {
  288. this.getDataList();
  289. },
  290. methods: {
  291. //重置
  292. resetFn() {
  293. this.examineRemark = "";
  294. this.examineStatus = "";
  295. },
  296. //审核
  297. async btnOK() {
  298. await getFinanceOtherReceExamine({
  299. id: this.approvalId,
  300. examineRemark: this.examineRemark,
  301. examineStatus: this.examineStatus,
  302. });
  303. this.$emit("updateList");
  304. this.$parent.showPage = 1;
  305. this.$message.success("审核成功");
  306. },
  307. async getDataList() {
  308. const res = await getFinanceOtherReceDetail({ id: this.approvalId });
  309. console.log(res);
  310. this.searchForm = {
  311. billType: res.data.billType,
  312. code: res.data.code,
  313. source: res.data.source,
  314. theTime: res.data.theTime,
  315. endTime: res.data.endTime,
  316. totalAmount: res.data.totalAmount,
  317. create: res.data.create,
  318. createTime: res.data.createTime,
  319. examineStatus: res.data.examineStatus == "WAIT" ? "待审核" : "",
  320. remark: res.data.remark,
  321. };
  322. this.dataList = res.data.items;
  323. },
  324. goBack() {
  325. this.$parent.showPage = 1;
  326. },
  327. },
  328. };
  329. </script>
  330. <style></style>