Commit 92d1a52e authored by xiejb's avatar xiejb

供应商 客户 商品 添加货主唯一值

parent a5b57acd
......@@ -104,6 +104,7 @@ export default {
this.postShow = val
if (val) {
this.postDataList = []
this.searchNum = '0'
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
this.checked = !this.customer.comGoodsId ? '' : this.customer.comGoodsId
// console.log(this.checked)
......@@ -121,7 +122,7 @@ export default {
methods: {
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
let titleStr = model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName
let titleStr = model.companyname + '/' + model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName
return titleStr
},
onSearch () {
......@@ -182,8 +183,10 @@ export default {
const removeItem = {
'beforeP': item.db_source,
'middleP': process.env.appRealDb,
'afterP': this.getSupplierArray(),
'saler': item.erp_user
'afterP': this.getSupplierArray(item.companynameId),
'saler': item.erp_user,
'companyname': item.companyname,
'companynameId': item.companynameId
}
companyList.push(removeItem)
})
......@@ -245,10 +248,12 @@ export default {
})
},
// 获取供应商数组ID
getSupplierArray () {
getSupplierArray (companynameId) {
const supplierList = []
this.supplier.forEach(item => {
if (companynameId === item.companynameId) {
supplierList.push(item.org)
}
})
return supplierList
},
......
......@@ -115,6 +115,7 @@ export default {
if (val) {
this.postDataList = []
this.checkedList = []
this.searchNum = '0'
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
this.customer.forEach((res)=>{
......@@ -135,7 +136,7 @@ export default {
methods: {
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
let titleStr = model.comPartyId + '/(' + model.partyOpcode + ')/' + model.partyName
let titleStr = model.companyname + '/' +model.comPartyId + '/(' + model.partyOpcode + ')/' + model.partyName
return titleStr
},
onSearch () {
......@@ -201,8 +202,10 @@ export default {
const removeItem = {
'beforeP': item.db_source,
'middleP': process.env.appRealDb,
'afterP': this.getSupplierArray(),
'saler': item.erp_user
'afterP': this.getSupplierArray(item.id),
'saler': item.erp_user,
'companyname': item.companyname,
'companynameId': item.id
}
companyList.push(removeItem)
})
......@@ -265,10 +268,12 @@ export default {
})
},
// 获取供应商数组ID
getSupplierArray () {
getSupplierArray (companynameId) {
const supplierList = []
this.supplier.forEach(item => {
if (item.companynameId === companynameId) {
supplierList.push(item.org)
}
})
return supplierList
},
......
......@@ -127,6 +127,7 @@ export default {
this.postDataList = []
this.checkedList = []
this.isAllChecked = false
this.searchNum = '0'
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
// console.log(this.checked)
......
......@@ -105,7 +105,7 @@ export default {
this.checkedList = []
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
console.log(this.consignor)
this.searchNum = '0'
this.customer.forEach((res)=>{
this.checkedList.push(res.org)
})
......@@ -124,7 +124,7 @@ export default {
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
// let titleStr = model.org + '/(' + model.partyOpcode + ')/' + model.partyName
return model.partyName
return model.companyname + '/' + model.partyName
},
onSearch () {
// if (!this.isJudgeStrNull(this.keywords)) {
......
......@@ -454,11 +454,11 @@ export default {
},
// 客户信息拼接
clientInfoStitching(model) {
return model.comPartyId + '/(' + model.partyOpcode + ')/' + model.partyName
return model.companyname + '/' + model.comPartyId + '/(' + model.partyOpcode + ')/' + model.partyName
},
// 供应商信息拼接
supplierInfoStitching(model) {
return model.partyName
return model.companyname + '/' +model.partyName
},
onQuickDateChoose(index, tag) {
console.log(index,tag)
......
......@@ -251,7 +251,7 @@ export default {
}
const model = {
'businessType': '',
'clientID': this.getClientValueArray(_this.moreSearchInfo.client), // 客户编码
'clientID': this.getClientValueArray(_this.moreSearchInfo.client, item.id), // 客户编码
'endDate': _this.moreSearchInfo.time.end, // 结束时间
'startDate': _this.moreSearchInfo.time.start, // 开始时间
'goodsCode': !_this.moreSearchInfo.goods.goodsOpcode ? '':_this.moreSearchInfo.goods.goodsOpcode, // 商品代码
......@@ -277,7 +277,7 @@ export default {
'sourceDb': !item.ownerid ? '':item.ownerid, // 数据来源
'sourceOrderNo': '', // 来源订单号(网上订单号)
'sourceSystem': '', // 订单来源 来源订单号和订单来源必须同时不为空
'supplierId': this.getSupplierValueArray(_this.moreSearchInfo.supplier) // 供应商(部门)编码
'supplierId': this.getSupplierValueArray(_this.moreSearchInfo.supplier,item.id) // 供应商(部门)编码
}
dataList.push(model)
})
......@@ -292,18 +292,26 @@ export default {
return []
},
// 返回客户数据数组
getClientValueArray (array) {
getClientValueArray (array,companynameId) {
const vaueArray = []
array.forEach(item => {
if (item.companynameId === companynameId) {
vaueArray.push(item.comPartyId)
}
})
return vaueArray
},
// 返回供应商数据数组
getSupplierValueArray (array) {
getSupplierValueArray (array,companynameId) {
const vaueArray = []
array.forEach(item => {
if (item.companynameId === companynameId) {
if (item.org === '5081' || item.org === '5082') {
vaueArray.push('508')
} else {
vaueArray.push(item.org)
}
}
})
return vaueArray
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment