Commit 4bbac062 by chenwq

对账单下载,商户多选

1 parent b08de625
......@@ -127,6 +127,7 @@ export default {
},
selectableFn(row) {
this.$emit('changeSelect')
return !row.required
},
......
......@@ -3,7 +3,7 @@
<d2-container class="edit-page edit-tmpl">
<div style="padding: 20px">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<AccountTmpl v-if="showTmpl" ref="accountTmpl" slot="accountTmpl" :type="editData.type" :tmplSelectList="tmplSelectList"></AccountTmpl>
<AccountTmpl v-if="showTmpl" ref="accountTmpl" slot="accountTmpl" :type="editData.type" :tmplSelectList="tmplSelectList" @changeSelect="changeSelect"></AccountTmpl>
</glsx-combi-form>
<div class="footer">
<el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">提交</el-button>
......@@ -138,6 +138,10 @@ export default {
})
},
changeSelect() {
this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected())
},
handleConfirm() {
this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected())
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
......
......@@ -33,7 +33,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="对账商户:" prop="merchant">
<el-select v-model="infoForm.merchant" multiple :multiple-limit="1" filterable style="width:400px" @change="handleChangeMerchant">
<el-select v-model="infoForm.merchant" multiple :multiple-limit="multipleLimit" filterable style="width:400px" @change="handleChangeMerchant">
<el-option v-for="item in baseData.merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" />
</el-select>
</el-form-item>
......@@ -103,6 +103,7 @@ export default {
}
return {
loading: false,
multipleLimit: 10,
// 判断是否是模版模式
isTmpl: false,
localTmplList: deepClone(localTmplList),
......@@ -314,6 +315,8 @@ export default {
judgeTmpl() {
this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4');
this.merchantTypeStr = this.typeObj[this.infoForm.merchantType]
this.multipleLimit = (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') ? 1 : 10
this.infoForm.merchant = []
this.resetTmplData()
},
......@@ -489,18 +492,22 @@ export default {
return params
},
// 系统对账
// 系统对账 - 单个商户
handleSystemBill() {
this.$refs.accountForm.validate(valid => {
if (valid) {
var params = this.getParams()
params.orderCurrentPage = 1
params.orderPageSize = 10
console.log('params', params)
getBillTmplAdapter(params).then(res => {
console.log(res, 'res')
this.$emit('handleBill', { billTmplInfo: res })
})
if (this.infoForm.merchant.length == 1) {
var params = this.getParams()
params.orderCurrentPage = 1
params.orderPageSize = 10
console.log('params', params)
getBillTmplAdapter(params).then(res => {
console.log(res, 'res')
this.$emit('handleBill', { billTmplInfo: res })
})
} else {
this.$message.warning("仅支持单商户进行系统对账")
}
}
})
},
......@@ -508,26 +515,38 @@ export default {
handleAddConfirm() {
this.$refs.accountForm.validate(valid => {
if (valid) {
var params = this.getParams()
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async'
console.log('params', params)
const list = [
...this.dowloadList,
{
name: '对账单',
// uuid: JSON.parse(res).data,
// ifSuccess: false
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
if (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') {
if (this.infoForm.merchant.length == 1) {
this.dowloadApi()
} else {
this.$message.warning("仅支持单商户进行系统对账")
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
} else {
this.dowloadApi()
}
}
})
},
dowloadApi() {
var params = this.getParams()
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async'
console.log('params', params)
const list = [
...this.dowloadList,
{
name: '对账单',
// uuid: JSON.parse(res).data,
// ifSuccess: false
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
},
handleClose() {
this.$emit('accountClose', true)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!