单据优化

This commit is contained in:
季圣华
2021-05-31 01:09:38 +08:00
parent 5ffaf4ce0e
commit 416157d020
4 changed files with 49 additions and 8 deletions

View File

@@ -127,6 +127,7 @@
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin'
import { getMpListShort } from "@/utils/util"
import { getAction } from '@/api/manage'
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import JDate from '@/components/jeecg/JDate'
import Vue from 'vue'
@@ -227,7 +228,7 @@
}
this.personList.value = this.model.salesMan
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark',
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','debt','salesMan'))
});
// 加载子表数据
@@ -293,8 +294,28 @@
headerId: record.id,
mpList: getMpListShort(Vue.ls.get('materialPropertyList')) //扩展属性
}
this.requestSubTableData(this.url.detailList, params, this.materialTable);
this.requestSubTableDataEx(this.url.detailList, params, this.materialTable);
}
},
/** 查询某个tab的数据,给明细里面的价税合计赋值 */
requestSubTableDataEx(url, params, tab, success) {
tab.loading = true
getAction(url, params).then(res => {
if(res && res.code === 200){
let list = res.data.rows
let listEx = []
for(let j=0; j<list.length; j++){
let info = list[j];
info.taxMoney = 0
info.taxLastMoney = info.allPrice
listEx.push(info)
}
tab.dataSource = listEx
typeof success === 'function' ? success(res) : ''
}
}).finally(() => {
tab.loading = false
})
}
}
}