|
@@ -5,20 +5,26 @@
|
|
|
</view>
|
|
|
<view class="goodsList">
|
|
|
<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
|
|
|
- <view class="title">铺主:{{ item.enterpriseName }}
|
|
|
- <view class="state" v-if="(item.peopleConfirmStatus == 0 || item.cooperEntrustStatus == 0 || item.applyConfirmStatus == 0) && item.finishStatus == 0">
|
|
|
+ <view class="title">{{ item.enterpriseName }}
|
|
|
+ <view class="state"
|
|
|
+ v-if="(item.peopleConfirmStatus == 0 || item.cooperEntrustStatus == 0 || item.applyConfirmStatus == 0) && item.finishStatus == 0">
|
|
|
<text class="icon"></text>
|
|
|
<text>未确认</text>
|
|
|
</view>
|
|
|
- <view class="state" v-if="item.peopleConfirmStatus == 1 && item.cooperEntrustStatus == 1 && item.applyConfirmStatus == 1 &&item.finishStatus == 0">
|
|
|
+ <view class="state"
|
|
|
+ v-if="item.peopleConfirmStatus == 1 && item.cooperEntrustStatus == 1 && item.applyConfirmStatus == 1 &&item.finishStatus == 0">
|
|
|
<text class="icon"></text>
|
|
|
<text>未进口</text>
|
|
|
</view>
|
|
|
- <view class="state" v-if="item.finishStatus == 1 && item.resaleStatus == 0">
|
|
|
+ <view class="state" v-if="item.finishStatus == 1 && item.upStatus == 1">
|
|
|
<text class="icon" style="color:#13ce66"></text>
|
|
|
- <text>已进口</text>
|
|
|
+ <text>待上架</text>
|
|
|
</view>
|
|
|
- <view class="state" v-if="item.resaleStatus == 1">
|
|
|
+ <view class="state" v-if="item.finishStatus == 1 && item.upStatus == 2&&item.resaleStatus == 0">
|
|
|
+ <text class="icon" style="color:#13ce66"></text>
|
|
|
+ <text>已上架</text>
|
|
|
+ </view>
|
|
|
+ <view class="state" v-if="item.resaleStatus == 1&& item.upStatus == 2">
|
|
|
<text class="icon" style="color: #13ce66"></text>
|
|
|
<text>已转售</text>
|
|
|
</view>
|
|
@@ -36,15 +42,22 @@
|
|
|
<view class="clear"></view>
|
|
|
<view class="op">
|
|
|
<view class="date">{{ item.createTime }}</view>
|
|
|
- <template v-if="item.finishStatus == 1 && item.resaleStatus == 0">
|
|
|
- <view class="an" style="color: blue;" @click.stop="resale(item)">订单转售</view>
|
|
|
+ <template v-if="item.finishStatus == 1 && (item.upStatus == 1||item.upStatus == 3)">
|
|
|
+ <view v-if="user.bindShop==2" class="an" style="color: blue;" @click.stop="resale(item)">上架
|
|
|
+ </view>
|
|
|
+ <view v-else class="an">请联系互助社绑定商铺
|
|
|
+ </view>
|
|
|
</template>
|
|
|
- <template v-if="item.peopleConfirmStatus == 1 && item.Sxb010Status == 1 && item.finishStatus == 0 && item.refundStatus == 0">
|
|
|
- <view class="an" style="color: #f44336" @click.stop="orderRefund(item.id)">退款</view>
|
|
|
+ <template
|
|
|
+ v-if="item.peopleConfirmStatus == 1 && item.Sxb010Status == 1 && item.finishStatus == 0 && item.refundStatus == 0">
|
|
|
+ <view class="an" style="color: #f44336" @click.stop="orderRefund(item.id)">退款</view>
|
|
|
</template>
|
|
|
- <!-- <template v-if="item.resaleStatus == 1 && item.beingOrder == 0">
|
|
|
+ <!-- <template v-if="item.resaleStatus == 1 && item.beingOrder == 0">
|
|
|
<view class="an" style="color: #f44336" @click.stop="updateResalePrice(item.id)">修改转售价格</view>
|
|
|
</template> -->
|
|
|
+ <template v-if="item.resaleStatus == 0 && item.beingOrder == 0&& item.upStatus == 2">
|
|
|
+ <view class="an" style="color: #f44336" @click.stop="downOrder(item)">下架</view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
@@ -54,149 +67,201 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- tab: [
|
|
|
- {
|
|
|
- name: '全部',
|
|
|
- peopleConfirmStatus: '', //边民确认状态
|
|
|
- cooperEntrustStatus: '', //互助委托申报确认状态
|
|
|
- applyConfirmStatus: '', //进口申报确认状态
|
|
|
- finishStatus: '', //订单完成状态
|
|
|
- resaleStatus: '' //订单转售状态
|
|
|
- },
|
|
|
- {
|
|
|
- name: '未进口',
|
|
|
- peopleConfirmStatus: 1,
|
|
|
- cooperEntrustStatus: 1,
|
|
|
- applyConfirmStatus: 1,
|
|
|
- finishStatus: 0,
|
|
|
- resaleStatus: 0
|
|
|
- },
|
|
|
- {
|
|
|
- name: '已进口',
|
|
|
- peopleConfirmStatus: 1,
|
|
|
- finishStatus: 1,
|
|
|
- resaleStatus: 0
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ user: {},
|
|
|
+ tab: [{
|
|
|
+ name: '全部',
|
|
|
+ peopleConfirmStatus: '', //边民确认状态
|
|
|
+ cooperEntrustStatus: '', //互助委托申报确认状态
|
|
|
+ applyConfirmStatus: '', //进口申报确认状态
|
|
|
+ finishStatus: '', //订单完成状态
|
|
|
+ resaleStatus: '' //订单转售状态
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '未进口',
|
|
|
+ peopleConfirmStatus: 1,
|
|
|
+ cooperEntrustStatus: 1,
|
|
|
+ applyConfirmStatus: 1,
|
|
|
+ finishStatus: 0,
|
|
|
+ resaleStatus: 0,
|
|
|
+ upStatus: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '待上架',
|
|
|
+ finishStatus: 1,
|
|
|
+ resaleStatus: 0,
|
|
|
+ upStatus: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '已上架',
|
|
|
+ finishStatus: 1,
|
|
|
+ resaleStatus: 0,
|
|
|
+ upStatus: 2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '已转售',
|
|
|
+ finishStatus: 1,
|
|
|
+ resaleStatus: 1,
|
|
|
+ upStatus: 2
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ param: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10
|
|
|
},
|
|
|
- {
|
|
|
- name: '已转售',
|
|
|
- peopleConfirmStatus: 1,
|
|
|
- finishStatus: 1,
|
|
|
- resaleStatus: 1
|
|
|
+ list: [],
|
|
|
+ loadMore: true,
|
|
|
+ id: '',
|
|
|
+ flag: '',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.user = this.getUser()
|
|
|
+ uni.$on('face', res => {
|
|
|
+ if (this.flag == 1) {
|
|
|
+ this.http.request({
|
|
|
+ url: '/level-one-server/app/TbOrder/confirmOrder',
|
|
|
+ data: {
|
|
|
+ orderId: this.id
|
|
|
+ },
|
|
|
+ success: resp => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '订单确认成功'
|
|
|
+ });
|
|
|
+ this.refresh();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (this.flag == 2) {
|
|
|
+ this.http.request({
|
|
|
+ url: '/level-one-server/app/TbOrder/applyOrder',
|
|
|
+ data: {
|
|
|
+ orderId: this.id
|
|
|
+ },
|
|
|
+ success: resp => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '进口申报确认成功'
|
|
|
+ });
|
|
|
+ this.refresh();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- ],
|
|
|
- param: {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ downOrder(item) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定下架?',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.http.request({
|
|
|
+ url: '/level-one-server/app/TbOrder/down',
|
|
|
+ data: {
|
|
|
+ id: item.id
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交成功'
|
|
|
+ });
|
|
|
+ item.upStatus = 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- list: [],
|
|
|
- loadMore: true,
|
|
|
- id: '',
|
|
|
- flag: '',
|
|
|
- };
|
|
|
- },
|
|
|
- onLoad() {
|
|
|
- this.getData();
|
|
|
- uni.$on('face', res => {
|
|
|
- if(this.flag == 1) {
|
|
|
+ getData() {
|
|
|
this.http.request({
|
|
|
- url: '/level-one-server/app/TbOrder/confirmOrder',
|
|
|
- data: { orderId: this.id },
|
|
|
- success: resp => {
|
|
|
- uni.showToast({ title: '订单确认成功' });
|
|
|
- this.refresh();
|
|
|
+ url: '/level-one-server/app/TbOrder/getList',
|
|
|
+ loading: 'false',
|
|
|
+ data: this.param,
|
|
|
+ success: res => {
|
|
|
+ this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
|
|
|
+ if (res.data.data) {
|
|
|
+ this.list=res.data.data;
|
|
|
+ console.log("---1---=" + this.list[0].finishStatus)
|
|
|
+ console.log("---2---=" + this.list[0].resaleStatus)
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
- } else if(this.flag == 2) {
|
|
|
+ },
|
|
|
+ // 点击tab切换
|
|
|
+ click(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.param.peopleConfirmStatus = e.peopleConfirmStatus;
|
|
|
+ this.param.cooperEntrustStatus = e.cooperEntrustStatus;
|
|
|
+ this.param.applyConfirmStatus = e.applyConfirmStatus;
|
|
|
+ this.param.finishStatus = e.finishStatus;
|
|
|
+ this.param.resaleStatus = e.resaleStatus;
|
|
|
+ this.param.upStatus = e.upStatus;
|
|
|
+ this.refresh();
|
|
|
+ },
|
|
|
+ detail(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/market/one/leader/detail?id=' + item.id
|
|
|
+ });
|
|
|
+ },
|
|
|
+ resale(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/market/two/leader/resale?item=' + JSON.stringify(item)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ orderRefund(id) {
|
|
|
this.http.request({
|
|
|
- url: '/level-one-server/app/TbOrder/applyOrder',
|
|
|
- data: { orderId: this.id },
|
|
|
+ url: '/level-one-server/app/TbOrder/orderRefund',
|
|
|
+ data: {
|
|
|
+ id: id
|
|
|
+ },
|
|
|
+ method: 'POST',
|
|
|
success: resp => {
|
|
|
- uni.showToast({ title: '进口申报确认成功' });
|
|
|
+ uni.showToast({
|
|
|
+ title: '操作成功'
|
|
|
+ });
|
|
|
this.refresh();
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+ updateResalePrice(id) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/market/two/leader/updatePrice?id=' + id
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 刷新数据
|
|
|
+ refresh() {
|
|
|
+ this.loadMore = true;
|
|
|
+ this.param.pageNo = 1;
|
|
|
+ this.list = [];
|
|
|
+ this.getData();
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getData() {
|
|
|
- this.http.request({
|
|
|
- url: '/level-one-server/app/TbOrder/getList',
|
|
|
- loading: 'false',
|
|
|
- data: this.param,
|
|
|
- success: res => {
|
|
|
- this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
|
|
|
- if (res.data.data) {
|
|
|
- this.list.push(...res.data.data);
|
|
|
- console.log("---1---="+this.list[0].finishStatus)
|
|
|
- console.log("---2---="+this.list[0].resaleStatus)
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 点击tab切换
|
|
|
- click(e) {
|
|
|
- console.log(e);
|
|
|
- this.param.peopleConfirmStatus = e.peopleConfirmStatus;
|
|
|
- this.param.cooperEntrustStatus = e.cooperEntrustStatus;
|
|
|
- this.param.applyConfirmStatus = e.applyConfirmStatus;
|
|
|
- this.param.finishStatus = e.finishStatus;
|
|
|
- this.param.resaleStatus = e.resaleStatus;
|
|
|
- this.refresh();
|
|
|
- },
|
|
|
- detail(item) {
|
|
|
- uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
|
|
|
},
|
|
|
- resale(item) {
|
|
|
- uni.navigateTo({url: '/pages/market/two/leader/resale?item=' + JSON.stringify(item)});
|
|
|
- },
|
|
|
- orderRefund(id) {
|
|
|
- this.http.request({
|
|
|
- url: '/level-one-server/app/TbOrder/orderRefund',
|
|
|
- data: { id: id },
|
|
|
- method: 'POST',
|
|
|
- success: resp => {
|
|
|
- uni.showToast({ title: '操作成功' });
|
|
|
- this.refresh();
|
|
|
- }
|
|
|
- });
|
|
|
+ //下拉刷新
|
|
|
+ onPullDownRefresh() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.refresh();
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
- updateResalePrice(id) {
|
|
|
- uni.navigateTo({url: '/pages/market/two/leader/updatePrice?id=' + id});
|
|
|
- },
|
|
|
- // 刷新数据
|
|
|
- refresh() {
|
|
|
- this.loadMore = true;
|
|
|
- this.param.pageNo = 1;
|
|
|
- this.list = [];
|
|
|
- this.getData();
|
|
|
- }
|
|
|
- },
|
|
|
- //下拉刷新
|
|
|
- onPullDownRefresh() {
|
|
|
- setTimeout(() => {
|
|
|
- this.refresh();
|
|
|
- uni.stopPullDownRefresh();
|
|
|
- }, 1000);
|
|
|
- },
|
|
|
- //上拉加载
|
|
|
- onReachBottom() {
|
|
|
- if (this.loadMore) {
|
|
|
- this.param.pageNo++;
|
|
|
- this.getData();
|
|
|
+ //上拉加载
|
|
|
+ onReachBottom() {
|
|
|
+ if (this.loadMore) {
|
|
|
+ this.param.pageNo++;
|
|
|
+ this.getData();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-page {
|
|
|
- background-color: $pg;
|
|
|
-}
|
|
|
-.state{
|
|
|
- margin-right: -70px;
|
|
|
-}
|
|
|
-</style>
|
|
|
+ page {
|
|
|
+ background-color: $pg;
|
|
|
+ }
|
|
|
+
|
|
|
+ .state {
|
|
|
+ margin-right: -70px;
|
|
|
+ }
|
|
|
+</style>
|