Commit 92d1a52e authored by xiejb's avatar xiejb

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

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