{"remainingRequest":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/admin.ws.baibaodun.com.cn/src/views/distribution/settlementBill/component/settleDialog.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/src/views/distribution/settlementBill/component/settleDialog.vue","mtime":1701741776312},{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":1701741929501},{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":1701741918737},{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":1701741928146}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { getSettleDocInfoApi, confirmSettleApi } from '@/api/distribution';\n\nexport default {\n props: ['showSettleDialog', 'checkList'],\n\n data() {\n return {\n form: {\n payWay: null\n },\n settleBillAttachmentsUrl: '',\n checkIds: [],\n settleBaseInfo: {}\n };\n },\n\n watch: {\n showSettleDialog(newVal) {\n if (!newVal) {\n this.checkIds = [];\n return;\n };\n\n this.checkList.length ? this.checkList.forEach(el => {\n this.checkIds.push(el.id);\n }) : null;\n this.getSettleInfo();\n }\n },\n\n methods: {\n getSettleInfo() {\n let params = {\n settleIdList: this.checkIds\n };\n\n getSettleDocInfoApi(params).then(res => {\n this.settleBaseInfo = res;\n }).catch(() => {});\n },\n\n onCancel() {\n this.$emit('closeSettleDialog')\n },\n\n confirmSettle() {\n let params = {\n settleIdList: this.checkIds,\n payWay: this.form.payWay\n };\n\n if (!params.payWay) {\n this.$message({\n message: '请选择支付方式',\n type: 'error',\n showClose: true\n });\n }\n\n confirmSettleApi(params).then(res => {\n this.$message({\n message: '结算成功',\n type: 'success',\n showClose: true\n });\n this.$emit('closeSettleDialog', 'update');\n }).catch(() => {});\n }\n }\n}\n",null]}