bug修复
This commit is contained in:
parent
47a517b653
commit
0c93989f39
@ -307,6 +307,9 @@
|
|||||||
takeGoods,
|
takeGoods,
|
||||||
doneDelivery
|
doneDelivery
|
||||||
} from "@/api/logistics.js"
|
} from "@/api/logistics.js"
|
||||||
|
import {
|
||||||
|
Toast
|
||||||
|
} from "@/libs/uniApi";
|
||||||
export default {
|
export default {
|
||||||
props: ['goodsInfo'],
|
props: ['goodsInfo'],
|
||||||
data() {
|
data() {
|
||||||
@ -360,8 +363,13 @@
|
|||||||
order_id: this.goodsInfo.order_id,
|
order_id: this.goodsInfo.order_id,
|
||||||
order_sn: sn
|
order_sn: sn
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
this.$emit('showTost')
|
this.$emit('showTost')
|
||||||
this.$emit('getlist')
|
this.$emit('getlist')
|
||||||
|
}).catch(err => {
|
||||||
|
Toast(err.msg)
|
||||||
|
// console.log(err, 65656)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -123,8 +123,9 @@
|
|||||||
taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'],
|
taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'],
|
||||||
townServiceList: [44, 45, 46, 47, 48, 49, 50], // 镇农科服务部长任务
|
townServiceList: [44, 45, 46, 47, 48, 49, 50], // 镇农科服务部长任务
|
||||||
navToTownServiceList: [44, 45, 46, 48, 49, 50], // 镇农科服务部长跳转/subpkg/townTask/townTask的任务 0
|
navToTownServiceList: [44, 45, 46, 48, 49, 50], // 镇农科服务部长跳转/subpkg/townTask/townTask的任务 0
|
||||||
navToTownMarketList: [51, 52, 53, 54, 55, 57, 58, 59], // 镇农科市场部长跳转/subpkg/townTask/townTask的任务 1
|
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
|
navToVillageList: [62, 63, 64, 65, 66, 68, ], // 村管理跳转/subpkg/townTask/townTask的任务 1
|
||||||
|
navToVillageListA: [75, 77, 78, 79, 80, 81] // 村管理跳转/subpkg/townTask/townTask的任务 1
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -146,6 +147,8 @@
|
|||||||
} else Toast('暂未开放')
|
} else Toast('暂未开放')
|
||||||
},
|
},
|
||||||
clickTask() {
|
clickTask() {
|
||||||
|
|
||||||
|
|
||||||
if (this.isTimeInRange()) return Toast('任务正在结算中');
|
if (this.isTimeInRange()) return Toast('任务正在结算中');
|
||||||
// if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) {
|
// if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) {
|
||||||
// return this.$props.datas.status == 3 ? Toast('任务已完成!') : Toast('任务已结束!');
|
// return this.$props.datas.status == 3 ? Toast('任务已完成!') : Toast('任务已结束!');
|
||||||
@ -162,6 +165,10 @@
|
|||||||
return this.navTo(
|
return this.navTo(
|
||||||
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`
|
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`
|
||||||
);
|
);
|
||||||
|
if (this.navToVillageListA.includes(this.$props.datas.type))
|
||||||
|
return this.navTo(
|
||||||
|
`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[2]}`
|
||||||
|
);
|
||||||
switch (this.$props.datas.type) {
|
switch (this.$props.datas.type) {
|
||||||
case 31:
|
case 31:
|
||||||
if (this.$store.state.app.userInfo.admin_id) this.navTo(
|
if (this.$store.state.app.userInfo.admin_id) this.navTo(
|
||||||
|
@ -331,24 +331,32 @@
|
|||||||
|
|
||||||
qrqodeFn() {
|
qrqodeFn() {
|
||||||
let that = this
|
let that = this
|
||||||
|
console.log(6666)
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
onlyFromCamera: true,
|
onlyFromCamera: true,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
|
||||||
that.takeGood(res.result)
|
that.takeGood(res.result)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取货{}
|
// 取货{}
|
||||||
takeGood(sn) {
|
takeGood(sn) {
|
||||||
|
console.log(takeGoods)
|
||||||
takeGoods({
|
takeGoods({
|
||||||
logistics_id: this.goodsDetil.logistics.id,
|
logistics_id: this.goodsDetil.logistics.id,
|
||||||
order_id: this.goodsDetil.logistics.order_id,
|
order_id: this.goodsDetil.logistics.order_id,
|
||||||
order_sn: sn
|
order_sn: sn
|
||||||
}).then(res => {
|
}).then((res, err) => {
|
||||||
|
console.log(545454, err)
|
||||||
this.showToast()
|
this.showToast()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
}).catch(err => {
|
||||||
|
Toast(err.msg)
|
||||||
|
console.log(err, 65656)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -6,10 +6,20 @@
|
|||||||
</u-skeleton>
|
</u-skeleton>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
|
<u-tabs style="background-color: #0022C7;" :list="tabLists" @click="changeTypeCurrent" lineColor='white'
|
||||||
|
lineWidth='30' inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
|
||||||
<u-empty v-if="list.length==0" icon="/static/img/empty/data.png" text="没有任务"></u-empty>
|
<u-empty v-if="list.length==0" icon="/static/img/empty/data.png" text="没有任务"></u-empty>
|
||||||
|
|
||||||
<view v-else class="task_list">
|
<view v-else class="task_list">
|
||||||
|
|
||||||
|
|
||||||
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
|
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
|
||||||
<task-item :datas="item" v-for="item in list" :key="item.id"></task-item>
|
<view class="" v-if="baseList.length">
|
||||||
|
<task-item :datas="item" 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>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@ -35,7 +45,16 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
status: 2,
|
||||||
skeleton: false,
|
skeleton: false,
|
||||||
|
baseList: [],
|
||||||
|
tabLists: [{
|
||||||
|
name: '进行中',
|
||||||
|
id: 2
|
||||||
|
}, {
|
||||||
|
name: '已完成',
|
||||||
|
id: 3
|
||||||
|
}, ],
|
||||||
loadConfig: {
|
loadConfig: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
@ -58,12 +77,21 @@
|
|||||||
uni.$on('initOaTask', this.loadList);
|
uni.$on('initOaTask', this.loadList);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeTypeCurrent(e) {
|
||||||
|
this.baseList = []
|
||||||
|
this.status = e.id
|
||||||
|
this.baseList = this.list.filter(item => item.status == this.status)
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
async loadList() {
|
async loadList() {
|
||||||
let res = await taskLists({
|
let res = await taskLists({
|
||||||
limit: 15,
|
limit: 15,
|
||||||
page: 1
|
page: 1
|
||||||
});
|
});
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
|
this.baseList = this.list.filter(item => item.status == this.status)
|
||||||
|
|
||||||
this.skeleton = false;
|
this.skeleton = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -282,7 +282,7 @@
|
|||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="店铺进货渠道" borderBottom>
|
<u-form-item labelWidth="auto" label="店铺进货渠道" borderBottom>
|
||||||
<u--input :readonly="readonly" type='number' v-model="formData1.incomingChannels"
|
<u--input :readonly="readonly" v-model="formData1.incomingChannels"
|
||||||
placeholder="请输入进货渠道"></u--input>
|
placeholder="请输入进货渠道"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无仓储" borderBottom>
|
<u-form-item labelWidth="auto" label="有无仓储" borderBottom>
|
||||||
|
@ -1,194 +1,208 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="task_page">
|
<view class="task_page">
|
||||||
<u-skeleton v-if="skeleton" :class="{'loading': skeleton}" :animate="true" title rows="3" rows-width="92%"
|
|
||||||
rowsHeight="56">
|
<!-- {{taskInfo}} -->
|
||||||
</u-skeleton>
|
|
||||||
<block v-else>
|
<u-skeleton v-if="skeleton" :class="{'loading': skeleton}" :animate="true" title rows="3" rows-width="92%"
|
||||||
<view class="card">
|
rowsHeight="56">
|
||||||
<view class="c_title">{{`任务名称: ${taskInfo.title||''}`}}</view>
|
</u-skeleton>
|
||||||
<view>{{taskInfo.content||''}}</view>
|
<block v-else>
|
||||||
</view>
|
<view class="card">
|
||||||
<view class="card" v-if="extend_info&&extend_info.target">
|
<view class="c_title">{{`任务名称: ${taskInfo.title||''}`}}</view>
|
||||||
<view class="c_title">目标数量: {{extend_info.target}}</view>
|
<view>{{taskInfo.content||''}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card" v-if="extend_info&&extend_info.store_name">
|
<view class="card" v-if="extend_info&&extend_info.target">
|
||||||
<view class="c_title">指定商品: </view>
|
<view class="c_title">目标数量: {{extend_info.target}}</view>
|
||||||
<view class="store">
|
</view>
|
||||||
<view class="store_name" v-for="(item, index) in extend_info.store_name" :key="index" @click="copyName(item)">
|
<view class="card" v-if="extend_info&&extend_info.store_name">
|
||||||
{{item}}
|
<view class="c_title">指定商品: </view>
|
||||||
</view>
|
<view class="store">
|
||||||
</view>
|
<view class="store_name" v-for="(item, index) in extend_info.store_name" :key="index"
|
||||||
</view>
|
@click="copyName(item)">
|
||||||
<view class="card">
|
{{item}}
|
||||||
<view class="c_title">判定条件:</view>
|
</view>
|
||||||
<view style="white-space: pre-line;">{{remark}}</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
<view class="card">
|
||||||
</view>
|
<view class="c_title">判定条件:</view>
|
||||||
|
<view style="white-space: pre-line;">{{remark}}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Toast } from "../../libs/uniApi";
|
import {
|
||||||
import { townTaskDetails } from "@/api/task.js"
|
Toast
|
||||||
import { dictDataListsTypeValue } from "@/api/oaPbulic.js"
|
} from "../../libs/uniApi";
|
||||||
export default {
|
import {
|
||||||
data() {
|
townTaskDetails
|
||||||
return {
|
} from "@/api/task.js"
|
||||||
taskInfo:{
|
import {
|
||||||
id: '',
|
dictDataListsTypeValue
|
||||||
title: '',
|
} from "@/api/oaPbulic.js"
|
||||||
content: '',
|
export default {
|
||||||
extend: {}
|
data() {
|
||||||
},
|
return {
|
||||||
extend_info: null,
|
taskInfo: {
|
||||||
remark: '',
|
id: '',
|
||||||
skeleton: true,
|
title: '',
|
||||||
type_value: 'town_task_type', // 任务类型
|
content: '',
|
||||||
}
|
extend: {}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
extend_info: null,
|
||||||
options.task_id?this.taskInfo.id=options.task_id:null;
|
remark: '',
|
||||||
options.type_value?this.type_value=options.type_value:null;
|
skeleton: true,
|
||||||
this.initTask();
|
type_value: 'town_task_type', // 任务类型
|
||||||
},
|
}
|
||||||
onShow() {},
|
},
|
||||||
methods: {
|
onLoad(options) {
|
||||||
async initTask(){
|
options.task_id ? this.taskInfo.id = options.task_id : null;
|
||||||
this.skeleton = true;
|
options.type_value ? this.type_value = options.type_value : null;
|
||||||
let res = await townTaskDetails({
|
this.initTask();
|
||||||
id: this.taskInfo.id
|
},
|
||||||
});
|
onShow() {},
|
||||||
if(res.data?.template_info?.extend){
|
methods: {
|
||||||
if(res.data?.template_info?.extend?.goods_id && typeof res.data?.template_info?.extend?.goods_id!=='object'){
|
async initTask() {
|
||||||
res.data.template_info.extend.goods_id = res.data?.template_info?.extend?.goods_id.split(',');
|
this.skeleton = true;
|
||||||
res.data.template_info.extend.store_name = res.data?.template_info?.extend?.store_name.split(';')||[];
|
let res = await townTaskDetails({
|
||||||
}
|
id: this.taskInfo.id
|
||||||
this.extend_info = res.data?.template_info?.extend;
|
});
|
||||||
}
|
if (res.data?.template_info?.extend) {
|
||||||
this.taskInfo = res.data;
|
if (res.data?.template_info?.extend?.goods_id && typeof res.data?.template_info?.extend
|
||||||
let dict = await dictDataListsTypeValue({
|
?.goods_id !== 'object') {
|
||||||
type_value: this.type_value
|
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(
|
||||||
dict.data.forEach((item)=>{
|
';') || [];
|
||||||
if(item.id==this.taskInfo.type){
|
}
|
||||||
this.remark = item.remark;
|
this.extend_info = res.data?.template_info?.extend;
|
||||||
}
|
}
|
||||||
})
|
this.taskInfo = res.data;
|
||||||
this.skeleton = false;
|
let dict = await dictDataListsTypeValue({
|
||||||
},
|
type_value: this.type_value
|
||||||
copyName(str = "", type = "商品名称") {
|
// type_value: 'town_task_type_master'
|
||||||
if (str) uni.setClipboardData({
|
})
|
||||||
data: str + "",
|
dict.data.forEach((item) => {
|
||||||
success: (e) => {
|
if (item.id == this.taskInfo.type) {
|
||||||
Toast(type + '已复制')
|
this.remark = item.remark;
|
||||||
},
|
}
|
||||||
fail: (e) => {
|
})
|
||||||
Toast('复制失败')
|
this.skeleton = false;
|
||||||
}
|
},
|
||||||
})
|
copyName(str = "", type = "商品名称") {
|
||||||
}
|
if (str) uni.setClipboardData({
|
||||||
},
|
data: str + "",
|
||||||
}
|
success: (e) => {
|
||||||
|
Toast(type + '已复制')
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
Toast('复制失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.task_page {
|
.task_page {
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 26rpx;
|
border-radius: 26rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
|
||||||
.c_title {
|
.c_title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file {
|
.file {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
&_item {
|
&_item {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
border: 2px solid #ccc;
|
border: 2px solid #ccc;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.del {
|
.del {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
top: 10rpx;
|
top: 10rpx;
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_btn {
|
&_btn {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
border: 2px solid #ccc;
|
border: 2px solid #ccc;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_empty {
|
&_empty {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.store{
|
.store {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #0122c7;
|
color: #0122c7;
|
||||||
margin-top: -10rpx;
|
margin-top: -10rpx;
|
||||||
&_name{
|
|
||||||
flex-shrink: 0;
|
&_name {
|
||||||
padding: 8rpx;
|
flex-shrink: 0;
|
||||||
border: 5rpx solid #0122c7;
|
padding: 8rpx;
|
||||||
border-radius: 10rpx;
|
border: 5rpx solid #0122c7;
|
||||||
background-color: rgba(#0122c7, 0.1);
|
border-radius: 10rpx;
|
||||||
margin-right: 10rpx;
|
background-color: rgba(#0122c7, 0.1);
|
||||||
margin-top: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.loading{
|
|
||||||
padding: 28rpx;
|
.loading {
|
||||||
}
|
padding: 28rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
x
Reference in New Issue
Block a user