# Conflicts: # src/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd11.vuerongxin_test
@@ -46,7 +46,7 @@ export function updateCbf(data) { | |||
// 删除承包方信息 | |||
export function deleteCbf(id) { | |||
return request({ | |||
url: '/service/cbf/mobile/remove/' + id, | |||
url: '/service/cbf/delete/' + id, | |||
method: 'get' | |||
}); | |||
} | |||
@@ -199,6 +199,11 @@ const whiteList = [ | |||
'/pest/pestLogin',//登录 | |||
'/pest/index',//首页 | |||
'/pest/agriculturalRecords',//农事记录 | |||
'/pest/agriculturalRecordsAdd',//农事记录(新增) | |||
'/pest/soilTesting',//土壤检测 | |||
'/pest/weather',//气象服务 | |||
'/pest/growthMonitoring',//长势监测 | |||
'/pest/temperatureAndHumidity',//温湿度 | |||
] | |||
@@ -2005,15 +2005,6 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/yinnong/personalPicture'], resolve) | |||
}, | |||
{ | |||
path: '/yinnong/done', | |||
name: 'yinnongDone', | |||
meta: { | |||
title: '我的已办', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/yinnong/done'], resolve) | |||
}, | |||
{ | |||
path: '/yinnong/doneCompleted/doneNew', | |||
name: 'yinnongDoneCompletedDoneNew', | |||
@@ -2023,15 +2014,6 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/yinnong/doneCompleted/doneNew'], resolve) | |||
}, | |||
{ | |||
path: '/yinnong/doneCompleted/completed', | |||
name: 'yinnongDoneCompletedCompleted', | |||
meta: { | |||
title: '我的待办', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/yinnong/doneCompleted/completed'], resolve) | |||
}, | |||
{ | |||
path: '/yinnong/doneCompleted/completedNew', | |||
name: 'yinnongDoneCompletedCompletedNew', | |||
@@ -5980,7 +5962,61 @@ export const constantRoutes = [ | |||
title: '农事记录', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/agriculturalRecords'], resolve) | |||
component: (resolve) => require(['@/views/pest/agriculturalRecords/agriculturalRecords'], resolve) | |||
}, | |||
{ | |||
path: '/pest/agriculturalRecordsAdd', | |||
name: 'agriculturalRecordsAdd', | |||
meta: { | |||
title: '新增农事记录', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/agriculturalRecords/agriculturalRecordsAdd'], resolve) | |||
}, | |||
{ | |||
path: '/pest/insectMonitoring', | |||
name: 'insectMonitoring', | |||
meta: { | |||
title: '虫情监测', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/insectMonitoring/insectMonitoring'], resolve) | |||
}, | |||
{ | |||
path: '/pest/soilTesting', | |||
name: 'soilTesting', | |||
meta: { | |||
title: '土壤检测', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/soilTesting/soilTesting'], resolve) | |||
}, | |||
{ | |||
path: '/pest/weather', | |||
name: 'weather', | |||
meta: { | |||
title: '气象服务', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/weather/weather'], resolve) | |||
}, | |||
{ | |||
path: '/pest/growthMonitoring', | |||
name: 'growthMonitoring', | |||
meta: { | |||
title: '长势监测', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/growthMonitoring/growthMonitoring'], resolve) | |||
}, | |||
{ | |||
path: '/pest/temperatureAndHumidity', | |||
name: 'temperatureAndHumidity', | |||
meta: { | |||
title: '温湿度', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/pest/temperatureAndHumidity/temperatureAndHumidity'], resolve) | |||
}, | |||
]; | |||
@@ -1,10 +1,8 @@ | |||
const deptId = 100 ; | |||
const severApi = 'http://192.168.31.107:8080'; | |||
export default | |||
{ | |||
deptId,//区县ID | |||
severApi,//全局API | |||
} | |||
export const REGION = { | |||
YI_LONG_XIAN: '仪陇', | |||
@@ -65,10 +65,11 @@ if(responseInterceptor === undefined){ | |||
responseInterceptor = service.interceptors.response.use(res => { | |||
Toast.clear(); | |||
// 未设置状态码则默认成功状态 | |||
const code = res.data.code || 200; | |||
const code = res.data.code || 200 || '200'; | |||
// 获取错误信息 | |||
const msg = errorCode[code] || res.data.msg || errorCode['default'] | |||
// console.info(gqnum); && gqnum === 0 | |||
console.log(code) | |||
if (code === 401) { | |||
// gqnum++; | |||
Dialog.confirm({ | |||
@@ -135,7 +136,7 @@ if(responseInterceptor === undefined){ | |||
} else if (code === 500) { | |||
Dialog.alert({ type: 'warning', message: msg }); | |||
return Promise.reject(new Error(msg)) | |||
} else if (code !== 200 && code !== 401) { | |||
} else if (code !== 200 && code !== 401 && code !== '200') { | |||
Dialog.alert({ type: 'warning', message: msg }); | |||
return Promise.reject('error') | |||
} else { | |||
@@ -25,7 +25,9 @@ | |||
</template> | |||
</van-field> | |||
<van-field v-model="form.ycbhtbm" label="原承包合同代码:" placeholder="请输入原承包合同代码" :border="false" input-align="left" maxlength="19" /> | |||
<van-field v-model="form.fbfbm" label="发包方代码:" placeholder="请输入发包方代码" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="14" /> | |||
<van-field v-model="form.fbfbm" label="发包方代码:" placeholder="请输入发包方代码" required :rules="[{ required: true }]" :border="false" input-align="left" :disabled="isDisabled" maxlength="14" /> | |||
<van-field v-model="form.cbfbm" label="承包方代码:" placeholder="请输入承包方代码" required :rules="[{ required: true }]" :border="false" input-align="left" :disabled="isDisabled" maxlength="18" /> | |||
<van-field v-model="form.cbfmc" label="承包方名称:" placeholder="请输入承包方名称" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="50" /> | |||
<van-field | |||
v-model="cbflxText" | |||
label="承包方类型:" | |||
@@ -48,8 +50,6 @@ | |||
@cancel="showType = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.cbfbm" label="承包方代码:" placeholder="请输入承包方代码" required :rules="[{ required: true }]" :border="false" input-align="left" :disabled="isDisabled" maxlength="18" /> | |||
<van-field v-model="form.cbfmc" label="承包方名称:" placeholder="请输入承包方名称" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="50" /> | |||
<van-field | |||
v-model="cbfsText" | |||
label="承包方式:" | |||
@@ -149,8 +149,9 @@ | |||
@cancel="showCbqxz = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.cbdkzs" label="承包地块数:" placeholder="请输入承包地块数" required :rules="[{ required: true }]" :border="false" input-align="left" type="digit" /> | |||
<van-field v-model="form.htzmjm" label="合同面积(亩):" placeholder="请输入合同面积(亩)" required :rules="[{ required: true }]" :border="false" input-align="left" type="number" /> | |||
<van-field v-model="form.cbdkzs" label="承包地块总数:" placeholder="请输入承包地块总数" required :rules="[{ required: true }]" :border="false" input-align="left" type="digit" /> | |||
<van-field v-model="form.htzmjm" label="合同总面积(亩):" placeholder="请输入合同总面积(亩)" required :rules="[{ required: true }]" :border="false" input-align="left" type="number" /> | |||
<van-field v-model="form.yhtzmjm" label="原合同总面积(亩):" placeholder="请输入原合同总面积(亩)" :border="false" input-align="left" type="number" /> | |||
</van-form> | |||
<p class="btn" @click="submitForm" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">保存</p> | |||
</div> | |||
@@ -248,6 +249,16 @@ | |||
}); | |||
}, | |||
submitForm() { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能保存承包合同信息'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
this.$refs.formData.validate().then(() => { | |||
if (this.form.id) { | |||
updateCbht(this.form).then(response => { | |||
@@ -293,6 +304,7 @@ | |||
cbqxz: null, | |||
cbdkzs: null, | |||
htzmjm: null, | |||
yhtzmjm: null, | |||
}; | |||
this.cbfsText = '家庭承包'; | |||
this.cbflxText = '农户'; | |||
@@ -359,7 +371,7 @@ | |||
} | |||
/deep/ .van-field__label { | |||
width: 225px; | |||
width: 245px; | |||
} | |||
/deep/ .van-field--disabled .van-field__label { | |||
@@ -186,7 +186,7 @@ | |||
}, | |||
deleteContractor(id, index) { | |||
this.$dialog.confirm({ | |||
message: '是否确认删除此条承包方信息?', | |||
message: '是否确认删除此条承包方信息以及与其相关联的家庭成员、承包合同、承包地块?', | |||
}).then(() => { | |||
// on confirm | |||
deleteCbf(id).then(res => { | |||
@@ -70,7 +70,82 @@ | |||
<van-field v-model="form.cbfdz" label="地址:" placeholder="请输入地址" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="100" /> | |||
<van-field v-model="form.yzbm" label="邮编:" placeholder="请输入邮编" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="6" /> | |||
<van-field v-model="form.lxdh" label="电话:" placeholder="请输入电话" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="15" /> | |||
<van-field v-model="form.cbfcysl" label="成员数量:" placeholder="请输入成员数量" required :rules="[{ required: true }]" :border="false" input-align="left" type="number" /> | |||
<van-field name="radio" label="是否有住房" :border="false" input-align="left"> | |||
<template #input> | |||
<van-radio-group v-model="form.sfyzf" direction="horizontal"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field name="radio" label="是否在村居住" :border="false" input-align="left"> | |||
<template #input> | |||
<van-radio-group v-model="form.sfzcjz" direction="horizontal"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
v-model="form.householdStatusText" | |||
label="整户状态:" | |||
placeholder="请选择整户状态" | |||
:border="false" | |||
input-align="left" | |||
right-icon="arrow-down" | |||
readonly | |||
clickable | |||
@click="showZhzt = true" | |||
/> | |||
<van-popup v-model="showZhzt" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="householdStatusOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmHouseholdStatusOptions" | |||
@cancel="showZhzt = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.totalArea" label="总面积(亩):" placeholder="请输入总面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.qqArea" label="确权面积(亩):" placeholder="请输入确权面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.qtArea" label="其他面积(亩):" placeholder="请输入其他面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.dks" label="地块数(块):" placeholder="请输入地块数(块)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.zzjyArea" label="自主经营面积(亩):" placeholder="请输入自主经营面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.lzcArea" label="流转出面积(亩):" placeholder="请输入流转出面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.shArea" label="损毁面积(亩):" placeholder="请输入损毁面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.zzArea" label="征占面积(亩):" placeholder="请输入征占面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.cbfdcy" label="调查员:" placeholder="请输入调查员" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="50" /> | |||
<van-field v-model="form.cbfdcrq" label="调查日期:" placeholder="请选择调查日期" required :rules="[{ required: true }]" | |||
:border="false" input-align="left" right-icon="arrow-down" readonly clickable @click="showDcrq = true" /> | |||
<van-popup v-model="showDcrq" position="bottom"> | |||
<van-datetime-picker | |||
:value="form.cbfdcrq ? new Date(form.cbfdcrq) : new Date()" | |||
type="date" | |||
title="请选择调查日期" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmDcrq" | |||
@cancel="showDcrq = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.cbfdcjs" label="调查记事:" type="textarea" rows="3" placeholder="请输入调查记事" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="250" /> | |||
<van-field v-model="form.gsjsr" label="公示记事人:" placeholder="请输入公示记事人" :border="false" input-align="left" maxlength="50" /> | |||
<van-field v-model="form.gsjs" label="公示记事:" type="textarea" rows="3" placeholder="请输入公示记事" :border="false" input-align="left" maxlength="250" /> | |||
<van-field v-model="form.gsshr" label="公示审核人:" placeholder="请输入公示审核人" :border="false" input-align="left" maxlength="20" /> | |||
<van-field v-model="form.gsshrq" label="公示审核日期:" placeholder="请选择公示审核日期" :border="false" input-align="left" right-icon="arrow-down" | |||
readonly clickable @click="showGsshrq = true" /> | |||
<van-popup v-model="showGsshrq" position="bottom"> | |||
<van-datetime-picker | |||
:value="form.gsshrq ? new Date(form.gsshrq) : new Date()" | |||
type="date" | |||
title="请选择公示审核日期" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmGsshrq" | |||
@cancel="showGsshrq = false" | |||
/> | |||
</van-popup> | |||
</van-form> | |||
<p class="btn" @click="submitForm" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">保存</p> | |||
</div> | |||
@@ -81,17 +156,21 @@ | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import contractorHeader from "./contractorHeader"; | |||
import FieldRadio from "@/components/form/FieldRadio"; | |||
import { getCbf, updateCbf } from "@/api/contracted/cbf"; | |||
export default { | |||
name: "contractedVillageContractor", | |||
components: { | |||
contractorHeader | |||
contractorHeader,FieldRadio | |||
}, | |||
data() { | |||
return { | |||
showType:false, | |||
showZjType:false, | |||
showZhzt:false, | |||
showDcrq: false, | |||
showGsshrq: false, | |||
// 承包方信息表单 | |||
form: {}, | |||
// 承包方类型字典 | |||
@@ -100,6 +179,10 @@ | |||
credentialTypeOptions: [], | |||
// 调查任务的完成状态:1表示已完成,2表示未完成 | |||
taskStatus: null, | |||
// 整户状态类型字典 | |||
householdStatusOptions: [], | |||
minDate: new Date(1978, 0, 1), | |||
maxDate: new Date(2100, 11, 31), | |||
}; | |||
}, | |||
created() { | |||
@@ -110,6 +193,9 @@ | |||
this.getDicts("cert_type").then(response => { | |||
this.credentialTypeOptions = response.data; | |||
}); | |||
this.getDicts("household_status").then(response => { | |||
this.householdStatusOptions = response.data; | |||
}); | |||
}, | |||
mounted() { | |||
setTimeout(() => { | |||
@@ -122,6 +208,9 @@ | |||
this.form = response.data; | |||
this.$set(this.form, 'cbflxText', this.selectDictLabel(this.contractorTypeOptions, response.data.cbflx)); | |||
this.$set(this.form, 'cbfzjlxText', this.selectDictLabel(this.credentialTypeOptions, response.data.cbfzjlx)); | |||
this.$set(this.form, 'householdStatusText', this.selectDictLabel(this.householdStatusOptions, response.data.householdStatus)); | |||
Cookies.set('householdStatus', this.form.householdStatus, { expires: 30 }); | |||
Cookies.set('householdStatusText', this.form.householdStatusText, { expires: 30 }); | |||
}); | |||
}, | |||
onConfirmTypeOptions(value){ | |||
@@ -134,6 +223,19 @@ | |||
this.form.cbfzjlxText = value.dictLabel; | |||
this.showZjType = false; | |||
}, | |||
onConfirmHouseholdStatusOptions(value){ | |||
this.form.householdStatus = value.dictValue; | |||
this.form.householdStatusText = value.dictLabel; | |||
this.showZhzt = false; | |||
}, | |||
onConfirmDcrq(data) { | |||
this.form.cbfdcrq = this.format(data, 'yyyy-MM-dd'); | |||
this.showDcrq = false; | |||
}, | |||
onConfirmGsshrq(data) { | |||
this.form.gsshrq = this.format(data, 'yyyy-MM-dd'); | |||
this.showGsshrq = false; | |||
}, | |||
submitForm() { | |||
this.$refs.formData.validate().then(() => { | |||
updateCbf(this.form).then(response => { | |||
@@ -178,7 +280,16 @@ | |||
padding: 0 4vw; | |||
overflow: hidden; | |||
} | |||
/deep/ .van-field__label { | |||
-webkit-box-flex: 0; | |||
flex: none; | |||
box-sizing: border-box; | |||
width: 9em; | |||
margin-right: 0.32rem; | |||
color: #646566; | |||
text-align: left; | |||
word-wrap: break-word; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
@@ -11,7 +11,7 @@ | |||
<div class="list_main"> | |||
<van-form ref="formData"> | |||
<van-field v-model="form.cbfbm" label="代码:" placeholder="<自动生成>" :border="false" input-align="left" maxlength="18"> | |||
<van-field v-model="form.cbfbm" label="代码:" placeholder="<自动生成>" :border="false" input-align="left" :disabled="true" maxlength="18"> | |||
<!-- <template #button> | |||
<van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | |||
</template> --> | |||
@@ -66,7 +66,82 @@ | |||
<van-field v-model="form.cbfdz" label="地址:" placeholder="请输入地址" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="100" /> | |||
<van-field v-model="form.yzbm" label="邮编:" placeholder="请输入邮编" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="6" /> | |||
<van-field v-model="form.lxdh" label="电话:" placeholder="请输入电话" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="15" /> | |||
<van-field v-model="form.cbfcysl" label="成员数量:" placeholder="请输入成员数量" required :rules="[{ required: true }]" :border="false" input-align="left" type="number" /> | |||
<van-field name="radio" label="是否有住房" :border="false" input-align="left"> | |||
<template #input> | |||
<van-radio-group v-model="form.sfyzf" direction="horizontal"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field name="radio" label="是否在村居住" :border="false" input-align="left"> | |||
<template #input> | |||
<van-radio-group v-model="form.sfzcjz" direction="horizontal"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
v-model="householdStatusText" | |||
label="整户状态:" | |||
placeholder="请选择整户状态" | |||
:border="false" | |||
input-align="left" | |||
right-icon="arrow-down" | |||
readonly | |||
clickable | |||
@click="showZhzt = true" | |||
/> | |||
<van-popup v-model="showZhzt" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="householdStatusOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmHouseholdStatusOptions" | |||
@cancel="showZhzt = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.totalArea" label="总面积(亩):" placeholder="请输入总面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.qqArea" label="确权面积(亩):" placeholder="请输入确权面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.qtArea" label="其他面积(亩):" placeholder="请输入其他面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.dks" label="地块数(块):" placeholder="请输入地块数(块)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.zzjyArea" label="自主经营面积(亩):" placeholder="请输入自主经营面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.lzcArea" label="流转出面积(亩):" placeholder="请输入流转出面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.shArea" label="损毁面积(亩):" placeholder="请输入损毁面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.zzArea" label="征占面积(亩):" placeholder="请输入征占面积(亩)" :border="false" input-align="left" type="number"/> | |||
<van-field v-model="form.cbfdcy" label="调查员:" placeholder="请输入调查员" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="50" /> | |||
<van-field v-model="form.cbfdcrq" label="调查日期:" placeholder="请选择调查日期" required :rules="[{ required: true }]" | |||
:border="false" input-align="left" right-icon="arrow-down" readonly clickable @click="showDcrq = true" /> | |||
<van-popup v-model="showDcrq" position="bottom"> | |||
<van-datetime-picker | |||
:value="new Date()" | |||
type="date" | |||
title="请选择调查日期" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmDcrq" | |||
@cancel="showDcrq = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.cbfdcjs" label="调查记事:" type="textarea" rows="3" placeholder="请输入调查记事" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="250" /> | |||
<van-field v-model="form.gsjsr" label="公示记事人:" placeholder="请输入公示记事人" :border="false" input-align="left" maxlength="50" /> | |||
<van-field v-model="form.gsjs" label="公示记事:" type="textarea" rows="3" placeholder="请输入公示记事" :border="false" input-align="left" maxlength="250" /> | |||
<van-field v-model="form.gsshr" label="公示审核人:" placeholder="请输入公示审核人" :border="false" input-align="left" maxlength="20" /> | |||
<van-field v-model="form.gsshrq" label="公示审核日期:" placeholder="请选择公示审核日期" :border="false" input-align="left" right-icon="arrow-down" | |||
readonly clickable @click="showGsshrq = true" /> | |||
<van-popup v-model="showGsshrq" position="bottom"> | |||
<van-datetime-picker | |||
:value="new Date()" | |||
type="date" | |||
title="请选择公示审核日期" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmGsshrq" | |||
@cancel="showGsshrq = false" | |||
/> | |||
</van-popup> | |||
</van-form> | |||
<p class="btn" @click="submitForm">保存</p> | |||
</div> | |||
@@ -77,13 +152,21 @@ | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import { addCbf, generateContractorCode } from "@/api/contracted/cbf"; | |||
import FieldRadio from "@/components/form/FieldRadio"; | |||
import FieldSelect from "@/components/form/FieldSelect"; | |||
export default { | |||
name: "contractedVillageContractorAdd", | |||
components: { | |||
FieldRadio,FieldSelect | |||
}, | |||
data() { | |||
return { | |||
showType:false, | |||
showZjType:false, | |||
showZhzt:false, | |||
showDcrq: false, | |||
showGsshrq: false, | |||
// 承包方信息表单 | |||
form: { | |||
deptId: null, | |||
@@ -96,16 +179,38 @@ | |||
yzbm: null, | |||
lxdh: null, | |||
cbfcysl: null, | |||
cbfdcy: null, | |||
cbfdcrq: null, | |||
cbfdcjs: null, | |||
gsjsr: null, | |||
gsjs: null, | |||
gsshr: null, | |||
gsshrq: null, | |||
sfyzf: 'Y', | |||
sfzcjz: 'Y', | |||
householdStatus: '1', | |||
totalArea: null, | |||
qqArea: null, | |||
qtArea: null, | |||
dks: null, | |||
zzjyArea: null, | |||
lzcArea: null, | |||
shArea: null, | |||
zzArea: null, | |||
}, | |||
// 承包方类型(标签名) | |||
cbflxText: '农户', | |||
// 承包方证件类型(标签名) | |||
cbfzjlxText: '居民身份证', | |||
householdStatusText: "正常", | |||
// 承包方类型字典 | |||
contractorTypeOptions: [], | |||
// 承包方证件类型字典 | |||
credentialTypeOptions: [], | |||
// 整户状态类型字典 | |||
householdStatusOptions: [], | |||
minDate: new Date(1978, 0, 1), | |||
maxDate: new Date(2100, 11, 31), | |||
}; | |||
}, | |||
created() { | |||
@@ -115,6 +220,9 @@ | |||
this.getDicts("cert_type").then(response => { | |||
this.credentialTypeOptions = response.data; | |||
}); | |||
this.getDicts("household_status").then(response => { | |||
this.householdStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
onConfirmTypeOptions(value){ | |||
@@ -127,10 +235,23 @@ | |||
this.cbfzjlxText = value.dictLabel; | |||
this.showZjType = false; | |||
}, | |||
onConfirmHouseholdStatusOptions(value){ | |||
this.form.householdStatus = value.dictValue; | |||
this.householdStatusText = value.dictLabel; | |||
this.showZhzt = false; | |||
}, | |||
onConfirmDcrq(data) { | |||
this.form.cbfdcrq = this.format(data, 'yyyy-MM-dd'); | |||
this.showDcrq = false; | |||
}, | |||
onConfirmGsshrq(data) { | |||
this.form.gsshrq = this.format(data, 'yyyy-MM-dd'); | |||
this.showGsshrq = false; | |||
}, | |||
submitForm() { | |||
this.$refs.formData.validate().then(() => { | |||
this.form.deptId = this.$route.params.deptId; | |||
this.form.cbfcysl = 1; | |||
// this.form.cbfcysl = 1; | |||
addCbf(this.form).then(response => { | |||
if (response.code == 200) { | |||
this.$toast({ | |||
@@ -164,7 +285,16 @@ | |||
padding: 0 4vw; | |||
overflow: hidden; | |||
} | |||
/deep/ .van-field__label { | |||
-webkit-box-flex: 0; | |||
flex: none; | |||
box-sizing: border-box; | |||
width: 9em; | |||
margin-right: 0.32rem; | |||
color: #646566; | |||
text-align: left; | |||
word-wrap: break-word; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
@@ -59,8 +59,8 @@ | |||
</div> | |||
</template> | |||
</van-swipe-cell> | |||
<!-- getDetail不加(), 第一个参数默认传递的是event,getDetail加(), 需要手动传递$event --> | |||
<p class="btn" @click="goDetail()" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">新增</p> | |||
<!-- addMember不加(), 第一个参数默认传递的是event,addMember加(), 需要手动传递$event --> | |||
<p class="btn" @click="addMember()" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">新增</p> | |||
</div> | |||
<van-popup v-model="showContractorPopup" position="bottom"> | |||
<van-search v-model="searchKeyword" placeholder="请输入姓名搜索" /> | |||
@@ -120,7 +120,7 @@ | |||
}); | |||
}, | |||
getContractorList() { | |||
listCbf({deptId: this.$route.params.deptId}).then(response => { | |||
listCbf({deptId: this.$route.params.deptId, householdStatus: '1'}).then(response => { | |||
this.contractorList = response.rows; | |||
}); | |||
}, | |||
@@ -135,6 +135,28 @@ | |||
} | |||
}); | |||
}, | |||
addMember() { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能新增家庭成员信息'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
this.$router.push({ | |||
name: 'contractedVillageContractorFamilyDetail', | |||
params: { | |||
id: undefined, | |||
deptId: this.$route.params.deptId, | |||
cbfbm: this.$route.params.cbfbm, | |||
cbfmc: this.$route.params.cbfmc, | |||
surveyStatus: this.$route.params.surveyStatus | |||
} | |||
}); | |||
}, | |||
goDetail(id) { | |||
this.$router.push({ | |||
name: 'contractedVillageContractorFamilyDetail', | |||
@@ -148,6 +170,16 @@ | |||
}); | |||
}, | |||
deleteFamilyMember(id, index) { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能删除家庭成员信息'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
this.$dialog.confirm({ | |||
message: '是否确认删除此条家庭成员信息?', | |||
}).then(() => { | |||
@@ -163,6 +195,16 @@ | |||
}); | |||
}, | |||
householdDivision(item, index) { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能执行分户操作'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
if (item.yhzgx === '户主') { | |||
this.$toast.fail('该成员身份为户主,不能分户'); | |||
return false; | |||
@@ -188,6 +230,16 @@ | |||
}); | |||
}, | |||
householdTransfer(item) { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能执行移户操作'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
if (item.yhzgx === '户主') { | |||
this.$toast.fail('该成员身份为户主,不能移户'); | |||
return false; | |||
@@ -220,6 +272,16 @@ | |||
}); | |||
}, | |||
houseHolder(item) { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能执行设为户主操作'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
if (item.yhzgx === '户主') { | |||
this.$toast.fail('该成员身份为户主,无需设置'); | |||
return false; | |||
@@ -27,6 +27,29 @@ | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
v-model="cyzjlxText" | |||
label="证件类型:" | |||
placeholder="请选择证件类型" | |||
required | |||
:rules="[{ required: true }]" | |||
:border="false" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
readonly | |||
clickable | |||
@click="showCredentialType = true" | |||
/> | |||
<van-popup v-model="showCredentialType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="cyzjlxOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmCredentialTypeOptions" | |||
@cancel="showCredentialType = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.cyzjhm" label="证件号码:" placeholder="请输入证件号码" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="20" /> | |||
<van-field | |||
v-model="familyStatusText" | |||
label="与户主关系:" | |||
@@ -56,29 +79,74 @@ | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
v-model="cyzjlxText" | |||
label="证件类型:" | |||
placeholder="请选择证件类型" | |||
required | |||
:rules="[{ required: true }]" | |||
:border="false" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
readonly | |||
clickable | |||
@click="showCredentialType = true" | |||
<field-select | |||
v-if="form.sfgyr === '2'" | |||
v-model="form.wdyy" | |||
label="无地原因:" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
placeholder="选择无地原因" | |||
remote-url="/open/zdzh/list/wdyy_type" | |||
:on-remote-response="'data'" | |||
/> | |||
<van-popup v-model="showCredentialType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="cyzjlxOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmCredentialTypeOptions" | |||
@cancel="showCredentialType = false" | |||
<FieldRadio | |||
v-if="form.sfgyr === '2'" | |||
v-model="form.sfhdr" | |||
label="是否侯地人员:" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
remote-url="/open/zdzh/list/sys_yes_no" | |||
:on-remote-response="'data'" | |||
/> | |||
<FieldRadio | |||
v-model="form.sfjtjjzzcy" | |||
label="是否集体经济组织成员:" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
remote-url="/open/zdzh/list/sys_yes_no" | |||
:on-remote-response="'data'" | |||
/> | |||
<FieldRadio | |||
v-model="form.isNew" | |||
label="是否新数据:" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
remote-url="/open/zdzh/list/sys_yes_no" | |||
:on-remote-response="'data'" | |||
/> | |||
<!-- <field-date-picker--> | |||
<!-- v-model="form.newAt"--> | |||
<!-- label="新增时间"--> | |||
<!-- placeholder="请选择新增时间"--> | |||
<!-- formatter="yyyy-MM-dd"--> | |||
<!-- input-align="right"--> | |||
<!-- />--> | |||
<van-field v-model="form.newAt" label="新增时间:" placeholder="请选择新增时间" :border="false" | |||
input-align="right" right-icon="arrow-down" readonly clickable @click="showNewAt = true" /> | |||
<van-popup v-model="showNewAt" position="bottom"> | |||
<van-datetime-picker | |||
:value="form.newAt ? new Date(form.newAt) : new Date()" | |||
type="date" | |||
title="请选择新增时间" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmNewAt" | |||
@cancel="showNewAt = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.cyzjhm" label="证件号码:" placeholder="请输入证件号码" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="20" /> | |||
<van-field v-model="form.elcbshjd" class="elcbshjd_css" label="二轮承包时户籍地:" placeholder="请输入二轮承包时户籍地" :border="false" input-align="right" maxlength="100" /> | |||
<van-field v-model="form.xhjd" label="现户籍地:" placeholder="请输入现户籍地" :border="false" input-align="right" maxlength="100" /> | |||
<!-- <field-select | |||
v-model="form.householdStatus" | |||
label="整户状态:" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
placeholder="请选择整户状态" | |||
remote-url="/open/zdzh/list/household_status" | |||
:on-remote-response="'data'" | |||
/> --> | |||
<van-field | |||
v-model="cybzText" | |||
label="成员备注:" | |||
@@ -111,10 +179,16 @@ | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import FieldRadio from "@/components/form/FieldRadio"; | |||
import FieldSelect from "@/components/form/FieldSelect"; | |||
import FieldDatePicker from "@/components/form/FieldDatePicker"; | |||
import { getJtcy, addJtcy, updateJtcy } from "@/api/contracted/cbfjtcy"; | |||
export default { | |||
name: "contractedVillageContractor", | |||
components: { | |||
FieldRadio, FieldSelect, FieldDatePicker | |||
}, | |||
data() { | |||
return { | |||
titleName: '', // 顶部标题名 | |||
@@ -131,6 +205,9 @@ | |||
familyStatusText: null, // 家庭身份标签名 | |||
showFamilyStatus: false, // 控制家庭身份字典弹出层的显示和隐藏 | |||
taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | |||
showNewAt: false, // 控制新建日期弹出层的显示和隐藏 | |||
minDate: new Date(1978, 0, 1), | |||
maxDate: new Date(2100, 11, 31), | |||
}; | |||
}, | |||
created() { | |||
@@ -186,6 +263,10 @@ | |||
this.cybzText = value.dictLabel; | |||
this.showMemberRemark = false; | |||
}, | |||
onConfirmNewAt(data) { | |||
this.form.newAt = this.format(data, 'yyyy-MM-dd'); | |||
this.showNewAt = false; | |||
}, | |||
goBack() { | |||
this.$router.push({ | |||
name: 'contractedVillageContractorFamily', | |||
@@ -198,6 +279,18 @@ | |||
}); | |||
}, | |||
submitForm() { | |||
if (this.$route.params.id) { | |||
let householdStatus = Cookies.get('householdStatus'); | |||
if (householdStatus !== '1') { | |||
let msg = '当前承包方已' + Cookies.get('householdStatusText') + ',不能修改家庭成员信息'; | |||
this.$toast({ | |||
icon: 'fail', // 找到自己需要的图标 | |||
message: msg, | |||
duration:"2000" | |||
}); | |||
return; | |||
} | |||
} | |||
this.$refs.formData.validate().then(() => { | |||
if (this.$route.params.id) { | |||
updateJtcy(this.form).then(response => { | |||
@@ -251,7 +344,15 @@ | |||
cybz: null, | |||
cybzsm: null, | |||
cycgfs: null, | |||
gqzbh: null | |||
gqzbh: null, | |||
sfjtjjzzcy: 'Y', | |||
isNew: 'N', | |||
newAt: null, | |||
elcbshjd: null, | |||
xhjd: null, | |||
wdyy: null, | |||
sfhdr: 'N', | |||
// householdStatus: '1', | |||
}; | |||
this.cyzjlxText = '居民身份证'; | |||
} | |||
@@ -267,7 +368,17 @@ | |||
padding: 0 4vw; | |||
overflow: hidden; | |||
} | |||
/deep/ .elcbshjd_css .van-field__label { | |||
-webkit-box-flex: 0; | |||
-webkit-flex: none; | |||
flex: none; | |||
box-sizing: border-box; | |||
width: 10.2em; | |||
margin-right: 0.32rem; | |||
color: #646566; | |||
text-align: left; | |||
word-wrap: break-word; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
@@ -45,6 +45,7 @@ | |||
import { contractorSignature, hangUp } from "@/api/contracted/cbf"; | |||
import vueEsign from "vue-esign"; | |||
import $ from "jquery"; | |||
import Cookies from "js-cookie"; | |||
export default { | |||
name: 'contractedVillageHeader', | |||
@@ -86,6 +87,8 @@ | |||
goBack() { | |||
getDept(this.deptId).then(response => { | |||
this.$router.push({path:'/contracted/village/contractor', query: { deptId: this.deptId, deptName: response.data.deptName }}); | |||
Cookies.remove('householdStatus'); | |||
Cookies.remove('householdStatusText'); | |||
}); | |||
}, | |||
handleSign() { | |||
@@ -122,7 +122,7 @@ | |||
}); | |||
}, | |||
getContractorList() { | |||
listCbf({deptId: this.$route.params.deptId}).then(response => { | |||
listCbf({deptId: this.$route.params.deptId, householdStatus: '1'}).then(response => { | |||
this.contractorList = response.rows; | |||
}); | |||
}, | |||
@@ -30,6 +30,28 @@ | |||
</van-picker> | |||
</van-popup> | |||
<van-field v-model="form.dkmc" label="地块名称:" placeholder="请输入地块名称" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | |||
<van-field | |||
v-model="syqxzText" | |||
label="所有权性质:" | |||
placeholder="请选择所有权性质" | |||
required | |||
:rules="[{ required: true }]" | |||
:border="false" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
readonly | |||
clickable | |||
@click="showOwnership = true" | |||
/> | |||
<van-popup v-model="showOwnership" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="syqxzOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmOwnershipOptions" | |||
@cancel="showOwnership = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
v-model="tdlylxText" | |||
label="土地利用类型:" | |||
@@ -103,13 +125,45 @@ | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field v-model="form.htmjm" type="number" label="合同面积(亩):" placeholder="请输入合同面积(亩)" required :rules="[{ required: true }]" :border="false" input-align="right" /> | |||
<van-field v-model="form.zjrxm" label="指界人姓名:" placeholder="请输入指界人姓名" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="100" /> | |||
<van-field v-model="form.dkdz" label="地块东至:" placeholder="请输入地块东至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | |||
<van-field v-model="form.dkxz" label="地块西至:" placeholder="请输入地块西至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | |||
<van-field v-model="form.dknz" label="地块南至:" placeholder="请输入地块南至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | |||
<van-field v-model="form.dkbz" label="地块北至:" placeholder="请输入地块北至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | |||
<van-field v-model="form.dkbzxx" label="地块备注信息:" placeholder="请输入地块备注信息" type="textarea" rows="3" :border="false" input-align="right" maxlength="250" /> | |||
<van-field v-model="form.dkbzxx" label="地块备注信息:" placeholder="请输入地块备注信息" :border="false" input-align="right" maxlength="250" /> <!-- type="textarea" rows="3" --> | |||
<van-field | |||
v-model="qdfsText" | |||
label="经营权取得方式:" | |||
placeholder="请选择经营权取得方式" | |||
required | |||
:rules="[{ required: true }]" | |||
:border="false" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
readonly | |||
clickable | |||
@click="showQdfs = true" | |||
/> | |||
<van-popup v-model="showQdfs" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="qdfsOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmQdfsOptions" | |||
@cancel="showQdfs = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.htmjm" type="number" label="合同面积(亩):" placeholder="请输入合同面积(亩)" required :rules="[{ required: true }]" :border="false" input-align="right" /> | |||
<van-field v-model="form.yhtmjm" type="number" label="原合同面积(亩):" placeholder="请输入原合同面积(亩)" :border="false" input-align="right" /> | |||
<van-field v-model="form.lzhtbm" label="流转合同代码:" placeholder="请输入流转合同代码" :border="false" input-align="right" maxlength="18" /> | |||
<van-field v-model="form.sfqqqg" label="是否确权确股:" placeholder="请选择是否确权确股" :border="false" input-align="right"> | |||
<template #input> | |||
<van-radio-group v-model="form.sfqqqg" direction="horizontal"> | |||
<van-radio v-for="item in sfqqqgOptions" :key="item.dictValue" :name="item.dictValue">{{ item.dictLabel }}</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<div class="mapBox"> | |||
<common-map ref="contractedLandMap" :minMapZoom="15" :maxMapZoom="18" :allowDraw="true" @drawFinished="onMapDrawFinished" /> | |||
@@ -139,6 +193,9 @@ | |||
isDisabled: false, // 是否禁用 | |||
form: {}, // 承包地信息表单 | |||
showLandCode: false, // 控制地块代码弹出层的显示和隐藏 | |||
syqxzOptions: [], // 所有权性质字典 | |||
syqxzText: null, // 所有权性质标签名 | |||
showOwnership: false, // 控制所有权性质字典弹出层的显示和隐藏 | |||
tdlylxOptions: [], // 土地利用类型字典 | |||
tdlylxText: null, // 土地利用类型标签名 | |||
showLandUseType: false, // 控制土地利用类型字典弹出层的显示和隐藏 | |||
@@ -149,6 +206,10 @@ | |||
tdytText: null, // 土地用途标签名 | |||
showLandPurpose: false, // 控制土地用途字典弹出层的显示和隐藏 | |||
sfjbntOptions: [], // 是否基本农田字典 | |||
qdfsOptions: [], // 承包经营权取得方式字典 | |||
qdfsText: null, // 经营权取得方式标签名 | |||
showQdfs: false, // 控制土地用途字典弹出层的显示和隐藏 | |||
sfqqqgOptions: [], // 是否确权确股字典 | |||
landList: [], // 地块信息列表 | |||
taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | |||
searchKeyword: '', // 弹出框查询关键字 | |||
@@ -156,6 +217,9 @@ | |||
}, | |||
created() { | |||
this.taskStatus = Cookies.get('taskStatus'); | |||
this.getDicts("land_ownership").then(response => { | |||
this.syqxzOptions = response.data; | |||
}); | |||
this.getDicts("land_use").then(response => { | |||
this.tdlylxOptions = response.data; | |||
}); | |||
@@ -167,6 +231,10 @@ | |||
}); | |||
this.getDicts("is_common").then(response => { | |||
this.sfjbntOptions = response.data; | |||
this.sfqqqgOptions = response.data; | |||
}); | |||
this.getDicts("jyq_method").then(response => { | |||
this.qdfsOptions = response.data; | |||
}); | |||
}, | |||
mounted() { | |||
@@ -211,9 +279,11 @@ | |||
getDetail(){ | |||
getCbdkxx(this.$route.params.id).then(response => { | |||
this.form = response.data; | |||
this.syqxzText = this.selectDictLabel(this.syqxzOptions, response.data.syqxz); | |||
this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, response.data.tdlylx); | |||
this.dldjText = this.selectDictLabel(this.dldjOptions, response.data.dldj); | |||
this.tdytText = this.selectDictLabel(this.tdytOptions, response.data.tdyt); | |||
this.qdfsText = this.selectDictLabel(this.qdfsOptions, response.data.cbjyqqdfs); | |||
if (response.data.theGeomJson) { | |||
this.form.theGeom = JSON.stringify(JSON.parse(response.data.theGeomJson).coordinates); | |||
this.$nextTick(() => { | |||
@@ -230,19 +300,25 @@ | |||
cbfbm: null, | |||
dkbm: null, | |||
dkmc: null, | |||
syqxz: null, | |||
tdlylx: null, | |||
dldj: null, | |||
tdyt: null, | |||
sfjbnt: null, | |||
htmjm: null, | |||
zjrxm: null, | |||
dkdz: null, | |||
dkxz: null, | |||
dknz: null, | |||
dkbz: null, | |||
dkbzxx: null, | |||
theGeom: null | |||
theGeom: null, | |||
cbjyqqdfs: '110', | |||
htmjm: null, | |||
yhtmjm: null, | |||
lzhtbm: null, | |||
sfqqqg: null | |||
}; | |||
this.qdfsText = '家庭承包'; | |||
}, | |||
openLandCodePopup() { | |||
/* if (this.form.dkbm) { | |||
@@ -257,6 +333,8 @@ | |||
onConfirmLandCodeOptions(value) { | |||
this.form.dkbm = value.dkbm; | |||
this.form.dkmc = value.dkmc; | |||
this.form.syqxz = value.syqxz; | |||
this.syqxzText = this.selectDictLabel(this.syqxzOptions, value.syqxz); | |||
this.form.tdlylx = value.tdlylx; | |||
this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, value.tdlylx); | |||
this.form.dldj = value.dldj; | |||
@@ -279,6 +357,11 @@ | |||
} | |||
this.showLandCode = false; | |||
}, | |||
onConfirmOwnershipOptions(value){ | |||
this.form.syqxz = value.dictValue; | |||
this.syqxzText = value.dictLabel; | |||
this.showOwnership = false; | |||
}, | |||
onConfirmLandUseTypeOptions(value) { | |||
this.form.tdlylx = value.dictValue; | |||
this.tdlylxText = value.dictLabel; | |||
@@ -294,6 +377,11 @@ | |||
this.tdytText = value.dictLabel; | |||
this.showLandPurpose = false; | |||
}, | |||
onConfirmQdfsOptions(value) { | |||
this.form.cbjyqqdfs = value.dictValue; | |||
this.qdfsText = value.dictLabel; | |||
this.showQdfs = false; | |||
}, | |||
goBack() { | |||
this.$router.push({ | |||
name: 'contractedVillageContractorLand', | |||
@@ -382,7 +470,7 @@ | |||
} | |||
/deep/ .van-field__label { | |||
width: 7em; | |||
width: 8em; | |||
} | |||
.tb_main{ | |||
@@ -50,6 +50,20 @@ | |||
<van-field v-model="form.lxdh" label="联系电话:" placeholder="请输入联系电话" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="15" /> | |||
<van-field v-model="form.fbfdz" label="地址:" placeholder="请输入地址" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="100" /> | |||
<van-field v-model="form.yzbm" label="邮政编码:" placeholder="请输入邮政编码" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="6" /> | |||
<van-field v-model="form.fbfdcy" label="调查员:" placeholder="请输入调查员" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="30" /> | |||
<van-field v-model="form.fbfdcrq" label="调查日期:" placeholder="请选择调查日期" required :rules="[{ required: true }]" | |||
:border="false" input-align="right" right-icon="arrow-down" readonly clickable @click="showDcrq = true" /> | |||
<van-popup v-model="showDcrq" position="bottom"> | |||
<van-datetime-picker | |||
:value="form.fbfdcrq ? new Date(form.fbfdcrq) : new Date()" | |||
type="date" | |||
title="请选择调查日期" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmDcrq" | |||
@cancel="showDcrq = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.fbfdcjs" label="调查记事:" placeholder="请输入调查记事" type="textarea" rows="3" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="200" /> | |||
<van-field label="签字图片:" readonly :border="false" label-width="auto" /> | |||
<img :src="'/api'+form.fbfdcqz" width="100%" alt="" /> | |||
@@ -115,6 +129,10 @@ | |||
resultImg: "", // 最终画布生成的base64图片 | |||
isCrop: false, // 是否裁剪,在画布设定尺寸基础上裁掉四周空白部分 | |||
}, | |||
// 调查日期弹出层 | |||
showDcrq: false, | |||
minDate: new Date(1978, 0, 1), | |||
maxDate: new Date(2100, 11, 31), | |||
}; | |||
}, | |||
created() { | |||
@@ -123,6 +141,8 @@ | |||
this.getDicts("cert_type").then(response => { | |||
this.credentialTypeOptions = response.data; | |||
}); | |||
}, | |||
mounted() { | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
@@ -150,6 +170,10 @@ | |||
this.credentialTypeText = value.dictLabel; | |||
this.showCredentialType = false; | |||
}, | |||
onConfirmDcrq(data) { | |||
this.form.fbfdcrq = this.format(data, 'yyyy-MM-dd'); | |||
this.showDcrq = false; | |||
}, | |||
submitForm() { | |||
this.$refs.formData.validate().then(() => { | |||
if (this.form.id) { | |||
@@ -192,6 +216,8 @@ | |||
lxdh: null, | |||
fbfdz: null, | |||
yzbm: null, | |||
fbfdcy: null, | |||
fbfdcrq: null, | |||
fbfdcjs: null, | |||
fbfdcqz: null | |||
}; | |||
@@ -15,6 +15,16 @@ | |||
<van-col span="2"></van-col> | |||
</van-row> | |||
<div id="content"></div> | |||
<div v-if="attachmentQueryList.length>0"> | |||
<van-divider>附件</van-divider> | |||
<van-cell :title="item.fileName" :url="'/api'+item.fileUrl" is-link v-for="(item,index) in attachmentQueryList"> | |||
<!-- 使用 right-icon 插槽来自定义右侧图标 --> | |||
<template #icon> | |||
<img src="../../assets/images/file_icon.png" style="display: block;width: 24px;margin-right: 5px;" alt=""> | |||
</template> | |||
</van-cell> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -25,6 +35,7 @@ export default { | |||
data() { | |||
return { | |||
detail:'', | |||
attachmentQueryList:[] | |||
}; | |||
}, | |||
created() { | |||
@@ -36,6 +47,19 @@ export default { | |||
console.log(response) | |||
this.detail = response.data | |||
document.getElementById('content').innerHTML = response.data.content; | |||
if(response.data.attachment){ | |||
var content = response.data.attachment.split(','); | |||
let list = []; | |||
content.map(rr=>{ | |||
list.push({ | |||
fileUrl:rr, | |||
fileName:rr.substr(27,rr.length) | |||
}) | |||
}) | |||
this.attachmentQueryList = list; | |||
} | |||
}); | |||
}, | |||
}, | |||
@@ -60,4 +84,11 @@ export default { | |||
img{ | |||
width: 100%; | |||
} | |||
/deep/.van-cell__title, .van-cell__value{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
} | |||
</style> |
@@ -7,23 +7,88 @@ | |||
fixed | |||
placeholder | |||
@click-left="$router.push({path:'/pest/index'})" | |||
/> | |||
@click-right="$router.push({path:'/pest/agriculturalRecordsAdd'})" | |||
> | |||
<template #right> | |||
<van-icon name="add-o" size="20" /> | |||
</template> | |||
</van-nav-bar> | |||
<van-search align="center" placeholder="请输入搜索关键词" left-icon="../../../static/images/pest/search_icon.png" /> | |||
<div class="file_main"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="地块选择 |" | |||
placeholder="请选择" | |||
@click="showLand = true" | |||
right-icon="list-switching" | |||
label-width="auto" | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择折旧方式' }]" | |||
/> | |||
<van-popup v-model="showLand" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="landOptions" | |||
@cancel="showLand = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="时间选择 |" | |||
placeholder="请选择" | |||
@click="showTime = true" | |||
right-icon="notes-o" | |||
label-width="auto" | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择折旧方式' }]" | |||
/> | |||
<van-popup v-model="showTime" position="bottom"> | |||
<van-datetime-picker | |||
v-model="currentDate" | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
/> | |||
</van-popup> | |||
<van-field readonly label="标题名称 |" placeholder="请输入" label-width="auto" :border="false" > | |||
<template #button> | |||
<p class="clear_file">重置</p> | |||
</template> | |||
</van-field> | |||
</div> | |||
<div class="statistics_main"> | |||
<p class="statistics_tt">共14条</p> | |||
<div class="statistics_block"> | |||
<p>排序</p> | |||
<van-icon name="exchange" style="transform: rotate(90deg)" /> | |||
</div> | |||
</div> | |||
<div class="list_main"> | |||
<van-list> | |||
<van-swipe-cell v-for="(item,index) in 10" :key="index" > | |||
<div class="item" @click="goDetail(item)"> | |||
<img src="../../../static/images/pest/index/pest_index_icon_15.png" alt=""> | |||
<img src="../../../../static/images/pest/list_img.png" alt=""> | |||
<div class="info"> | |||
<div class="title"> | |||
<p class="news_title">物品名称名称名称名称</p> | |||
<p class="tips_mark">仓库</p> | |||
<p class="news_title">记录人员</p> | |||
<p class="tips_mark">王响</p> | |||
</div> | |||
<div class="title"> | |||
<p class="news_title">农事记录</p> | |||
<p class="tips_mark">耕地浇灌农事记录</p> | |||
</div> | |||
<div class="time"> | |||
<p>库存量 <span>+100</span></p> | |||
<p>预警值 <span>50</span></p> | |||
<div class="title"> | |||
<p class="news_title">记录日期</p> | |||
<p class="tips_mark">2023.02.02 21:57 星期四</p> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -56,85 +121,44 @@ | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import { listSurveyTask } from "@/api/contracted"; | |||
import { getInfo, logout } from "@/api/login"; | |||
export default { | |||
name: "contractedIndex", | |||
name: "agriculturalRecords", | |||
data() { | |||
return { | |||
showPopover: false, | |||
// 通过 actions 属性来定义菜单选项 | |||
actions: [ | |||
{ text: '修改密码',value:1 }, | |||
{ text: '退出登录',value:2 } | |||
], | |||
nickName: null, | |||
phone: null, | |||
// 调查任务 | |||
surveyTask: { | |||
'FINISHED': [], // 已完成任务 | |||
'UNFINISHED': [] // 进行中任务 | |||
}, | |||
// 任务选项 | |||
taskOption: 'FINISHED', | |||
landOptions:[], | |||
showLand:false, | |||
showTime:false, | |||
minDate: new Date(2020, 0, 1), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(2021, 0, 17), | |||
}; | |||
}, | |||
created() { | |||
this.getUserInfo(); | |||
}, | |||
methods: { | |||
getUserInfo() { | |||
getInfo().then(response => { | |||
this.nickName = response.user.nickName; | |||
this.phone = response.user.phonenumber; | |||
this.getList(response.user.userId); | |||
}); | |||
}, | |||
getList(userId){ | |||
listSurveyTask({userId: userId}).then(response => { | |||
this.surveyTask = response.data; | |||
}); | |||
}, | |||
goDetail(item){ | |||
// 调查任务完成状态:已完成标记为1,未完成标记为2 | |||
let status = '1'; | |||
if (item.surStatus === 'UNFINISHED') { | |||
status = '2'; | |||
} | |||
Cookies.set('taskStatus', status, { expires: 30 }); | |||
this.$router.push({path:'/contracted/village/contractor', query: { deptId: item.deptId, deptName: item.deptName }}) | |||
}, | |||
onSelect(action) { | |||
switch (action.value) { | |||
case 1: | |||
this.$router.push({path:'/contracted/user/passWord'}) | |||
break; | |||
case 2: | |||
this.loginOut(); | |||
break; | |||
} | |||
}, | |||
changeTaskOption(option) { | |||
this.taskOption = option; | |||
}, | |||
loginOut() { | |||
logout().then(res => { | |||
this.$router.push({ path: '/contracted/login' }); | |||
}) | |||
} | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container{ | |||
background: #F2F6F2 url("../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background: #F2F6F2 url("../../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background-size: 100% auto; | |||
height: 100vh; | |||
padding: 0 4vw; | |||
} | |||
.clear_file{ | |||
background: linear-gradient(to right , #8AE15B , #BBFE9C); | |||
color: #ffffff; | |||
padding: 0 25px; | |||
border-radius: 100vh; | |||
font-size: .3rem; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
@@ -147,9 +171,45 @@ | |||
border: none; | |||
} | |||
/deep/ .van-search{ | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/deep/ .van-search__content{ | |||
padding: 5px 25px; | |||
border-radius: 20px; | |||
} | |||
/deep/ .van-search .van-cell{ | |||
align-items: center; | |||
} | |||
.file_main{ | |||
background: #ffffff; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
overflow: hidden; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.statistics_main{ | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
margin-top: 15PX; | |||
font-size: .35rem; | |||
line-height: 1; | |||
.statistics_tt{ | |||
flex: 1; /* 占据剩余空间 */ | |||
text-align: center; /* 文字水平居中 */ | |||
} | |||
.statistics_block{ | |||
display: flex; | |||
align-items: center; | |||
position: absolute; | |||
right: 0; | |||
} | |||
} | |||
.list_main{ | |||
margin-top: 15PX; | |||
/*height: 35vh;*/ | |||
height: 65vh; | |||
overflow-y: scroll; | |||
.item{ | |||
border-radius: 30px; | |||
@@ -160,32 +220,32 @@ | |||
display: flex; | |||
align-items: center; | |||
img{ | |||
width: 12%; | |||
width: 174px; | |||
height: 174px; | |||
border-radius: 10px; | |||
margin-right: 2vh; | |||
display: block; | |||
} | |||
.info{ | |||
flex: 1; | |||
.title{ | |||
display: flex; | |||
font-size: 32px; | |||
align-items: center; | |||
height: 58px; | |||
justify-content: space-between; | |||
.news_title{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
font-weight: bold; | |||
font-size: .35rem; | |||
color: rgba(28,35,76,.7); | |||
margin-right: 15px; | |||
} | |||
.tips_mark{ | |||
font-size: 14PX; | |||
font-size: .35rem; | |||
color: #1C234C; | |||
text-align: center; | |||
flex-shrink: 0; | |||
background: linear-gradient(to right,#8AE15B,#BBFE9C); | |||
padding: 5px 25px; | |||
border-radius: 100vh; | |||
} | |||
} | |||
@@ -239,7 +299,7 @@ | |||
.icon{ | |||
width: 22PX; | |||
height: 29PX; | |||
background: url('../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
@@ -250,7 +310,7 @@ | |||
.icon { | |||
width: 26PX; | |||
height: 25PX; | |||
background: url('../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
@@ -261,7 +321,7 @@ | |||
.icon { | |||
width: 29PX; | |||
height: 21PX; | |||
background: url('../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
@@ -272,7 +332,7 @@ | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background: url('../../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} |
@@ -0,0 +1,300 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
title="农事记录" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.push({path:'/pest/agriculturalRecords'})" | |||
/> | |||
<div class="file_main top"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="地块选择" | |||
placeholder="请选择" | |||
@click="showLand = true" | |||
right-icon="arrow-down" | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择折旧方式' }]" | |||
/> | |||
<van-popup v-model="showLand" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="landOptions" | |||
@cancel="showLand = false" | |||
/> | |||
</van-popup> | |||
<van-field label="记录人" placeholder="请输入" :border="false" /> | |||
<van-field label="标题" placeholder="请输入" :border="false" /> | |||
</div> | |||
<div class="file_main center"> | |||
<van-field readonly label="内容" :border="false" /> | |||
<van-field placeholder="请输入" type="textarea" rows="4" autosize :border="false" style="padding-top: 0;" /> | |||
</div> | |||
<div class="file_main bottom"> | |||
<van-field readonly label="农事图片" :border="false" /> | |||
<div class="load_block"> | |||
<van-uploader :after-read="afterRead" /> | |||
</div> | |||
</div> | |||
<div class="btn_main"> | |||
<van-button color="#CECECE" round block>取消</van-button> | |||
<van-button color="linear-gradient(to right , #8AE15B , #BBFE9C)" round block>确定</van-button> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
export default { | |||
name: "agriculturalRecordsAdd", | |||
data() { | |||
return { | |||
landOptions:[], | |||
showLand:false, | |||
showTime:false, | |||
minDate: new Date(2020, 0, 1), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(2021, 0, 17), | |||
}; | |||
}, | |||
created() { | |||
}, | |||
methods: { | |||
afterRead(file) { | |||
// 此时可以自行将文件上传至服务器 | |||
console.log(file); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container{ | |||
background: #F2F6F2 url("../../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background-size: 100% auto; | |||
height: 100vh; | |||
padding: 0 4vw; | |||
} | |||
.btn_main{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
margin-top: 5vh; | |||
button:nth-child(2){ | |||
margin-left: 5vh; | |||
} | |||
} | |||
.clear_file{ | |||
background: linear-gradient(to right , #8AE15B , #BBFE9C); | |||
color: #ffffff; | |||
padding: 0 25px; | |||
border-radius: 100vh; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
/deep/ .top.van-field__label{ | |||
border-right: 1px solid #ddd; | |||
} | |||
/deep/ .center textarea{ | |||
background: #F5F8F6; | |||
padding: 20px; | |||
} | |||
/deep/ .van-nav-bar .van-icon{ | |||
color: #000000; | |||
} | |||
/deep/ .van-hairline--bottom::after{ | |||
border: none; | |||
} | |||
/deep/ .van-search{ | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/deep/ .van-search__content{ | |||
padding: 5px 25px; | |||
border-radius: 20px; | |||
} | |||
/deep/ .van-search .van-cell{ | |||
align-items: center; | |||
} | |||
.load_block{ | |||
padding: 0 32px; | |||
} | |||
.file_main{ | |||
background: #ffffff; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
overflow: hidden; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.statistics_main{ | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
margin-top: 15PX; | |||
font-size: .35rem; | |||
line-height: 1; | |||
.statistics_tt{ | |||
flex: 1; /* 占据剩余空间 */ | |||
text-align: center; /* 文字水平居中 */ | |||
} | |||
.statistics_block{ | |||
display: flex; | |||
align-items: center; | |||
position: absolute; | |||
right: 0; | |||
} | |||
} | |||
.list_main{ | |||
margin-top: 15PX; | |||
height: 65vh; | |||
overflow-y: scroll; | |||
.item{ | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:25px 32px; | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-items: center; | |||
img{ | |||
width: 174px; | |||
height: 174px; | |||
border-radius: 10px; | |||
margin-right: 2vh; | |||
display: block; | |||
} | |||
.info{ | |||
flex: 1; | |||
.title{ | |||
display: flex; | |||
align-items: center; | |||
height: 58px; | |||
.news_title{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
font-size: .35rem; | |||
color: rgba(28,35,76,.7); | |||
margin-right: 15px; | |||
} | |||
.tips_mark{ | |||
font-size: .35rem; | |||
color: #1C234C; | |||
text-align: center; | |||
border-radius: 100vh; | |||
} | |||
} | |||
.time{ | |||
font-size: 16PX; | |||
color: #c1c1c1; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 5PX; | |||
justify-content: space-between; | |||
p:first-child{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
p:last-child{ | |||
font-size: 16PX; | |||
text-align: center; | |||
flex-shrink: 0; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.operation{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: right; | |||
text-align: center; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
height: 100%; | |||
padding: 0 15Px; | |||
margin-left: 10PX; | |||
.opera_btn{ | |||
border-radius: 50%; | |||
&.delete{ | |||
background:#df0707; | |||
margin-left: 10PX; | |||
.icon{ | |||
width: 22PX; | |||
height: 29PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 26PX; | |||
height: 25PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29PX; | |||
height: 21PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,481 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
title="长势监测" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.push({path:'/pest/index'})" | |||
/> | |||
<div class="flex_app"> | |||
<div class="flex_main flex_main_left"> | |||
<p class="flex_num">小麦<span>(皖麦50号)</span></p> | |||
<p class="flex_name">当前作物</p> | |||
<i></i> | |||
</div> | |||
<div class="flex_main"> | |||
<div class="flex_block"> | |||
<i class="icon icon1"></i> | |||
<div class="flex_nr"> | |||
<p class="flex_num">返青期</p> | |||
<p class="flex_name">物候期</p> | |||
</div> | |||
</div> | |||
<div class="flex_block"> | |||
<i class="icon icon2"></i> | |||
<div class="flex_nr"> | |||
<p class="flex_num">35.5<span class="flex_unit">亩</span></p> | |||
<p class="flex_name">种植面积</p> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="file_main"> | |||
<van-field readonly label="作物长势地图" input-align="right"> | |||
<template #input> | |||
<p class="time_box">2024-03-01<van-icon name="arrow-down" /></p> | |||
</template> | |||
</van-field> | |||
<div class="file_swipe"> | |||
<img src="../../../../static/images/pest/map_bg.png" width="100%" alt=""> | |||
</div> | |||
</div> | |||
<div class="file_main"> | |||
<van-field readonly label="植被指数" input-align="right"/> | |||
<div class="charts" id="main3"></div> | |||
</div> | |||
<div class="bottom"></div> | |||
</div> | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import * as echarts from "echarts"; | |||
export default { | |||
name: "insectMonitoring", | |||
data() { | |||
return { | |||
landOptions:[], | |||
showLand:false, | |||
showTime:false, | |||
minDate: new Date(2020, 0, 1), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(2021, 0, 17), | |||
}; | |||
}, | |||
created() { | |||
}, | |||
mounted() { | |||
this.chart3(); | |||
}, | |||
methods: { | |||
chart3(){ | |||
var chartDom = document.getElementById('main3'); | |||
var myChart = echarts.init(chartDom); | |||
var option; | |||
option = { | |||
grid: { | |||
top:'15%', | |||
left: '3%', | |||
right: '4%', | |||
bottom: '3%', | |||
containLabel: true | |||
}, | |||
legend: { | |||
top: 10, | |||
right: "5%", | |||
itemWidth: 10, | |||
itemHeight: 10, | |||
// padding: [5, 10], | |||
textStyle: { | |||
fontSize: 14, | |||
color: "#a6c8dd", | |||
padding: [3, 0, 0, 0], | |||
}, | |||
}, | |||
xAxis: { | |||
type: 'category', | |||
data: [ | |||
'03-03', | |||
'03-04', | |||
'03-05', | |||
'03-06', | |||
'03-07', | |||
'03-08', | |||
'03-09', | |||
'03-10', | |||
'03-11', | |||
'03-12', | |||
'03-13', | |||
'03-14', | |||
'03-15', | |||
'03-16', | |||
'03-17', | |||
'03-18', | |||
] | |||
}, | |||
yAxis: { | |||
type: 'value', | |||
name: '虫害只' | |||
}, | |||
series: [ | |||
{ | |||
data: [ | |||
1, | |||
2, | |||
3, | |||
4, | |||
5, | |||
6, | |||
10, | |||
0, | |||
0, | |||
0, | |||
0, | |||
0, | |||
5, | |||
0, | |||
7, | |||
0, | |||
], | |||
type: 'line', | |||
lineStyle: { | |||
width: 1, | |||
color: 'rgba(142, 277, 97, 1)' | |||
}, | |||
stack: 'Total', | |||
smooth: true, | |||
showSymbol: false, | |||
areaStyle: { | |||
opacity: 0.8, | |||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | |||
{ | |||
offset: 0, | |||
color: 'rgba(142, 277, 97, .8)' | |||
}, | |||
{ | |||
offset: 1, | |||
color: 'rgba(142, 277, 97, 0)' | |||
} | |||
]) | |||
}, | |||
} | |||
] | |||
}; | |||
option && myChart.setOption(option); | |||
} | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container{ | |||
background: #F2F6F2 url("../../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background-size: 100% auto; | |||
height: 100vh; | |||
padding: 0 4vw; | |||
} | |||
.flex_app{ | |||
display: flex; | |||
.flex_main_left{ | |||
flex: 1; | |||
background: url("../../../../static/images/pest/flex_main_left_bg.png") no-repeat center; | |||
background-size: 100% 100%; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: space-evenly; | |||
padding: 0 20px; | |||
margin-right: 16px; | |||
.flex_num{font-size: .45rem;color: #ffffff;font-weight: bold;span{font-size: .25rem;font-weight: normal;}} | |||
.flex_unit{font-size: .25rem;color: #9F9F9F;font-weight: normal;} | |||
.flex_name{font-size: .3rem;color: #ffffff;} | |||
i{ | |||
display: block; | |||
width: 4.5vh; | |||
height: 4.5vh; | |||
background: url("../../../../static/images/pest/flex_main_left_icon.png") no-repeat center; | |||
background-size: 100% 100%; | |||
} | |||
} | |||
} | |||
.flex_main{ | |||
flex: 1; | |||
display: flex; | |||
margin-top: 16px; | |||
flex-direction: column; | |||
.flex_block{ | |||
flex: 1; | |||
position: relative; | |||
padding: 1vh; | |||
margin-top: 16px; | |||
display: flex; | |||
align-items: center; | |||
border-radius: 15PX; | |||
background: #ffffff; | |||
.flex_y{ | |||
font-size: .35rem; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
padding: 10px 10px 10px 20px; | |||
line-height: 1; | |||
border-bottom-left-radius: 15PX; | |||
} | |||
.flex_nr{ | |||
display: flex; | |||
flex-direction: column; | |||
align-items: baseline; | |||
justify-content: space-evenly; | |||
.flex_num{font-size: .45rem;color: #000000;font-weight: bold;} | |||
.flex_unit{font-size: .25rem;color: #9F9F9F;font-weight: normal;} | |||
.flex_name{font-size: .3rem;color: #9F9F9F;} | |||
} | |||
&:nth-child(1){ | |||
margin-top: 0px; | |||
} | |||
i{ | |||
display: block; | |||
width: 4.5vh; | |||
height: 4.5vh; | |||
margin-right: 15px; | |||
} | |||
.icon1{ | |||
background: url("../../../../static/images/pest/growth_icon_01.png") no-repeat center; | |||
background-size: 100% 100%; | |||
} | |||
.icon2{ | |||
background: url("../../../../static/images/pest/growth_icon_02.png") no-repeat center; | |||
background-size: 100% 100%; | |||
} | |||
} | |||
} | |||
.time_box{ | |||
font-size: .3rem; | |||
background: #F5F8F6; | |||
color: rgba(28,35,76,.5); | |||
padding:0 15PX; | |||
border-radius: 100vh; | |||
} | |||
.my-swipe .van-swipe-item { | |||
color: #fff; | |||
font-size: 20PX; | |||
line-height: 300PX; | |||
text-align: center; | |||
background-color: #39a9ed; | |||
border-radius: 15PX; | |||
} | |||
.charts{ | |||
height: 30vh; | |||
} | |||
.file_swipe{ | |||
padding: 36px; | |||
} | |||
.bottom{ | |||
padding-bottom: 10vh; | |||
} | |||
/deep/ .center textarea{ | |||
background: #F5F8F6; | |||
padding: 20px; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
/deep/ .van-nav-bar .van-icon{ | |||
color: #000000; | |||
} | |||
/deep/ .van-hairline--bottom::after{ | |||
border: none; | |||
} | |||
/deep/ .van-search{ | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/deep/ .van-search__content{ | |||
padding: 5px 25px; | |||
border-radius: 20px; | |||
} | |||
/deep/ .van-search .van-cell{ | |||
align-items: center; | |||
} | |||
.file_main{ | |||
background: #ffffff; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
overflow: hidden; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.statistics_main{ | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
margin-top: 15PX; | |||
font-size: .35rem; | |||
line-height: 1; | |||
.statistics_tt{ | |||
flex: 1; /* 占据剩余空间 */ | |||
text-align: center; /* 文字水平居中 */ | |||
} | |||
.statistics_block{ | |||
display: flex; | |||
align-items: center; | |||
position: absolute; | |||
right: 0; | |||
} | |||
} | |||
.list_main{ | |||
margin-top: 15PX; | |||
height: 65vh; | |||
overflow-y: scroll; | |||
.item{ | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:25px 32px; | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-items: center; | |||
img{ | |||
width: 174px; | |||
height: 174px; | |||
border-radius: 10px; | |||
margin-right: 2vh; | |||
display: block; | |||
} | |||
.info{ | |||
flex: 1; | |||
.title{ | |||
display: flex; | |||
align-items: center; | |||
height: 58px; | |||
.news_title{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
font-size: .35rem; | |||
color: rgba(28,35,76,.7); | |||
margin-right: 15px; | |||
} | |||
.tips_mark{ | |||
font-size: .35rem; | |||
color: #1C234C; | |||
text-align: center; | |||
border-radius: 100vh; | |||
} | |||
} | |||
.time{ | |||
font-size: 16PX; | |||
color: #c1c1c1; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 5PX; | |||
justify-content: space-between; | |||
p:first-child{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
p:last-child{ | |||
font-size: 16PX; | |||
text-align: center; | |||
flex-shrink: 0; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.operation{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: right; | |||
text-align: center; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
height: 100%; | |||
padding: 0 15Px; | |||
margin-left: 10PX; | |||
.opera_btn{ | |||
border-radius: 50%; | |||
&.delete{ | |||
background:#df0707; | |||
margin-left: 10PX; | |||
.icon{ | |||
width: 22PX; | |||
height: 29PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 26PX; | |||
height: 25PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29PX; | |||
height: 21PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -39,23 +39,23 @@ | |||
<img src="../../../static/images/pest/index/pest_index_icon_7.png" alt=""> | |||
<p>农事记录</p> | |||
</van-grid-item> | |||
<van-grid-item> | |||
<van-grid-item :to="{name:'insectMonitoring'}"> | |||
<img src="../../../static/images/pest/index/pest_index_icon_8.png" alt=""> | |||
<p>虫情监测</p> | |||
</van-grid-item> | |||
<van-grid-item> | |||
<van-grid-item :to="{name:'soilTesting'}"> | |||
<img src="../../../static/images/pest/index/pest_index_icon_9.png" alt=""> | |||
<p>土壤检测</p> | |||
</van-grid-item> | |||
<van-grid-item> | |||
<van-grid-item :to="{name:'weather'}"> | |||
<img src="../../../static/images/pest/index/pest_index_icon_10.png" alt=""> | |||
<p>气象服务</p> | |||
</van-grid-item> | |||
<van-grid-item> | |||
<van-grid-item :to="{name:'temperatureAndHumidity'}"> | |||
<img src="../../../static/images/pest/index/pest_index_icon_11.png" alt=""> | |||
<p>温湿度</p> | |||
</van-grid-item> | |||
<van-grid-item> | |||
<van-grid-item :to="{name:'growthMonitoring'}"> | |||
<img src="../../../static/images/pest/index/pest_index_icon_12.png" alt=""> | |||
<p>长势监测</p> | |||
</van-grid-item> | |||
@@ -0,0 +1,396 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
title="虫情监测" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.push({path:'/pest/index'})" | |||
/> | |||
<div class="file_main"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="虫情设备" | |||
placeholder="请选择" | |||
@click="showLand = true" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
:border="false" | |||
input-align="right" | |||
:rules="[{ required: true , message:'请选择' }]" | |||
/> | |||
<van-popup v-model="showLand" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="landOptions" | |||
@cancel="showLand = false" | |||
/> | |||
</van-popup> | |||
</div> | |||
<div class="file_main center"> | |||
<van-field readonly label="内容" :border="false" /> | |||
<van-field placeholder="请输入" type="textarea" rows="4" autosize :border="false" style="padding-top: 0;" /> | |||
</div> | |||
<div class="file_main"> | |||
<van-field readonly label="实景图片" input-align="right"> | |||
<template #input> | |||
<p class="time_box">2024-03-01<van-icon name="arrow-down" /></p> | |||
</template> | |||
</van-field> | |||
<div class="file_swipe"> | |||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white"> | |||
<van-swipe-item>1</van-swipe-item> | |||
<van-swipe-item>2</van-swipe-item> | |||
<van-swipe-item>3</van-swipe-item> | |||
<van-swipe-item>4</van-swipe-item> | |||
</van-swipe> | |||
</div> | |||
</div> | |||
<div class="file_main"> | |||
<van-field readonly label="虫害趋势" input-align="right"> | |||
<template #input> | |||
<p class="time_box">2024-03-01<van-icon name="arrow-down" /></p> | |||
</template> | |||
</van-field> | |||
<div class="charts" id="main3"></div> | |||
</div> | |||
<div class="bottom"></div> | |||
</div> | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import * as echarts from "echarts"; | |||
export default { | |||
name: "insectMonitoring", | |||
data() { | |||
return { | |||
landOptions:[], | |||
showLand:false, | |||
showTime:false, | |||
minDate: new Date(2020, 0, 1), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(2021, 0, 17), | |||
}; | |||
}, | |||
created() { | |||
}, | |||
mounted() { | |||
this.chart3(); | |||
}, | |||
methods: { | |||
chart3(){ | |||
var chartDom = document.getElementById('main3'); | |||
var myChart = echarts.init(chartDom); | |||
var option; | |||
option = { | |||
grid: { | |||
top:'15%', | |||
left: '3%', | |||
right: '4%', | |||
bottom: '3%', | |||
containLabel: true | |||
}, | |||
legend: { | |||
top: 10, | |||
right: "5%", | |||
itemWidth: 10, | |||
itemHeight: 10, | |||
// padding: [5, 10], | |||
textStyle: { | |||
fontSize: 14, | |||
color: "#a6c8dd", | |||
padding: [3, 0, 0, 0], | |||
}, | |||
}, | |||
xAxis: { | |||
type: 'category', | |||
data: [ | |||
'03-03', | |||
'03-04', | |||
'03-05', | |||
'03-06', | |||
'03-07', | |||
'03-08', | |||
'03-09', | |||
'03-10', | |||
'03-11', | |||
'03-12', | |||
'03-13', | |||
'03-14', | |||
'03-15', | |||
'03-16', | |||
'03-17', | |||
'03-18', | |||
] | |||
}, | |||
yAxis: { | |||
type: 'value', | |||
name: '虫害只' | |||
}, | |||
series: [ | |||
{ | |||
data: [ | |||
0, | |||
0, | |||
0, | |||
0, | |||
0, | |||
0, | |||
10, | |||
0, | |||
0, | |||
0, | |||
0, | |||
0, | |||
5, | |||
0, | |||
0, | |||
0, | |||
], | |||
type: 'line' | |||
} | |||
] | |||
}; | |||
option && myChart.setOption(option); | |||
} | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container{ | |||
background: #F2F6F2 url("../../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background-size: 100% auto; | |||
height: 100vh; | |||
padding: 0 4vw; | |||
} | |||
.time_box{ | |||
font-size: .3rem; | |||
background: #F5F8F6; | |||
color: rgba(28,35,76,.5); | |||
padding:0 15PX; | |||
border-radius: 100vh; | |||
} | |||
.my-swipe .van-swipe-item { | |||
color: #fff; | |||
font-size: 20PX; | |||
line-height: 300PX; | |||
text-align: center; | |||
background-color: #39a9ed; | |||
border-radius: 15PX; | |||
} | |||
.charts{ | |||
height: 30vh; | |||
} | |||
.file_swipe{ | |||
padding: 36px; | |||
} | |||
.bottom{ | |||
padding-bottom: 10vh; | |||
} | |||
/deep/ .center textarea{ | |||
background: #F5F8F6; | |||
padding: 20px; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
/deep/ .van-nav-bar .van-icon{ | |||
color: #000000; | |||
} | |||
/deep/ .van-hairline--bottom::after{ | |||
border: none; | |||
} | |||
/deep/ .van-search{ | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/deep/ .van-search__content{ | |||
padding: 5px 25px; | |||
border-radius: 20px; | |||
} | |||
/deep/ .van-search .van-cell{ | |||
align-items: center; | |||
} | |||
.file_main{ | |||
background: #ffffff; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
overflow: hidden; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.statistics_main{ | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
margin-top: 15PX; | |||
font-size: .35rem; | |||
line-height: 1; | |||
.statistics_tt{ | |||
flex: 1; /* 占据剩余空间 */ | |||
text-align: center; /* 文字水平居中 */ | |||
} | |||
.statistics_block{ | |||
display: flex; | |||
align-items: center; | |||
position: absolute; | |||
right: 0; | |||
} | |||
} | |||
.list_main{ | |||
margin-top: 15PX; | |||
height: 65vh; | |||
overflow-y: scroll; | |||
.item{ | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:25px 32px; | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-items: center; | |||
img{ | |||
width: 174px; | |||
height: 174px; | |||
border-radius: 10px; | |||
margin-right: 2vh; | |||
display: block; | |||
} | |||
.info{ | |||
flex: 1; | |||
.title{ | |||
display: flex; | |||
align-items: center; | |||
height: 58px; | |||
.news_title{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
font-size: .35rem; | |||
color: rgba(28,35,76,.7); | |||
margin-right: 15px; | |||
} | |||
.tips_mark{ | |||
font-size: .35rem; | |||
color: #1C234C; | |||
text-align: center; | |||
border-radius: 100vh; | |||
} | |||
} | |||
.time{ | |||
font-size: 16PX; | |||
color: #c1c1c1; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 5PX; | |||
justify-content: space-between; | |||
p:first-child{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
p:last-child{ | |||
font-size: 16PX; | |||
text-align: center; | |||
flex-shrink: 0; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.operation{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: right; | |||
text-align: center; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
height: 100%; | |||
padding: 0 15Px; | |||
margin-left: 10PX; | |||
.opera_btn{ | |||
border-radius: 50%; | |||
&.delete{ | |||
background:#df0707; | |||
margin-left: 10PX; | |||
.icon{ | |||
width: 22PX; | |||
height: 29PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 26PX; | |||
height: 25PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29PX; | |||
height: 21PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,350 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
title="土壤检测" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.push({path:'/pest/index'})" | |||
/> | |||
<div class="file_main"> | |||
<van-field readonly label="土壤检测" input-align="right"> | |||
<template #input> | |||
<p class="time_box">采集时间:2024-03-18 17:17</p> | |||
</template> | |||
</van-field> | |||
<div style="padding: 16px;"> | |||
<div class="flex_main"> | |||
<div class="flex_block green"> | |||
<p class="flex_y green">优</p> | |||
<div class="flex_nr"> | |||
<p class="flex_num">17.0</p> | |||
<p class="flex_unit">℃</p> | |||
<p class="flex_name">土壤温度</p> | |||
</div> | |||
</div> | |||
<div class="flex_block orange"> | |||
<p class="flex_y orange">良</p> | |||
<div class="flex_nr"> | |||
<p class="flex_num">35.5</p> | |||
<p class="flex_unit">%</p> | |||
<p class="flex_name">土壤湿度</p> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="flex_main"> | |||
<div class="flex_block blue"> | |||
<p class="flex_y blue">优</p> | |||
<div class="flex_nr"> | |||
<p class="flex_num">567.86</p> | |||
<p class="flex_unit">mg/L</p> | |||
<p class="flex_name">土壤盐分</p> | |||
</div> | |||
</div> | |||
<div class="flex_block green"> | |||
<div class="flex_nr"> | |||
<p class="flex_num">-0.631</p> | |||
<p class="flex_unit">m</p> | |||
<p class="flex_name">土壤深度</p> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="file_main center"> | |||
<van-field readonly label="内容" :border="false" /> | |||
<van-field readonly v-model="textarea" placeholder="请输入" type="textarea" autosize :border="false" style="padding-top: 0;" /> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import * as echarts from "echarts"; | |||
export default { | |||
name: "soilTesting", | |||
data() { | |||
return { | |||
textarea:'当前土壤湿度较低,土壤温度较低,请注意农事的防护' | |||
}; | |||
}, | |||
created() { | |||
}, | |||
mounted() { | |||
}, | |||
methods: { | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container{ | |||
background: #F2F6F2 url("../../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background-size: 100% auto; | |||
height: 100vh; | |||
padding: 0 4vw; | |||
} | |||
.flex_main{ | |||
display: flex; | |||
&:nth-child(1){ | |||
margin-bottom: 16px; | |||
} | |||
.flex_block{ | |||
flex: 1; | |||
position: relative; | |||
padding: 2vh 0; | |||
.flex_y{ | |||
font-size: .35rem; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
padding: 10px 10px 10px 20px; | |||
line-height: 1; | |||
border-bottom-left-radius: 15PX; | |||
&.green{ | |||
background: #ADF1C2; | |||
color: #19D77C; | |||
} | |||
&.orange{ | |||
background: #FFE9BA; | |||
color: #FDCD63; | |||
} | |||
&.blue{ | |||
background: #B3DCFB; | |||
color: #53B1F6; | |||
} | |||
} | |||
.flex_nr{ | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
justify-content: space-evenly; | |||
.flex_num{font-size: .6rem;color: #000000;font-weight: bold;} | |||
.flex_unit{font-size: .4rem;color: #9F9F9F;} | |||
.flex_name{font-size: .35rem;color: #666666;} | |||
} | |||
&.green{ | |||
background: #EDFCE1; | |||
} | |||
&.orange{ | |||
background: #FEF4DF; | |||
} | |||
&.blue{ | |||
background: #DCEFFD; | |||
} | |||
&:nth-child(2){ | |||
margin-left: 16px; | |||
} | |||
} | |||
} | |||
.time_box{ | |||
font-size: .3rem; | |||
color: rgba(28,35,76,.5); | |||
} | |||
.file_swipe{ | |||
padding: 36px; | |||
} | |||
.bottom{ | |||
padding-bottom: 10vh; | |||
} | |||
/deep/ .center textarea{ | |||
background: #FEECEF; | |||
color: #F7738C; | |||
padding: 20px; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
/deep/ .van-nav-bar .van-icon{ | |||
color: #000000; | |||
} | |||
/deep/ .van-hairline--bottom::after{ | |||
border: none; | |||
} | |||
/deep/ .van-search{ | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/deep/ .van-search__content{ | |||
padding: 5px 25px; | |||
border-radius: 20px; | |||
} | |||
/deep/ .van-search .van-cell{ | |||
align-items: center; | |||
} | |||
.file_main{ | |||
background: #ffffff; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
overflow: hidden; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.statistics_main{ | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
margin-top: 15PX; | |||
font-size: .35rem; | |||
line-height: 1; | |||
.statistics_tt{ | |||
flex: 1; /* 占据剩余空间 */ | |||
text-align: center; /* 文字水平居中 */ | |||
} | |||
.statistics_block{ | |||
display: flex; | |||
align-items: center; | |||
position: absolute; | |||
right: 0; | |||
} | |||
} | |||
.list_main{ | |||
margin-top: 15PX; | |||
height: 65vh; | |||
overflow-y: scroll; | |||
.item{ | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:25px 32px; | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-items: center; | |||
img{ | |||
width: 174px; | |||
height: 174px; | |||
border-radius: 10px; | |||
margin-right: 2vh; | |||
display: block; | |||
} | |||
.info{ | |||
flex: 1; | |||
.title{ | |||
display: flex; | |||
align-items: center; | |||
height: 58px; | |||
.news_title{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
font-size: .35rem; | |||
color: rgba(28,35,76,.7); | |||
margin-right: 15px; | |||
} | |||
.tips_mark{ | |||
font-size: .35rem; | |||
color: #1C234C; | |||
text-align: center; | |||
border-radius: 100vh; | |||
} | |||
} | |||
.time{ | |||
font-size: 16PX; | |||
color: #c1c1c1; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 5PX; | |||
justify-content: space-between; | |||
p:first-child{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
p:last-child{ | |||
font-size: 16PX; | |||
text-align: center; | |||
flex-shrink: 0; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.operation{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: right; | |||
text-align: center; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
height: 100%; | |||
padding: 0 15Px; | |||
margin-left: 10PX; | |||
.opera_btn{ | |||
border-radius: 50%; | |||
&.delete{ | |||
background:#df0707; | |||
margin-left: 10PX; | |||
.icon{ | |||
width: 22PX; | |||
height: 29PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 26PX; | |||
height: 25PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29PX; | |||
height: 21PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,512 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
title="温湿度" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.push({path:'/pest/index'})" | |||
/> | |||
<div class="file_main"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="当前地块" | |||
placeholder="请选择" | |||
@click="showLand = true" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
:border="false" | |||
input-align="right" | |||
:rules="[{ required: true , message:'请选择' }]" | |||
/> | |||
<van-popup v-model="showLand" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="landOptions" | |||
@cancel="showLand = false" | |||
/> | |||
</van-popup> | |||
</div> | |||
<div class="file_main"> | |||
<van-field readonly label="采集数据" input-align="right"> | |||
<template #input> | |||
<p class="time_box">设备1<van-icon name="arrow-down" /></p> | |||
</template> | |||
</van-field> | |||
<div class="charts" id="main3"></div> | |||
</div> | |||
<div class="bottom"></div> | |||
</div> | |||
</template> | |||
<script> | |||
import Cookies from "js-cookie"; | |||
import * as echarts from "echarts"; | |||
export default { | |||
name: "insectMonitoring", | |||
data() { | |||
return { | |||
landOptions:[], | |||
showLand:false, | |||
showTime:false, | |||
minDate: new Date(2020, 0, 1), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(2021, 0, 17), | |||
}; | |||
}, | |||
created() { | |||
}, | |||
mounted() { | |||
this.chart3(); | |||
}, | |||
methods: { | |||
chart3(){ | |||
var chartDom = document.getElementById('main3'); | |||
var myChart = echarts.init(chartDom); | |||
let colors = ['#8CE25E','#2562FE'] | |||
var option; | |||
option = { | |||
grid: { | |||
top:'15%', | |||
left: '5%', | |||
right: '4%', | |||
bottom: '3%', | |||
containLabel: true | |||
}, | |||
legend: { | |||
top: 10, | |||
right: "5%", | |||
itemWidth: 10, | |||
itemHeight: 10, | |||
// padding: [5, 10], | |||
textStyle: { | |||
fontSize: 14, | |||
color: "#a6c8dd", | |||
padding: [3, 0, 0, 0], | |||
}, | |||
}, | |||
xAxis: { | |||
type: 'category', | |||
data: [ | |||
'03-03', | |||
'03-04', | |||
'03-05', | |||
'03-06', | |||
'03-07', | |||
'03-08', | |||
'03-09', | |||
'03-10', | |||
'03-11', | |||
'03-12', | |||
'03-13', | |||
'03-14', | |||
'03-15', | |||
'03-16', | |||
'03-17', | |||
'03-18', | |||
] | |||
}, | |||
yAxis: [ | |||
{ | |||
type: 'value', | |||
name: '温度\n℃', | |||
position: 'left', | |||
alignTicks: true, | |||
axisLine: { | |||
show: true, | |||
lineStyle: { | |||
color: colors[0] | |||
} | |||
} | |||
}, | |||
{ | |||
type: 'value', | |||
name: '湿度\n%', | |||
position: 'left', | |||
alignTicks: true, | |||
offset: 30, | |||
axisLine: { | |||
show: true, | |||
lineStyle: { | |||
color: colors[1] | |||
} | |||
}, | |||
} | |||
], | |||
series: [ | |||
{ | |||
data: [ | |||
1, | |||
2, | |||
3, | |||
4, | |||
5, | |||
6, | |||
10, | |||
0, | |||
0, | |||
0, | |||
0, | |||
0, | |||
5, | |||
0, | |||
7, | |||
0, | |||
], | |||
type: 'line', | |||
lineStyle: { | |||
width: 1, | |||
color: colors[0] | |||
}, | |||
stack: 'Total', | |||
smooth: true, | |||
showSymbol: false, | |||
yAxisIndex: 0, // 使用Y轴1 | |||
}, | |||
{ | |||
data: [ | |||
10, | |||
20, | |||
30, | |||
40, | |||
50, | |||
60, | |||
10, | |||
11, | |||
35, | |||
28, | |||
15, | |||
8, | |||
5, | |||
18, | |||
7, | |||
1, | |||
], | |||
type: 'line', | |||
lineStyle: { | |||
width: 1, | |||
color: colors[1] | |||
}, | |||
stack: 'Total', | |||
smooth: true, | |||
showSymbol: false, | |||
yAxisIndex: 1, // 使用Y轴1 | |||
} | |||
] | |||
}; | |||
option && myChart.setOption(option); | |||
} | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container{ | |||
background: #F2F6F2 url("../../../../static/images/pest/index/pest_index_bg.png") no-repeat top; | |||
background-size: 100% auto; | |||
height: 100vh; | |||
padding: 0 4vw; | |||
} | |||
.flex_app{ | |||
display: flex; | |||
.flex_main_left{ | |||
flex: 1; | |||
background: url("../../../../static/images/pest/flex_main_left_bg.png") no-repeat center; | |||
background-size: 100% 100%; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: space-evenly; | |||
padding: 0 20px; | |||
margin-right: 16px; | |||
.flex_num{font-size: .45rem;color: #ffffff;font-weight: bold;span{font-size: .25rem;font-weight: normal;}} | |||
.flex_unit{font-size: .25rem;color: #9F9F9F;font-weight: normal;} | |||
.flex_name{font-size: .3rem;color: #ffffff;} | |||
i{ | |||
display: block; | |||
width: 4.5vh; | |||
height: 4.5vh; | |||
background: url("../../../../static/images/pest/flex_main_left_icon.png") no-repeat center; | |||
background-size: 100% 100%; | |||
} | |||
} | |||
} | |||
.flex_main{ | |||
flex: 1; | |||
display: flex; | |||
margin-top: 16px; | |||
flex-direction: column; | |||
.flex_block{ | |||
flex: 1; | |||
position: relative; | |||
padding: 1vh; | |||
margin-top: 16px; | |||
display: flex; | |||
align-items: center; | |||
border-radius: 15PX; | |||
background: #ffffff; | |||
.flex_y{ | |||
font-size: .35rem; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
padding: 10px 10px 10px 20px; | |||
line-height: 1; | |||
border-bottom-left-radius: 15PX; | |||
} | |||
.flex_nr{ | |||
display: flex; | |||
flex-direction: column; | |||
align-items: baseline; | |||
justify-content: space-evenly; | |||
.flex_num{font-size: .45rem;color: #000000;font-weight: bold;} | |||
.flex_unit{font-size: .25rem;color: #9F9F9F;font-weight: normal;} | |||
.flex_name{font-size: .3rem;color: #9F9F9F;} | |||
} | |||
&:nth-child(1){ | |||
margin-top: 0px; | |||
} | |||
i{ | |||
display: block; | |||
width: 4.5vh; | |||
height: 4.5vh; | |||
margin-right: 15px; | |||
} | |||
.icon1{ | |||
background: url("../../../../static/images/pest/growth_icon_01.png") no-repeat center; | |||
background-size: 100% 100%; | |||
} | |||
.icon2{ | |||
background: url("../../../../static/images/pest/growth_icon_02.png") no-repeat center; | |||
background-size: 100% 100%; | |||
} | |||
} | |||
} | |||
.time_box{ | |||
font-size: .3rem; | |||
background: #F5F8F6; | |||
color: rgba(28,35,76,.5); | |||
padding:0 15PX; | |||
border-radius: 100vh; | |||
} | |||
.my-swipe .van-swipe-item { | |||
color: #fff; | |||
font-size: 20PX; | |||
line-height: 300PX; | |||
text-align: center; | |||
background-color: #39a9ed; | |||
border-radius: 15PX; | |||
} | |||
.charts{ | |||
height: 30vh; | |||
} | |||
.file_swipe{ | |||
padding: 36px; | |||
} | |||
.bottom{ | |||
padding-bottom: 10vh; | |||
} | |||
/deep/ .center textarea{ | |||
background: #F5F8F6; | |||
padding: 20px; | |||
} | |||
/deep/ .van-nav-bar{ | |||
background: transparent; | |||
} | |||
/deep/ .van-nav-bar .van-icon{ | |||
color: #000000; | |||
} | |||
/deep/ .van-hairline--bottom::after{ | |||
border: none; | |||
} | |||
/deep/ .van-search{ | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/deep/ .van-search__content{ | |||
padding: 5px 25px; | |||
border-radius: 20px; | |||
} | |||
/deep/ .van-search .van-cell{ | |||
align-items: center; | |||
} | |||
.file_main{ | |||
background: #ffffff; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
overflow: hidden; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.statistics_main{ | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
margin-top: 15PX; | |||
font-size: .35rem; | |||
line-height: 1; | |||
.statistics_tt{ | |||
flex: 1; /* 占据剩余空间 */ | |||
text-align: center; /* 文字水平居中 */ | |||
} | |||
.statistics_block{ | |||
display: flex; | |||
align-items: center; | |||
position: absolute; | |||
right: 0; | |||
} | |||
} | |||
.list_main{ | |||
margin-top: 15PX; | |||
height: 65vh; | |||
overflow-y: scroll; | |||
.item{ | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:25px 32px; | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-items: center; | |||
img{ | |||
width: 174px; | |||
height: 174px; | |||
border-radius: 10px; | |||
margin-right: 2vh; | |||
display: block; | |||
} | |||
.info{ | |||
flex: 1; | |||
.title{ | |||
display: flex; | |||
align-items: center; | |||
height: 58px; | |||
.news_title{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
font-size: .35rem; | |||
color: rgba(28,35,76,.7); | |||
margin-right: 15px; | |||
} | |||
.tips_mark{ | |||
font-size: .35rem; | |||
color: #1C234C; | |||
text-align: center; | |||
border-radius: 100vh; | |||
} | |||
} | |||
.time{ | |||
font-size: 16PX; | |||
color: #c1c1c1; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 5PX; | |||
justify-content: space-between; | |||
p:first-child{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
p:last-child{ | |||
font-size: 16PX; | |||
text-align: center; | |||
flex-shrink: 0; | |||
span{ | |||
color: #5fe495; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.operation{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: right; | |||
text-align: center; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
height: 100%; | |||
padding: 0 15Px; | |||
margin-left: 10PX; | |||
.opera_btn{ | |||
border-radius: 50%; | |||
&.delete{ | |||
background:#df0707; | |||
margin-left: 10PX; | |||
.icon{ | |||
width: 22PX; | |||
height: 29PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 26PX; | |||
height: 25PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29PX; | |||
height: 21PX; | |||
background: url('../../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -15,6 +15,16 @@ | |||
<van-col span="2"></van-col> | |||
</van-row> | |||
<div id="content"></div> | |||
<div v-if="attachmentQueryList.length>0"> | |||
<van-divider>附件</van-divider> | |||
<van-cell :title="item.fileName" :url="'/api'+item.fileUrl" is-link v-for="(item,index) in attachmentQueryList"> | |||
<!-- 使用 right-icon 插槽来自定义右侧图标 --> | |||
<template #icon> | |||
<img src="../../assets/images/file_icon.png" style="display: block;width: 24px;margin-right: 5px;" alt=""> | |||
</template> | |||
</van-cell> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -25,6 +35,7 @@ export default { | |||
data() { | |||
return { | |||
detail:'', | |||
attachmentQueryList:[] | |||
}; | |||
}, | |||
created() { | |||
@@ -36,6 +47,20 @@ export default { | |||
console.log(response) | |||
this.detail = response.data | |||
document.getElementById('content').innerHTML = response.data.content; | |||
if(response.data.attachment){ | |||
var content = response.data.attachment.split(','); | |||
let list = []; | |||
content.map(rr=>{ | |||
list.push({ | |||
fileUrl:rr, | |||
fileName:rr.substr(27,rr.length) | |||
}) | |||
}) | |||
this.attachmentQueryList = list; | |||
} | |||
}); | |||
}, | |||
}, | |||
@@ -52,5 +77,13 @@ export default { | |||
} | |||
#content{ | |||
overflow: hidden; | |||
font-size: 14PX; | |||
} | |||
/deep/.van-cell__title, .van-cell__value{ | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 1; | |||
word-break: break-all; | |||
overflow: hidden; | |||
} | |||
</style> |
@@ -124,6 +124,7 @@ export default { | |||
}; | |||
}, | |||
created() { | |||
clearInterval(); | |||
this.getDicts("project_type").then(response => { | |||
console.log(response) | |||
response.data.map(item => { | |||
@@ -33,6 +33,10 @@ | |||
<van-col span="5">挂牌价</van-col> | |||
<van-col span="19" class="price"><span>{{detail.price}}</span> {{detail.unit}}</van-col> | |||
</van-row> | |||
<van-row v-if="detail.priceMax"> | |||
<van-col span="5">最高限价</van-col> | |||
<van-col span="19" class="money"><span>{{ detail.priceMax }}</span> 元</van-col> | |||
</van-row> | |||
<van-row> | |||
<van-col span="5">保证金</van-col> | |||
<van-col span="19" class="money"><span>{{ detail.deposit }}</span> 元</van-col> | |||
@@ -370,7 +374,7 @@ export default { | |||
isSign=true | |||
} | |||
}) | |||
if (resresponse.data.auditStatus == 'Y'){ | |||
if (resresponse.data.activitiStatus == '3'){ | |||
if (isSign){ | |||
this.$toast({ | |||
icon: 'error', // 找到自己需要的图标 | |||
@@ -539,7 +543,11 @@ export default { | |||
if(this.getSignupData=="1"){ | |||
this.isSignup=true | |||
this.btnMsg="立即竞价" | |||
this.showBtn=true | |||
if(this.detail.biddingType!='线下竞价'){ | |||
this.showBtn=true | |||
}else{ | |||
this.btnMsg="立即竞价(暂不支持线上出价)" | |||
} | |||
// this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 | |||
}else{ | |||
this.btnMsg="未报名" | |||
@@ -637,7 +645,11 @@ export default { | |||
if(this.getSignupData=="1"){ | |||
this.isSignup=true | |||
this.btnMsg="立即竞价" | |||
this.showBtn=true | |||
if(this.detail.biddingType!='线下竞价'){ | |||
this.showBtn=true | |||
}else{ | |||
this.btnMsg="立即竞价(暂不支持线上出价)" | |||
} | |||
// this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 | |||
}else{ | |||
this.btnMsg="未报名" | |||
@@ -72,7 +72,7 @@ | |||
</van-col> | |||
</van-row> | |||
<div class="gl_main"> | |||
<template v-if="false"> | |||
<template v-if="!contractionVisible"> | |||
<div class="headers"> | |||
<div class="flex3">合同编码</div> | |||
<div class="flex3">合同名称</div> | |||
@@ -84,12 +84,12 @@ | |||
<div class="desc_main"> | |||
<ul class="analysisTable_list"> | |||
<!--1--> | |||
<li v-for="item in contractionList" class="flex_item"> | |||
<li v-for="item in contractionList" class="flex_item" @click="viewContractionInfo(item)"> | |||
<div class="flex3" @click="lookName(item.code)">{{item.code}}</div> | |||
<div class="flex3" @click="lookName(item.name)">{{item.name}}</div> | |||
<div class="flex3">{{item.secondParty}}</div> | |||
<div class="flex3">{{item.totalAmount}}</div> | |||
<div class="flex3">{{selectDictLabel(contractionStatuOptions, item.contractionStatus)}}</div> | |||
<div class="flex3">{{item.contractionStatus}}</div> | |||
</li> | |||
</ul> | |||
</div> | |||
@@ -97,6 +97,7 @@ | |||
<template v-else> | |||
<div class="headers"> | |||
<div>关联合同</div> | |||
<div class="back" @click="hideContractionInfo">< 返回</div> | |||
</div> | |||
<van-row> | |||
<van-col :span="4"><span class="title">合同编码:</span></van-col> | |||
@@ -212,7 +213,7 @@ | |||
</van-col> | |||
</van-row> | |||
<div class="gl_main"> | |||
<template v-if="false"> | |||
<template v-if="!contractionVisible"> | |||
<div class="headers"> | |||
<div class="flex3">合同编码</div> | |||
<div class="flex3">合同名称</div> | |||
@@ -224,12 +225,12 @@ | |||
<div class="desc_main"> | |||
<ul class="analysisTable_list"> | |||
<!--1--> | |||
<li v-for="item in contractionList" class="flex_item"> | |||
<li v-for="item in contractionList" class="flex_item" @click="viewContractionInfo(item)"> | |||
<div class="flex3" @click="lookName(item.code)">{{item.code}}</div> | |||
<div class="flex3" @click="lookName(item.name)">{{item.name}}</div> | |||
<div class="flex3">{{item.secondParty}}</div> | |||
<div class="flex3" >{{item.totalAmount}}</div> | |||
<div class="flex3">{{selectDictLabel(contractionStatuOptions, item.contractionStatus)}}</div> | |||
<div class="flex3">{{item.contractionStatus}}</div> | |||
</li> | |||
</ul> | |||
</div> | |||
@@ -237,6 +238,7 @@ | |||
<template v-else> | |||
<div class="headers"> | |||
<div>关联合同</div> | |||
<div class="back" @click="hideContractionInfo">< 返回</div> | |||
</div> | |||
<van-row> | |||
<van-col :span="4"><span class="title">合同编码:</span></van-col> | |||
@@ -385,7 +387,7 @@ | |||
width: 94%; | |||
position: fixed; | |||
z-index: 1001; | |||
top: 50%; | |||
top: 54%; | |||
transform: translateY(-50%); | |||
right: 3%; | |||
display: flex; | |||
@@ -479,7 +481,7 @@ | |||
} | |||
.gl_main{ | |||
margin-top: .8vh; | |||
height: 28.15vh; | |||
height: 38.15vh; | |||
padding:0.92vh 0 0 0; | |||
.headers { | |||
height: 3.24vh; | |||
@@ -492,10 +494,16 @@ | |||
background: rgba(11,239,202,.3); | |||
padding-right: 0.53vw; | |||
margin-bottom: 1vh; | |||
position: relative; | |||
.flex_left{ | |||
text-align: left; | |||
padding-left: 0.83vw; | |||
} | |||
.back { | |||
cursor: pointer; | |||
position: absolute; | |||
left: 0.83vw; | |||
} | |||
} | |||
.desc_main{ | |||
height: 21.5vh; | |||
@@ -524,6 +532,7 @@ | |||
color: #fff; | |||
font-size: 1.29vh; | |||
position: relative; | |||
cursor: pointer; | |||
// border-bottom: 1px solid rgba(255, 255, 255, 0.2); | |||
// &:hover { | |||
// background: rgba(8, 85, 255, 0.6); | |||
@@ -579,7 +588,7 @@ | |||
getResourceList, | |||
assetPropertyDetail, | |||
assetResourceDetail, | |||
openAttachmentList | |||
openAttachmentList as attachmentList | |||
} from "@/api/sunVillage_info/fixedAssets"; | |||
import {getQueryLand} from "@/api/sunVillage_info/homestead/application"; | |||
import { getConfigKey } from "@/api/system/config"; | |||
@@ -610,6 +619,7 @@ | |||
villageBorderLayerName: "", // 乡镇边界图层名称 | |||
contractionData: {}, | |||
contractionAttachmentList: [], | |||
contractionVisible:false, | |||
}; | |||
}, | |||
created() { | |||
@@ -868,20 +878,15 @@ | |||
if (ifConsole !="标注点") { | |||
let obj = {}; | |||
assetResourceDetail(feature.values_.id, {translate_dict: 1, getAttachments: true,}).then((resp) => { | |||
that.contractionList = resp.data.params.contractionAssetList; | |||
that.contractionList = resp.data.params.contractionAssetList || []; | |||
that.$set(obj, 'fileList', resp.data.params.attachments.map(rr=>{ | |||
return { | |||
url:'/api'+rr.fileUrl | |||
}; | |||
})); | |||
that.contractionData = resp.data.params.contraction || {}; | |||
that.contractionData = {}; | |||
that.contractionAttachmentList = []; | |||
if(resp.data.params.contraction) | |||
that.contractionAttachmentList = resp.data.params.contraction.params.attachments.map(rr=>{ | |||
return { | |||
url:'/api'+rr.fileUrl | |||
}; | |||
}); | |||
that.contractionVisible = false; | |||
that.mapHaDataValue = true; | |||
}); | |||
that.mapHasDateStatus = 0; | |||
@@ -957,20 +962,15 @@ | |||
} else { | |||
let obj = {}; | |||
assetPropertyDetail(feature.values_.properties[0].value.values_.id, {translate_dict: 1, getAttachments: true,}).then((resp) => { | |||
that.contractionList = resp.data.params.contractionAssetList; | |||
that.contractionList = resp.data.params.contractionAssetList || []; | |||
that.$set(obj, 'fileList', resp.data.params.attachments.map(rr=>{ | |||
return { | |||
url:'/api'+rr.fileUrl | |||
}; | |||
})); | |||
that.contractionData = resp.data.params.contraction || {}; | |||
that.contractionData = {}; | |||
that.contractionAttachmentList = []; | |||
if(resp.data.params.contraction) | |||
that.contractionAttachmentList = resp.data.params.contraction.params.attachments.map(rr=>{ | |||
return { | |||
url:'/api'+rr.fileUrl | |||
}; | |||
}); | |||
that.contractionVisible = false; | |||
that.mapHaDataValue = true; | |||
}); | |||
that.mapHasDateStatus = 1; | |||
@@ -1084,6 +1084,7 @@ | |||
that.mapHasData = obj; | |||
} | |||
}else { | |||
that.contractionVisible = false; | |||
that.mapHaDataValue = false; | |||
} | |||
}); | |||
@@ -1114,6 +1115,26 @@ | |||
}); | |||
} | |||
}, | |||
viewContractionInfo(row) { | |||
this.contractionData = row || {}; | |||
this.contractionAttachmentList = []; | |||
attachmentList({ | |||
tableId: row.id, | |||
tableName: 't_contraction_info', | |||
}).then((resp) => { | |||
this.contractionAttachmentList = resp.rows.map(rr=>{ | |||
return { | |||
url:'/api'+rr.fileUrl | |||
}; | |||
}); | |||
}); | |||
this.contractionVisible = true; | |||
}, | |||
hideContractionInfo() { | |||
this.contractionData = {}; | |||
this.contractionAttachmentList = []; | |||
this.contractionVisible = false; | |||
}, | |||
}, | |||
}; | |||
</script> |
@@ -181,16 +181,16 @@ | |||
}, | |||
changeInform(val){ | |||
console.log(val) | |||
var that = this; | |||
var str = val; | |||
var numArr = str.match(/\d+/g) | |||
var nameArr = str.match(/[\u4e00-\u9fa5]/g).join("") | |||
console.log(numArr) | |||
console.log(nameArr) | |||
var nameArr = str.match(/[\u4e00-\u9fa5]/g); | |||
if(nameArr != null){ | |||
nameArr = nameArr.join("") | |||
} | |||
if (numArr) { | |||
numArr.map(rr=>{ | |||
if (rr.length>16) { | |||
if (rr.length>=16) { | |||
const carId = isBankCard(rr); | |||
if (carId) { | |||
that.form.payee = nameArr; | |||
@@ -329,11 +329,41 @@ | |||
<p class="main_title" v-if="isModifyOrder" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | |||
<div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="发票" /> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="其他" /> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row v-if="!isModifyOrder"> | |||
@@ -681,6 +711,120 @@ | |||
}) | |||
}); | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
@@ -1189,6 +1333,20 @@ | |||
commonAttach(params1).then((r1) => { | |||
file.id=r1.id; | |||
file.fileUrl = r1.fileUrl; | |||
let subIndex = r1.fileUrl.lastIndexOf("."); | |||
let ext = r1.fileUrl.substring(subIndex + 1, r1.fileUrl.length); | |||
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; | |||
let fileData = {"url": baseUrl + r1.fileUrl, "file": new File([], "name", {}), "id": r1.id,"type":ext}; | |||
if(obj === '1'){ | |||
this.fileList1.splice(-1, 1); | |||
this.fileList1.push(fileData); | |||
}else if(obj === '2'){ | |||
this.fileList2.splice(-1, 1); | |||
this.fileList2.push(fileData); | |||
}else{ | |||
this.fileList3.splice(-1, 1); | |||
this.fileList3.push(fileData); | |||
} | |||
}) | |||
} | |||
}, | |||
@@ -1205,7 +1363,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -1217,7 +1377,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -1229,7 +1391,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -355,7 +355,7 @@ | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
auditbatchNo: this.$route.query.auditbatchNo, | |||
comment: this.comment, | |||
remark: this.comment, | |||
pass: this.pass, | |||
}; | |||
approval(data).then((response) => { | |||
@@ -83,13 +83,43 @@ | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList1.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList2.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList3.length" style="margin-left:8px;" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -210,6 +240,120 @@ | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo; | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
getCashierAccount(response.data.cashierId).then(res => { | |||
@@ -278,7 +422,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -290,7 +436,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -302,7 +450,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -72,13 +72,43 @@ | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList1.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList2.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList3.length" style="margin-left:8px;" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -253,6 +283,120 @@ | |||
} | |||
}); | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
@@ -263,7 +407,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -275,7 +421,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -287,7 +435,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -27,7 +27,7 @@ | |||
finished-text="没有更多了" | |||
@load="getList"> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" center :to="{name:'sunVillageApprovalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||
<van-cell :title="item.remark" center :to="{name:'sunVillageApprovalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | |||
</template> | |||
@@ -35,22 +35,25 @@ | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | |||
</template> | |||
<template #default> | |||
<p style="width: 80px;display: inline-block">{{item.auditStatus}}</p> | |||
<span v-if="item.auditStatus === '0'" style="color: #696969">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '3' " style="color: #00FF00">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else style="color: #FFA500;">{{ selectDictLabel(auditStatusOptions, item.auditStatus) }} </span> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify', query: {id:item.id}}" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
@@ -106,7 +109,9 @@ export default { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
if(response.rows[i].remark.length > 12){ | |||
response.rows[i].remark = response.rows[i].remark.substring(0,12)+"..."; | |||
} | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
@@ -28,10 +28,14 @@ | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail11', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||
<van-cell :title="item.remark" center :to="{name:'sunVillageApprovalDetail11', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<span v-if="item.auditStatus === '0'" style="color: #696969">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '3' " style="color: #00FF00">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else style="color: #FFA500;">{{ selectDictLabel(auditStatusOptions, item.auditStatus) }} </span> | |||
<template #label> | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
@@ -39,16 +43,16 @@ | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify11', query: {id:item.id}}" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify11', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
@@ -101,7 +105,9 @@ export default { | |||
listCash(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
if(response.rows[i].remark.length > 12){ | |||
response.rows[i].remark = response.rows[i].remark.substring(0,12)+"..."; | |||
} | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
@@ -323,11 +323,41 @@ | |||
<p class="main_title" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="发票" /> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="其他" /> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
@@ -813,6 +843,120 @@ | |||
this.saveRelease() | |||
} | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
saveRelease(){ | |||
let _this = this; | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
@@ -1051,6 +1195,20 @@ | |||
commonAttach(params1).then((r1) => { | |||
file.id=r1.id; | |||
file.fileUrl = r1.fileUrl; | |||
let subIndex = r1.fileUrl.lastIndexOf("."); | |||
let ext = r1.fileUrl.substring(subIndex + 1, r1.fileUrl.length); | |||
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; | |||
let fileData = {"url": baseUrl + r1.fileUrl, "file": new File([], "name", {}), "id": r1.id,"type":ext}; | |||
if(obj === '1'){ | |||
this.fileList1.splice(-1, 1); | |||
this.fileList1.push(fileData); | |||
}else if(obj === '2'){ | |||
this.fileList2.splice(-1, 1); | |||
this.fileList2.push(fileData); | |||
}else{ | |||
this.fileList3.splice(-1, 1); | |||
this.fileList3.push(fileData); | |||
} | |||
}) | |||
} | |||
}, | |||
@@ -1068,7 +1226,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -1080,7 +1240,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -1092,7 +1254,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -234,11 +234,41 @@ | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @click-preview="previewPreview" @delete="deleteFile1" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="发票" /> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @click-preview="previewPreview" @delete="deleteFile2" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="其他" /> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @click-preview="previewPreview" @delete="deleteFile3" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
@@ -395,6 +425,120 @@ | |||
} | |||
}) | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
initProjectInfo(){ | |||
let _this = this | |||
let queryParams={ | |||
@@ -1807,7 +1951,14 @@ | |||
} | |||
}, | |||
beforeRead1(file) { | |||
this.uploadFiles1.push(file.file); | |||
let subIndex = file.file.name.lastIndexOf("."); | |||
let ext = file.file.name.substring(subIndex + 1, file.file.name.length); | |||
if(ext !== 'png' || ext !== 'jpg'){ | |||
this.$set(file, "type", ext); | |||
this.fileList1.splice(-1, 1); | |||
this.fileList1.push(file); | |||
this.uploadFiles1.push(file.file); | |||
} | |||
}, | |||
deleteFile1(file){ | |||
this.uploadFiles1.map((response,index) => { | |||
@@ -1821,7 +1972,14 @@ | |||
} | |||
}, | |||
beforeRead2(file) { | |||
this.uploadFiles2.push(file.file); | |||
let subIndex = file.file.name.lastIndexOf("."); | |||
let ext = file.file.name.substring(subIndex + 1, file.file.name.length); | |||
if(ext !== 'png' || ext !== 'jpg'){ | |||
this.$set(file, "type", ext); | |||
this.fileList2.splice(-1, 1); | |||
this.fileList2.push(file); | |||
this.uploadFiles2.push(file.file); | |||
} | |||
}, | |||
deleteFile2(file){ | |||
this.uploadFiles2.map((response,index) => { | |||
@@ -1835,7 +1993,14 @@ | |||
} | |||
}, | |||
beforeRead3(file) { | |||
this.uploadFiles3.push(file.file); | |||
let subIndex = file.file.name.lastIndexOf("."); | |||
let ext = file.file.name.substring(subIndex + 1, file.file.name.length); | |||
if(ext !== 'png' || ext !== 'jpg'){ | |||
this.$set(file, "type", ext); | |||
this.fileList3.splice(-1, 1); | |||
this.fileList3.push(file); | |||
this.uploadFiles3.push(file.file); | |||
} | |||
}, | |||
deleteFile3(file){ | |||
this.uploadFiles3.map((response,index) => { | |||
@@ -1858,7 +2023,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -1870,7 +2037,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -1882,7 +2051,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -24,12 +24,12 @@ | |||
@cancel="showCollectionPay = false"/> | |||
</van-popup> | |||
<van-field v-model="form.orderNum" label="结款序号" placeholder="结款序号" required input-align="right" type="digit" :error-message="errorMessages.orderNum" :border="false" /> | |||
<van-field v-model="form.orderNum" label="结款序号" placeholder="填写序号" required input-align="right" type="digit" :error-message="errorMessages.orderNum" :border="false" /> | |||
<van-field v-model="form.settlementDate" clickable label="结款日期" placeholder="请选择" :error-message="errorMessages.settlementDate" @click="showSettlementDate = true" input-align="right" right-icon="arrow-down" label-width="auto" required :border="false"/> | |||
<van-popup v-model="showSettlementDate" position="bottom"> | |||
<van-datetime-picker v-model="settlementDate" type="date" title="选择年月日" @confirm="onConfirmSettlementDate" @cancel="showSettlementDate = false"/> | |||
</van-popup> | |||
<van-field v-model="form.settlementAmount" label="结款金额" type="number" required placeholder="结款金额" input-align="right" :error-message="errorMessages.settlementAmount" :border="false" /> | |||
<van-field v-model="form.settlementAmount" label="结款金额" type="number" required placeholder="填写金额" input-align="right" :error-message="errorMessages.settlementAmount" :border="false" /> | |||
<van-field v-model="planStatus" @click="showPlanStatus = false" label="结款状态" input-align="right" :border="false" disabled /> | |||
<van-popup v-model="showPlanStatus" position="bottom"> | |||
@@ -41,7 +41,7 @@ | |||
disabled/> | |||
</van-popup> | |||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
<van-field v-model="form.remark" label="备注" placeholder="填写备注" input-align="right" :border="false" /> | |||
</div> | |||
<div style="margin: 16px auto;width: 50%;"> | |||
<van-button round block type="primary" native-type="submit"> | |||
@@ -4,7 +4,7 @@ | |||
class="header_main" | |||
:style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`" | |||
> | |||
{{queryParams.otherType=='1'?'合同':queryParams.otherType=='2'?'党务':queryParams.otherType=='3'?'政务':queryParams.otherType=='4'?'产交':''}}公开 | |||
{{queryParams.otherType=='1'?'合同':queryParams.otherType=='2'?'党务':queryParams.otherType=='3'?'政务':queryParams.otherType=='4'?'产交':queryParams.otherType=='5'?'惠农资金':''}}公开 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn" @click="goAdd" v-show="showBtn"></div> | |||
</div> | |||
@@ -107,7 +107,7 @@ | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
document.title = this.$route.query.typeX=='1'?'合同公开':this.$route.query.typeX=='2'?'党务公开':this.$route.query.typeX=='3'?'政务公开':this.$route.query.typeX=='4'?'产交公开':''; | |||
document.title = this.$route.query.typeX=='1'?'合同公开':this.$route.query.typeX=='2'?'党务公开':this.$route.query.typeX=='3'?'政务公开':this.$route.query.typeX=='4'?'产交公开':this.$route.query.typeX=='5'?'惠农资金公开':''; | |||
}, | |||
methods: { | |||
getList(){ | |||
@@ -89,7 +89,8 @@ | |||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||
</div> | |||
</div> | |||
<!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | |||
@@ -115,6 +116,12 @@ | |||
</div> | |||
</van-form> | |||
<van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||
<div style="width: 100%;height: 400px;overflow:scroll;"> | |||
<img :src="fjImg" width="95%"/> | |||
</div> | |||
</van-dialog> | |||
</div> | |||
</template> | |||
@@ -128,6 +135,8 @@ | |||
return { | |||
showBuildTime:false, | |||
showPictureType:false, | |||
fjImg:"", | |||
fjImgShow:false, | |||
form:{ | |||
openAt:this.format(new Date(),'yyyy-MM-dd'), | |||
openPic:'', | |||
@@ -203,6 +212,26 @@ | |||
that.form = res.data; | |||
}) | |||
}, | |||
goToPage(url) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
let subIndex = url.lastIndexOf("."); | |||
let ext = url.substring(subIndex + 1, url.length); | |||
//console.log(ext) | |||
if (ext == "jpg" || ext == "png") { | |||
url = url.substring(4,url.length); | |||
this.fjImg = baseImgUrl + url; | |||
this.fjImgShow = true; | |||
}else{ | |||
let allUrl = url; | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
}, | |||
onSubmit(){ | |||
var that = this; | |||
that.form.openFile = that.openFile2.join(',') | |||
@@ -54,7 +54,8 @@ | |||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -66,7 +67,11 @@ | |||
</van-field> | |||
</div> | |||
<van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||
<div style="width: 100%;height: 400px;overflow:scroll;"> | |||
<img :src="fjImg" width="95%"/> | |||
</div> | |||
</van-dialog> | |||
</div> | |||
</template> | |||
@@ -87,6 +92,8 @@ | |||
openPic:[], | |||
fileList:[], | |||
fileList1:[], | |||
fjImgShow:false, | |||
fjImg:'', | |||
openNy:new Date(), | |||
type:'', | |||
openFile:[], | |||
@@ -141,6 +148,26 @@ | |||
this.form = res.data; | |||
}) | |||
}, | |||
goToPage(url) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
let subIndex = url.lastIndexOf("."); | |||
let ext = url.substring(subIndex + 1, url.length); | |||
//console.log(ext) | |||
if (ext == "jpg" || ext == "png") { | |||
url = url.substring(4,url.length); | |||
this.fjImg = baseImgUrl + url; | |||
this.fjImgShow = true; | |||
}else{ | |||
let allUrl = url; | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
}, | |||
}, | |||
} | |||
@@ -86,7 +86,8 @@ | |||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||
</div> | |||
</div> | |||
<!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | |||
@@ -102,6 +103,11 @@ | |||
</div> | |||
</van-form> | |||
<van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||
<div style="width: 100%;height: 400px;overflow:scroll;"> | |||
<img :src="fjImg" width="95%"/> | |||
</div> | |||
</van-dialog> | |||
</div> | |||
</template> | |||
@@ -120,6 +126,8 @@ | |||
openPic:'', | |||
openFile:'', | |||
}, | |||
fjImg:'', | |||
fjImgShow:false, | |||
openPic:[], | |||
pictureTypeOptions:[], | |||
fileList:[], | |||
@@ -165,7 +173,7 @@ | |||
}else if(name.indexOf('.xls') > -1){ | |||
type = 'excel'; | |||
} | |||
this.openFile[i] = {name:name,type:type} | |||
this.openFile[i] = {name:name,type:type,url:'/api'+rr} | |||
}) | |||
} | |||
if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ | |||
@@ -192,6 +200,26 @@ | |||
} | |||
}) | |||
}, | |||
goToPage(url) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
let subIndex = url.lastIndexOf("."); | |||
let ext = url.substring(subIndex + 1, url.length); | |||
//console.log(ext) | |||
if (ext == "jpg" || ext == "png") { | |||
url = url.substring(4,url.length); | |||
this.fjImg = baseImgUrl + url; | |||
this.fjImgShow = true; | |||
}else{ | |||
let allUrl = url; | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
}, | |||
onConfirmOpenNy(data){ | |||
this.form.openAt = this.format(data,'yyyy-MM-dd'); | |||
this.openNy = data; | |||
@@ -54,7 +54,8 @@ | |||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
<p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -66,7 +67,11 @@ | |||
</van-field> | |||
</div> | |||
<van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||
<div style="width: 100%;height: 400px;overflow:scroll;"> | |||
<img :src="fjImg" width="95%"/> | |||
</div> | |||
</van-dialog> | |||
</div> | |||
</template> | |||
@@ -84,6 +89,8 @@ | |||
openPic:'', | |||
openFile:'', | |||
}, | |||
fjImg:'', | |||
fjImgShow:false, | |||
openPic:[], | |||
fileList:[], | |||
fileList1:[], | |||
@@ -141,7 +148,26 @@ | |||
this.form = res.data; | |||
}) | |||
}, | |||
goToPage(url) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
let subIndex = url.lastIndexOf("."); | |||
let ext = url.substring(subIndex + 1, url.length); | |||
//console.log(ext) | |||
if (ext == "jpg" || ext == "png") { | |||
url = url.substring(4,url.length); | |||
this.fjImg = baseImgUrl + url; | |||
this.fjImgShow = true; | |||
}else{ | |||
let allUrl = url; | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
}, | |||
}, | |||
} | |||
</script> | |||
@@ -29,8 +29,8 @@ | |||
<van-row> | |||
<van-col :span="24">姓名</van-col> | |||
</van-row> | |||
<van-row v-for="(item,index) in 10" :key="index"> | |||
<van-col :span="24">张三</van-col> | |||
<van-row v-for="(item,index) in oddjobList" :key="index"> | |||
<van-col :span="24">{{item.workerName}}</van-col> | |||
</van-row> | |||
<div class="name_bg"></div> | |||
<img src="../../assets/images/sunVillage_info/name_icon.png" class="name_icon"/> | |||
@@ -43,10 +43,10 @@ | |||
<van-col :span="8">出工事由</van-col> | |||
<van-col :span="8">出工数</van-col> | |||
</van-row> | |||
<van-row v-for="(item,index) in 10" :key="index"> | |||
<van-col :span="8">2023-03-05</van-col> | |||
<van-col :span="8">上班打卡</van-col> | |||
<van-col :span="8">8</van-col> | |||
<van-row v-for="(item,index) in oddjobList" :key="index"> | |||
<van-col :span="8">{{item.jobTime}}</van-col> | |||
<van-col :span="8">{{item.workReason}}</van-col> | |||
<van-col :span="8">{{item.workNum}}</van-col> | |||
</van-row> | |||
</div> | |||
</div> | |||
@@ -77,6 +77,7 @@ | |||
fileList:[], | |||
listLength:'0', | |||
searchInput:'', | |||
pageNum:0, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
@@ -92,6 +93,7 @@ | |||
showBtn:true, | |||
yearMonth:[], | |||
yearList:[], | |||
oddjobList:[], | |||
deptName:'', | |||
nowYear:new Date().getFullYear(), | |||
}; | |||
@@ -109,7 +111,14 @@ | |||
methods: { | |||
getList(){ | |||
var _this = this; | |||
let params = { | |||
bookId:this.queryParams.bookId, | |||
yearMonth:this.queryParams.yearMonth, | |||
} | |||
listOddjob(params).then(response => { | |||
this.listLength = response.total; | |||
this.oddjobList = response.rows; | |||
}); | |||
}, | |||
tabClickMonth(month){ | |||
this.month = month ; | |||
@@ -4,7 +4,7 @@ | |||
零工登记 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
</div> | |||
<van-form > | |||
<van-form ref="formData"> | |||
<div class="list_main"> | |||
<div class="titBox"> | |||
<img src="../../assets/images/sunVillage_info/add_icon_3.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||
@@ -16,7 +16,7 @@ | |||
clickable | |||
label="出工日期" | |||
placeholder="请选择" | |||
v-model="value" | |||
v-model="form.jobTime" | |||
@click="showBuildTime = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
@@ -30,24 +30,25 @@ | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
v-model="buildTime" | |||
:max-date="maxDate" | |||
:value="new Date" | |||
@confirm="onConfirmBuildTime" | |||
@cancel="showBuildTime = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="value" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="value" label="出工事由" placeholder="出工事由" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="value" label="记工员" placeholder="记工员" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="value" label="出工数" placeholder="出工数" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="value" label="工日值" placeholder="工日值" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="value" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" /> | |||
<van-field v-model="value" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="form.workerName" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="form.workReason" label="出工事由" placeholder="出工事由" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="form.workerNote" label="记工员" placeholder="记工员" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="form.workNum" label="出工数" placeholder="出工数" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="form.perMoney" label="工日值" placeholder="工日值" input-align="right" :border="false" /> | |||
<van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="form.totalMoney" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" /> | |||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
</div> | |||
<div style="margin: 16px auto;width: 50%;"> | |||
<van-button round block type="primary" native-type="submit"> | |||
<van-button round block type="primary" @click="submitForm"> | |||
保存 | |||
</van-button> | |||
</div> | |||
@@ -55,15 +56,16 @@ | |||
</div> | |||
</template> | |||
<script> | |||
import { addPermanent } from "@/api/sunVillage_info/fixedAssets"; | |||
import { addOddjob,updateOddjob } from "@/api/sunVillage_info/fixedAssets"; | |||
export default { | |||
name: "certificateList", | |||
data() { | |||
return { | |||
minDate:new Date(1900,1,1), | |||
maxDate: new Date(2050, 12, 31), | |||
showBuildTime:false, | |||
form:{}, | |||
buildTime:new Date(), | |||
value:'' | |||
@@ -74,9 +76,42 @@ | |||
}, | |||
methods: { | |||
onConfirmBuildTime(data){ | |||
this.form.buildTime = this.format(data,'yyyy-MM-dd'); | |||
this.form.jobTime = this.format(data,'yyyy-MM-dd'); | |||
this.showBuildTime = false; | |||
}, | |||
submitForm(){ | |||
this.$refs.formData.validate().then(() => { | |||
if (this.form.id) { | |||
updateOddjob(this.form).then(response => { | |||
if (response.code == 200) { | |||
this.$toast({ | |||
icon: 'success', | |||
message: '保存成功', | |||
duration:"1000", | |||
}); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}); | |||
} else { | |||
addOddjob(this.form).then(response => { | |||
if (response.code == 200) { | |||
this.$toast({ | |||
icon: 'success', | |||
message: '保存成功', | |||
duration:"1000", | |||
}); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}); | |||
} | |||
}).catch(() => { | |||
this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | |||
}); | |||
}, | |||
}, | |||
} | |||
</script> | |||
@@ -365,13 +365,13 @@ export default { | |||
this.userForm.id = response.data.id; | |||
this.form.tableId = response.data.id; | |||
showUserImg(response.data.id).then(responseSecond => { | |||
console.log(responseSecond) | |||
this.form.files = responseSecond.data | |||
for (var i = 0 ; i < responseSecond.data.length ; i++){ | |||
this.fileList.push({url:this.global.severApi+responseSecond.data[i].fileUrl,id:responseSecond.data[i].id}) | |||
} | |||
}); | |||
// showUserImg(response.data.id).then(responseSecond => { | |||
// console.log(responseSecond) | |||
// this.form.files = responseSecond.data | |||
// for (var i = 0 ; i < responseSecond.data.length ; i++){ | |||
// this.fileList.push({url:this.global.severApi+responseSecond.data[i].fileUrl,id:responseSecond.data[i].id}) | |||
// } | |||
// }); | |||
}); | |||
}); | |||
}, | |||
@@ -138,7 +138,7 @@ export default { | |||
}); | |||
showImg(response.data.id).then(responseSecond => { | |||
for (var i = 0 ; i < responseSecond.data.length ; i++){ | |||
this.fileList.push({url:this.global.severApi+responseSecond.data[i].fileUrl,id:responseSecond.data[i].id}) | |||
this.fileList.push({url:'/api'+responseSecond.data[i].fileUrl,id:responseSecond.data[i].id}) | |||
} | |||
}); | |||
}); | |||
@@ -180,12 +180,13 @@ | |||
var that = this; | |||
var str = val; | |||
var numArr = str.match(/\d+/g) | |||
var nameArr = str.match(/[\u4e00-\u9fa5]/g).join("") | |||
console.log(numArr) | |||
console.log(nameArr) | |||
var nameArr = str.match(/[\u4e00-\u9fa5]/g) | |||
if(nameArr != null){ | |||
nameArr = nameArr.join("") | |||
} | |||
if (numArr) { | |||
numArr.map(rr=>{ | |||
if (rr.length>16) { | |||
if (rr.length>=16) { | |||
const carId = isBankCard(rr); | |||
if (carId) { | |||
that.form.payee = nameArr; | |||
@@ -275,7 +275,7 @@ | |||
</van-cell> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" @click="deleteChargeItme(index)" /> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
@@ -323,11 +323,41 @@ | |||
<p class="main_title" v-if="isModifyOrder" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | |||
<div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead('1')" @click-preview="previewPreview" @delete="deleteFile" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="发票" /> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead('2')" @click-preview="previewPreview" @delete="deleteFile" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell title="其他" /> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead('3')" @click-preview="previewPreview" @delete="deleteFile" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row v-if="!isModifyOrder"> | |||
@@ -538,6 +568,120 @@ | |||
let dd = new Date().getDate(); | |||
_this.nowDate = moment(new Date()).format("YYYY-MM-DD"); | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
initProjectInfo(){ | |||
let _this = this | |||
let queryParams={ | |||
@@ -1168,6 +1312,20 @@ | |||
commonAttach(params1).then((r1) => { | |||
file.id=r1.id; | |||
file.fileUrl = r1.fileUrl; | |||
let subIndex = r1.fileUrl.lastIndexOf("."); | |||
let ext = r1.fileUrl.substring(subIndex + 1, r1.fileUrl.length); | |||
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; | |||
let fileData = {"url": baseUrl + r1.fileUrl, "file": new File([], "name", {}), "id": r1.id,"type":ext}; | |||
if(obj === '1'){ | |||
this.fileList1.splice(-1, 1); | |||
this.fileList1.push(fileData); | |||
}else if(obj === '2'){ | |||
this.fileList2.splice(-1, 1); | |||
this.fileList2.push(fileData); | |||
}else{ | |||
this.fileList3.splice(-1, 1); | |||
this.fileList3.push(fileData); | |||
} | |||
}) | |||
} | |||
}, | |||
@@ -1184,7 +1342,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -1196,7 +1356,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -1208,7 +1370,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -232,11 +232,11 @@ | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" @click-preview="previewPreview" style="margin-left:8px;"></van-uploader> | |||
<van-cell title="发票" /> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" @click-preview="previewPreview" style="margin-left:8px;"></van-uploader> | |||
<van-cell title="其他" /> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" @click-preview="previewPreview" style="margin-left:8px;"></van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
@@ -445,6 +445,120 @@ | |||
} | |||
}); | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
// 表单重置 | |||
reset() { | |||
this.form = { | |||
@@ -700,6 +814,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}) | |||
@@ -710,6 +825,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}) | |||
@@ -718,6 +834,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -776,6 +893,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -792,6 +910,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -807,6 +926,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -828,6 +948,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -844,6 +965,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -859,6 +981,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -889,6 +1012,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -905,6 +1029,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -920,6 +1045,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -940,6 +1066,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -956,6 +1083,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -971,6 +1099,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1011,6 +1140,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1027,6 +1157,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1043,6 +1174,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1063,6 +1195,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1079,6 +1212,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1094,6 +1228,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1124,6 +1259,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1140,6 +1276,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1155,6 +1292,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1175,6 +1313,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1191,6 +1330,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1206,6 +1346,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1308,6 +1449,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1322,6 +1464,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1335,6 +1478,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1353,6 +1497,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1367,6 +1512,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1380,6 +1526,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1408,6 +1555,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1422,6 +1570,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1435,6 +1584,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1453,6 +1603,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1467,6 +1618,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1480,6 +1632,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1518,6 +1671,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1532,6 +1686,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1545,6 +1700,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1563,6 +1719,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1577,6 +1734,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1590,6 +1748,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1618,6 +1777,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1632,6 +1792,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1645,6 +1806,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1663,6 +1825,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1677,6 +1840,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1690,6 +1854,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}) | |||
@@ -1857,7 +2022,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -1869,7 +2036,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -1881,7 +2050,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -782,6 +782,8 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -789,6 +791,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -801,6 +804,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -808,6 +812,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -818,6 +823,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -825,6 +831,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -880,6 +887,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -887,6 +895,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -898,6 +907,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -905,6 +915,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -915,6 +926,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -922,6 +934,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -937,6 +950,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -944,6 +958,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -955,6 +970,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -962,6 +978,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -972,6 +989,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -979,6 +997,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1004,6 +1023,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1011,6 +1031,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1022,6 +1043,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1029,6 +1051,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1039,6 +1062,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1046,6 +1070,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1061,6 +1086,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1068,6 +1094,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1079,6 +1106,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1086,6 +1114,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1096,6 +1125,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1103,6 +1133,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1138,6 +1169,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1145,6 +1177,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1156,6 +1189,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1163,6 +1197,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1173,6 +1208,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1180,6 +1216,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1195,6 +1232,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1202,6 +1240,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1213,6 +1252,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1220,6 +1260,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1230,6 +1271,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1237,6 +1279,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1262,6 +1305,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1269,6 +1313,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1280,6 +1325,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1287,6 +1333,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1297,6 +1344,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1304,6 +1352,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1319,6 +1368,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1326,6 +1376,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1337,6 +1388,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1344,6 +1396,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1354,6 +1407,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
@@ -1361,6 +1415,7 @@ | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -1446,6 +1501,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1453,12 +1509,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1470,6 +1528,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1477,12 +1536,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1504,6 +1565,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1511,12 +1573,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1528,6 +1592,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1535,12 +1600,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1572,6 +1639,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1579,12 +1647,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1596,6 +1666,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1603,12 +1674,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1630,6 +1703,7 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
@@ -1637,12 +1711,14 @@ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -1654,6 +1730,7 @@ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} else if(this.form.capitalExpenditureType==4){ | |||
@@ -1661,12 +1738,14 @@ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -78,7 +78,17 @@ | |||
<p class="main_title">上传附件(收据)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList1" :key="index"> | |||
@@ -87,7 +97,17 @@ | |||
<p class="main_title">上传附件(发票)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList2" :key="index"> | |||
@@ -96,7 +116,17 @@ | |||
<p class="main_title">上传附件(其他)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList3" :key="index"> | |||
@@ -332,7 +362,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -344,7 +376,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -356,7 +390,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||
}) | |||
}) | |||
}, | |||
@@ -366,7 +402,7 @@ | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
auditbatchNo: this.$route.query.auditbatchNo, | |||
comment: this.comment, | |||
remark: this.comment, | |||
pass: this.pass, | |||
}; | |||
approval(data).then((response) => { | |||
@@ -68,7 +68,17 @@ | |||
<p class="main_title">上传附件(收据)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList1" :key="index"> | |||
@@ -77,7 +87,17 @@ | |||
<p class="main_title">上传附件(发票)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList2" :key="index"> | |||
@@ -86,7 +106,17 @@ | |||
<p class="main_title">上传附件(其他)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList3" :key="index"> | |||
@@ -315,7 +345,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -327,7 +359,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -339,7 +373,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||
}) | |||
}) | |||
}, | |||
@@ -355,7 +391,7 @@ | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
auditbatchNo: this.$route.query.auditbatchNo, | |||
comment: this.comment, | |||
remark: this.comment, | |||
pass: this.pass, | |||
}; | |||
console.log(data); | |||
@@ -15,8 +15,8 @@ | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right"/> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto"/> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
@@ -26,15 +26,18 @@ | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" | |||
input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="转账附言" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
<van-field readonly label="转账附言" v-model="form.remark" type="textarea" input-align="right" rows="3" | |||
label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" | |||
label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
@@ -44,14 +47,14 @@ | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right"/> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right"/> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right"/> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
@@ -59,116 +62,170 @@ | |||
<p class="main_title">收款方信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
<van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==3||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" /> | |||
<van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" | |||
input-align="right" label-width="auto"/> | |||
<van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==3||form.bankType==4" | |||
v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto"/> | |||
</div> | |||
<div style="position:relative;" > | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<div style="position:relative;"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" | |||
:key="index" v-if="index<listLength"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right"/> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
<van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="转账状态" v-model="item.transferStatus" input-align="right" /> | |||
<van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="交易结果描述" v-model="item.causeFailure" type="textarea" input-align="right" rows="3" label-width="auto" /> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right"/> | |||
<van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="转账状态" | |||
v-model="item.transferStatus" input-align="right"/> | |||
<van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="交易结果描述" | |||
v-model="item.causeFailure" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||
<p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="listLength = chargeItme.length,showbtn=false"> | |||
查看更多</p> | |||
<p class="main_more" v-if="chargeItme.length>1 && !showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
<van-cell value="收据"/> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled | |||
:upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" @click-preview="previewPreview" | |||
:deletable="false" :max-count="fileList1.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="发票"/> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled | |||
:upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" @click-preview="previewPreview" | |||
:deletable="false" :max-count="fileList2.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="其他"/> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled | |||
:upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" @click-preview="previewPreview" | |||
:deletable="false" :max-count="fileList3.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
getTransfer, | |||
queryTransferDetail, | |||
listPayee, | |||
updateTransfer, | |||
getProjectto, | |||
listProject, | |||
addProjectto, | |||
customSubmit, | |||
getInfoto, | |||
listTemplate | |||
} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showbtn:true, | |||
showcapital: false, | |||
showpayee: false, | |||
showlasj: false, | |||
showbankType: false, | |||
showproject: false, | |||
showFundType: false, | |||
showbtn: true, | |||
listLength:1, | |||
listLength: 1, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
form: {}, | |||
fileList1: [], | |||
fileList2: [], | |||
fileList3: [], | |||
capitalExpenditureType: '', | |||
payee: '', | |||
bankType: '', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
transferStatusOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectList:[], | |||
wfydlxDictionaries: [], | |||
jglxDictionaries: [], | |||
sysDictionaries: [], | |||
capitalExpenditureTypeOptions: [], | |||
bankTypeDictionaries: [], | |||
projectList: [], | |||
projectFundTypeOptions: [], | |||
transferStatusOptions: [], | |||
projectFundTypeDictionaries: [], | |||
projectList: [], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
chargeItme: [], | |||
chargeItmeShow: [], | |||
payeeList:[], | |||
payeeList: [], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
transferType: "", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
capitalExpenditureOpen: false, | |||
contractOpen: false, | |||
projectForm: { | |||
projectId: null, | |||
projectName: null, | |||
projectContractor: null, | |||
projectAmount: null, | |||
projectBillNum: null, | |||
projectFundType: '1', | |||
outId: null, | |||
ynType: '1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
infoForm: { | |||
infoId: null, | |||
name: null, | |||
code: null, | |||
totalAmount: null, | |||
contractionId: null, | |||
transferId: null | |||
}, | |||
projectFundType:'', | |||
templateList:[], | |||
projectFundType: '', | |||
templateList: [], | |||
}; | |||
}, | |||
created() { | |||
@@ -189,7 +246,7 @@ | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
getTemplateList() { | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
@@ -199,20 +256,20 @@ | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
tempalteFormat(id) { | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
if (res.id == id) { | |||
console.log(res.name) | |||
name = res.name | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo; | |||
goFlow() { | |||
window.location = 'approvalProcess?id=' + this.$route.query.id + '&auditbatchNo=' + this.$route.query.auditbatchNo; | |||
}, | |||
getDictionaries(){ | |||
getDictionaries() { | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
@@ -220,17 +277,17 @@ | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
if (response.data.capitalExpenditureType == 2) { | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
let param = { | |||
'outId': response.data.id, | |||
'ynType': '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4) { | |||
} else if (response.data.capitalExpenditureType == 4) { | |||
this.contractOpen = true | |||
let param = { | |||
'transferId': response.data.id | |||
@@ -238,13 +295,13 @@ | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
} else { | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
for (var j = 0; j < response.rows.length; j++) { | |||
response.rows[j].bankTypeText = this.selectDictLabel(this.bankTypeDictionaries, response.rows[j].bankType); | |||
response.rows[j].transferStatus = this.selectDictLabel(this.transferStatusOptions, response.rows[j].transferStatus); | |||
} | |||
@@ -252,6 +309,120 @@ | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file, fileType) { | |||
return new Promise((resolve, reject) => { | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload = function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,' + base64String); | |||
} | |||
reader.onerror = function () { | |||
reject(new Error("Failed to load file")) | |||
} | |||
}) | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
@@ -262,8 +433,8 @@ | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
getFileList() { | |||
let oData1 = { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
@@ -271,11 +442,13 @@ | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
let oData2 = { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
@@ -283,11 +456,13 @@ | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
let oData3 = { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
@@ -295,17 +470,19 @@ | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
goBack() { | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
deleteChargeItme(index) { | |||
this.chargeItme.splice(index, 1) | |||
}, | |||
}, | |||
} | |||
@@ -315,44 +492,49 @@ | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_more{ | |||
.main_more { | |||
width: 96%; | |||
margin: 0 auto; | |||
margin-top: 10px; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
text-align: center; | |||
padding: 10PX 0; | |||
} | |||
.main_title{ | |||
.main_title { | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
.main_box { | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
.submitButton { | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
.addFamily { | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
.deleteFamily { | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
@@ -72,13 +72,43 @@ | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" @click-preview="previewPreview" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" @click-preview="previewPreview" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"> | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" @click-preview="previewPreview" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" > | |||
<template #preview-cover="file"> | |||
<div class="preview-cover"> | |||
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||
</div> | |||
</template> | |||
</van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -196,6 +226,120 @@ | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,'; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
@@ -263,7 +407,9 @@ | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData2= { | |||
@@ -275,7 +421,9 @@ | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
let oData3= { | |||
@@ -287,7 +435,9 @@ | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
let subIndex = r.fileName.lastIndexOf("."); | |||
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||
}) | |||
}) | |||
}, | |||
@@ -21,7 +21,7 @@ | |||
finished-text="没有更多了" | |||
@load="getList"> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payerAccount" center :to="{name:'approvalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||
<van-cell :title="item.remark" center :to="{name:'approvalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | |||
</template> | |||
@@ -29,8 +29,10 @@ | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | |||
</template> | |||
<template #default> | |||
<p style="width: 80px;display: inline-block">{{item.auditStatus}}</p> | |||
<p v-if="item.auditStatus === '通过' && item.paymentState === '待支付'" style="color: #606266;width: 80px;display: inline-block">{{item.paymentState}}</p> | |||
<span v-if="item.auditStatus === '0'" style="color: #696969">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '1' " style="color: #FFA500;">{{ selectDictLabel(auditStatusOptions, item.auditStatus) }} </span> | |||
<p v-if="item.auditStatus === '3' && item.paymentState === '待支付'" style="color: #606266;width: 80px;display: inline-block">{{item.paymentState}}</p> | |||
<p v-else-if="item.paymentState === '银行受理'" style="width: 80px;display: inline-block">{{item.paymentState}}</p> | |||
<p v-else-if="(item.paymentState === '支付失败' || item.paymentState === '部分失败') && item.downId == null" style="color: #F56C6C;width: 80px;display: inline-block">{{item.paymentState}}-未重新申请</p> | |||
<p v-else-if="(item.paymentState === '支付失败' || item.paymentState === '部分失败') && item.downId != null" style="color: #E6A23C;width: 80px;display: inline-block">{{item.paymentState}}-已重新申请</p> | |||
@@ -40,16 +42,16 @@ | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.paymentState === '银行受理'" square text="核实结果" color="#FFA63E" type="info" @click="transactionStatusQuery(item.id)" class="delete-button" /> | |||
@@ -111,8 +113,10 @@ export default { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
response.rows[i].paymentState = this.selectDictLabel(this.paymentStateOptions, response.rows[i].paymentState); | |||
if(response.rows[i].remark.length > 12){ | |||
response.rows[i].remark = response.rows[i].remark.substring(0,12)+"..."; | |||
} | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
@@ -22,10 +22,13 @@ | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail11', query: {id:item.id}}"> | |||
<van-cell :title="item.payer" center :to="{name:'approvalDetail11', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<span v-if="item.auditStatus === '0'">{{ selectDictLabel(this.auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(this.auditStatusOptions, item.auditStatus)}} </span> | |||
<span v-else style="color: #67c23a;">{{ selectDictLabel(this.auditStatusOptions, item.auditStatus) }} </span> | |||
<template #label> | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
@@ -33,16 +36,16 @@ | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify11', query: {id:item.id}}" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'approvalModify11', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
<van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
@@ -95,7 +98,6 @@ export default { | |||
listCash(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
@@ -234,11 +234,11 @@ | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @click-preview="previewPreview" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||
<van-cell title="发票" /> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @click-preview="previewPreview" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||
<van-cell title="其他" /> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @click-preview="previewPreview" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
@@ -2148,6 +2148,120 @@ | |||
this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
} | |||
}, | |||
previewPreview(file, index, len) { | |||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||
if (file.url) { | |||
//已上传文件 | |||
let fileName = file.file.name || file.url; | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
let imgi = file.listIndex | |||
//console.log(ext) | |||
let allUrl = file.url; | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
const link = document.createElement("a"); | |||
link.style.display = "none"; | |||
link.target = "_blank" | |||
link.href = allUrl; | |||
document.body.appendChild(link); | |||
link.click(); | |||
document.body.removeChild(link); | |||
} | |||
} else { | |||
//新上传文件 | |||
let fileName = file.file.name; | |||
// console.info(file.file.name) | |||
let subIndex = fileName.lastIndexOf("."); | |||
let ext = fileName.substring(subIndex + 1, fileName.length); | |||
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||
let type = this.getfileType(ext); | |||
// 将文件转换为base64编码 | |||
this.fileToBase64(file.file, ext).then(res => { | |||
this.downloadFile(res, fileName, ext, type); | |||
}) | |||
} | |||
} | |||
}, | |||
getfileType(type) { | |||
switch (type) { | |||
case 'txt': | |||
return 'text/plain'; | |||
case 'doc': | |||
return 'application/msword'; | |||
case 'docx': | |||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||
case 'xls': | |||
return 'application/vnd.ms-excel'; | |||
case 'xlsx': | |||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||
case 'pdf': | |||
return 'application/pdf'; | |||
case 'pptx': | |||
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||
case 'png': | |||
return 'image/png'; | |||
case 'jpg': | |||
return 'image/jpeg'; | |||
case 'gif': | |||
return 'image/gif'; | |||
case 'svg': | |||
return 'image/svg+xml'; | |||
case 'ico': | |||
return 'image/x-icon'; | |||
case 'bmp': | |||
return 'image/bmp,';; | |||
} | |||
}, | |||
downloadFile(base64, fileName, fileType, mimetype) { | |||
const typeHeader = 'data:application/' + fileType + ';base64,'; | |||
const blob = this.base64ToBlob(base64, mimetype); | |||
this.downloadFileDownload(blob, fileName, fileType); | |||
}, | |||
base64ToBlob(base64, mime) { | |||
//解码base64得到二进制字符串 | |||
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||
let rawLength = raw.length | |||
//创建8位无符号整数值的类型化数组 | |||
let uInt8Array = new Uint8Array(rawLength) | |||
for (let i = 0; i < rawLength; ++i) { | |||
uInt8Array[i] = raw.charCodeAt(i); | |||
} | |||
return new Blob([uInt8Array], {type: mime}) | |||
}, | |||
downloadFileDownload(blob, fileName, fileType) { | |||
const downloadElement = document.createElement('a'); | |||
let href = blob; | |||
if (typeof blob === 'string') { | |||
downloadElement.target = '_blank' | |||
} else { | |||
href = window.URL.createObjectURL(blob) | |||
} | |||
downloadElement.href = href; | |||
downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||
document.body.appendChild(downloadElement); | |||
downloadElement.click(); | |||
document.body.removeChild(downloadElement) | |||
if (typeof blob !== 'string') { | |||
window.URL.revokeObjectURL(href) | |||
} | |||
}, | |||
fileToBase64(file,fileType){ | |||
return new Promise((resolve,reject)=>{ | |||
//创建一个新的FileReader 对象 | |||
const reader = new FileReader(); | |||
//读取file对象 | |||
reader.readAsDataURL(file); | |||
reader.onload=function () { | |||
const base64String = reader.result.split(",")[1]; | |||
resolve('data:application/' + fileType + ';base64,'+base64String); | |||
} | |||
reader.onerror=function () { | |||
reject(new Error("Failed to load file") ) | |||
} | |||
}) | |||
}, | |||
selectChange(select) { | |||
let obj = {}; | |||
obj = this.payerOptions.find((account) => { | |||
@@ -598,6 +598,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}) | |||
@@ -606,6 +607,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -616,6 +618,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}) | |||
@@ -624,6 +627,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -658,6 +662,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}) | |||
@@ -666,6 +671,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -676,6 +682,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}) | |||
@@ -684,6 +691,7 @@ | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
} | |||
@@ -736,12 +744,14 @@ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
}else{ | |||
@@ -750,12 +760,14 @@ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
window.location.reload(); | |||
},2000) | |||
} | |||
} | |||
@@ -25,7 +25,7 @@ | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
<van-row v-if="processList.status==2" v-for="(item1,index,i) in processList.审批事项" :key="i"> | |||
<van-row v-for="(item1,index,i) in processList" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" v-show="item1.auditStatus=='1'"><van-icon name="minus" size="14" /></p> | |||
<p class="icon_jian blue" v-show="item1.auditStatus=='3'"><van-icon name="success" size="14" /></p> | |||
@@ -109,8 +109,8 @@ export default { | |||
}, | |||
methods: { | |||
//查询审批进程 | |||
getTransferProcess(id){ | |||
getTransferProcess(id).then(res => { | |||
getTransferProcess(auditbatchNo){ | |||
getTransferProcess(auditbatchNo).then(res => { | |||
this.processList = res.data[auditbatchNo] | |||
}) | |||
}, | |||
@@ -119,7 +119,7 @@ export default { | |||
this.form = response.data; | |||
this.processList = {} | |||
if(this.form.auditStatus != 0){ | |||
this.getTransferProcess(this.$route.query.id); | |||
this.getTransferProcess(this.$route.query.auditbatchNo); | |||
} | |||
if(this.form.approvalMode == 1){ | |||
selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | |||
@@ -25,7 +25,7 @@ | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
<van-row v-if="processList.status==2" v-for="(item1,index,i) in processList.审批事项" :key="i"> | |||
<van-row v-for="(item1,index,i) in processList" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" v-show="item1.auditStatus=='1'"><van-icon name="minus" size="14" /></p> | |||
<p class="icon_jian blue" v-show="item1.auditStatus=='3'"><van-icon name="success" size="14" /></p> | |||
@@ -114,8 +114,8 @@ export default { | |||
}, | |||
methods: { | |||
//查询审批进程 | |||
getTransferProcess1(id){ | |||
getTransferProcess(id).then(res => { | |||
getTransferProcess1(auditbatchNo){ | |||
getTransferProcess(auditbatchNo).then(res => { | |||
this.processList = res.data[auditbatchNo] | |||
}) | |||
}, | |||
@@ -124,7 +124,7 @@ export default { | |||
this.form = response.data; | |||
this.processList = {} | |||
if(this.form.auditStatus != 0){ | |||
this.getTransferProcess1(this.$route.query.id); | |||
this.getTransferProcess1(this.$route.query.auditbatchNo); | |||
} | |||
if(this.form.approvalMode == 1){ | |||
selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | |||
@@ -48,14 +48,14 @@ | |||
</template> | |||
<template #label> | |||
<p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | |||
<span style="width: 100%;text-align:left;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||
<span style="width: 100%;text-align:left;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||
break-all;overflow: hidden;">{{item.payeeToname}}</span> | |||
</p> | |||
</template> | |||
<template #default> | |||
<p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: break-all;overflow: hidden;">{{item.actacn}}</p> | |||
<p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | |||
<span style="width: 100%;text-align:right;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||
<span style="width: 100%;text-align:right;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||
break-all;overflow: hidden;">{{item.payeeActacn}}</span> | |||
</p> | |||
</template> | |||
@@ -66,7 +66,7 @@ | |||
</template> | |||
<script> | |||
import { listRecordDetail, getRecordDetail,getDianzihuidan} from "@/api/onlineHome/bankAgriculture/recordDetail"; | |||
import { listRecordDetail, getRecordDetail,getDianzihuidan} from "@/api/onlineHome/bankAgriculture/recordDetail"; | |||
import { getAccount} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "recordDetailList", | |||
@@ -109,7 +109,7 @@ export default { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
if(this.applicationList != null && this.applicationList != [] && this.applicationList.length>0){ | |||
if(this.applicationList != null && this.applicationList != []){ | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
@@ -120,6 +120,7 @@ export default { | |||
} | |||
}); | |||
}, | |||
getAccountList(){ | |||
let params1={ | |||
accountType: "102", | |||
@@ -1,176 +0,0 @@ | |||
<template> | |||
<div> | |||
<van-nav-bar | |||
title="待办事项" | |||
/> | |||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="width: 96%;margin: 2%;height:128px;border-radius: 6px;"> | |||
<van-swipe-item v-for="(image,index) in images" :key="index"> | |||
<img :src="image" style="width:100%;height: 128px"/> | |||
</van-swipe-item> | |||
</van-swipe> | |||
<van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||
<van-cell> | |||
<template #title> | |||
<van-row style=""> | |||
<van-col span="23" :offset="1"> | |||
<h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||
<van-image | |||
height="20" | |||
width="20" | |||
style="vertical-align: middle;margin-right: 10px" | |||
src="../../../../static/images/onlineHome/done.png"></van-image>{{item.projectName}}</h3> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-cell> | |||
<van-cell> | |||
<template #title> | |||
<van-row> | |||
<van-col span="6" :offset="1"> | |||
<p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p> | |||
</van-col> | |||
<van-col span="10" :offset="1"> | |||
<p style="color: #878787">{{item.formData.activityBusinessType}}</p> | |||
</van-col> | |||
<van-col span="5" :offset="1"> | |||
<p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-cell> | |||
</van-cell-group> | |||
<van-empty v-if="taskList.length<1" description="暂无事项" /> | |||
<yinnongIndex></yinnongIndex> | |||
</div> | |||
</template> | |||
<script> | |||
import onlineHomeIndex from "../../onlineHomeIndex"; | |||
import yinnongIndex from "../../yinnongIndex"; | |||
import { getInfo } from "../../../api/login/index"; | |||
import {ListDone, ListTodo} from "../../../api/onlineHome/done"; | |||
export default { | |||
components: { | |||
onlineHomeIndex, | |||
yinnongIndex | |||
}, | |||
name: "done", | |||
data(){ | |||
return{ | |||
taskList:[], | |||
activeName:this.$route.query.activeName?this.$route.query.activeName:'1', | |||
total:0, | |||
nickName:"", | |||
electronicSignature:"", | |||
queryParams: { | |||
pageNum: 1, | |||
pageSize: 100, | |||
}, | |||
activityBusinessTypeOptions:[], | |||
images:['../../../../static/images/onlineHome/banner_03.png'], | |||
} | |||
}, | |||
created() { | |||
this.getDicts("activity_business_type").then((response) => { | |||
this.activityBusinessTypeOptions = response.data; | |||
if(this.$route.query.activeName){ | |||
this.activeName = this.$route.query.activeName | |||
} | |||
this.getList(); | |||
}); | |||
console.log(this.$route.query.fr) | |||
if(this.$route.query.fr){ | |||
this.$cookies.set("from",this.$route.query.fr,"0") | |||
} | |||
getInfo().then((response) => { | |||
this.electronicSignature = response.user.electronicSignature; | |||
this.nickName = response.user.nickName; | |||
}); | |||
}, | |||
methods: { | |||
goOnlineHomeIndex(){ | |||
if(this.$cookies.get("from")=="my"){ | |||
this.$router.push({name:"yinnongMy"}) | |||
}else{ | |||
this.$router.push({name:"yinnongWorkbench"}) | |||
} | |||
}, | |||
getList() { | |||
this.taskList = [] | |||
// this.$set(this.queryParams, "systemType", '4'); | |||
ListTodo(this.queryParams).then((response) => { | |||
response.rows.map(res => { | |||
if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||
res.tableName = '来自农村宅基地管理系统' | |||
}else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){ | |||
res.tableName = '来自银农直联审批管理系统' | |||
}else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | |||
res.tableName = '来自银农直联审批管理系统' | |||
} | |||
if(this.activityBusinessTypeOptions){ | |||
this.activityBusinessTypeOptions.map(t => { | |||
if(t.dictValue == res.formData.activityBusinessType){ | |||
res.formData.activityBusinessType = t.dictLabel | |||
this.taskList.push(res) | |||
} | |||
}); | |||
} | |||
}) | |||
}) | |||
}, | |||
goDetail(item){ | |||
console.log(item) | |||
let type = item.formData.processKey; | |||
switch (type) { | |||
case 'homeuseZyyctcsq': | |||
this.$router.push({name:'sunVillageInfoPaidExitDetail',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type,electronicSignature:this.electronicSignature,nickName:this.nickName}}) | |||
break; | |||
case 'home_check': | |||
case 'home_start': | |||
this.$router.push({name:'approvalForm',query: {id:item.formData.ydjfsqId,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type,electronicSignature:this.electronicSignature,nickName:this.nickName}}) | |||
break; | |||
case 'home_apply': | |||
this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type,electronicSignature:this.electronicSignature,nickName:this.nickName}}) | |||
break; | |||
case 'baseApply': | |||
case 'landscope': | |||
case 'accepting': | |||
this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||
break; | |||
case 'toReviewTransferProcess': | |||
case 'yinnong_transfer': | |||
if(item.formData.transferType == '10'){ | |||
this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.transferType == '11'){ | |||
this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.transferType == '12'){ | |||
this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.transferType != '10'&&item.formData.transferType != '11'&&item.formData.transferType != '12'){ | |||
this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
case 'yinnong_majorevent': | |||
this.$router.push({name:'approvalApproval13',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped> | |||
>>>.my-swipe .van-swipe-item { | |||
color: #fff; | |||
font-size: 20px; | |||
line-height: 144px; | |||
text-align: center; | |||
} | |||
</style> |
@@ -14,18 +14,18 @@ | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||
<van-cell> | |||
<van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||
<van-cell style="padding: 0 0"> | |||
<template #title> | |||
<van-row style=""> | |||
<van-col span="23" :offset="1"> | |||
<h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||
<p style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||
<van-image | |||
height="20" | |||
width="20" | |||
style="vertical-align: middle;margin-right: 10px" | |||
src="../../../../static/images/onlineHome/done.png"></van-image>{{item.systemType =='4'?selectDictLabel(transferTypeOptions, item.data.transferType):item.auditName}}</h3> | |||
src="../../../../static/images/onlineHome/done.png"></van-image>{{item.auditName}}</p> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
@@ -34,7 +34,7 @@ | |||
<template #title> | |||
<van-row> | |||
<van-col span="6" :offset="1"> | |||
<p style="color: #878787" >{{item.createTime?item.createTime.substring(0,10):item.data.updateTime.substring(0,10)}}</p> | |||
<p style="color: #878787" >{{item.createTime.substring(0,10)}}</p> | |||
</van-col> | |||
<van-col span="10" :offset="1"> | |||
<p style="color: #878787">{{item.businessType}}</p> | |||
@@ -1,170 +0,0 @@ | |||
done.vue<template> | |||
<div> | |||
<van-nav-bar | |||
title="已办事项" | |||
/> | |||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="width: 96%;margin: 2%;height:128px;border-radius: 6px;"> | |||
<van-swipe-item v-for="(image,index) in images" :key="index"> | |||
<img :src="image" style="width:100%;height: 128px"/> | |||
</van-swipe-item> | |||
</van-swipe> | |||
<van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||
<van-cell> | |||
<template #title> | |||
<van-row style=""> | |||
<van-col span="23" :offset="1"> | |||
<h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||
<van-image | |||
height="20" | |||
width="20" | |||
style="vertical-align: middle;margin-right: 10px" | |||
src="../../../../static/images/onlineHome/done.png"></van-image>{{item.projectName}}</h3> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-cell> | |||
<van-cell> | |||
<template #title> | |||
<van-row> | |||
<van-col span="6" :offset="1"> | |||
<p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p> | |||
</van-col> | |||
<van-col span="10" :offset="1"> | |||
<p style="color: #878787">{{item.formData.activityBusinessType}}</p> | |||
</van-col> | |||
<van-col span="5" :offset="1"> | |||
<p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-cell> | |||
</van-cell-group> | |||
<van-empty v-if="taskList.length<1" description="暂无事项" /> | |||
<yinnongIndex></yinnongIndex> | |||
</div> | |||
</template> | |||
<script> | |||
import onlineHomeIndex from "../../onlineHomeIndex"; | |||
import yinnongIndex from "../../yinnongIndex"; | |||
import {ListDone, ListTodo} from "../../../api/onlineHome/done"; | |||
export default { | |||
components: { | |||
onlineHomeIndex, | |||
yinnongIndex | |||
}, | |||
name: "done", | |||
data(){ | |||
return{ | |||
taskList:[], | |||
activeName:this.$route.query.activeName?this.$route.query.activeName:'2', | |||
total:0, | |||
queryParams: { | |||
pageNum: 1, | |||
pageSize: 100, | |||
}, | |||
activityBusinessTypeOptions:[], | |||
images:['../../../../static/images/onlineHome/banner_02.png'], | |||
} | |||
}, | |||
created() { | |||
this.getDicts("activity_business_type").then((response) => { | |||
this.activityBusinessTypeOptions = response.data; | |||
if(this.$route.query.activeName){ | |||
this.activeName = this.$route.query.activeName | |||
} | |||
this.getList(); | |||
}); | |||
console.log(this.$route.query.fr) | |||
if(this.$route.query.fr){ | |||
this.$cookies.set("from",this.$route.query.fr,"0") | |||
} | |||
}, | |||
methods: { | |||
goOnlineHomeIndex(){ | |||
if(this.$cookies.get("from")=="my"){ | |||
this.$router.push({name:"yinnongMy"}) | |||
}else{ | |||
this.$router.push({name:"yinnongWorkbench"}) | |||
} | |||
}, | |||
getList() { | |||
this.taskList = [] | |||
// this.$set(this.queryParams, "systemType", '4'); | |||
ListDone(this.queryParams).then((response) => { | |||
response.rows.map(res => { | |||
if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||
res.tableName = '来自农村宅基地管理系统' | |||
}else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){ | |||
res.tableName = '来自银农直联审批管理系统' | |||
}else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | |||
res.tableName = '来自银农直联审批管理系统' | |||
} | |||
if(this.activityBusinessTypeOptions){ | |||
this.activityBusinessTypeOptions.map(t => { | |||
if(t.dictValue == res.formData.activityBusinessType){ | |||
res.formData.activityBusinessType = t.dictLabel | |||
this.taskList.push(res) | |||
} | |||
}); | |||
} | |||
}) | |||
}) | |||
}, | |||
goDetail(item){ | |||
console.log(item) | |||
let type = item.formData.processKey; | |||
switch (type) { | |||
case 'homeuseZyyctcsq': | |||
this.$router.push({name:'sunVillageInfoPaidExitDetail',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||
break; | |||
case 'home_check': | |||
case 'home_start': | |||
this.$router.push({name:'approvalForm',query: {id:item.formData.ydjfsqId,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||
break; | |||
case 'home_apply': | |||
this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||
break; | |||
case 'baseApply': | |||
case 'landscope': | |||
case 'accepting': | |||
this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||
break; | |||
case 'toReviewTransferProcess': | |||
case 'yinnong_transfer': | |||
if(item.formData.transferType == '10'){ | |||
this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.transferType == '11'){ | |||
this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.transferType == '12'){ | |||
this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.transferType != '10'&&item.formData.transferType != '11'&&item.formData.transferType != '12'){ | |||
this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
case 'yinnong_majorevent': | |||
this.$router.push({name:'approvalApproval13',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped> | |||
>>>.my-swipe .van-swipe-item { | |||
color: #fff; | |||
font-size: 20px; | |||
line-height: 144px; | |||
text-align: center; | |||
} | |||
</style> |
@@ -8,18 +8,18 @@ done.vue<template> | |||
<img :src="image" style="width:100%;height: 150px"/> | |||
</van-swipe-item> | |||
</van-swipe> | |||
<van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||
<van-cell> | |||
<van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||
<van-cell style="padding: 0 0"> | |||
<template #title> | |||
<van-row style=""> | |||
<van-col span="23" :offset="1"> | |||
<h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||
<p style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||
<van-image | |||
height="20" | |||
width="20" | |||
style="vertical-align: middle;margin-right: 10px" | |||
src="../../../../static/images/onlineHome/done.png"></van-image>{{item.systemType =='4'?selectDictLabel(transferTypeOptions, item.data.transferType):item.auditName}}</h3> | |||
src="../../../../static/images/onlineHome/done.png"></van-image>{{item.auditName}}</p> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
@@ -34,7 +34,8 @@ done.vue<template> | |||
<p style="color: #878787">{{item.businessType}}</p> | |||
</van-col> | |||
<van-col span="5" :offset="1"> | |||
<p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||
<p v-if="item.auditStatus == '2'" style="font-size: 14px;font-weight:bold;text-align: right;color: red">驳回</p> | |||
<p v-if="item.auditStatus == '3'" style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">通过</p> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
@@ -4,9 +4,9 @@ | |||
<van-tabbar route :placeholder="true" > | |||
<!-- <van-tabbar-item replace to="/yinnong/publicity" icon="bullhorn-o">公示</van-tabbar-item>--> | |||
<!-- <van-tabbar-item replace to="/yinnong/doneCompleted/completed" icon="todo-list-o">待办</van-tabbar-item>--> | |||
<van-tabbar-item replace to="/yinnong/doneCompleted/completedNew" icon="todo-list-o">待办(新)</van-tabbar-item> | |||
<van-tabbar-item replace to="/yinnong/doneCompleted/completedNew" icon="todo-list-o">待办</van-tabbar-item> | |||
<!-- <van-tabbar-item replace to="/yinnong/doneCompleted/done" icon="completed">已办</van-tabbar-item>--> | |||
<van-tabbar-item replace to="/yinnong/doneCompleted/doneNew" icon="completed">已办(新)</van-tabbar-item> | |||
<van-tabbar-item replace to="/yinnong/doneCompleted/doneNew" icon="completed">已办</van-tabbar-item> | |||
<van-tabbar-item replace to="/yinnong/workbench" icon="apps-o">工作台</van-tabbar-item> | |||
<!-- <van-tabbar-item replace to="/yinnong/home" icon="wap-home-o">家园</van-tabbar-item> --> | |||
<van-tabbar-item replace to="/yinnong/my" icon="manager-o">我的</van-tabbar-item> | |||