Commit 38e0321c authored by 琉璃丶c's avatar 琉璃丶c

Merge remote-tracking branch 'origin/master'

parents a7e84d6c 42eddb45
...@@ -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
...@@ -74,6 +74,7 @@ export function getGoodsSetList(params) { ...@@ -74,6 +74,7 @@ export function getGoodsSetList(params) {
loading: true loading: true
}) })
} }
// ====================高级搜索====================
// 获取货主列表 // 获取货主列表
export function getConsignorSetList(params) { export function getConsignorSetList(params) {
return fetch({ return fetch({
...@@ -83,3 +84,30 @@ export function getConsignorSetList(params) { ...@@ -83,3 +84,30 @@ export function getConsignorSetList(params) {
loading: true loading: true
}) })
} }
// 获取供应商
export function getEmployeeOrgQueryList(params) {
return fetch({
url: '/CompanyOrderLife/checkCompanyNum',
method: 'post',
data: 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 @@ ...@@ -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'
...@@ -87,6 +87,16 @@ export default { ...@@ -87,6 +87,16 @@ export default {
customer: { customer: {
type: Object, type: Object,
default: () => {} default: () => {}
},
// 供应商
supplier: {
type: Object,
default: () => {}
},
// 货主
consignor: {
type: Array,
default: () => []
} }
}, },
watch: { watch: {
...@@ -96,7 +106,7 @@ export default { ...@@ -96,7 +106,7 @@ 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.comGoodsId ? '' : this.customer.comGoodsId this.checked = !this.customer.comGoodsId ? '' : this.customer.comGoodsId
console.log(this.checked) // console.log(this.checked)
this.currentPage = 1 this.currentPage = 1
this.onLoad() this.onLoad()
} }
...@@ -166,14 +176,23 @@ export default { ...@@ -166,14 +176,23 @@ export default {
}, },
getPostData() { getPostData() {
let _this = this let _this = this
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 = { let data = {
'goods': _this.keywords, 'goods': _this.keywords,
'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId, 'list': companyList,
'saler': this.linkInfo.sysUserId,
'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,10 +84,20 @@ export default { ...@@ -84,10 +84,20 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
// 供应商
supplier: {
type: Object,
default: () => {}
},
customer: { customer: {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
// 货主
consignor: {
type: Array,
default: () => []
},
chinfo: { chinfo: {
type: Object, type: Object,
default: ()=> { default: ()=> {
...@@ -105,7 +115,7 @@ export default { ...@@ -105,7 +115,7 @@ 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.comPartyId ? '' : this.customer.comPartyId this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
console.log(this.checked) // console.log(this.checked)
this.currentPage = 1 this.currentPage = 1
this.onLoad() this.onLoad()
} }
...@@ -175,14 +185,23 @@ export default { ...@@ -175,14 +185,23 @@ export default {
}, },
getPostData() { getPostData() {
let _this = this let _this = this
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 = { let data = {
'customer':_this.keywords, 'customer': _this.keywords,
'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId, 'list': companyList,
'saler': this.linkInfo.sysUserId,
'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)) {
...@@ -199,15 +199,15 @@ export default { ...@@ -199,15 +199,15 @@ export default {
getPostData() { getPostData() {
let _this = this let _this = this
let data = { let data = {
'attr': { 'attr': {
'empid': '199476' 'empid': this.linkInfo.userId
}, },
'filters': [], 'filters': [],
'logic': 'or', 'logic': 'or',
'sort': 'desc', 'sort': 'desc',
'orderby': 'createon', 'orderby': 'createon',
'pageNum': _this.currentPage, 'pageNum': _this.currentPage,
'pageSize': _this.pageSize 'pageSize': _this.pageSize
} }
getConsignorSetList(data).then(rt => { getConsignorSetList(data).then(rt => {
if (rt.code === 200) { if (rt.code === 200) {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<van-cell :title="titleInitial(item)" clickable @click="itemClick(item,index)" v-for="(item,index) in postDataList" <van-cell :title="titleInitial(item)" clickable @click="itemClick(item,index)" v-for="(item,index) in postDataList"
:key="index"> :key="index">
<template #right-icon> <template #right-icon>
<van-radio :name="item.comPartyId" /> <van-radio :name="item.org" />
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</template> </template>
<script> <script>
import {getCgSupplyList} from '@/api/common' import {getEmployeeOrgQueryList} 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'
...@@ -100,8 +100,7 @@ export default { ...@@ -100,8 +100,7 @@ export default {
if (val) { if (val) {
this.postDataList = [] this.postDataList = []
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.org ? '' : this.customer.org
console.log(this.checked)
this.currentPage = 1 this.currentPage = 1
this.onLoad() this.onLoad()
} }
...@@ -116,8 +115,8 @@ export default { ...@@ -116,8 +115,8 @@ export default {
methods: { methods: {
/// 标题拼接 <!-- 药厂码/SAP码)名称 --> /// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) { titleInitial(model) {
let titleStr = model.comPartyId + '/(' + model.partyOpcode + ')/' + model.partyName // let titleStr = model.org + '/(' + model.partyOpcode + ')/' + model.partyName
return titleStr return model.partyName
}, },
onSearch () { onSearch () {
// if (!this.isJudgeStrNull(this.keywords)) { // if (!this.isJudgeStrNull(this.keywords)) {
...@@ -139,7 +138,7 @@ export default { ...@@ -139,7 +138,7 @@ export default {
this.$emit('cancleclick') this.$emit('cancleclick')
}, },
onConfirmClick() { onConfirmClick() {
if (!this.choosedPost.comPartyId) { if (!this.choosedPost.org) {
Dialog.alert({ Dialog.alert({
title: '温馨提示', title: '温馨提示',
message: '请选择选项!' message: '请选择选项!'
...@@ -154,7 +153,7 @@ export default { ...@@ -154,7 +153,7 @@ export default {
}) })
}, },
itemClick(item, index) { itemClick(item, index) {
this.checked = item.comPartyId this.checked = item.org
this.choosedPost = item this.choosedPost = item
}, },
onRefresh() { onRefresh() {
...@@ -171,29 +170,47 @@ export default { ...@@ -171,29 +170,47 @@ export default {
}, },
getPostData() { getPostData() {
let _this = this let _this = this
const companyList = []
_this.consignor.forEach(item => {
const removeItem = {
'length': '100',
'attr': {
'empid': this.linkInfo.userId + ',1',
'userid': '23528',
'sysname': item.sysname,
'companyname': item.companyname
},
'dbName': '',
'start': '1'
}
companyList.push(removeItem)
})
let data = { let data = {
// 'dbSource':this.linkInfo.sysDbSource, 'list': [
'dbSource':'erp_test_shaphar', {
'pageNum': _this.currentPage, 'length': '100',
'pageSize': _this.pageSize, 'attr': {
// 'erpUserId':this.linkInfo.sysUserId, 'empid': '199476,1',
'erpUserId': '23528', 'userid': '23528',
'invOwner':'200', 'sysname': 'ERP',
'goodsId':'', 'companyname': '上药控股有限公司'
'supply':_this.keywords },
'dbName': '',
'start': '1'
}
]
} }
getCgSupplyList(data).then(rt => { getEmployeeOrgQueryList(data).then(rt => {
if (rt.code === 200) {
if (rt.code === '00000') {
if (_this.currentPage === 1) { if (_this.currentPage === 1) {
_this.searchNum = rt.entity.total + '' // _this.searchNum = rt.entity.total + ''
this.postDataList = [] this.postDataList = []
} }
if (this.isRefreshing) { if (this.isRefreshing) {
this.postDataList = rt.entity.supplyList this.postDataList = rt.data
} }
else if (!!rt.entity.supplyList || rt.entity.supplyList.length > 0) { else if (!!rt.data || rt.data.length > 0) {
this.postDataList = this.postDataList.concat(rt.entity.supplyList) this.postDataList = this.postDataList.concat(rt.data)
} }
// _this.postDataListSetAction(rt.data) // _this.postDataListSetAction(rt.data)
// 重置刷新提示 // 重置刷新提示
...@@ -201,12 +218,12 @@ export default { ...@@ -201,12 +218,12 @@ export default {
// 重置加载更多提示 // 重置加载更多提示
_this.loading = false _this.loading = false
// 若当前加载的页数没有满足每页的数量代表完全加载 // 若当前加载的页数没有满足每页的数量代表完全加载
if (rt.entity.supplyList.length < 10) { // if (rt.data.length < 10) {
_this.finished = true _this.finished = true
} else { // } else {
// 加载成功后下一页自增1 // 加载成功后下一页自增1
_this.currentPage++ _this.currentPage++
} // }
} else { } else {
_this.$toast(rt.message) _this.$toast(rt.message)
// _this.$toast('列表获取失败') // _this.$toast('列表获取失败')
...@@ -224,39 +241,6 @@ export default { ...@@ -224,39 +241,6 @@ export default {
_this.finished = true _this.finished = true
}) })
}, },
// 数据处理
postDataListSetAction(array) {
array.forEach((res)=>{
this.postDataList.push({
assigneeFactoryId: res.assigneeFactoryId,
catagory: res.catagory,
comGoodsFormId: res.comGoodsFormId,
comGoodsId: res.comGoodsId,
comGoodsVarietyId: res.comGoodsVarietyId,
comUnitId: res.comUnitId,
defaultExpireDate: res.defaultExpireDate,
factoryId: res.factoryId,
goodsDesc: res.goodsDesc,
goodsName: res.goodsName,
goodsOpcode: res.goodsOpcode,
goodsSpell: res.goodsSpell,
goodsStatus: res.goodsStatus,
midPacknum: res.midPacknum,
packageNum: res.packageNum,
partyName: res.partyName,
partyName1: res.partyName1,
partyOpcode: res.partyOpcode,
productLocation: res.productLocation,
unitName: res.unitName,
goodsForm: res.goodsForm,
partyOpcode1: res.partyOpcode1,
priceCode: res.priceCode,
retailPrice: res.retailPrice,
taxRate: res.taxRate,
varietyName: res.varietyName,
})
})
},
/// 判断数值是否为空 /// 判断数值是否为空
isJudgeStrNull(val) { isJudgeStrNull(val) {
if (val !== null && val !== undefined && val !== '') { if (val !== null && val !== undefined && val !== '') {
......
...@@ -96,6 +96,8 @@ ...@@ -96,6 +96,8 @@
<search-goods <search-goods
v-model="moreSearchDialog.goodsShow" v-model="moreSearchDialog.goodsShow"
:customer="!moreSearchInfo.goods ? {}:moreSearchInfo.goods" :customer="!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
:consignor="moreSearchInfo.consignor"
:supplier="moreSearchInfo.supplier"
@cancleclick="showPost" @cancleclick="showPost"
@confirmclick="postConfirm" @confirmclick="postConfirm"
></search-goods> ></search-goods>
...@@ -103,6 +105,8 @@ ...@@ -103,6 +105,8 @@
<search-in-client <search-in-client
v-model="moreSearchDialog.clientShow" v-model="moreSearchDialog.clientShow"
:customer="!moreSearchInfo.client ? {}:moreSearchInfo.client" :customer="!moreSearchInfo.client ? {}:moreSearchInfo.client"
:consignor="moreSearchInfo.consignor"
:supplier="moreSearchInfo.supplier"
:chinfo="chinfo" :chinfo="chinfo"
@cancleclick="showPost" @cancleclick="showPost"
@confirmclick="postConfirm" @confirmclick="postConfirm"
...@@ -140,17 +144,6 @@ export default { ...@@ -140,17 +144,6 @@ export default {
goodsShow: false, goodsShow: false,
clientShow: false clientShow: false
}, },
moreSearchInfo: {
supplier: '', // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
orderNo: '', // 订单号
time: {
start: getFormateDate(new Date(), 'yyyy-MM-dd'),
end: getFormateDate(new Date(), 'yyyy-MM-dd')
},
},
chinfo: { chinfo: {
goodsId: '', goodsId: '',
supplier: '' supplier: ''
...@@ -182,8 +175,8 @@ export default { ...@@ -182,8 +175,8 @@ export default {
computed: { computed: {
// 供应商 // 供应商
supplier () { supplier () {
if (this.moreSearchInfo.supplier.comPartyId) { if (this.moreSearchInfo.supplier) {
return !this.moreSearchInfo.supplier ? '' : (this.moreSearchInfo.supplier.comPartyId + '/(' + this.moreSearchInfo.supplier.partyOpcode + ')' + this.moreSearchInfo.supplier.partyName) return !this.moreSearchInfo.supplier ? '' : this.moreSearchInfo.supplier.partyName
} else { } else {
return '' return ''
} }
...@@ -227,7 +220,7 @@ export default { ...@@ -227,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
...@@ -241,6 +234,22 @@ export default { ...@@ -241,6 +234,22 @@ export default {
choosetime: { choosetime: {
type: Object, type: Object,
default: () => {} default: () => {}
},
moreSearchInfo: {
type: Object,
default: () => {
return {
supplier: {}, // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
orderNo: '', // 订单号
time: {
start: getFormateDate(new Date(), 'yyyy-MM-dd'),
end: getFormateDate(new Date(), 'yyyy-MM-dd')
}
}
}
} }
}, },
watch: { watch: {
...@@ -261,7 +270,7 @@ export default { ...@@ -261,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
} }
...@@ -270,7 +279,7 @@ export default { ...@@ -270,7 +279,7 @@ export default {
}, },
onCleanClick() { onCleanClick() {
this.moreSearchInfo = { this.moreSearchInfo = {
supplier: '', // 供应商 supplier: {}, // 供应商
consignor: [], // 货主 consignor: [], // 货主
goods: '', // 商品 goods: '', // 商品
client: '', // 客户 client: '', // 客户
...@@ -293,7 +302,7 @@ export default { ...@@ -293,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
} }
...@@ -328,7 +337,7 @@ export default { ...@@ -328,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
...@@ -351,7 +360,7 @@ export default { ...@@ -351,7 +360,7 @@ export default {
}, },
// 商品信息拼接 // 商品信息拼接
consignorInfoStitching(model) { consignorInfoStitching(model) {
return model.companyname return model.companyname + '/(' + model.erp_userid[0] + ')'
// return model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName // return model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName
}, },
onQuickDateChoose(index, tag) { onQuickDateChoose(index, tag) {
......
...@@ -25,13 +25,14 @@ ...@@ -25,13 +25,14 @@
<my-order-list :more-search-info="moreSearchInfo" :ref="item.name" :orderTypeCode="item.orderTypeCode" :activeTab="activeTab" @orderItemAction="orderItemAction"/> <my-order-list :more-search-info="moreSearchInfo" :ref="item.name" :orderTypeCode="item.orderTypeCode" :activeTab="activeTab" @orderItemAction="orderItemAction"/>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<high-search v-model="moreSearchShow" @onsearch="moreSearchConfirm" @onclean="moreSearchClean"/> <high-search :more-search-info="moreSearchInfo" v-model="moreSearchShow" @onsearch="moreSearchConfirm" @onclean="moreSearchClean"/>
</div> </div>
</template> </template>
<script> <script>
import myOrderList from './myOrderList.vue' import myOrderList from './myOrderList.vue'
import HighSearch from './components/HighSearch.vue' import HighSearch from './components/HighSearch.vue'
import {getEmployeeOrgQueryList, getConsignorSetList} from '@/api/common'
import {getFormateDate} from '@/utils/common' import {getFormateDate} from '@/utils/common'
import { bridge } from "@/utils"; import { bridge } from "@/utils";
const allTabsTitle = [ const allTabsTitle = [
...@@ -52,7 +53,7 @@ export default { ...@@ -52,7 +53,7 @@ export default {
moreSearchShow: false, moreSearchShow: false,
activeTab: 'home', activeTab: 'home',
moreSearchInfo: { moreSearchInfo: {
supplier: '', // 供应商 supplier: {}, // 供应商
consignor: [], // 货主 consignor: [], // 货主
goods: '', // 商品 goods: '', // 商品
client: '', // 客户 client: '', // 客户
...@@ -96,12 +97,96 @@ export default { ...@@ -96,12 +97,96 @@ export default {
window.removeEventListener('popstate', this.onBrowserBack, false) window.removeEventListener('popstate', this.onBrowserBack, false)
}, },
mounted() { mounted() {
this.moreSearchShow = true // this.moreSearchShow = true
this.getConsignorPostData()
// this.tabsTitleData() // this.tabsTitleData()
}, },
destroyed() { destroyed() {
}, },
methods: { methods: {
// 查询是否货主为单个
getConsignorPostData() {
let _this = this
let data = {
'attr': {
'empid': this.linkInfo.userId
},
'filters': [],
'logic': 'or',
'sort': 'desc',
'orderby': 'createon',
'pageNum': 1,
'pageSize': 10
}
getConsignorSetList(data).then(rt => {
if (rt.code === 200) {
// this.postDataList = rt.data.list
if (rt.data.list.length !== 1) {
this.moreSearchShow = true
} else if (rt.data.list.length === 1) {
this.moreSearchInfo.consignor.push(rt.data.list[0])
this.getEmployeeOrgPostData(rt.data.list[0])
} else if (rt.data.list.length === 0) {
_this.$toast('暂无货主!')
}
} else {
_this.$toast(rt.message)
}
}).catch(e => {
_this.$toast('列表获取失败')
})
},
getEmployeeOrgPostData(item) {
let _this = this
const companyList = []
const removeItem = {
'length': '100',
'attr': {
'empid': this.linkInfo.userId + ',1',
'userid': item.erp_userid[0],
'sysname': item.sysname,
'companyname': item.companyname
},
'dbName': '',
'start': '1'
}
companyList.push(removeItem)
// let data = {
// list: companyList
// }
let data = {
'list': [
{
'length': '1',
'attr': {
'empid': '199476,1',
'userid': '23528',
'sysname': 'ERP',
'companyname': '上药控股有限公司'
},
'dbName': '',
'start': '1'
}
]
}
getEmployeeOrgQueryList(data).then(rt => {
if (rt.code === 200) {
this.postDataList = rt.data
if (rt.data.length !== 0 && rt.data.length > 1) {
this.moreSearchShow = true
} else if (rt.data.length === 1) {
this.moreSearchInfo.supplier = rt.data[0]
} else if (rt.data.length === 0) {
this.moreSearchShow = true
}
} else {
_this.$toast(rt.message)
}
}).catch(e => {
_this.$toast('列表获取失败')
})
},
// 单个发票点击事件 // 单个发票点击事件
orderItemAction(model) { orderItemAction(model) {
console.log(model) console.log(model)
......
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