开票申请卡片批量粘贴编辑事件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 presetVar from '../presetVar'
import requestApi from '../requestApi'
/**
* pk_org申请组织,
* pk_customer客户,
@ -33,8 +34,12 @@ const headKeys = ['pk_org', 'pk_customer', 'gmf_zh', 'pk_customer_v','gmf_dz','g
* fphxz:发票行性质
* taxcode:税码
* 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) {
// 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)) {
hasChange = true;
}
// if (bodyKeys.includes(key)) {
// debugger;
// }
if (hasChange) {
// 取得表头数据
let headBodyData;
@ -64,10 +72,12 @@ export default function (moduleId, key, value, changedrows, index, record) {
checkrule: 'true',
templateid: this.props.meta.getMeta().pageid
}
// console.log('sendData = ', sendData);
requestApi.valueChange({
data: sendData,
success: (data) => {
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]);
if (moduleId == presetVar.bodyAreaId && key == 'zkje') {
// 折扣金额编辑后可能增加折扣行

View File

@ -3,11 +3,12 @@
* @PageInfo: 开票申请卡片批量粘贴编辑事件
* @Date: 2025-05-07 16:30:44
* @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 bodyAfterEvent from "./bodyAfterEvent";
import presetVar from "../presetVar";
import valueChange from "../common/valueChange";
const BATCHITEM = [
'spbm', // 税收分类编码
@ -83,7 +84,8 @@ export default async function batchEvents(param) {
}).then((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);
});
}