consumptionDetails.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <template>
  2. <!-- 商品退货管理————待确认 -->
  3. <div>
  4. <div class="common-card">
  5. <h3>基本信息</h3>
  6. <el-form
  7. :model="listForm"
  8. ref="listform"
  9. label-width="180px"
  10. class="grid-form-class"
  11. >
  12. <div class="form-body">
  13. <div class="flex-css">
  14. <el-form-item label="对账单号" prop="stmtNo">
  15. <div class="content">
  16. {{ listForm.stmtNo }}
  17. </div>
  18. </el-form-item>
  19. <el-form-item label="客户名称" prop="branchName">
  20. <div class="content">
  21. {{ listForm.branchName }}
  22. </div>
  23. </el-form-item>
  24. <el-form-item label="对账类型" prop="isFas">
  25. <div class="content">
  26. {{ listForm.isFas }}
  27. </div>
  28. </el-form-item>
  29. </div>
  30. <div class="flex-css">
  31. <el-form-item label="对账周期" prop="stmtPrd">
  32. <div class="content">
  33. {{ listForm.stmtPrd }}
  34. </div>
  35. </el-form-item>
  36. <el-form-item label="对账金额" prop="amt">
  37. <div class="content">
  38. {{ listForm.amt }}
  39. </div>
  40. </el-form-item>
  41. <el-form-item label="状态" prop="stas">
  42. <div class="content">
  43. {{ listForm.stas }}
  44. </div>
  45. </el-form-item>
  46. </div>
  47. </div>
  48. </el-form>
  49. </div>
  50. <div class="common-card">
  51. <h3>发票信息</h3>
  52. <el-form
  53. :model="listForm"
  54. ref="listform"
  55. label-width="180px"
  56. class="grid-form-class"
  57. >
  58. <div class="form-body">
  59. <div class="flex-css">
  60. <el-form-item label="开票名称" prop="invoName">
  61. <div class="content">
  62. {{ listForm.invoName }}
  63. </div>
  64. </el-form-item>
  65. <el-form-item label="发票号码" prop="invoNo" >
  66. <div class="content">
  67. {{ listForm.invoNo }}
  68. </div>
  69. </el-form-item>
  70. <el-form-item label="开票日期" prop="invoDate">
  71. <div class="content">
  72. {{ listForm.invoDate }}
  73. </div>
  74. </el-form-item>
  75. </div>
  76. <div class="flex-css">
  77. <el-form-item label="开票金额" prop="invoAmt">
  78. <div class="content">
  79. {{ listForm.invoAmt }}
  80. </div>
  81. </el-form-item>
  82. <el-form-item label="发票文件" prop="invoFile" >
  83. <yl-upload :fileId="listForm.invoFile" :fileStas="listForm.stas" readonly> </yl-upload>
  84. </el-form-item>
  85. <el-form-item
  86. label="核验文件"
  87. prop="invoChkFile"
  88. >
  89. <yl-upload :fileId="listForm.invoChkFile" :fileStas="listForm.stas" readonly> </yl-upload>
  90. </el-form-item>
  91. </div>
  92. </div>
  93. </el-form>
  94. </div>
  95. <div class="common-card">
  96. <h3>付款信息</h3>
  97. <el-form
  98. :model="listForm"
  99. ref="listform"
  100. label-width="180px"
  101. class="grid-form-class"
  102. >
  103. <div class="form-body">
  104. <div class="flex-css">
  105. <el-form-item label="供应商" prop="splerName">
  106. <div class="content">
  107. {{ this.$store.state.user.username }}
  108. </div>
  109. </el-form-item>
  110. <el-form-item label="账户名称" prop="accName">
  111. <div class="content">
  112. {{ listForm.accName }}
  113. </div>
  114. </el-form-item>
  115. <el-form-item label="账号" prop="accNo">
  116. <div class="content">
  117. {{ listForm.accNo }}
  118. </div>
  119. </el-form-item>
  120. </div>
  121. <div class="flex-css">
  122. <el-form-item label="付款日期" prop="payDate">
  123. <div class="content">
  124. {{ listForm.payDate }}
  125. </div>
  126. </el-form-item>
  127. <el-form-item label="付款金额" prop="payAmt">
  128. <div class="content">
  129. {{ listForm.payAmt }}
  130. </div>
  131. </el-form-item>
  132. <el-form-item label="附件" prop="payFile">
  133. <yl-upload :fileId="listForm.payFile" :fileStas="listForm.stas" readonly> </yl-upload>
  134. </el-form-item>
  135. </div>
  136. </div>
  137. </el-form>
  138. </div>
  139. <div class="foot-button">
  140. <el-button type="info" @click="handleBack">返 回</el-button>
  141. </div>
  142. </div>
  143. </template>
  144. <script>
  145. import ylStep from "@/components/yl-step";
  146. import ylUpload from "@/components/yl-upload-files";
  147. import { selectSetlStmtDetlD } from "@/api/procurement-settlement/index";
  148. export default {
  149. components: {
  150. ylStep,
  151. ylUpload,
  152. },
  153. data() {
  154. return {
  155. listForm: {
  156. stmtNo: "",
  157. branchName: "",
  158. isFas: "",
  159. amt: "",
  160. stmtPrd: "",
  161. stas: "",
  162. invoFile: "",
  163. invoChkFile: "",
  164. invoName: "",
  165. invoNo: "",
  166. invoDate: "",
  167. invoAmt: "",
  168. splerName: "",
  169. accName: "",
  170. accNo: "",
  171. payDate: "",
  172. payAmt: "",
  173. payFile: "",
  174. },
  175. stasOptions: [
  176. { value: "C", lable: "未付款" },
  177. { value: "Y", lable: "已付款" },
  178. ],
  179. isFasOptions: [
  180. { value: "0", lable: "非集采" },
  181. { value: "1", lable: "集采" },
  182. ],
  183. };
  184. },
  185. created() {
  186. this.listForm.stmtNo = this.$route.query.stmtNo;
  187. this.listForm.branchName = this.$route.query.branchName;
  188. this.listForm.amt = this.$route.query.amt;
  189. this.listForm.stmtPrd = this.$route.query.stmtPrd;
  190. this.listForm.invoFile = this.$route.query.invoFile;
  191. this.listForm.invoChkFile = this.$route.query.invoChkFile;
  192. this.listForm.invoName = this.$route.query.invoName;
  193. this.listForm.invoNo = this.$route.query.invoNo;
  194. this.listForm.invoAmt = this.$route.query.invoAmt;
  195. this.listForm.invoDate = this.$route.query.invoDate;
  196. this.stasOptions.forEach((i) => {
  197. if (i.value == this.$route.query.stas) {
  198. this.listForm.stas = i.lable;
  199. }
  200. });
  201. this.isFasOptions.forEach((i) => {
  202. if (i.value == this.$route.query.isFas) {
  203. this.listForm.isFas = i.lable;
  204. }
  205. });
  206. this.listForm.splerName = this.$route.query.splerName;
  207. this.listForm.accName = this.$route.query.accName;
  208. this.listForm.accNo = this.$route.query.accNo;
  209. this.listForm.payDate = this.$route.query.payDate;
  210. this.listForm.payAmt = this.$route.query.payAmt;
  211. this.listForm.payFile = this.$route.query.payFile;
  212. // console.log(this.listForm.payFile,"this.listForm.payFile");
  213. },
  214. mounted() {
  215. this.getData();
  216. },
  217. methods: {
  218. //设置表格第一行的颜色
  219. // getRowClass({ row, column, rowIndex, columnIndex }) {
  220. // return "background:#e2e1e1;text-align:center";
  221. // },
  222. arraySpanMethod() {
  223. //table合计行合并单元格
  224. setTimeout(() => {
  225. if (this.$refs.table.$el) {
  226. let current = this.$refs.table.$el
  227. .querySelector(".el-table__footer-wrapper")
  228. .querySelector(".el-table__footer");
  229. let cell = current.rows[0].cells;
  230. cell[1].colSpan = "13";
  231. }
  232. }, 50);
  233. },
  234. getSummaries(param) {
  235. //table自定义合计行方法summary-method
  236. const { columns, data } = param;
  237. const sums = [];
  238. columns.forEach((column, index) => {
  239. if (index === 0) {
  240. sums[index] = "合计";
  241. return;
  242. }
  243. if (index === 7) {
  244. const values = data.map((item) => Number(item[column.property]));
  245. sums[1] = values.reduce((prev, curr) => {
  246. return prev + curr;
  247. }, 0);
  248. sums[1] = sums[1].toFixed(2) + "元";
  249. }
  250. });
  251. return sums;
  252. },
  253. getUpload(id) {
  254. this.listForm.invoFile = id;
  255. if (id) {
  256. this.$refs.listform.clearValidate("invoFile");
  257. // console.log(this.listForm.invoFile, "this.listForm.invoFile");
  258. } else {
  259. this.$refs.listform.validateField("invoFile");
  260. }
  261. },
  262. getUpload1(id) {
  263. this.listForm.invoChkFile = id;
  264. if (id) {
  265. this.$refs.listform.clearValidate("invoChkFile");
  266. // console.log(this.listForm.invoChkFile, "this.listForm.invoChkFile");
  267. } else {
  268. this.$refs.listform.validateField("invoChkFile");
  269. }
  270. },
  271. getData() {
  272. this.listLoading = true;
  273. selectSetlStmtDetlD({ stmtNo: this.$route.query.stmtNo })
  274. .then((res) => {
  275. this.list = res.data;
  276. this.total = this.$route.query.detlCnt;
  277. this.listLoading = false;
  278. })
  279. .catch((err) => {
  280. this.listLoading = false;
  281. });
  282. },
  283. // 确认
  284. // handleSubmit() {
  285. // this.$refs["listform"].validate((valid) => {
  286. // if (valid) {
  287. // this.$confirm("确认提交", "提示", {
  288. // confirmButtonText: "确定",
  289. // cancelButtonText: "取消",
  290. // type: "warning",
  291. // })
  292. // .then(() => {
  293. // this.submitLoad = true;
  294. // this.listForm.stas = "D";
  295. // insertSetlInvo(this.listForm)
  296. // .then((response) => {
  297. // this.$message({
  298. // message: "提交成功",
  299. // type: "success",
  300. // });
  301. // this.submitLoad = false;
  302. // this.$router.push({
  303. // name: "InvoiceManage",
  304. // query: {
  305. // spdId: this.$route.query.spdId,
  306. // activeNameTab: this.$route.query.activeNameTab,
  307. // },
  308. // });
  309. // })
  310. // .catch(() => {
  311. // this.submitLoad = false;
  312. // });
  313. // })
  314. // .catch(() => {});
  315. // }
  316. // });
  317. // },
  318. // 返回
  319. handleBack() {
  320. this.$router.push({
  321. name: "PaymentStatus",
  322. query: {
  323. spdId: this.$route.query.spdId,
  324. activeNameTab: this.$route.query.activeNameTab,
  325. },
  326. });
  327. },
  328. },
  329. };
  330. </script>
  331. <style lang="scss" scoped>
  332. #printMe {
  333. ::v-deep .print-table {
  334. border: 1px solid #999;
  335. td,
  336. th {
  337. border-right: 1px solid #999;
  338. border-bottom: 1px solid #999;
  339. }
  340. }
  341. ::v-deep .price-css {
  342. margin-left: 94%;
  343. }
  344. }
  345. </style>