yemain1
This commit is contained in:
parent
7d6b6db4d9
commit
9946239502
15
api/task.js
15
api/task.js
@ -79,4 +79,17 @@ export const townMasterTask3Commit = (data) => oahttp.post('/task/commit_town_ma
|
||||
/**
|
||||
* 入股任务提交
|
||||
*/
|
||||
export const commit_service_group_taskAPI = (data) => oahttp.post('/task/commit_service_group_task', data)
|
||||
export const commit_service_group_taskAPI = (data) => oahttp.post('/task/commit_service_group_task', data)
|
||||
/**
|
||||
* 督促小组公司入股
|
||||
*/
|
||||
export const commit_village_task_4API = (data) => oahttp.post('/task/commit_village_task_4', data)
|
||||
/**
|
||||
* 入股甲方公司
|
||||
*/
|
||||
export const commit_village_task_5API = (data) => oahttp.post('/task/commit_village_task_5', data)
|
||||
/**
|
||||
* 入股甲方公司
|
||||
*/
|
||||
export const commit_town_service_manager_task_6API = (data) => oahttp.post('/task/commit_town_service_manager_task_6',
|
||||
data)
|
@ -37,8 +37,6 @@
|
||||
<view @click.stop="callFn(goodsInfo.shop_phone)">
|
||||
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
|
||||
color="#0122c7" size="22"></u-icon>
|
||||
|
||||
|
||||
<text class="phone_num"> {{goodsInfo.shop_phone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -66,11 +64,13 @@
|
||||
</view>
|
||||
<view class="pro_list">
|
||||
<text style="color: #999;width: 15vw;">
|
||||
商品信息
|
||||
商品信息:
|
||||
</text>
|
||||
<view>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsInfo.products">
|
||||
<text class="goods_detil">{{item.goods_name}}</text>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsInfo.products" :key="index">
|
||||
<u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true"
|
||||
:src="item.goods_pic" width="100rpx" height="100rpx"></u--image>
|
||||
<text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -120,31 +120,32 @@
|
||||
</view>
|
||||
<view class="hr">
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系电话
|
||||
</text>
|
||||
<view @click.stop="callFn(goodsInfo.receiver_phone)">
|
||||
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
|
||||
color="#FF7C32" size="22"></u-icon> {{goodsInfo.receiver_phone}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="pro_list">
|
||||
<text style="color: #999;width: 15vw;">
|
||||
商品信息
|
||||
</text>
|
||||
<view>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsInfo.products">
|
||||
<text class="goods_detil">{{item.goods_name}}</text>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsInfo.products" :key="index">
|
||||
<u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true"
|
||||
:src="item.goods_pic" width="100rpx" height="100rpx"></u--image>
|
||||
<text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<text>
|
||||
联系电话
|
||||
</text>
|
||||
<view @click.stop="callFn(goodsInfo.receiver_phone)">
|
||||
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone" color="#FF7C32"
|
||||
size="22"></u-icon> {{goodsInfo.receiver_phone}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="total">
|
||||
共计{{goodsInfo.product_count}}件商品
|
||||
@ -255,7 +256,7 @@
|
||||
商品信息
|
||||
</text>
|
||||
<view>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsInfo.products">
|
||||
<view class="goods_tit" v-for="(item,index) in goodsInfo.products" :key="index">
|
||||
<text class="goods_detil">{{item.goods_name}}</text>
|
||||
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
||||
</view>
|
||||
@ -487,11 +488,11 @@
|
||||
}
|
||||
|
||||
.pro_list {
|
||||
display: flex;
|
||||
/* display: flex;
|
||||
|
||||
text {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
.total {
|
||||
@ -507,6 +508,8 @@
|
||||
.goods_tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.goods_detil {
|
||||
width: 55vw;
|
||||
@ -575,4 +578,8 @@
|
||||
font-size: 35.05rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.slot-content {
|
||||
padding-left: 160rpx;
|
||||
}
|
||||
</style>
|
@ -106,6 +106,9 @@
|
||||
import {
|
||||
Toast
|
||||
} from '../../libs/uniApi';
|
||||
import {
|
||||
dictDataListsTypeValue
|
||||
} from "@/api/oaPbulic.js"
|
||||
export default {
|
||||
name: "task",
|
||||
props: {
|
||||
@ -114,23 +117,57 @@
|
||||
default: function() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
taskValueList: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
extend: {},
|
||||
// 以下从左至右分别为: 服务部长,市场部长,负责人
|
||||
taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'],
|
||||
townServiceList: [44, 45, 46, 47, 48, 49, 50], // 镇农科服务部长任务
|
||||
navToTownServiceList: [44, 45, 46, 48, 49, 50], // 镇农科服务部长跳转/subpkg/townTask/townTask的任务 0
|
||||
navToTownMarketList: [51, 52, 53, 54, 55, 56, 57, 58, 59], // 镇农科市场部长跳转/subpkg/townTask/townTask的任务 1
|
||||
navToVillageList: [62, 63, 64, 65, 66, 68, ], // 村管理跳转/subpkg/townTask/townTask的任务 1
|
||||
navToVillageListA: [75, 77, 78, 79, 80, 81] // 村管理跳转/subpkg/townTask/townTask的任务 1
|
||||
townServiceList: ["town_task_type_1", "town_task_type_2", "town_task_type_3", "town_task_type_4",
|
||||
"town_task_type_5",
|
||||
"town_task_type_7"
|
||||
], // 镇农科服务部长任务
|
||||
navToTownServiceList: ["town_task_type_1", "town_task_type_2", "town_task_type_3", "town_task_type_5",
|
||||
"town_task_type_7"
|
||||
], // 镇农科服务部长跳转/subpkg/townTask/townTask的任务 0
|
||||
navToTownMarketList: ["town_task_type_marketing_director_1", "town_task_type_marketing_director_2",
|
||||
"town_task_type_marketing_director_3",
|
||||
"town_task_type_marketing_director_4",
|
||||
"town_task_type_marketing_director_5",
|
||||
"town_task_type_marketing_director_6",
|
||||
"town_task_type_marketing_director_7",
|
||||
"town_task_type_marketing_director_8",
|
||||
"town_task_type_marketing_director_9"
|
||||
], // 镇农科市场部长跳转/subpkg/townTask/townTask的任务 1
|
||||
navToVillageList: ["village_task_type_1", "village_task_type_2", "village_task_type_3",
|
||||
"village_task_type_7",
|
||||
], // 村管理跳转/subpkg/townTask/townTask的任务 1
|
||||
navToVillageListA: ["town_task_type_master_2", "town_task_type_master_4", "town_task_type_master_5",
|
||||
"town_task_type_master_6",
|
||||
"town_task_type_master_7",
|
||||
"town_task_type_master_8"
|
||||
], // 村管理跳转/subpkg/townTask/townTask的任务 1
|
||||
navToList: ["village_task_type_4", "village_task_type_5", "town_task_type_6"],
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$props.datas.extend ? this.extend = this.$props.datas.extend : null;
|
||||
|
||||
// 获取用户角色
|
||||
// this.$store.state.app.userInfo.group_id
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
navTo(url) {
|
||||
if (url) {
|
||||
@ -147,65 +184,77 @@
|
||||
} else Toast('暂未开放')
|
||||
},
|
||||
clickTask() {
|
||||
|
||||
|
||||
this.$props.taskValueList.forEach(item => {
|
||||
// console.log(item)
|
||||
if (this.$props.datas.type == item.id) {
|
||||
this.$props.datas.type_value = item.value
|
||||
}
|
||||
})
|
||||
console.log(this.$props.datas.type_value)
|
||||
// console.log(this.navToVillageList.includes(this.$props.datas.type_value))
|
||||
// return
|
||||
if (this.isTimeInRange()) return Toast('任务正在结算中');
|
||||
// if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) {
|
||||
// return this.$props.datas.status == 3 ? Toast('任务已完成!') : Toast('任务已结束!');
|
||||
// }
|
||||
if (this.navToTownServiceList.includes(this.$props.datas.type))
|
||||
if (this.navToTownServiceList.includes(this.$props.datas.type_value))
|
||||
return this.navTo(
|
||||
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[0]}`
|
||||
);
|
||||
if (this.navToTownMarketList.includes(this.$props.datas.type))
|
||||
if (this.navToTownMarketList.includes(this.$props.datas.type_value))
|
||||
return this.navTo(
|
||||
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`
|
||||
);
|
||||
if (this.navToVillageList.includes(this.$props.datas.type))
|
||||
if (this.navToVillageList.includes(this.$props.datas.type_value))
|
||||
return this.navTo(
|
||||
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`
|
||||
);
|
||||
if (this.navToVillageListA.includes(this.$props.datas.type))
|
||||
if (this.navToVillageListA.includes(this.$props.datas.type_value))
|
||||
return this.navTo(
|
||||
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[2]}`
|
||||
`/subpkg/townTask/villageTask4?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[2]}`
|
||||
);
|
||||
switch (this.$props.datas.type) {
|
||||
case 31:
|
||||
if (this.navToList.includes(this.$props.datas.type_value))
|
||||
|
||||
return this.navTo(
|
||||
`/subpkg/townTask/villageTask4?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[2]}`
|
||||
);
|
||||
switch (this.$props.datas.type_value) {
|
||||
case "1":
|
||||
if (this.$store.state.app.userInfo.admin_id) this.navTo(
|
||||
`/subpkg/captain/captain?task_id=${this.$props.datas?.id}`);
|
||||
else this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 32:
|
||||
case "2":
|
||||
this.navTo(`/subpkg/property/vehicle?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 33:
|
||||
case "3":
|
||||
let is_show = true;
|
||||
if (uni.$u.timeFormat(Date.now(), 'yyyy-mm-dd') != this.$props.datas?.end_time) is_show = false;
|
||||
this.navTo(
|
||||
`/subpkg/blockTransaction/blockTransaction?task_id=${this.$props.datas?.id}&is_show=${is_show}`
|
||||
);
|
||||
break;
|
||||
case 34:
|
||||
case "4":
|
||||
this.navTo(`/subpkg/otherTask/otherTask?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 35:
|
||||
case "5":
|
||||
this.navTo(`/subpkg/buyShare/buyShare?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 47:
|
||||
case "town_task_type_4":
|
||||
this.navTo(`/subpkg/townTask/serviceTask4?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 60:
|
||||
case "town_task_type_marketing_director_10":
|
||||
this.navTo(
|
||||
`/subpkg/townTask/marketTask10?task_id=${this.$props.datas?.id}&stage=${this.$props.datas?.stage}`
|
||||
);
|
||||
break;
|
||||
case 67:
|
||||
// case 67:
|
||||
// this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`);
|
||||
// break;
|
||||
case "village_task_type_8":
|
||||
this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 69:
|
||||
this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
case 76:
|
||||
case "town_task_type_master_3":
|
||||
this.navTo(`/subpkg/townTask/gatherRecords?task_id=${this.$props.datas?.id}`);
|
||||
break;
|
||||
default:
|
||||
|
35
pages.json
35
pages.json
@ -156,15 +156,23 @@
|
||||
"navigationBarTitleText": "配送信息",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/logistics/deliveryDetil",
|
||||
"style": {
|
||||
"navigationBarTitleText": "配送信息",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
"navigationBarTextStyle": "white",
|
||||
"app-plus": {
|
||||
// 弹出层
|
||||
"subNVues": [{
|
||||
"id": "map", // 唯一标识
|
||||
"path": "pages/logistics/mask", // 页面路径
|
||||
//样式
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"width": "750rpx",
|
||||
"height": "600rpx",
|
||||
|
||||
"background": "rgba(0,0,0,.5)"
|
||||
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
}, {
|
||||
@ -782,6 +790,15 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "townTask/villageTask4",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务:入股任务",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "otherTask/otherTask",
|
||||
"style": {
|
||||
|
@ -12,7 +12,7 @@
|
||||
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
|
||||
<cover-image class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
||||
</cover-image>
|
||||
<cover-view v-if="showToast" class="cover"></cover-view>
|
||||
|
||||
</map>
|
||||
<view class="map_address">
|
||||
<view style="display: flex;">
|
||||
@ -58,8 +58,16 @@
|
||||
物流信息:
|
||||
</view>
|
||||
<view>用户名称: {{fuzzyName( goodsDetil.logistics.receiver_name)}}</view>
|
||||
<view @click.stop="callFn(goodsDetil.logistics.shop_phone)">
|
||||
联系电话: <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
|
||||
color="#fff" size="22"></u-icon>{{goodsDetil.logistics.shop_phone}}
|
||||
</view>
|
||||
<view>
|
||||
通知时间: {{goodsDetil.logistics.create_time}}
|
||||
联系地址: {{goodsDetil.logistics.receiver_address}}
|
||||
</view>
|
||||
|
||||
<view>
|
||||
下单时间: {{goodsDetil.logistics.create_time}}
|
||||
</view>
|
||||
<view class="pro_list">
|
||||
<view class="goods">
|
||||
@ -70,9 +78,7 @@
|
||||
v-for="(item,index) in goodsDetil.product" :key="index">
|
||||
<u--image style="flex: 2;" radius='10' :showLoading="true" :src="item.goods_pic"
|
||||
width="100rpx" height="100rpx"></u--image>
|
||||
<text style="flex: 6;">{{item.goods_name}}</text>
|
||||
|
||||
<!-- <text style="flex: 1;">X{{item.product_num}}{{item.goods_unit}}</text> -->
|
||||
<text style="flex: 7;">{{item.goods_name}}</text>
|
||||
<text style="flex: 1;">X{{item.product_num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -99,7 +105,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹窗 -->
|
||||
<u-overlay :show="showToast" @click="showToast = false">
|
||||
<u-overlay :show="showToast" @click="offMaskFn">
|
||||
<view class="warp">
|
||||
<view class="rect">
|
||||
<view class="cont">
|
||||
@ -132,6 +138,7 @@
|
||||
showPop: false,
|
||||
goodsDetil: undefined,
|
||||
scale: 17,
|
||||
subNVue: null,
|
||||
nowAddress: "无",
|
||||
markers: [
|
||||
// 商家
|
||||
@ -322,7 +329,11 @@
|
||||
});
|
||||
},
|
||||
|
||||
offMaskFn() {
|
||||
this.showToast = false
|
||||
this.subNVue.hide()
|
||||
|
||||
},
|
||||
|
||||
|
||||
qrqodeFn() {
|
||||
@ -345,6 +356,7 @@
|
||||
}).then((res, err) => {
|
||||
this.showToast = true
|
||||
setTimeout(() => {
|
||||
this.subNVue.show(300)
|
||||
this.showToast = false
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
@ -371,6 +383,10 @@
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
this.subNVue = uni.getSubNVueById('map');
|
||||
this.subNVue.hide()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
</view>
|
||||
<view v-else @scroll='scrolling'>
|
||||
<logistiCard ref="logistiCards" v-for="(item, index) in orderlist" @getlist="getOrderList"
|
||||
@showTost="showToast" @showToast2="showToast2" :goodsInfo="item" :key="index">
|
||||
@showToast2="showToast2" :goodsInfo="item" :key="index">
|
||||
</logistiCard>
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
@ -70,14 +70,6 @@
|
||||
this.getOrderList()
|
||||
},
|
||||
|
||||
showToast() {
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
title: '成功主题(带图标)',
|
||||
message: "操作成功",
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||
})
|
||||
},
|
||||
showToast2() {
|
||||
// 6
|
||||
this.$refs.uToast.show({
|
||||
|
@ -67,7 +67,7 @@
|
||||
<view style="margin: 10rpx 0;">
|
||||
<u-steps :current="record.length" direction="column">
|
||||
<u-steps-item :title="item.content" :error="index==record.length-1?true:false"
|
||||
:desc="item.create_time" v-for="(item,index) in goodsDetil.record">
|
||||
:desc="item.create_time" v-for="(item,index) in goodsDetil.record" :key="index">
|
||||
</u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
@ -77,7 +77,7 @@
|
||||
商品信息
|
||||
</text>
|
||||
<view>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
|
||||
<view class="goods_tit" v-for="(item,index) in goodsDetil.product" :key="index">
|
||||
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
<!-- <u--image style="flex: 2;" :showLoading="true" :src="item.goods_pic" width="100rpx"
|
||||
height="100rpx" @click="click"></u--image> -->
|
||||
@ -97,41 +97,95 @@
|
||||
<view>
|
||||
{{goodsDetil.record[2].create_time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="hr">
|
||||
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
收货详情
|
||||
收货详情:
|
||||
</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
用户名称:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.receiver_name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系方式:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.receiver_phone}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系地址:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.receiver_address}}
|
||||
</view>
|
||||
<view>
|
||||
{{ fuzzyName(goodsDetil.logistics.receiver_name) ||"顾客姓名"}}: {{goodsDetil.logistics.receiver_phone||"顾客电话"}}
|
||||
</view>
|
||||
<view>
|
||||
{{goodsDetil.record[2].create_time}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="hr">
|
||||
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
取货详情
|
||||
取货详情:
|
||||
</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
店铺名称:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_address||"商家地址"}}
|
||||
</view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_name||"商家电话"}}
|
||||
: {{goodsDetil.logistics.shop_phone||"商家电话"}}
|
||||
</view>
|
||||
<view>
|
||||
{{goodsDetil.record[1].create_time}}
|
||||
{{goodsDetil.logistics.shop_name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
店主姓名:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_user}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系方式:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_phone}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系方式:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_address}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 下划线 -->
|
||||
<view class="hr">
|
||||
|
||||
@ -143,18 +197,20 @@
|
||||
<view style="margin: 10rpx 0;">
|
||||
<u-steps :current="record.length" direction="column">
|
||||
<u-steps-item :title="item.content" :desc="item.create_time"
|
||||
v-for="(item,index) in goodsDetil.record">
|
||||
v-for="(item,index) in goodsDetil.record" :key='index'>
|
||||
</u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pro_list">
|
||||
<text style="width: 15vw;">
|
||||
商品信息
|
||||
商品信息:
|
||||
</text>
|
||||
<view>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
|
||||
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
<view class="goods_tit" v-for="(item,index) in goodsDetil.product" :key='index'>
|
||||
<u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true"
|
||||
:src="item.goods_pic" width="100rpx" height="100rpx"></u--image>
|
||||
<text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -163,7 +219,13 @@
|
||||
|
||||
<!-- 已取货 -->
|
||||
<view class="left" v-if="goodsDetil.logistics.status==1">
|
||||
<view class=" list">
|
||||
<view class="list">
|
||||
<text>
|
||||
收货详情:
|
||||
</text>
|
||||
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
用户名称
|
||||
</text>
|
||||
@ -173,7 +235,7 @@
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系方式
|
||||
联系方式:
|
||||
</text>
|
||||
<view @click.stop="callFn(goodsDetil.logistics.receiver_phone)">
|
||||
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone" color="#0122c7"
|
||||
@ -182,7 +244,7 @@
|
||||
</view>
|
||||
<view class="list" style="margin: 10rpx 0;">
|
||||
<text style="width: 16vw;">
|
||||
收货地址
|
||||
联系地址:
|
||||
</text>
|
||||
<view>
|
||||
<view>
|
||||
@ -190,6 +252,47 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
取货时间
|
||||
</text>
|
||||
<view>
|
||||
{{goodsDetil.logistics.qh_time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="hr">
|
||||
|
||||
</view>
|
||||
<view class="list" style="">
|
||||
<text>
|
||||
取货详情:
|
||||
</text>
|
||||
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
用户名称
|
||||
</text>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系方式
|
||||
</text>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_phone}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>
|
||||
联系地址
|
||||
</text>
|
||||
<view>
|
||||
{{goodsDetil.logistics.shop_address}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
物流信息
|
||||
@ -197,7 +300,7 @@
|
||||
<view style="margin: 20rpx 0;">
|
||||
<u-steps :current="record.length-1" direction="column">
|
||||
<u-steps-item :title="item.content" :desc="item.create_time"
|
||||
v-for="(item,index) in (record)">
|
||||
v-for="(item,index) in (record)" :key="index">
|
||||
</u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
@ -210,13 +313,13 @@
|
||||
|
||||
<view>
|
||||
<text style="color: #999;width: 15vw;">
|
||||
商品信息
|
||||
商品信息:
|
||||
</text>
|
||||
<view class="goods_tit" style="align-items: center;"
|
||||
v-for="(item,index) in goodsDetil.product">
|
||||
<u--image style="flex: 2;" radius='10' :showLoading="true" :src="item.goods_pic"
|
||||
width="100rpx" height="100rpx"></u--image>
|
||||
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
v-for="(item,index) in goodsDetil.product" :key="index">
|
||||
<u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true"
|
||||
:src="item.goods_pic" width="100rpx" height="100rpx"></u--image>
|
||||
<text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
|
||||
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -405,13 +508,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.pro_list {
|
||||
display: flex;
|
||||
|
||||
text {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
.pro_list {}
|
||||
|
||||
.total {
|
||||
/* font-family: "宋体"; */
|
||||
@ -445,8 +542,12 @@
|
||||
}
|
||||
|
||||
.goods_tit {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
/* background-color: red; */
|
||||
width: 650rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tost_tit {
|
||||
|
8
pages/logistics/mask.nvue
Normal file
8
pages/logistics/mask.nvue
Normal file
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
@ -15,7 +15,8 @@
|
||||
|
||||
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
|
||||
<view class="" v-if="baseList.length">
|
||||
<task-item :datas="item" v-for="item in baseList" :key="item.id"></task-item>
|
||||
<task-item :datas="item" :taskValueList='taskValueList' v-for="item in baseList"
|
||||
:key="item.id"></task-item>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<u-empty icon="/static/img/empty/data.png" text="没有任务"></u-empty>
|
||||
@ -39,6 +40,9 @@
|
||||
import {
|
||||
taskLists
|
||||
} from "@/api/task.js"
|
||||
import {
|
||||
dictDataListsTypeValue
|
||||
} from "@/api/oaPbulic.js"
|
||||
export default {
|
||||
components: {
|
||||
taskItem
|
||||
@ -64,19 +68,48 @@
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
list: []
|
||||
list: [],
|
||||
taskValueList: [],
|
||||
roleList: [{
|
||||
id: 17,
|
||||
type_vale: "village_task_type"
|
||||
}, {
|
||||
id: 16,
|
||||
type_vale: "town_task_type_marketing_director"
|
||||
}, {
|
||||
id: 15,
|
||||
type_vale: "town_task_type_master"
|
||||
}, {
|
||||
id: 14,
|
||||
type_vale: "town_task_type"
|
||||
}, {
|
||||
id: 5,
|
||||
type_vale: "task_type"
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.skeleton = true;
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.loadList();
|
||||
this.getTaskValue()
|
||||
},
|
||||
onReady() {
|
||||
uni.$on('initOaTask', this.loadList);
|
||||
},
|
||||
methods: {
|
||||
async getTaskValue() {
|
||||
const desiredElement = this.roleList.find(element => element.id == this.$store.state.app.userInfo
|
||||
.group_id);
|
||||
let res = await dictDataListsTypeValue({
|
||||
type_value: desiredElement.type_vale
|
||||
})
|
||||
this.taskValueList = res.data
|
||||
},
|
||||
changeTypeCurrent(e) {
|
||||
this.baseList = []
|
||||
this.status = e.id
|
||||
|
@ -1,313 +1,208 @@
|
||||
<template>
|
||||
<view style="padding-top: 28rpx;padding-bottom: 160rpx;">
|
||||
<view class="card">
|
||||
<view class="title">任务名称: {{task.title}}</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<!-- <view class="text">阶段类型: 单次</view> -->
|
||||
<view class="text" style="color: #FF7C32;" v-if="task.extend&&task.extend.shareholder">入股金额:
|
||||
{{task.extend.shareholder.money}}元
|
||||
<view class="task_page">
|
||||
|
||||
<!-- {{taskInfo}} -->
|
||||
|
||||
<u-skeleton v-if="skeleton" :class="{'loading': skeleton}" :animate="true" title rows="3" rows-width="92%"
|
||||
rowsHeight="56">
|
||||
</u-skeleton>
|
||||
<block v-else>
|
||||
<view class="card">
|
||||
<view class="c_title">{{`任务名称: ${taskInfo.title||''}`}}</view>
|
||||
<view>{{taskInfo.content||''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="card">
|
||||
<view class="title">任务描述</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<view class="text">{{task.content||'暂无任务描述'}}</view>
|
||||
</view> -->
|
||||
<view class="card">
|
||||
<view class="title">事件记录</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<u-steps v-if="task.extend&&task.extend.shareholder" :current="-1" direction="column" activeColor="#0122c7"
|
||||
dot inactiveColor="#0122c7">
|
||||
<u-steps-item v-for="(item, index) in task.extend.shareholder.user_list" :title="item.time"
|
||||
:desc="item.info">
|
||||
</u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">附件上传</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<text style="margin-right: 10rpx;">金额:</text>
|
||||
<view class="" style="width: 500rpx;">
|
||||
<u--input style="border: 1px solid #CCCCCC;" :readonly='isDisabled' placeholder="请输入金额"
|
||||
type='number' border="surround" v-model="amount"></u--input>
|
||||
</view>
|
||||
<view class="card" v-if="extend_info&&extend_info.target">
|
||||
<view class="c_title">目标数量: {{extend_info.target}}</view>
|
||||
</view>
|
||||
<view class="" :class="{hide:file}" v-if="!isDisabled">
|
||||
<view class="" :class="{hide:progress!=0}">
|
||||
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
|
||||
style="margin-top: 28rpx;" :debug="false" :formats="'png,jpg,jpeg,pdf,webp'" :multiple="false"
|
||||
:count="1" :instantly="false" @change="changeFile" @uploadEnd="onuploadEnd"
|
||||
@progress="onprogress">
|
||||
<view class="change-file">上传凭证</view>
|
||||
</lsjUpload>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;" v-if="progress>0">
|
||||
<u-loading-icon :text=" '正在上传中'+ progress+'%'" textSize="18"></u-loading-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="file" v-if='file'>
|
||||
<view class="">
|
||||
<image :src="local_src||file" style="width: 150rpx;height: 150rpx;margin-right: 12rpx;"
|
||||
v-if="file_type=='image'">
|
||||
</image>
|
||||
<image src="@/static/img/contract/pdf.png" style="width: 150rpx;height: 150rpx;margin-right: 12rpx;"
|
||||
v-else>
|
||||
</image>
|
||||
</view>
|
||||
<view class="r-cont">
|
||||
<view class="">
|
||||
{{fileTit}}
|
||||
<view class="card" v-if="extend_info&&extend_info.store_name">
|
||||
<view class="c_title">指定商品: </view>
|
||||
<view class="store">
|
||||
<view class="store_name" v-for="(item, index) in extend_info.store_name" :key="index"
|
||||
@click="copyName(item)">
|
||||
{{item}}
|
||||
</view>
|
||||
<view class="" style="display: flex;">
|
||||
<view class="" style="color: blue;margin-right: 10rpx;" @click="navToContract">
|
||||
查看
|
||||
</view>
|
||||
<view class="" style="color: red;" @click="delFn" v-if="!isDisabled">
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- <button @click='uplodeFileFn'>点击上传附件</button> -->
|
||||
|
||||
<!-- <image class="contract_img" src="@/static/img/contract/pdf.png"></image> -->
|
||||
<!-- <view class="text">
|
||||
<view class="name">{{item.contract_type_name||'合同'}}</view>
|
||||
<view>
|
||||
<text>{{item.update_time}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="text" style="color: #FF7C32;">入股的金额将在次日凌晨更新到"股金管理"内,请于次日打开"股金管理"页面查看详情</view> -->
|
||||
</view>
|
||||
<!-- <mybtn v-if="task.status!=3 && task.status!=5" text="前往支付页面"
|
||||
@click="navTo(`/subpkg/topUp/topUp?task_id=${task_id}`)"></mybtn>
|
||||
<mybtn v-else :text="task.status==3?'已完成任务':'任务已关闭'" :my_btn_disabled="true"></mybtn> -->
|
||||
<mybtn v-if="!isDisabled" text="提交" @click="submitFn"></mybtn>
|
||||
<mybtn v-else-if='task.status==3' text="已完成任务" :my_btn_disabled="true"></mybtn>
|
||||
<mybtn v-else-if="isDisabled" text="任务已经提交" :my_btn_disabled="true"></mybtn>
|
||||
<view class="card">
|
||||
<view class="c_title">判定条件:</view>
|
||||
<view style="white-space: pre-line;">{{remark}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
taskShareholder,
|
||||
commit_service_group_taskAPI
|
||||
} from "@/api/task.js"
|
||||
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
|
||||
import {
|
||||
FILE_URL,
|
||||
IMG_URL
|
||||
} from '@/api/file.js'
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi";
|
||||
|
||||
import {
|
||||
townTaskDetails
|
||||
} from "@/api/task.js"
|
||||
import {
|
||||
dictDataListsTypeValue
|
||||
} from "@/api/oaPbulic.js"
|
||||
export default {
|
||||
components: {
|
||||
lsjUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
progress: 0,
|
||||
imgTypeList: ["png", "jpg", "jpeg", "webp"],
|
||||
isDisabled: false,
|
||||
amount: "",
|
||||
fileOption: {},
|
||||
task: {},
|
||||
task_id: -1,
|
||||
file: "",
|
||||
local_src: "",
|
||||
fileTit: "",
|
||||
file_type: "pdf",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.task_id = options.task_id;
|
||||
this.loadTask();
|
||||
uni.$on('upBuyShare', this.loadTask);
|
||||
this.fileOption = {
|
||||
url: FILE_URL,
|
||||
name: 'file',
|
||||
header: {
|
||||
token: this.$store.state.app.token
|
||||
}
|
||||
taskInfo: {
|
||||
id: '',
|
||||
title: '',
|
||||
content: '',
|
||||
extend: {}
|
||||
},
|
||||
extend_info: null,
|
||||
remark: '',
|
||||
skeleton: true,
|
||||
type_value: 'town_task_type', // 任务类型
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
options.task_id ? this.taskInfo.id = options.task_id : null;
|
||||
options.type_value ? this.type_value = options.type_value : null;
|
||||
this.initTask();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
navToContract() {
|
||||
let fileSrc = this.file
|
||||
if (this.file_type == 'image') {
|
||||
uni.previewImage({
|
||||
urls: [fileSrc]
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/subpkg/pdfView/pdfView?url=${fileSrc}`
|
||||
})
|
||||
async initTask() {
|
||||
this.skeleton = true;
|
||||
let res = await townTaskDetails({
|
||||
id: this.taskInfo.id
|
||||
});
|
||||
if (res.data?.template_info?.extend) {
|
||||
if (res.data?.template_info?.extend?.goods_id && typeof res.data?.template_info?.extend
|
||||
?.goods_id !== 'object') {
|
||||
res.data.template_info.extend.goods_id = res.data?.template_info?.extend?.goods_id.split(',');
|
||||
res.data.template_info.extend.store_name = res.data?.template_info?.extend?.store_name.split(
|
||||
';') || [];
|
||||
}
|
||||
this.extend_info = res.data?.template_info?.extend;
|
||||
}
|
||||
},
|
||||
async submitFn() {
|
||||
if (!this.amount) return Toast("请输入金额")
|
||||
if (Number(this.amount) < Number(this.task.extend.shareholder.money)) return Toast("未达到目标入股金额,无法提交")
|
||||
let data = {
|
||||
id: this.task_id,
|
||||
annex: this.file,
|
||||
amount: this.amount,
|
||||
file_type: this.file_type
|
||||
}
|
||||
|
||||
let res = await commit_service_group_taskAPI({
|
||||
...data
|
||||
this.taskInfo = res.data;
|
||||
let dict = await dictDataListsTypeValue({
|
||||
type_value: this.type_value
|
||||
// type_value: 'town_task_type_master'
|
||||
})
|
||||
Toast("操作成功!")
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
},
|
||||
delFn() {
|
||||
this.clear()
|
||||
this.file = ""
|
||||
this.file_type = "pdf"
|
||||
this.progress = 0
|
||||
|
||||
},
|
||||
clear() {
|
||||
this.$refs.lsjUpload.clear();
|
||||
},
|
||||
/**
|
||||
* 某文件上传结束回调(成功失败都回调)
|
||||
* @param {Object} item 当前上传完成的文件
|
||||
*/
|
||||
onuploadEnd(item) {
|
||||
let res = JSON.parse(item.responseText)
|
||||
this.file = res.data.uri
|
||||
this.fileTit = res.data.name
|
||||
this.$forceUpdate();
|
||||
},
|
||||
/**
|
||||
* 上传进度回调
|
||||
* 如果网页上md文档没有渲染出事件名称onprogre,请复制代码的小伙伴自行添加上哈,没有哪个事件是只(item)的
|
||||
* @param {Object} item 当前正在上传的文件
|
||||
*/
|
||||
onprogress(item) {
|
||||
this.progress = item.progress
|
||||
},
|
||||
/**
|
||||
* 文件选择回调
|
||||
* @param {Object} files 已选择的所有文件Map集合
|
||||
*/
|
||||
async changeFile(files) {
|
||||
let type = [...files.values()][0]?.name || null
|
||||
if (!type) return
|
||||
let isImage = null
|
||||
this.imgTypeList.forEach(item => {
|
||||
if (type.includes(item)) {
|
||||
isImage = true
|
||||
this.file_type = 'image'
|
||||
dict.data.forEach((item) => {
|
||||
if (item.id == this.taskInfo.type) {
|
||||
this.remark = item.remark;
|
||||
}
|
||||
})
|
||||
this.local_src = [...files.values()][0].path
|
||||
if (isImage) {
|
||||
this.$refs.lsjUpload.setData("url", IMG_URL)
|
||||
} else {
|
||||
this.$refs.lsjUpload.setData("url", FILE_URL)
|
||||
}
|
||||
this.$refs.lsjUpload.upload()
|
||||
// 更新选择的文件
|
||||
this.files = files;
|
||||
// 强制更新视图
|
||||
this.$forceUpdate();
|
||||
this.skeleton = false;
|
||||
},
|
||||
async loadTask() {
|
||||
let res = await taskShareholder({
|
||||
id: this.task_id
|
||||
});
|
||||
this.task = res.data;
|
||||
if (this.task.extend.is_commit == 1) {
|
||||
this.file = this.task.extend.annex
|
||||
this.file_type = this.task.extend.file_type
|
||||
this.amount = this.task.extend.amount || 0
|
||||
this.fileTit = "附件"
|
||||
this.isDisabled = true
|
||||
}
|
||||
},
|
||||
navTo(url) {
|
||||
if (url) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
success() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
} else Toast('暂未开放')
|
||||
},
|
||||
}
|
||||
copyName(str = "", type = "商品名称") {
|
||||
if (str) uni.setClipboardData({
|
||||
data: str + "",
|
||||
success: (e) => {
|
||||
Toast(type + '已复制')
|
||||
},
|
||||
fail: (e) => {
|
||||
Toast('复制失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx;
|
||||
padding: 28rpx;
|
||||
.task_page {
|
||||
padding-top: 30rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
.card {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 26rpx;
|
||||
padding: 28rpx;
|
||||
|
||||
.c_title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.file {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&_item {
|
||||
flex-shrink: 0;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 16rpx;
|
||||
border: 2px solid #ccc;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.del {
|
||||
position: absolute;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&_btn {
|
||||
flex-shrink: 0;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 16rpx;
|
||||
border: 2px solid #ccc;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
border-radius: 10rpx;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&_empty {
|
||||
flex-shrink: 0;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 16rpx;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.store {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 26rpx;
|
||||
color: #0122c7;
|
||||
margin-top: -10rpx;
|
||||
|
||||
&_name {
|
||||
flex-shrink: 0;
|
||||
padding: 8rpx;
|
||||
border: 5rpx solid #0122c7;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgba(#0122c7, 0.1);
|
||||
margin-right: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
line-height: 50rpx;
|
||||
.loading {
|
||||
padding: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.contract_img {
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
margin-right: 21rpx;
|
||||
}
|
||||
|
||||
.change-file {
|
||||
margin: 0 auto;
|
||||
width: 500rpx;
|
||||
height: 200rpx;
|
||||
border: 2px dashed #ccc;
|
||||
border-radius: 14rpx;
|
||||
color: #999;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.file {
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
|
||||
.r-cont {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.hide {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
336
subpkg/townTask/villageTask4.vue
Normal file
336
subpkg/townTask/villageTask4.vue
Normal file
@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<view style="padding-top: 28rpx;padding-bottom: 160rpx;">
|
||||
<view class="card">
|
||||
<view class="title">任务名称: {{task.title}}</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<!-- <view class="text">阶段类型: 单次</view> -->
|
||||
<view class="text" style="color: #FF7C32;" v-if="task.extend&&task.extend.shareholder">入股金额:
|
||||
{{task.extend.shareholder.money}}元
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="card">
|
||||
<view class="title">任务描述</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<view class="text">{{task.content||'暂无任务描述'}}</view>
|
||||
</view> -->
|
||||
<!-- <view class="card">
|
||||
<view class="title">事件记录</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<u-steps v-if="task.extend&&task.extend.shareholder" :current="-1" direction="column" activeColor="#0122c7"
|
||||
dot inactiveColor="#0122c7">
|
||||
<u-steps-item v-for="(item, index) in task.extend.shareholder.user_list" :title="item.time"
|
||||
:desc="item.info">
|
||||
</u-steps-item>
|
||||
</u-steps>
|
||||
</view> -->
|
||||
<view class="card" v-if="task.approve_status==3">
|
||||
<view class="title" style="color: #FF7C32;">驳回提示</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<view class="text" style="color: #FF7C32;">{{task.deny_notes}}</view>
|
||||
<!-- <button v-if="other.is_commit==1" class="btn" @click="toUpdate">去修改</button> -->
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">凭证上传</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<text style="margin-right: 10rpx;">金额:</text>
|
||||
<view class="" style="width: 500rpx;">
|
||||
<u--input style="border: 1px solid #CCCCCC;" :readonly='isDisabled && task.approve_status!=3'
|
||||
placeholder="请输入金额" type='number' border="surround" v-model="amount"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" :class="{hide:file}" v-if="!isDisabled || task.approve_status==3">
|
||||
<view class="" :class="{hide:progress!=0}">
|
||||
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
|
||||
style="margin-top: 28rpx;" :debug="false" :formats="'png,jpg,jpeg,pdf,webp'" :multiple="false"
|
||||
:count="1" :instantly="false" @change="changeFile" @uploadEnd="onuploadEnd"
|
||||
@progress="onprogress">
|
||||
<view class="change-file">上传凭证</view>
|
||||
</lsjUpload>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;" v-if="progress>0">
|
||||
<u-loading-icon :text=" '正在上传中'+ progress+'%'" textSize="18"></u-loading-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="file" v-if='file'>
|
||||
<view class="">
|
||||
<image :src="local_src||file" style="width: 150rpx;height: 150rpx;margin-right: 12rpx;"
|
||||
v-if="file_type=='image'">
|
||||
</image>
|
||||
<image src="@/static/img/contract/pdf.png" style="width: 150rpx;height: 150rpx;margin-right: 12rpx;"
|
||||
v-else>
|
||||
</image>
|
||||
</view>
|
||||
<view class="r-cont">
|
||||
<view class="">
|
||||
{{fileTit}}
|
||||
</view>
|
||||
<view class="" style="display: flex;">
|
||||
<view class="" style="color: blue;margin-right: 10rpx;" @click="navToContract">
|
||||
查看
|
||||
</view>
|
||||
<view class="" style="color: red;" @click="delFn" v-if="!isDisabled ||task.approve_status==3">
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- <button @click='uplodeFileFn'>点击上传附件</button> -->
|
||||
|
||||
<!-- <image class="contract_img" src="@/static/img/contract/pdf.png"></image> -->
|
||||
<!-- <view class="text">
|
||||
<view class="name">{{item.contract_type_name||'合同'}}</view>
|
||||
<view>
|
||||
<text>{{item.update_time}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="text" style="color: #FF7C32;">入股的金额将在次日凌晨更新到"股金管理"内,请于次日打开"股金管理"页面查看详情</view> -->
|
||||
</view>
|
||||
<!-- <mybtn v-if="task.status!=3 && task.status!=5" text="前往支付页面"
|
||||
@click="navTo(`/subpkg/topUp/topUp?task_id=${task_id}`)"></mybtn>
|
||||
<mybtn v-else :text="task.status==3?'已完成任务':'任务已关闭'" :my_btn_disabled="true"></mybtn> -->
|
||||
<mybtn v-if="!isDisabled" text="提交" @click="submitFn"></mybtn>
|
||||
<mybtn v-else-if="task.approve_status==3" text="已驳回,请重新提交" @click="submitFn"></mybtn>
|
||||
<mybtn v-else-if='task.status==3' text="已完成任务" :my_btn_disabled="true"></mybtn>
|
||||
<mybtn v-else-if="isDisabled" text="任务已经提交" :my_btn_disabled="true"></mybtn>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
taskShareholder,
|
||||
commit_village_task_4API,
|
||||
commit_village_task_5API,
|
||||
commit_town_service_manager_task_6API
|
||||
} from "@/api/task.js"
|
||||
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
|
||||
import {
|
||||
FILE_URL,
|
||||
IMG_URL
|
||||
} from '@/api/file.js'
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
lsjUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
progress: 0,
|
||||
imgTypeList: ["png", "jpg", "jpeg", "webp"],
|
||||
isDisabled: false,
|
||||
amount: "",
|
||||
fileOption: {},
|
||||
task: {},
|
||||
task_id: -1,
|
||||
file: "",
|
||||
local_src: "",
|
||||
fileTit: "",
|
||||
file_type: "pdf",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.task_id = options.task_id;
|
||||
this.loadTask();
|
||||
uni.$on('upBuyShare', this.loadTask);
|
||||
this.fileOption = {
|
||||
url: FILE_URL,
|
||||
name: 'file',
|
||||
header: {
|
||||
token: this.$store.state.app.token
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navToContract() {
|
||||
let fileSrc = this.file
|
||||
if (this.file_type == 'image') {
|
||||
uni.previewImage({
|
||||
urls: [fileSrc]
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/subpkg/pdfView/pdfView?url=${fileSrc}`
|
||||
})
|
||||
}
|
||||
},
|
||||
async submitFn() {
|
||||
if (!this.amount) return Toast("请输入金额")
|
||||
let data = {
|
||||
id: this.task_id,
|
||||
annex: this.file,
|
||||
amount: this.amount,
|
||||
file_type: this.file_type
|
||||
}
|
||||
|
||||
|
||||
if (this.task.type == 66) {
|
||||
let res = await commit_village_task_5API({
|
||||
...data
|
||||
})
|
||||
}
|
||||
|
||||
if (this.task.type == 65) {
|
||||
let res = await commit_village_task_4API({
|
||||
...data
|
||||
})
|
||||
}
|
||||
if (this.task.type == 49) {
|
||||
let res = await commit_town_service_manager_task_6API({
|
||||
...data
|
||||
})
|
||||
}
|
||||
|
||||
Toast("操作成功!")
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
},
|
||||
delFn() {
|
||||
if (this.task.approve_status != 3) this.clear()
|
||||
this.file = ""
|
||||
this.file_type = "pdf"
|
||||
this.progress = 0
|
||||
|
||||
},
|
||||
clear() {
|
||||
this.$refs.lsjUpload.clear();
|
||||
},
|
||||
/**
|
||||
* 某文件上传结束回调(成功失败都回调)
|
||||
* @param {Object} item 当前上传完成的文件
|
||||
*/
|
||||
onuploadEnd(item) {
|
||||
let res = JSON.parse(item.responseText)
|
||||
this.file = res.data.uri
|
||||
this.fileTit = res.data.name
|
||||
this.$forceUpdate();
|
||||
},
|
||||
/**
|
||||
* 上传进度回调
|
||||
* 如果网页上md文档没有渲染出事件名称onprogre,请复制代码的小伙伴自行添加上哈,没有哪个事件是只(item)的
|
||||
* @param {Object} item 当前正在上传的文件
|
||||
*/
|
||||
onprogress(item) {
|
||||
this.progress = item.progress
|
||||
},
|
||||
/**
|
||||
* 文件选择回调
|
||||
* @param {Object} files 已选择的所有文件Map集合
|
||||
*/
|
||||
async changeFile(files) {
|
||||
let type = [...files.values()][0]?.name || null
|
||||
if (!type) return
|
||||
let isImage = null
|
||||
this.imgTypeList.forEach(item => {
|
||||
if (type.includes(item)) {
|
||||
isImage = true
|
||||
this.file_type = 'image'
|
||||
}
|
||||
})
|
||||
this.local_src = [...files.values()][0].path
|
||||
if (isImage) {
|
||||
this.$refs.lsjUpload.setData("url", IMG_URL)
|
||||
} else {
|
||||
this.$refs.lsjUpload.setData("url", FILE_URL)
|
||||
}
|
||||
this.$refs.lsjUpload.upload()
|
||||
// 更新选择的文件
|
||||
this.files = files;
|
||||
// 强制更新视图
|
||||
this.$forceUpdate();
|
||||
},
|
||||
async loadTask() {
|
||||
let res = await taskShareholder({
|
||||
id: this.task_id
|
||||
});
|
||||
this.task = res.data;
|
||||
if (this.task.extend?.is_commit == 1) {
|
||||
this.file = this.task.extend.annex
|
||||
this.file_type = this.task.extend.file_type
|
||||
this.amount = this.task.extend.amount || 0
|
||||
this.fileTit = "附件"
|
||||
this.isDisabled = true
|
||||
}
|
||||
},
|
||||
navTo(url) {
|
||||
if (url) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
success() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
} else Toast('暂未开放')
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx;
|
||||
padding: 28rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.text {
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.contract_img {
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
margin-right: 21rpx;
|
||||
}
|
||||
|
||||
.change-file {
|
||||
margin: 0 auto;
|
||||
width: 500rpx;
|
||||
height: 200rpx;
|
||||
border: 2px dashed #ccc;
|
||||
border-radius: 14rpx;
|
||||
color: #999;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.file {
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
|
||||
.r-cont {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.hide {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user