wangfukang 3 years ago
parent
commit
76e97d04be
  1. 40
      pages/index/index.vue
  2. 2
      pages/inventory/goodsList1.vue
  3. 21
      pages/login/login.vue
  4. 19
      pages/other/logistics.vue
  5. 51
      pages/other/logisticsAddress.vue

40
pages/index/index.vue

@ -186,15 +186,29 @@
val == null || undefined ? '暂无' : val val == null || undefined ? '暂无' : val
return val; return val;
} }
}, },
// created(){
// if (uni.getStorageSync('hiver_token')) {
// if(uni.getStorageSync('wayValue') == 1){
// uni.reLaunch({
// url: '/pages/other/logistics'
// })
// }else if(uni.getStorageSync('wayValue') == 2){
// uni.reLaunch({
// url: '/pages/other/custom'
// })
// }
// }
// },
onShow() { onShow() {
this.shopName = uni.getStorageSync('shopName') this.shopName = uni.getStorageSync('shopName')
this.type = uni.getStorageSync('type') this.type = uni.getStorageSync('type')
}, },
onLoad() { onLoad() {
this.getSaleInfo() this.getSaleInfo()
this.getServerData(); this.getServerData();
this.getOrderInfoList(); this.getOrderInfoList();
this.getWaitCount() this.getWaitCount()
}, },
methods: { methods: {
@ -428,10 +442,10 @@
padding-left: 0 !important; padding-left: 0 !important;
} }
.u-grid-item.data-v-5b3a01af { .u-grid-item.data-v-b1f995c2 {
width: 44% !important; width: 44% !important;
height: 160rpx; height: 160rpx;
background: linear-gradient(#84C1FF, #C4E1FF) !important; background-image: linear-gradient(#84C1FF, #C4E1FF) !important;
margin-left: 4%; margin-left: 4%;
border-radius: 30rpx; border-radius: 30rpx;
margin-top: 20rpx !important; margin-top: 20rpx !important;
@ -439,16 +453,16 @@
} }
.u-grid-item.data-v-5b3a01af:nth-child(2) { .u-grid-item.data-v-b1f995c2:nth-child(2) {
background: linear-gradient(#FFBB77, #FFDCB9) !important; background-image: linear-gradient(#FFBB77, #FFDCB9) !important;
} }
.u-grid-item.data-v-5b3a01af:nth-child(3) { .u-grid-item.data-v-b1f995c2:nth-child(3) {
background: linear-gradient(#1AFD9C, #7AFEC6) !important; background-image: linear-gradient(#1AFD9C, #7AFEC6) !important;
} }
.u-grid-item.data-v-5b3a01af:nth-child(4) { .u-grid-item.data-v-b1f995c2:nth-child(4) {
background: linear-gradient(#79FF79, #BBFFBB) !important; background-image: linear-gradient(#79FF79, #BBFFBB) !important;
} }
.u-count-num { .u-count-num {

2
pages/inventory/goodsList1.vue

@ -3,7 +3,7 @@
<view class="page1"> <view class="page1">
<view class="content"> <view class="content">
<view class="notice"> <view class="notice">
<u-notice-bar mode='horizontal' type='primary' :text="noticeData"></u-notice-bar> <u-notice-bar mode='horizontal' bgColor="#088FEB" color="#eee" :text="noticeData"></u-notice-bar>
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="content-list"> <view class="content-list">

21
pages/login/login.vue

@ -71,13 +71,15 @@
data() { data() {
return { return {
mobile: '15101147760', mobile: '15101147760',
username: '15101147760', // username: '15101147760',
username: '15630117759',
code: '', code: '',
password: '123456', // password: '123456',
password: '19950123kang',
loginWay: true, //true账号密码登录 false验证码登录 loginWay: true, //true账号密码登录 false验证码登录
captchaImg: '', captchaImg: '',
captchaId: '', captchaId: '',
wayValue: 0, wayValue: 1,
range: [{ range: [{
value: 0, value: 0,
text: "店铺" text: "店铺"
@ -99,13 +101,7 @@
}, },
computed: mapState(['type']), computed: mapState(['type']),
onLoad() { onLoad() {
if (uni.getStorageSync('hiver_token')) { this.getCaptchaImg();
uni.reLaunch({
url: '/pages/index/index'
})
} else {
this.getCaptchaImg();
}
}, },
methods: { methods: {
...mapMutations(['login']), ...mapMutations(['login']),
@ -147,7 +143,7 @@
} }
loginUrl='/auth/smsLogin' loginUrl='/auth/smsLogin'
} }
if(this.wayValue == 1){ if(this.wayValue == 1){ //15630117759 19950123kang
this.tui.request("/app/logitics/login", "POST", { this.tui.request("/app/logitics/login", "POST", {
username: this.username, username: this.username,
password: this.password, password: this.password,
@ -158,6 +154,9 @@
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync("hiver_token", res.result.lcomToken) uni.setStorageSync("hiver_token", res.result.lcomToken)
uni.setStorageSync("transCompany", res.result.logiticsCompany.id) uni.setStorageSync("transCompany", res.result.logiticsCompany.id)
uni.setStorageSync("companyName", res.result.logiticsCompany.companyName)
uni.setStorageSync("signCompany", res.result.logiticsCompany.signCompany)
uni.setStorageSync("wayValue", this.wayValue)
this.tui.toast('登录成功', 2000, true) this.tui.toast('登录成功', 2000, true)
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({

19
pages/other/logistics.vue

@ -72,15 +72,16 @@
}] }]
} }
}, },
created() { created() {
const id = uni.getStorageSync('transCompany') uni.hideHomeButton() //左上角HOME按钮
const date = this.formatDate(new Date(), 'YYYY-MM-DD') // const id = uni.getStorageSync('transCompany')
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' // const date = this.formatDate(new Date(), 'YYYY-MM-DD')
this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' // this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
this.query.saleVO.transCompany = id // this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59'
this.range = date // this.query.saleVO.transCompany = id
this.getShopList() // this.range = date
this.getAllList() // this.getShopList()
// this.getAllList()
}, },
methods: { methods: {
sectionChange(index) { sectionChange(index) {

51
pages/other/logisticsAddress.vue

@ -30,11 +30,11 @@
<input placeholder="请选择省市区" disabled type="text" v-model="formData.address1"></input> <input placeholder="请选择省市区" disabled type="text" v-model="formData.address1"></input>
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="费用说明" name="address"> <uni-forms-item label="费用说明" name="standard">
<uni-easyinput type="textarea" v-model="formData.address" /> <uni-easyinput type="textarea" v-model="formData.standard" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<view class="address-btn" @tap="backPrevPage">确认</view> <view class="address-btn" @tap="setAddress">确认</view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@ -46,7 +46,7 @@
return { return {
formData: { formData: {
address1: '', address1: '',
address: '', standard: '',
province: '', province: '',
city: '', city: '',
area: '', area: '',
@ -60,7 +60,7 @@
errorMessage: '请选择线路', errorMessage: '请选择线路',
}] }]
}, },
address: { standard: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '请输入费用说明', errorMessage: '请输入费用说明',
@ -76,13 +76,40 @@
uni.hideHomeButton() //左上角HOME按钮 uni.hideHomeButton() //左上角HOME按钮
}, },
onLoad(options) { onLoad(options) {
this.getList()
}, },
methods: { methods: {
//新增人员 //获取列表
getList(){
this.tui.request('/app/operatingArea/getOperatingAreaList', 'POST', {
pageNum:1,
pageSize:10
}, false, false).then((res) => {
if (res.code == 200){
this.standardList = res.result
}
})
},
//弹出弹窗
addAddress(data) { addAddress(data) {
this.$refs.inputDialog.open('bottom') this.$refs.inputDialog.open('bottom')
}, },
//新增修改
setAddress(){
this.tui.request('/app/operatingArea/saveOrUpdateOperatingArea', 'post', {
shippingType:uni.getStorageSync("signCompany"),
shippingMethod:uni.getStorageSync("companyName"),
shippingMethodId:uni.getStorageSync("transCompany"),
province:this.formData.province,
city:this.formData.city,
area:this.formData.area,
chargingStandard:this.formData.standard
}, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result
})
},
delAddress(){ delAddress(){
var that = this; var that = this;
uni.showModal({ uni.showModal({
@ -108,11 +135,9 @@
let address = data.province + data.city + data.area; let address = data.province + data.city + data.area;
this.show = false this.show = false
this.formData.address1 = address; this.formData.address1 = address;
this.addressObj = { this.formData.province = data.province
province: data.province, this.formData.city= data.city
city: data.city, this.formData.area= data.area
area: data.area,
}
}, },
} }
} }

Loading…
Cancel
Save