Commit fee9320e authored by xiejb's avatar xiejb

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

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