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, {
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
......@@ -74,6 +74,7 @@ export function getGoodsSetList(params) {
loading: true
})
}
// ====================高级搜索====================
// 获取货主列表
export function getConsignorSetList(params) {
return fetch({
......@@ -83,3 +84,30 @@ export function getConsignorSetList(params) {
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 @@
</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'
......@@ -87,6 +87,16 @@ export default {
customer: {
type: Object,
default: () => {}
},
// 供应商
supplier: {
type: Object,
default: () => {}
},
// 货主
consignor: {
type: Array,
default: () => []
}
},
watch: {
......@@ -96,7 +106,7 @@ export default {
this.postDataList = []
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
this.checked = !this.customer.comGoodsId ? '' : this.customer.comGoodsId
console.log(this.checked)
// console.log(this.checked)
this.currentPage = 1
this.onLoad()
}
......@@ -166,14 +176,23 @@ export default {
},
getPostData() {
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 = {
'goods': _this.keywords,
'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId,
'saler': this.linkInfo.sysUserId,
'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,10 +84,20 @@ export default {
type: Boolean,
default: false
},
// 供应商
supplier: {
type: Object,
default: () => {}
},
customer: {
type: Object,
default: () => {}
},
// 货主
consignor: {
type: Array,
default: () => []
},
chinfo: {
type: Object,
default: ()=> {
......@@ -105,7 +115,7 @@ export default {
this.postDataList = []
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
console.log(this.checked)
// console.log(this.checked)
this.currentPage = 1
this.onLoad()
}
......@@ -175,14 +185,23 @@ export default {
},
getPostData() {
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 = {
'customer':_this.keywords,
'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId,
'saler': this.linkInfo.sysUserId,
'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)) {
......@@ -200,7 +200,7 @@ export default {
let _this = this
let data = {
'attr': {
'empid': '199476'
'empid': this.linkInfo.userId
},
'filters': [],
'logic': 'or',
......
......@@ -33,7 +33,7 @@
<van-cell :title="titleInitial(item)" clickable @click="itemClick(item,index)" v-for="(item,index) in postDataList"
:key="index">
<template #right-icon>
<van-radio :name="item.comPartyId" />
<van-radio :name="item.org" />
</template>
</van-cell>
</van-cell-group>
......@@ -50,7 +50,7 @@
</template>
<script>
import {getCgSupplyList} from '@/api/common'
import {getEmployeeOrgQueryList} from '@/api/common'
import {getResListNum} from '../utils/common'
import SearchResult from './SearchResult'
import { Dialog } from 'vant'
......@@ -100,8 +100,7 @@ export default {
if (val) {
this.postDataList = []
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
console.log(this.checked)
this.checked = !this.customer.org ? '' : this.customer.org
this.currentPage = 1
this.onLoad()
}
......@@ -116,8 +115,8 @@ export default {
methods: {
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
let titleStr = model.comPartyId + '/(' + model.partyOpcode + ')/' + model.partyName
return titleStr
// let titleStr = model.org + '/(' + model.partyOpcode + ')/' + model.partyName
return model.partyName
},
onSearch () {
// if (!this.isJudgeStrNull(this.keywords)) {
......@@ -139,7 +138,7 @@ export default {
this.$emit('cancleclick')
},
onConfirmClick() {
if (!this.choosedPost.comPartyId) {
if (!this.choosedPost.org) {
Dialog.alert({
title: '温馨提示',
message: '请选择选项!'
......@@ -154,7 +153,7 @@ export default {
})
},
itemClick(item, index) {
this.checked = item.comPartyId
this.checked = item.org
this.choosedPost = item
},
onRefresh() {
......@@ -171,29 +170,47 @@ export default {
},
getPostData() {
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 = {
// 'dbSource':this.linkInfo.sysDbSource,
'dbSource':'erp_test_shaphar',
'pageNum': _this.currentPage,
'pageSize': _this.pageSize,
// 'erpUserId':this.linkInfo.sysUserId,
'erpUserId': '23528',
'invOwner':'200',
'goodsId':'',
'supply':_this.keywords
'list': [
{
'length': '100',
'attr': {
'empid': '199476,1',
'userid': '23528',
'sysname': 'ERP',
'companyname': '上药控股有限公司'
},
'dbName': '',
'start': '1'
}
getCgSupplyList(data).then(rt => {
if (rt.code === '00000') {
]
}
getEmployeeOrgQueryList(data).then(rt => {
if (rt.code === 200) {
if (_this.currentPage === 1) {
_this.searchNum = rt.entity.total + ''
// _this.searchNum = rt.entity.total + ''
this.postDataList = []
}
if (this.isRefreshing) {
this.postDataList = rt.entity.supplyList
this.postDataList = rt.data
}
else if (!!rt.entity.supplyList || rt.entity.supplyList.length > 0) {
this.postDataList = this.postDataList.concat(rt.entity.supplyList)
else if (!!rt.data || rt.data.length > 0) {
this.postDataList = this.postDataList.concat(rt.data)
}
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
......@@ -201,12 +218,12 @@ export default {
// 重置加载更多提示
_this.loading = false
// 若当前加载的页数没有满足每页的数量代表完全加载
if (rt.entity.supplyList.length < 10) {
// if (rt.data.length < 10) {
_this.finished = true
} else {
// } else {
// 加载成功后下一页自增1
_this.currentPage++
}
// }
} else {
_this.$toast(rt.message)
// _this.$toast('列表获取失败')
......@@ -224,39 +241,6 @@ export default {
_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) {
if (val !== null && val !== undefined && val !== '') {
......
......@@ -96,6 +96,8 @@
<search-goods
v-model="moreSearchDialog.goodsShow"
:customer="!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
:consignor="moreSearchInfo.consignor"
:supplier="moreSearchInfo.supplier"
@cancleclick="showPost"
@confirmclick="postConfirm"
></search-goods>
......@@ -103,6 +105,8 @@
<search-in-client
v-model="moreSearchDialog.clientShow"
:customer="!moreSearchInfo.client ? {}:moreSearchInfo.client"
:consignor="moreSearchInfo.consignor"
:supplier="moreSearchInfo.supplier"
:chinfo="chinfo"
@cancleclick="showPost"
@confirmclick="postConfirm"
......@@ -140,17 +144,6 @@ export default {
goodsShow: 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: {
goodsId: '',
supplier: ''
......@@ -182,8 +175,8 @@ export default {
computed: {
// 供应商
supplier () {
if (this.moreSearchInfo.supplier.comPartyId) {
return !this.moreSearchInfo.supplier ? '' : (this.moreSearchInfo.supplier.comPartyId + '/(' + this.moreSearchInfo.supplier.partyOpcode + ')' + this.moreSearchInfo.supplier.partyName)
if (this.moreSearchInfo.supplier) {
return !this.moreSearchInfo.supplier ? '' : this.moreSearchInfo.supplier.partyName
} else {
return ''
}
......@@ -227,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
......@@ -241,6 +234,22 @@ export default {
choosetime: {
type: Object,
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: {
......@@ -261,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
}
......@@ -270,7 +279,7 @@ export default {
},
onCleanClick() {
this.moreSearchInfo = {
supplier: '', // 供应商
supplier: {}, // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
......@@ -293,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
}
......@@ -328,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
......@@ -351,7 +360,7 @@ export default {
},
// 商品信息拼接
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
},
onQuickDateChoose(index, tag) {
......
......@@ -25,13 +25,14 @@
<my-order-list :more-search-info="moreSearchInfo" :ref="item.name" :orderTypeCode="item.orderTypeCode" :activeTab="activeTab" @orderItemAction="orderItemAction"/>
</van-tab>
</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>
</template>
<script>
import myOrderList from './myOrderList.vue'
import HighSearch from './components/HighSearch.vue'
import {getEmployeeOrgQueryList, getConsignorSetList} from '@/api/common'
import {getFormateDate} from '@/utils/common'
import { bridge } from "@/utils";
const allTabsTitle = [
......@@ -52,7 +53,7 @@ export default {
moreSearchShow: false,
activeTab: 'home',
moreSearchInfo: {
supplier: '', // 供应商
supplier: {}, // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
......@@ -96,12 +97,96 @@ export default {
window.removeEventListener('popstate', this.onBrowserBack, false)
},
mounted() {
this.moreSearchShow = true
// this.moreSearchShow = true
this.getConsignorPostData()
// this.tabsTitleData()
},
destroyed() {
},
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) {
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