Commit fee9320e authored by xiejb's avatar xiejb

高级搜索 客户商品对接接口

parent fcdea7fd
......@@ -8,10 +8,12 @@ module.exports = merge(prodEnv, {
HOST_URL: '"http://222.66.127.246"',
PORT: '":8020"',
BASE_URL: '""',
appRealDb: '"app_test_shaphar"',
// 正式
// HOST_URL: '"http://mobileportal.shaphar.com"',
// PORT: '":8028"',
// BASE_URL: '"/basservice"'
// appRealDb: '"app_real_shaphar"',
//NEW 正式
// HOST_URL: '"https://mobileportal.shaphar.com"',
// PORT: '":8443"',
......
......@@ -3,12 +3,15 @@ module.exports = {
NODE_ENV: '"production"',
// 正式版
// HOST_URL: '"https://mobileportal.shaphar.com:8443/basservicenew"',
// appRealDb: '"app_real_shaphar"',
// 体验版
// HOST_URL: '"http://mobileportal.shaphar.com:8028/basservicenew"',
// 测试版
HOST_URL: '"http://222.66.127.246:8020"',
appRealDb: '"app_test_shaphar"',
// HOST_URL: '"http://192.168.1.139:8020"'
PORT: '""',
BASE_URL: '""'
BASE_URL: '""',
}
\ No newline at end of file
......@@ -93,3 +93,21 @@ export function getEmployeeOrgQueryList(params) {
loading: true
})
}
// 获取商品集合列表
export function getOrderGoodsSetList(params) {
return fetch({
url: '/CompanyOrderLife/queryGoods_PS',
method: 'post',
data: params,
loading: true
})
}
// 获取客户集合列表
export function getOrderCustomerSetList(params) {
return fetch({
url: '/CompanyOrderLife/queryCustomer_PS',
method: 'post',
data: params,
loading: true
})
}
......@@ -50,7 +50,7 @@
</template>
<script>
import {getGoodsList} from '../api/common'
import {getOrderGoodsSetList} from '../api/common'
import {getResListNum} from '../utils/common'
import SearchResult from './SearchResult'
import { Dialog } from 'vant'
......@@ -84,6 +84,15 @@ export default {
type: Boolean,
default: false
},
customer: {
type: Object,
default: () => {}
},
// 供应商
supplier: {
type: Object,
default: () => {}
},
// 货主
consignor: {
type: Array,
......@@ -167,21 +176,23 @@ export default {
},
getPostData() {
let _this = this
// let data = {
// 'goods': _this.keywords,
// 'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId,
// 'saler': this.linkInfo.sysUserId,
// 'start': _this.currentPage,
// 'length': _this.pageSize
// }
const companyList = []
_this.consignor.forEach(item => {
const removeItem = {
'beforeP': 'erp_test_shaphar',
'middleP': process.env.appRealDb,
'afterP': '200',
'saler': '22998'
}
companyList.push(removeItem)
})
let data = {
'goods': _this.keywords,
'dbName': 'erp_test_shaphar-app_test_shaphar-200',
'saler': '22998',
'list': companyList,
'start': _this.currentPage,
'length': _this.pageSize
}
getGoodsList(data).then(rt => {
getOrderGoodsSetList(data).then(rt => {
if (_this.currentPage === 1) {
_this.searchNum = getResListNum(rt.msg)
this.postDataList = []
......
......@@ -50,7 +50,7 @@
</template>
<script>
import {getCustomerList} from '../api/common'
import {getOrderCustomerSetList} from '../api/common'
import {getResListNum} from '../utils/common'
import SearchResult from './SearchResult'
import { Dialog } from 'vant'
......@@ -84,6 +84,11 @@ export default {
type: Boolean,
default: false
},
// 供应商
supplier: {
type: Object,
default: () => {}
},
customer: {
type: Object,
default: () => {}
......@@ -180,21 +185,23 @@ export default {
},
getPostData() {
let _this = this
// let data = {
// 'customer':_this.keywords,
// 'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId,
// 'saler': this.linkInfo.sysUserId,
// 'start': _this.currentPage,
// 'length': _this.pageSize
// }
const companyList = []
_this.consignor.forEach(item => {
const removeItem = {
'beforeP': 'erp_test_shaphar',
'middleP': process.env.appRealDb,
'afterP': '508',
'saler': '23528'
}
companyList.push(removeItem)
})
let data = {
'customer':_this.keywords,
'dbName': 'erp_test_shaphar-app_test_shaphar-508',
'saler': '23528',
'customer': _this.keywords,
'list': companyList,
'start': _this.currentPage,
'length': _this.pageSize
}
getCustomerList(data).then(rt => {
getOrderCustomerSetList(data).then(rt => {
if (rt.code === '1') {
if (_this.currentPage === 1) {
_this.searchNum = getResListNum(rt.msg)
......
......@@ -136,7 +136,7 @@ export default {
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
// let titleStr = model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName
return model.companyname
return model.companyname + '/(' + model.erp_userid[0] + ')'
},
onSearch () {
// if (!this.isJudgeStrNull(this.keywords)) {
......
......@@ -101,8 +101,6 @@ export default {
this.postDataList = []
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
this.checked = !this.customer.org ? '' : this.customer.org
console.log(this.checked)
console.log(this.consignor)
this.currentPage = 1
this.onLoad()
}
......
......@@ -97,6 +97,7 @@
v-model="moreSearchDialog.goodsShow"
:customer="!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
:consignor="moreSearchInfo.consignor"
:supplier="moreSearchInfo.supplier"
@cancleclick="showPost"
@confirmclick="postConfirm"
></search-goods>
......@@ -105,6 +106,7 @@
v-model="moreSearchDialog.clientShow"
:customer="!moreSearchInfo.client ? {}:moreSearchInfo.client"
:consignor="moreSearchInfo.consignor"
:supplier="moreSearchInfo.supplier"
:chinfo="chinfo"
@cancleclick="showPost"
@confirmclick="postConfirm"
......@@ -218,7 +220,7 @@ export default {
},
// 货主与供应商是否选择
isSelectConsignorSupplier () {
if (this.moreSearchInfo.consignor.length === 0 || this.moreSearchInfo.supplier === '' || this.moreSearchInfo.supplier === null || this.moreSearchInfo.supplier === undefined) {
if (this.moreSearchInfo.consignor.length === 0 || this.moreSearchInfo.supplier.org === {} || this.moreSearchInfo.supplier.org === null || this.moreSearchInfo.supplier.org === undefined) {
return false
}
return true
......@@ -237,7 +239,7 @@ export default {
type: Object,
default: () => {
return {
supplier: '', // 供应商
supplier: {}, // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
......@@ -268,7 +270,7 @@ export default {
this.$toast('请先选择货主!')
return
}
if (this.moreSearchInfo.supplier === '' || this.moreSearchInfo.supplier === null || this.moreSearchInfo.supplier === undefined) {
if (this.moreSearchInfo.supplier.org === '' || this.moreSearchInfo.supplier.org === null || this.moreSearchInfo.supplier.org === undefined) {
this.$toast('请先供应商!')
return
}
......@@ -277,7 +279,7 @@ export default {
},
onCleanClick() {
this.moreSearchInfo = {
supplier: '', // 供应商
supplier: {}, // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
......@@ -300,7 +302,7 @@ export default {
return
}
if (type !== 'supplier') {
if (this.moreSearchInfo.supplier === '' || this.moreSearchInfo.supplier === null || this.moreSearchInfo.supplier === undefined) {
if (this.moreSearchInfo.supplier.org === '' || this.moreSearchInfo.supplier.org === null || this.moreSearchInfo.supplier.org === undefined) {
this.$toast('请先供应商!')
return
}
......@@ -335,7 +337,7 @@ export default {
this.moreSearchInfo.goods = data.value
break;
case data.page === 'consignor':
this.moreSearchInfo.supplier = ''
this.moreSearchInfo.supplier = {}
this.moreSearchInfo.goods = ''
this.moreSearchInfo.client = ''
this.moreSearchInfo.consignor = data.value
......
......@@ -52,7 +52,7 @@ export default {
moreSearchShow: false,
activeTab: 'home',
moreSearchInfo: {
supplier: '', // 供应商
supplier: {}, // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
......
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