页面修改

This commit is contained in:
zmj 2023-11-18 20:17:03 +08:00
parent eca744e099
commit dcf5a1a22f
5 changed files with 491 additions and 410 deletions

View File

@ -98,3 +98,18 @@ export const commit_town_service_manager_task_6API = (data) => oahttp.post('/tas
*/
export const commit_town_master_task_6API = (data) => oahttp.post('/task/commit_town_master_task_6',
data)
/**
* 应用软件推广
*/
export const commit_town_master_task_type_2API = (data) => oahttp.post('/task/commit_town_master_task_type_2',
data)
/**
* 应用软件推广
*/
export const commit_town_master_task_type_7API = (data) => oahttp.post('/task/commit_town_master_task_type_7',
data)
/**
* 应用软件推广
*/
export const commit_town_master_task_type_8API = (data) => oahttp.post('/task/commit_town_master_task_type_8',
data)

View File

@ -145,11 +145,10 @@
"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_7",
"town_task_type_master_8"
// "",
], // /subpkg/townTask/townTask 1
navToList: ["village_task_type_4", "village_task_type_5", "town_task_type_6", "town_task_type_master_6", ],
@ -243,9 +242,24 @@
case "village_task_type_8":
this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`);
break;
case "town_task_type_master_2":
this.navTo(
`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}&type_value=${this.$props.datas.task_type_value}`
);
break;
case "town_task_type_master_3":
this.navTo(`/subpkg/townTask/gatherRecords?task_id=${this.$props.datas?.id}`);
break;
case "town_task_type_master_7":
this.navTo(
`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}&type_value=${this.$props.datas.task_type_value}`
);
break;
case "town_task_type_master_8":
this.navTo(
`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}&type_value=${this.$props.datas.task_type_value}`
);
break;
default:
this.navTo('');
break;

View File

@ -5,7 +5,7 @@
lineWidth='100' inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
<view class="" style="height: 20rpx;">
</view>
<view class="card" v-for="(item,index) in gatherList" :key="item.id" v-if="page==1&&item.planting"
<view class="card" v-for="(item,index) in gatherList.planting" :key="item.id" v-if="page==1"
@click="navgo(`/subpkg/townTask/townGather?type=plant&task_id=${task_id}&index=${index}`)">
<view class="card_head">
@ -18,14 +18,14 @@
</view>
<view class="card_content">
<view class="" style="margin-bottom: 20rpx;">
法人姓名: {{item.planting[0].entityName}}
法人姓名: {{item.entityName}}
</view>
<view class="">
联系电话: {{item.planting[0].phone}}
联系电话: {{item.phone}}
</view>
</view>
</view>
<view class="card" v-for="(item,index) in gatherList" :key="index" v-if="page==2&&item.supply"
<view class="card" v-for="(item,index) in gatherList.supply" :key="index" v-if="page==2"
@click="navgo(`/subpkg/townTask/townGather?type=supply&task_id=${task_id}&index=${index}`)">
<view class="card_head">
<view class="">
@ -37,10 +37,10 @@
</view>
<view class="card_content">
<view class="" style="margin-bottom: 20rpx;">
店主姓名: {{item.supply[0].storeName}}
店主姓名: {{item.storeName}}
</view>
<view class="">
联系电话: {{item.supply[0].shopkeeperPhone}}
联系电话: {{item.shopkeeperPhone}}
</view>
</view>
</view>
@ -72,7 +72,7 @@
data() {
return {
show: false,
gatherList: [],
gatherList: {},
page: 1,
task_id: "",
tabLists: [{

View File

@ -381,6 +381,7 @@
taskId: "",
readonly: false,
landPlanList: ['自己养', '出租', '代养', '租更多地扩大养殖'],
pas_Info: {},
breedingTypeList: [{
id: 1,
name: "水产"
@ -460,23 +461,37 @@
}
},
onLoad(option) {
this.taskId = option.task_id
if (option.type == 'supply') this.page = 0
if (option.index) {
townMasterTask3List({
id: option.task_id
}).then(res => {
this.pas_Info = res.data.template_info.extend.purchase_sales_info
if (option.index) {
this.readonly = true
this.flag = true
console.log(option, 6464)
if (option.type == 'supply') {
this.formData1 = res.data.template_info.extend.purchase_sales_info[option.index]?.supply[0]
this.formData1 = this.pas_Info.supply[option.index]
} else {
this.formData = res.data.template_info.extend.purchase_sales_info[option.index]?.planting[
0]
this.formData = this.pas_Info.planting[option.index]
}
}
// if (option.type == 'supply') {
// this.formData1 = res.data.template_info.extend.purchase_sales_info[option.index]?.supply[0]
// } else {
// this.formData = res.data.template_info.extend.purchase_sales_info[option.index]?.planting[
// 0]
// }
})
}
// }
this.flag = true
@ -580,26 +595,20 @@
this.formData[data.value] = e.detail.value;
},
async commit() {
if (this.page) {
this.pas_Info.planting.push(this.formData)
await townMasterTask3Commit({
id: Number(this.taskId),
purchase_sales_info: {
planting: [{
...this.formData
}],
}
purchase_sales_info: this.pas_Info
})
} else {
this.pas_Info.supply.push(this.formData1)
await townMasterTask3Commit({
id: Number(this.taskId),
purchase_sales_info: {
supply: [{
...this.formData1
}],
}
purchase_sales_info: this.pas_Info
})
}
Toast("操作成功")

View File

@ -21,7 +21,8 @@
<view class="file">
<view class="file_item" v-for="(item, index) in fileList" :key="'file'+index">
<image class="image" :src="item" @click="priview(index)"></image>
<image v-if="!other.is_commit" class="del" src="/static/icons/delete.png" @click.stop="deleteFile(index)">
<image v-if="!other.is_commit" class="del" src="/static/icons/delete.png"
@click.stop="deleteFile(index)">
</image>
</view>
<view v-if="!other.is_commit && this.fileList.length<9" class="file_btn" @click="chooseFile">
@ -76,9 +77,15 @@
import {
taskOtherTaskDetail,
taskOtherTaskCommit,
villageTask6Commit
villageTask6Commit,
commit_town_master_task_type_2API,
commit_town_master_task_type_7API,
commit_town_master_task_type_8API
} from "@/api/task.js"
import { Toast } from "../../libs/uniApi";
import {
Toast
} from "../../libs/uniApi";
export default {
data() {
return {
@ -102,11 +109,13 @@
fileList: [],
videoList: [],
video_src: '',
show_video: false
show_video: false,
type_value: ""
};
},
onLoad(options) {
this.task_id = options.task_id;
this.type_value = options?.type_value || ""
this.initDetail();
},
computed: {
@ -125,14 +134,17 @@
methods: {
//
initDetail() {
taskOtherTaskDetail({ id: this.task_id }).then((res) => {
taskOtherTaskDetail({
id: this.task_id
}).then((res) => {
this.taskInfo = res.data;
this.other = JSON.parse(JSON.stringify(res.data?.extend?.other || {})); //
this.approve_status = res.data?.approve_status;
this.deny_notes = res.data?.deny_notes;
res.data?.extend?.other?.note ? this.note = res.data?.extend?.other?.note : null;
res.data?.extend?.other?.annex ? this.fileList = res.data?.extend?.other?.annex : null;
res.data?.extend?.other?.video_annex ? this.videoList = res.data?.extend?.other?.video_annex : null;
res.data?.extend?.other?.video_annex ? this.videoList = res.data?.extend?.other?.video_annex :
null;
// this.other.is_commit = 0;
})
},
@ -158,19 +170,50 @@
Toast('未检测到您的修改,请修改后提交')
}
return flag;
}
else return true;
} else return true;
},
//
async submit() {
if (!this.isReject()) return; //
if (this.note.trim() == '') return Toast('详情描述不能为空');
if (this.type_value == 'town_task_type_master_2') {
await commit_town_master_task_type_2API({
id: this.task_id,
note: this.note,
annex: this.fileList,
video_annex: this.videoList
});
}
if (this.type_value == 'town_task_type_master_7') {
await commit_town_master_task_type_7API({
id: this.task_id,
note: this.note,
annex: this.fileList,
video_annex: this.videoList
});
}
if (this.type_value == 'town_task_type_master_8') {
await commit_town_master_task_type_8API({
id: this.task_id,
note: this.note,
annex: this.fileList,
video_annex: this.videoList
});
} else {
await villageTask6Commit({
id: this.task_id,
note: this.note,
annex: this.fileList,
video_annex: this.videoList
});
}
this.other.is_commit = 1;
this.approve_status = 1;
Toast('提交成功');