开票申请卡片批量粘贴编辑事件2

This commit is contained in:
mzr 2025-05-08 15:56:03 +08:00
parent 6118908f94
commit b63550c178
2 changed files with 21 additions and 9 deletions

View File

@ -2,6 +2,7 @@
import {get} from 'lodash' import {get} from 'lodash'
import presetVar from '../presetVar' import presetVar from '../presetVar'
import requestApi from '../requestApi' import requestApi from '../requestApi'
/** /**
* pk_org申请组织, * pk_org申请组织,
* pk_customer客户, * pk_customer客户,
@ -33,8 +34,12 @@ const headKeys = ['pk_org', 'pk_customer', 'gmf_zh', 'pk_customer_v','gmf_dz','g
* fphxz:发票行性质 * fphxz:发票行性质
* taxcode:税码 * taxcode:税码
* spbm:税收分类编码 * spbm:税收分类编码
* sl:税率
* xmjshj:价税合计
* def1:合同销售订单编号
*/ */
const bodyKeys = ['xmdj', 'sl', 'xmje', 'se', 'xmsl', 'xmjshj', 'pk_materiel', 'zkje', 'fphxz', 'taxcode', 'spbm']; const bodyKeys = ['xmdj', 'sl', 'xmje', 'se', 'xmsl', 'xmjshj', 'pk_materiel',
'zkje', 'fphxz', 'taxcode', 'spbm', 'sl', 'xmjshj', 'def1'];
export default function (moduleId, key, value, changedrows, index, record) { export default function (moduleId, key, value, changedrows, index, record) {
// console.log('valueChange', moduleId, key, value, changedrows, index); // console.log('valueChange', moduleId, key, value, changedrows, index);
@ -43,6 +48,9 @@ export default function (moduleId, key, value, changedrows, index, record) {
(moduleId == presetVar.bodyAreaId && bodyKeys.indexOf(key) > -1)) { (moduleId == presetVar.bodyAreaId && bodyKeys.indexOf(key) > -1)) {
hasChange = true; hasChange = true;
} }
// if (bodyKeys.includes(key)) {
// debugger;
// }
if (hasChange) { if (hasChange) {
// 取得表头数据 // 取得表头数据
let headBodyData; let headBodyData;
@ -64,10 +72,12 @@ export default function (moduleId, key, value, changedrows, index, record) {
checkrule: 'true', checkrule: 'true',
templateid: this.props.meta.getMeta().pageid templateid: this.props.meta.getMeta().pageid
} }
// console.log('sendData = ', sendData);
requestApi.valueChange({ requestApi.valueChange({
data: sendData, data: sendData,
success: (data) => { success: (data) => {
data.head && data.head[presetVar.formAreaId] && this.props.form.setAllFormValue(data.head); data.head && data.head[presetVar.formAreaId] && this.props.form.setAllFormValue(data.head);
// console.log('data.body = ', data.body);
data.body && data.body[presetVar.bodyAreaId] && this.props.cardTable.updateDataByRowId(presetVar.bodyAreaId, data.body[presetVar.bodyAreaId]); data.body && data.body[presetVar.bodyAreaId] && this.props.cardTable.updateDataByRowId(presetVar.bodyAreaId, data.body[presetVar.bodyAreaId]);
if (moduleId == presetVar.bodyAreaId && key == 'zkje') { if (moduleId == presetVar.bodyAreaId && key == 'zkje') {
// 折扣金额编辑后可能增加折扣行 // 折扣金额编辑后可能增加折扣行

View File

@ -3,11 +3,12 @@
* @PageInfo: 开票申请卡片批量粘贴编辑事件 * @PageInfo: 开票申请卡片批量粘贴编辑事件
* @Date: 2025-05-07 16:30:44 * @Date: 2025-05-07 16:30:44
* @Last Modified by: mzr * @Last Modified by: mzr
* @Last Modified time: 2025-05-07 16:30:44 * @Last Modified time: 2025-05-08 15:50:44
*/ */
import {cloneDeep} from "lodash"; import {cloneDeep} from "lodash";
import bodyAfterEvent from "./bodyAfterEvent"; import presetVar from "../presetVar";
import valueChange from "../common/valueChange";
const BATCHITEM = [ const BATCHITEM = [
'spbm', // 税收分类编码 'spbm', // 税收分类编码
@ -83,7 +84,8 @@ export default async function batchEvents(param) {
}).then((res) => { }).then((res) => {
let {props, changedrows, indexs, key} = res let {props, changedrows, indexs, key} = res
//执行业务的批量编辑后事件 //执行业务的批量编辑后事件
bodyAfterEvent.call(self, areaCode, attrcode, newValue, changedrows); // bodyAfterEvent.call(self, presetVar.bodyAreaId, attrcode, newValue, changedrows, indexs);
valueChange.call(self, presetVar.bodyAreaId, attrcode, null, changedrows, indexs, null);
}); });
} }