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) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange'
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 {
},
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) => {
......
......@@ -117,7 +117,7 @@ export default {
handleInput(rowIdx, attr) {
const val = this.tableData[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]
},
handleInputBlur() {
......
......@@ -713,22 +713,22 @@ export default {
validateField(rowIndex, source, field, fieldConfig) {
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}`
// console.log(rowIndex, source, field, '0000000')
// console.log(rowIndex, source, field, fieldConfig, '0000000')
if (this.judgeDisable(rowIndex, source, fieldConfig)) {
return true
}
if (headObj?.editType === 'selectInput') {
if (fieldConfig?.editType === 'selectInput') {
const obj = this.tableList[rowIndex][source]
const selectVal = obj[headObj.editObj.selectField]
const inputVal = obj[headObj.editObj.inputField]
const selectVal = obj[fieldConfig.editObj.selectField]
const inputVal = obj[fieldConfig.editObj.inputField]
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
}
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
}
} else if (value === undefined || value === null || value === '') {
......@@ -736,11 +736,11 @@ export default {
return false
}
if (headObj?.editObj?.rule) {
let errorTxt = headObj.editObj.rule(value, rowIndex, source, headObj.editType == 'selectInput' ? headObj : field)
if (fieldConfig?.editObj?.rule) {
let errorTxt = fieldConfig.editObj.rule(value, rowIndex, source, fieldConfig.editType == 'selectInput' ? fieldConfig : field)
if (errorTxt) {
if (headObj.editType === 'selectInput') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.inputField}`, errorTxt)
if (fieldConfig.editType === 'selectInput') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.inputField}`, errorTxt)
} else {
this.$set(this.validationErrors, key, errorTxt)
}
......@@ -989,7 +989,7 @@ export default {
/**editable为false,平台方和备注不能编辑
*/
if (value.ORDER.editable == false) {
if (['ORDERplatformMerchantId', 'SUB_ORDERpartnerFeeCalculateCoefficient'].includes(source + fieldConfig.fieldCode)) {
if (['ORDERplatformMerchantId', 'ORDERcoverReceiverType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
}
}
......
......@@ -14,6 +14,7 @@
<script>
import AccountTmpl from "../accountTmplManage/components/AccountTmpl"
import { deepClone } from '@/common/util'
import { tmplCheckField } from '@api/accountManage'
export default {
name: 'TmplDrawer',
components: {
......@@ -43,8 +44,14 @@ export default {
this.$emit('handleClose')
},
handleConfirm() {
this.$emit('handleConfirm', {
const params = {
type: this.type,
fieldIds: deepClone(this.$refs.accountTmpl.getSelected())
}
tmplCheckField(params).then(res => {
this.$emit('handleConfirm', {
fieldIds: deepClone(this.$refs.accountTmpl.getSelected())
})
})
},
},
......
......@@ -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!