diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue
index dbbcab2..d69af53 100644
--- a/pages/inventory/goodsList1.vue
+++ b/pages/inventory/goodsList1.vue
@@ -1547,7 +1547,7 @@
}
.notice{
width: 100%;
- height: 90rpx;
+ height: 56rpx;
}
.bottom-right {
width: 60%;
diff --git a/pages/other/logisticsAddress.vue b/pages/other/logisticsAddress.vue
index beba421..c8ebf3a 100644
--- a/pages/other/logisticsAddress.vue
+++ b/pages/other/logisticsAddress.vue
@@ -3,20 +3,19 @@
-
+
- 河北省沧州市运河区
+ {{item.province +'-'+ item.city+'-'+item.area}}
- 10公斤内/30元,每公斤/20元
+ {{item.chargingStandard}}
-
编辑
删除
-
+
+
@@ -52,7 +51,11 @@
area: '',
id: ''
},
- show: false,
+ show: false,
+ standardList:[],
+ status: 'loadmore',
+ pages:1,
+ total:0,
rules: {
address1: {
rules: [{
@@ -77,47 +80,136 @@
},
onLoad(options) {
this.getList()
+ },
+ onReachBottom() {
+ if (this.pages >= this.total) return;
+ this.status = 'loading';
+ this.pages = ++this.pages;
+ this.getList();
},
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
+ let that = this;
+ uni.request({
+ url: that.tui.interfaceUrl() + '/app/operatingArea/getOperatingAreaList',
+ data: {
+ pageNum:this.pages,
+ pageSize:10
+ },
+ header: {
+ 'content-type': 'application/json',
+ // 'Authorization': tui.getToken()
+ 'appWLToken': that.tui.getToken()
+ },
+ method: 'POST', //'GET','POST'
+ dataType: 'json',
+ success: (res) => {
+ this.status = 'nomore';
+ if (res.data.code == 200){
+ this.pages = res.data.result.pages
+ this.total = res.data.result.total
+ if (this.pages == 1) {
+ this.standardList = res.data.result.records
+ } else {
+ this.standardList = [...this.standardList, ...res.data.result.records]
+ }
+ }
+ },
+ fail: (res) => {
+ that.tui.toast("网络不给力,请稍后再试")
}
-
})
},
//弹出弹窗
- addAddress(data) {
+ addAddress(data) {
+ let item = this.formData = {}
+ if(data){
+ item.id = data.id
+ item.standard = data.chargingStandard
+ item.province = data.province
+ item.city = data.city
+ item.area = data.area
+ item.address1 = data.province + data.city + data.area;
+ }
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
+ let item = {}
+ if(this.formData.id != ''){
+ item = {
+ 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,
+ id:this.formData.id
+ }
+ }else{
+ item= {
+ 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
+ }
+ }
+ uni.request({
+ url: this.tui.interfaceUrl() + '/app/operatingArea/saveOrUpdateOperatingArea',
+ data: item,
+ header: {
+ 'content-type': 'application/json',
+ // 'Authorization': tui.getToken()
+ 'appWLToken': this.tui.getToken()
+ },
+ method: 'POST', //'GET','POST'
+ dataType: 'json',
+ success: (res) => {
+ if (res.data.code == 200){
+ this.tui.toast("操作成功")
+ this.getList();
+ this.$refs.inputDialog.close()
+ this.formData = {}
+ }
+ },
+ fail: (res) => {
+ this.tui.toast("网络不给力,请稍后再试~")
+ }
})
},
- delAddress(){
+ delAddress(data){
var that = this;
uni.showModal({
title: "提示",
content: "确定删除此条线路吗?",
success: function(res) {
if (res.confirm) {
- that.tui.toast('删除成功')
+ uni.request({
+ url: that.tui.interfaceUrl() + '/app/operatingArea/deleteOperatingArea',
+ data: {
+ id:data.id
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded',
+ 'appWLToken': that.tui.getToken()
+ },
+ method: 'POST', //'GET','POST'
+ dataType: 'json',
+ success: (res) => {
+ if (res.data.code == 200){
+ that.tui.toast('删除成功')
+ that.getList();
+ }
+ },
+ fail: (res) => {
+ that.tui.toast("网络不给力,请稍后再试~")
+ }
+ })
}
that.$forceUpdate()
}