给采购订单增加请购单的关联
This commit is contained in:
@@ -216,6 +216,7 @@
|
|||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ title: '关联请购单', dataIndex: 'linkApply',width:140},
|
||||||
{ title: '关联订单', dataIndex: 'linkNumber',width:140},
|
{ title: '关联订单', dataIndex: 'linkNumber',width:140},
|
||||||
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true},
|
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true},
|
||||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
||||||
|
|||||||
@@ -280,6 +280,11 @@
|
|||||||
{{model.number}}
|
{{model.number}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 6 }}" :wrapperCol="wrapperCol" label="关联请购单">
|
||||||
|
{{model.linkApply}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
|
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
|
||||||
{{model.linkNumber}}
|
{{model.linkNumber}}
|
||||||
|
|||||||
@@ -70,8 +70,10 @@
|
|||||||
<template v-if="!queryParam.purchaseStatus">
|
<template v-if="!queryParam.purchaseStatus">
|
||||||
<a-tag v-if="record.status === '0'" color="red">未审核</a-tag>
|
<a-tag v-if="record.status === '0'" color="red">未审核</a-tag>
|
||||||
<a-tag v-if="record.status === '1'" color="green">已审核</a-tag>
|
<a-tag v-if="record.status === '1'" color="green">已审核</a-tag>
|
||||||
|
<a-tag v-if="record.status === '2' && queryParam.subType === '请购单'" color="cyan">完成采购</a-tag>
|
||||||
<a-tag v-if="record.status === '2' && queryParam.subType === '采购订单'" color="cyan">完成采购</a-tag>
|
<a-tag v-if="record.status === '2' && queryParam.subType === '采购订单'" color="cyan">完成采购</a-tag>
|
||||||
<a-tag v-if="record.status === '2' && queryParam.subType === '销售订单'" color="cyan">完成销售</a-tag>
|
<a-tag v-if="record.status === '2' && queryParam.subType === '销售订单'" color="cyan">完成销售</a-tag>
|
||||||
|
<a-tag v-if="record.status === '3' && queryParam.subType === '请购单'" color="blue">部分采购</a-tag>
|
||||||
<a-tag v-if="record.status === '3' && queryParam.subType === '采购订单'" color="blue">部分采购</a-tag>
|
<a-tag v-if="record.status === '3' && queryParam.subType === '采购订单'" color="blue">部分采购</a-tag>
|
||||||
<a-tag v-if="record.status === '3' && queryParam.subType === '销售订单'" color="blue">部分销售</a-tag>
|
<a-tag v-if="record.status === '3' && queryParam.subType === '销售订单'" color="blue">部分销售</a-tag>
|
||||||
<a-tag v-if="record.status === '2' && (queryParam.subType === '采购'||queryParam.subType === '销售')" color="green">已审核</a-tag>
|
<a-tag v-if="record.status === '2' && (queryParam.subType === '采购'||queryParam.subType === '销售')" color="green">已审核</a-tag>
|
||||||
@@ -213,9 +215,9 @@
|
|||||||
this.queryParam.type = type
|
this.queryParam.type = type
|
||||||
this.queryParam.subType = subType
|
this.queryParam.subType = subType
|
||||||
this.queryParam.status = status
|
this.queryParam.status = status
|
||||||
this.columns[0].title = organType
|
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.initColumns(subType, organType)
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
purchaseShow(type, subType, organType, status, purchaseStatus) {
|
purchaseShow(type, subType, organType, status, purchaseStatus) {
|
||||||
@@ -225,11 +227,31 @@
|
|||||||
this.queryParam.subType = subType
|
this.queryParam.subType = subType
|
||||||
this.queryParam.status = status
|
this.queryParam.status = status
|
||||||
this.queryParam.purchaseStatus = purchaseStatus
|
this.queryParam.purchaseStatus = purchaseStatus
|
||||||
this.columns[0].title = organType
|
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.initColumns(subType, organType)
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
|
initColumns(subType, organType) {
|
||||||
|
for(let i=0; i<this.columns.length; i++) {
|
||||||
|
if (this.columns[i].dataIndex === 'organName') {
|
||||||
|
this.columns[i].title = organType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(subType === '请购单') {
|
||||||
|
for(let i=0; i<this.columns.length; i++){
|
||||||
|
if(this.columns[i].dataIndex === 'organName') {
|
||||||
|
this.columns.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(this.columns[i].dataIndex === 'totalPrice') {
|
||||||
|
this.columns.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(this.columns[i].dataIndex === 'totalTaxLastMoney') {
|
||||||
|
this.columns.splice(i, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
myHandleDetail(record) {
|
myHandleDetail(record) {
|
||||||
findBillDetailByNumber({ number: record.number }).then((res) => {
|
findBillDetailByNumber({ number: record.number }).then((res) => {
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
@@ -266,6 +288,7 @@
|
|||||||
this.discountMoney = record.discountMoney
|
this.discountMoney = record.discountMoney
|
||||||
this.deposit = record.changeAmount - record.finishDeposit
|
this.deposit = record.changeAmount - record.finishDeposit
|
||||||
this.remark = record.remark
|
this.remark = record.remark
|
||||||
|
this.initListColumns()
|
||||||
this.loadDetailData(1)
|
this.loadDetailData(1)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -278,6 +301,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
initListColumns() {
|
||||||
|
if(this.queryParam.subType === '请购单') {
|
||||||
|
for(let i=0; i<this.columnsDetail.length; i++){
|
||||||
|
if(this.columnsDetail[i].dataIndex === 'unitPrice') {
|
||||||
|
this.columnsDetail.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(this.columnsDetail[i].dataIndex === 'allPrice') {
|
||||||
|
this.columnsDetail.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(this.columnsDetail[i].dataIndex === 'taxRate') {
|
||||||
|
this.columnsDetail.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(this.columnsDetail[i].dataIndex === 'taxMoney') {
|
||||||
|
this.columnsDetail.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(this.columnsDetail[i].dataIndex === 'taxLastMoney') {
|
||||||
|
this.columnsDetail.splice(i, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//查询明细列表
|
//查询明细列表
|
||||||
loadDetailData(arg) {
|
loadDetailData(arg) {
|
||||||
//加载数据 若传入参数1则加载第一页的内容
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
|
|||||||
@@ -50,6 +50,13 @@
|
|||||||
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'number' ]" :readOnly="true"/>
|
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'number' ]" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联请购单" data-step="3" data-title="关联请购单"
|
||||||
|
data-intro="采购订单单据可以通过关联请购单来选择已录入的请购单,选择之后会自动加载请购单的内容,
|
||||||
|
提交之后原来的请购单会对应的改变单据状态。另外本系统支持分批多次关联">
|
||||||
|
<a-input-search placeholder="请选择关联请购单" v-decorator="[ 'linkApply' ]" @search="onSearchLinkApply" :readOnly="true"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单" data-step="3" data-title="关联订单"
|
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单" data-step="3" data-title="关联订单"
|
||||||
data-intro="采购订单单据可以通过关联订单来选择已录入的销售订单,选择之后会自动加载订单的内容,
|
data-intro="采购订单单据可以通过关联订单来选择已录入的销售订单,选择之后会自动加载订单的内容,
|
||||||
@@ -320,7 +327,7 @@
|
|||||||
}
|
}
|
||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkApply', 'linkNumber', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney','accountId','changeAmount'))
|
'discount','discountMoney','discountLastMoney','accountId','changeAmount'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
@@ -385,6 +392,10 @@
|
|||||||
this.$refs.linkBillList.purchaseShow('其它', '销售订单', '客户', "1,3","0,3")
|
this.$refs.linkBillList.purchaseShow('其它', '销售订单', '客户', "1,3","0,3")
|
||||||
this.$refs.linkBillList.title = "选择销售订单"
|
this.$refs.linkBillList.title = "选择销售订单"
|
||||||
},
|
},
|
||||||
|
onSearchLinkApply() {
|
||||||
|
this.$refs.linkBillList.purchaseShow('其它', '请购单', '客户', "1,3")
|
||||||
|
this.$refs.linkBillList.title = "选择请购单"
|
||||||
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
@@ -405,11 +416,20 @@
|
|||||||
}
|
}
|
||||||
info.linkId = info.id
|
info.linkId = info.id
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
if(linkNumber.indexOf('QGD')===-1) {
|
||||||
this.form.setFieldsValue({
|
this.$nextTick(() => {
|
||||||
'linkNumber': linkNumber
|
this.form.setFieldsValue({
|
||||||
|
'linkNumber': linkNumber
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
} else {
|
||||||
|
//关联请购单
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({
|
||||||
|
'linkApply': linkNumber
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
//给优惠后金额重新赋值
|
//给优惠后金额重新赋值
|
||||||
discountLastMoney = discountLastMoney?discountLastMoney:0
|
discountLastMoney = discountLastMoney?discountLastMoney:0
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user