Commit c56534ff by 前端

Merge branch 'SAAS+V4.54.0-0630' into 'develop'

上线合并

See merge request !460
2 parents 6cdcb696 1eb50f6c
...@@ -112,3 +112,9 @@ export function billCancelChange(data) { ...@@ -112,3 +112,9 @@ export function billCancelChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange' data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange'
return request(data, "post") return request(data, "post")
} }
// 对账单待取消内容确认
export function tmplCheckField(data) {
data.method = 'dj.api.reconciliation.template.checkField'
return request(data, "post")
}
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ export default {
}, },
selectableFn(row) { selectableFn(row) {
this.$emit('changeSelect')
return !row.required return !row.required
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<d2-container class="edit-page edit-tmpl"> <d2-container class="edit-page edit-tmpl">
<div style="padding: 20px"> <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"> <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> </glsx-combi-form>
<div class="footer"> <div class="footer">
<el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">提交</el-button> <el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">提交</el-button>
...@@ -138,6 +138,10 @@ export default { ...@@ -138,6 +138,10 @@ export default {
}) })
}, },
changeSelect() {
this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected())
},
handleConfirm() { handleConfirm() {
this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected()) this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected())
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
handleInput(rowIdx, attr) { handleInput(rowIdx, attr) {
const val = this.tableData[rowIdx][attr] const val = this.tableData[rowIdx][attr]
const oldVal = this.tableOldData[rowIdx][attr] const oldVal = this.tableOldData[rowIdx][attr]
this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 9, 2) this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 9, 2, '', '', 'priceReg_negative')
this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr] this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr]
}, },
handleInputBlur() { handleInputBlur() {
......
...@@ -713,22 +713,22 @@ export default { ...@@ -713,22 +713,22 @@ export default {
validateField(rowIndex, source, field, fieldConfig) { validateField(rowIndex, source, field, fieldConfig) {
const value = this.tableList[rowIndex][source][field] const value = this.tableList[rowIndex][source][field]
const headObj = this.tmplFieldsList.find(i => i.fieldCode == field) // const headObj = this.tmplFieldsList.find(i => i.fieldCode == field)
var key = `${rowIndex}_${source}_${field}` var key = `${rowIndex}_${source}_${field}`
// console.log(rowIndex, source, field, '0000000') // console.log(rowIndex, source, field, fieldConfig, '0000000')
if (this.judgeDisable(rowIndex, source, fieldConfig)) { if (this.judgeDisable(rowIndex, source, fieldConfig)) {
return true return true
} }
if (headObj?.editType === 'selectInput') { if (fieldConfig?.editType === 'selectInput') {
const obj = this.tableList[rowIndex][source] const obj = this.tableList[rowIndex][source]
const selectVal = obj[headObj.editObj.selectField] const selectVal = obj[fieldConfig.editObj.selectField]
const inputVal = obj[headObj.editObj.inputField] const inputVal = obj[fieldConfig.editObj.inputField]
if (selectVal === undefined || selectVal === null || selectVal === '') { if (selectVal === undefined || selectVal === null || selectVal === '') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.selectField}`, '此项为必填项') this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.selectField}`, '此项为必填项')
return false return false
} }
if (inputVal === undefined || inputVal === null || inputVal === '') { if (inputVal === undefined || inputVal === null || inputVal === '') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.inputField}`, '此项为必填项') this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.inputField}`, '此项为必填项')
return false return false
} }
} else if (value === undefined || value === null || value === '') { } else if (value === undefined || value === null || value === '') {
...@@ -736,11 +736,11 @@ export default { ...@@ -736,11 +736,11 @@ export default {
return false return false
} }
if (headObj?.editObj?.rule) { if (fieldConfig?.editObj?.rule) {
let errorTxt = headObj.editObj.rule(value, rowIndex, source, headObj.editType == 'selectInput' ? headObj : field) let errorTxt = fieldConfig.editObj.rule(value, rowIndex, source, fieldConfig.editType == 'selectInput' ? fieldConfig : field)
if (errorTxt) { if (errorTxt) {
if (headObj.editType === 'selectInput') { if (fieldConfig.editType === 'selectInput') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.inputField}`, errorTxt) this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.inputField}`, errorTxt)
} else { } else {
this.$set(this.validationErrors, key, errorTxt) this.$set(this.validationErrors, key, errorTxt)
} }
...@@ -989,7 +989,7 @@ export default { ...@@ -989,7 +989,7 @@ export default {
/**editable为false,平台方和备注不能编辑 /**editable为false,平台方和备注不能编辑
*/ */
if (value.ORDER.editable == false) { if (value.ORDER.editable == false) {
if (['ORDERplatformMerchantId', 'SUB_ORDERpartnerFeeCalculateCoefficient'].includes(source + fieldConfig.fieldCode)) { if (['ORDERplatformMerchantId', 'ORDERcoverReceiverType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true isDisable = true
} }
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<script> <script>
import AccountTmpl from "../accountTmplManage/components/AccountTmpl" import AccountTmpl from "../accountTmplManage/components/AccountTmpl"
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { tmplCheckField } from '@api/accountManage'
export default { export default {
name: 'TmplDrawer', name: 'TmplDrawer',
components: { components: {
...@@ -43,8 +44,14 @@ export default { ...@@ -43,8 +44,14 @@ export default {
this.$emit('handleClose') this.$emit('handleClose')
}, },
handleConfirm() { handleConfirm() {
this.$emit('handleConfirm', { const params = {
type: this.type,
fieldIds: deepClone(this.$refs.accountTmpl.getSelected()) fieldIds: deepClone(this.$refs.accountTmpl.getSelected())
}
tmplCheckField(params).then(res => {
this.$emit('handleConfirm', {
fieldIds: deepClone(this.$refs.accountTmpl.getSelected())
})
}) })
}, },
}, },
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="对账商户:" prop="merchant"> <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-option v-for="item in baseData.merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -103,6 +103,7 @@ export default { ...@@ -103,6 +103,7 @@ export default {
} }
return { return {
loading: false, loading: false,
multipleLimit: 10,
// 判断是否是模版模式 // 判断是否是模版模式
isTmpl: false, isTmpl: false,
localTmplList: deepClone(localTmplList), localTmplList: deepClone(localTmplList),
...@@ -314,6 +315,8 @@ export default { ...@@ -314,6 +315,8 @@ export default {
judgeTmpl() { judgeTmpl() {
this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4'); this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4');
this.merchantTypeStr = this.typeObj[this.infoForm.merchantType] this.merchantTypeStr = this.typeObj[this.infoForm.merchantType]
this.multipleLimit = (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') ? 1 : 10
this.infoForm.merchant = []
this.resetTmplData() this.resetTmplData()
}, },
...@@ -489,18 +492,22 @@ export default { ...@@ -489,18 +492,22 @@ export default {
return params return params
}, },
// 系统对账 // 系统对账 - 单个商户
handleSystemBill() { handleSystemBill() {
this.$refs.accountForm.validate(valid => { this.$refs.accountForm.validate(valid => {
if (valid) { if (valid) {
var params = this.getParams() if (this.infoForm.merchant.length == 1) {
params.orderCurrentPage = 1 var params = this.getParams()
params.orderPageSize = 10 params.orderCurrentPage = 1
console.log('params', params) params.orderPageSize = 10
getBillTmplAdapter(params).then(res => { console.log('params', params)
console.log(res, 'res') getBillTmplAdapter(params).then(res => {
this.$emit('handleBill', { billTmplInfo: res }) console.log(res, 'res')
}) this.$emit('handleBill', { billTmplInfo: res })
})
} else {
this.$message.warning("仅支持单商户进行系统对账")
}
} }
}) })
}, },
...@@ -508,26 +515,38 @@ export default { ...@@ -508,26 +515,38 @@ export default {
handleAddConfirm() { handleAddConfirm() {
this.$refs.accountForm.validate(valid => { this.$refs.accountForm.validate(valid => {
if (valid) { if (valid) {
var params = this.getParams() if (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') {
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async' if (this.infoForm.merchant.length == 1) {
console.log('params', params) this.dowloadApi()
const list = [ } else {
...this.dowloadList, this.$message.warning("仅支持单商户进行系统对账")
{
name: '对账单',
// uuid: JSON.parse(res).data,
// ifSuccess: false
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
} }
] } else {
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.dowloadApi()
this.handleClose() }
} }
}) })
}, },
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() { handleClose() {
this.$emit('accountClose', true) 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!