|
@@ -8,25 +8,25 @@
|
|
<view class="row1 flex jcsb alc">
|
|
<view class="row1 flex jcsb alc">
|
|
<view class="left flex alc">
|
|
<view class="left flex alc">
|
|
<view class="bottom" style="margin-top: 6rpx;">
|
|
<view class="bottom" style="margin-top: 6rpx;">
|
|
- <text class="color1">采购</text>
|
|
|
|
- <text class="color2">销售</text>
|
|
|
|
- <text class="color3">2022.09.01 08:28</text>
|
|
|
|
|
|
+ <text class="color1" v-if="item.tranType=='采购'">采购</text>
|
|
|
|
+ <text class="color2" v-if="item.tranType=='销售'">销售</text>
|
|
|
|
+ <text class="color3">{{item.updateDate}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="right" style="color: #FE6430;">审核中</view>
|
|
|
|
- <view class="right" style="color: #FB2323;">已驳回</view>
|
|
|
|
- <view class="right" style="color: #22C572;">已通过</view>
|
|
|
|
|
|
+ <view class="right" style="color: #FE6430;" v-if="item.status=='待审核'">审核中</view>
|
|
|
|
+ <view class="right" style="color: #FB2323;" v-if="item.status=='已驳回'">已驳回</view>
|
|
|
|
+ <view class="right" style="color: #22C572;" v-if="item.status=='审核通过'">已通过</view>
|
|
</view>
|
|
</view>
|
|
<view class="row2">
|
|
<view class="row2">
|
|
- <mote-lines-divide :dt="content" :line="3" expandText="展开" foldHint="收起" />
|
|
|
|
|
|
+ <mote-lines-divide :dt="item.publishingContent" :line="3" expandText="展开" foldHint="收起" />
|
|
</view>
|
|
</view>
|
|
<view class="row3">
|
|
<view class="row3">
|
|
- <image src="../../static/img/splash3.png" mode="aspectFill" v-for="(item,index) in 9"
|
|
|
|
- class="img"></image>
|
|
|
|
|
|
+ <image :src="item1" mode="aspectFill" v-for="(item1,index) in item.imgList" class="img">
|
|
|
|
+ </image>
|
|
</view>
|
|
</view>
|
|
<view class="row4">
|
|
<view class="row4">
|
|
<u-icon name="map-fill" color="#AFB3BF" size="28" bold></u-icon>
|
|
<u-icon name="map-fill" color="#AFB3BF" size="28" bold></u-icon>
|
|
- <text class="text">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
|
|
+ <text class="text">{{item.placeDelivery}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="row5">
|
|
<view class="row5">
|
|
<view class="del btn" @click="del(item)">
|
|
<view class="del btn" @click="del(item)">
|
|
@@ -35,6 +35,9 @@
|
|
<view class="edit btn" @click="edit(item)">
|
|
<view class="edit btn" @click="edit(item)">
|
|
编辑
|
|
编辑
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="edit btn" @click="refresh(item)">
|
|
|
|
+ 刷新
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -42,7 +45,7 @@
|
|
<view class="add" @click="release">
|
|
<view class="add" @click="release">
|
|
<u-icon name="plus" color="#fff" size="34" bold></u-icon>
|
|
<u-icon name="plus" color="#fff" size="34" bold></u-icon>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+ <u-toast ref="uToast" />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -61,7 +64,7 @@
|
|
mixins: [MescrollMixin], // 使用mixin
|
|
mixins: [MescrollMixin], // 使用mixin
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
-
|
|
|
|
|
|
+ canReset: false,
|
|
keyword: '',
|
|
keyword: '',
|
|
inputStyle: {
|
|
inputStyle: {
|
|
// "padding-left": '30rpx'
|
|
// "padding-left": '30rpx'
|
|
@@ -74,8 +77,9 @@
|
|
// },
|
|
// },
|
|
noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
|
noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
|
empty: {
|
|
empty: {
|
|
- tip: '~ 搜索无数据 ~', // 提示
|
|
|
|
- btnText: '去看看'
|
|
|
|
|
|
+ icon: '/static/empty.png',
|
|
|
|
+ tip: '暂无内容', // 提示
|
|
|
|
+ // btnText: '去看看'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
goods: [], //列表数据
|
|
goods: [], //列表数据
|
|
@@ -103,45 +107,63 @@
|
|
var userInfo = uni.getStorageSync("userInfo")
|
|
var userInfo = uni.getStorageSync("userInfo")
|
|
var that = this
|
|
var that = this
|
|
console.log("userInfo", userInfo)
|
|
console.log("userInfo", userInfo)
|
|
- // setTimeout(function() {
|
|
|
|
- // that.$api.doRequest('get', '/appVersion/test', {
|
|
|
|
- // userId: "7e83070d05fc4d50aaa46e00a3ee03d8"
|
|
|
|
- // }).then(res => {
|
|
|
|
-
|
|
|
|
- // })
|
|
|
|
- // }, 500);
|
|
|
|
- uni.removeTabBarBadge({
|
|
|
|
- index: 4
|
|
|
|
- })
|
|
|
|
- this.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
|
|
|
|
- if (res.data.data) {
|
|
|
|
- let name = 'myTip';
|
|
|
|
- let value = res.data.data.total;
|
|
|
|
- that.$store.commit('$uStore', {
|
|
|
|
- name,
|
|
|
|
- value
|
|
|
|
- });
|
|
|
|
- if (value != 0 && value) {
|
|
|
|
- uni.setTabBarBadge({
|
|
|
|
- index: 4,
|
|
|
|
- text: value + ""
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- name = 'taskTip';
|
|
|
|
- value = res.data.data.total;
|
|
|
|
- that.$store.commit('$uStore', {
|
|
|
|
- name,
|
|
|
|
- value
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.$nextTick(function() {
|
|
|
|
+ this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页
|
|
|
|
+ this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题
|
|
|
|
+ this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
|
|
|
|
+ });
|
|
|
|
+
|
|
},
|
|
},
|
|
onLoad(options) {},
|
|
onLoad(options) {},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
- edit() {},
|
|
|
|
- del() {},
|
|
|
|
|
|
+ refresh(val) {
|
|
|
|
+ let _obj = {
|
|
|
|
+ id: val.id,
|
|
|
|
+ flag: 0
|
|
|
|
+ }
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '数据加载中',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
|
|
+ this.$api.doRequest('post', '/transactionExchangeInfo/editInfo', _obj).then(res => {
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ title: '刷新成功成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ })
|
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
|
+ }
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ edit(val) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/business/editRelease?id=' + val.id
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ del(val) {
|
|
|
|
+ let _obj = {
|
|
|
|
+ id: val.id,
|
|
|
|
+ }
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '数据加载中',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
|
|
+ this.$api.doRequest('post', '/transactionExchangeInfo/deleteInfo', _obj).then(res => {
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ title: '删除成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ })
|
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
|
+ }
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
selectAddress(val) {
|
|
selectAddress(val) {
|
|
console.log(val)
|
|
console.log(val)
|
|
},
|
|
},
|
|
@@ -153,18 +175,26 @@
|
|
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
|
|
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
|
|
upCallback(page) {
|
|
upCallback(page) {
|
|
//联网加载数据
|
|
//联网加载数据
|
|
- let curTab = this.tabs[this.tabIndex]
|
|
|
|
- let keyword = curTab.name // 具体项目中,您可能取的是tab中的type,status等字段
|
|
|
|
- apiGoods(page.num, page.size, keyword).then(res => {
|
|
|
|
- //联网成功的回调,隐藏下拉刷新和上拉加载的状态;
|
|
|
|
- this.mescroll.endSuccess(res.list.length);
|
|
|
|
- //设置列表数据
|
|
|
|
- if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
|
|
|
|
- this.goods = this.goods.concat(res.list); //追加新数据
|
|
|
|
- this.co
|
|
|
|
- }).catch(() => {
|
|
|
|
- //联网失败, 结束加载
|
|
|
|
- this.mescroll.endErr();
|
|
|
|
|
|
+ let _obj = {
|
|
|
|
+ pageSize: page.size,
|
|
|
|
+ currentPage: page.num,
|
|
|
|
+ userId: this.userInfo.id,
|
|
|
|
+ }
|
|
|
|
+ this.$api.doRequest('get', '/transactionExchangeInfo/selectTransactionExchangeInfo', _obj).then(res => {
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ let curPageData = res.data.data.records;
|
|
|
|
+ let curPageLen = curPageData.length;
|
|
|
|
+ let totalPage = res.data.data.total;
|
|
|
|
+ if (page.num == 1) this.goods = [];
|
|
|
|
+ this.goods = this.goods.concat(curPageData);
|
|
|
|
+ console.log(curPageLen, totalPage)
|
|
|
|
+ this.mescroll.endByPage(curPageLen, totalPage);
|
|
|
|
+ for (let i = 0; i < this.goods.length; i++) {
|
|
|
|
+ this.goods[i].imgList = this.goods[i].urlImg.split(',')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ uni.hideLoading()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//点击空布局按钮的回调
|
|
//点击空布局按钮的回调
|
|
@@ -303,7 +333,7 @@
|
|
margin-top: 18rpx;
|
|
margin-top: 18rpx;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- justify-content: space-between;
|
|
|
|
|
|
+ /* justify-content: space-between; */
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
/* background: #bbb; */
|
|
/* background: #bbb; */
|
|
|
|
|
|
@@ -312,12 +342,19 @@
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
- width: 32%;
|
|
|
|
- height: 210rpx;
|
|
|
|
|
|
+ width: 214rpx;
|
|
|
|
+ height: 214rpx;
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
background: lightblue;
|
|
background: lightblue;
|
|
list-style: none;
|
|
list-style: none;
|
|
border-radius: 10rpx;
|
|
border-radius: 10rpx;
|
|
|
|
+ margin-right: 16rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .img:nth-of-type(3),
|
|
|
|
+ .img:nth-of-type(6),
|
|
|
|
+ .img:nth-of-type(9) {
|
|
|
|
+ margin-right: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|