单据优化
This commit is contained in:
parent
5ffaf4ce0e
commit
416157d020
@ -125,6 +125,7 @@
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
import { getMpListShort, changeListFmtMinus} from "@/utils/util"
|
||||
import { getAction } from '@/api/manage'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
@ -222,7 +223,7 @@
|
||||
this.manyAccountBtnStatus = false
|
||||
}
|
||||
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'))
|
||||
});
|
||||
// 加载子表数据
|
||||
@ -288,8 +289,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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,12 +151,11 @@
|
||||
key:'rowIndex',
|
||||
width:40,
|
||||
align:"center",
|
||||
fixed: 'left',
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{title: '条码', dataIndex: 'mBarCode', width: 120,fixed: 'left'},
|
||||
{title: '条码', dataIndex: 'mBarCode', width: 120},
|
||||
{title: '名称', dataIndex: 'name', width: 120},
|
||||
{title: '规格', dataIndex: 'standard', width: 80},
|
||||
{title: '型号', dataIndex: 'model', width: 80},
|
||||
|
||||
@ -17,12 +17,12 @@
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="基本单位">
|
||||
<a-input placeholder="请输入基本单位" v-decorator.trim="[ 'basicUnit', validatorRules.basicUnit]" />
|
||||
<a-input placeholder="请输入基本单位(小单位)" v-decorator.trim="[ 'basicUnit', validatorRules.basicUnit]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-form :form="form">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="副单位">
|
||||
<a-input placeholder="请输入副单位" v-decorator.trim="[ 'otherUnit', validatorRules.otherUnit]" />
|
||||
<a-input placeholder="请输入副单位(大单位)" v-decorator.trim="[ 'otherUnit', validatorRules.otherUnit]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-form :form="form">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user