123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- <template>
- <view :style="'padding-bottom:' + bottom ">
- <view class='zhanline'></view>
- <uni-forms class='inform' :class="disabled?'disabledbox':''" ref="form" :rules="rules" :value="datainfo" >
- <view class="info_tit">开工信息</view>
- <uni-forms-item name="xmmc" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12">项目名称</view>
- <input :disabled='disabled' placeholder="请输入项目名称" v-model="datainfo.xmmc" class="f16 c34 flex1 txr"/>
- </view>
- </uni-forms-item>
- <uni-forms-item name="kgrq" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>开工日期</view>
- <picker :disabled='disabled' mode="date" :value="datainfo.kgrq" class="infolist_a" @change='bindDateChangea'>
- <view :class="datainfo.kgrq?'':'f16 co80'">{{datainfo.kgrq||"请选择开工日期"}}</view>
- </picker>
- </view>
- </uni-forms-item>
- <uni-forms-item name="njgrq" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>拟竣工日期</view>
- <picker :disabled='disabled' mode="date" :value="datainfo.njgrq" class="infolist_a" @change='bindDateChangeb'>
- <view :class="datainfo.njgrq?'':'f16 co80'">{{datainfo.njgrq||"请选择拟竣工日期"}}</view>
- </picker>
- </view>
- </uni-forms-item>
- <uni-forms-item name="sscrq" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>试生产日期</view>
- <picker :disabled='disabled' mode="date" :value="datainfo.sscrq" class="infolist_a" @change='bindDateChangec'>
- <view :class="datainfo.sscrq?'':'f16 co80'">{{datainfo.sscrq||"请选择试生产日期"}}</view>
- </picker>
- </view>
- </uni-forms-item>
- <uni-forms-item name="ntcsj" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>拟投产日期</view>
- <picker :disabled='disabled' mode="date" :value="datainfo.ntcsj" class="infolist_a" @change='bindDateChanged'>
- <view :class="datainfo.ntcsj?'':'f16 co80'">{{datainfo.ntcsj||"请选择拟投产日期"}}</view>
- </picker>
- </view>
- </uni-forms-item>
- <uni-forms-item name="rtsj" style='margin-bottom: 0;'>
- <view class="flexc infolist" style="background-color: #ffffff;">
- <view class="f16 fw c34 flex0 pr pl12">入统日期</view>
- <picker mode="date" :value="datainfo.rtsj" class="infolist_a" @change='bindDateChangee'>
- <view :class="datainfo.rtsj?'':'f16 co80'">{{datainfo.rtsj||"请选择入统日期"}}</view>
- </picker>
- <view class="delpicker" v-if="datainfo.rtsj">
- <image :src="closedimg" class="closed" @click="datainfo.rtsj=''"></image>
- </view>
- </view>
- </uni-forms-item>
- <uni-forms-item name="nrtsj" style='margin-bottom: 0;'>
- <view class="flexc infolist" style="background-color: #ffffff;">
- <view class="f16 fw c34 flex0 pr pl12">拟入统日期</view>
- <picker mode="date" :value="datainfo.nrtsj" class="infolist_a" @change='bindDateChangef'>
- <view :class="datainfo.nrtsj?'':'f16 co80'">{{datainfo.nrtsj||"请选择拟入统日期"}}</view>
- </picker>
- <view class="delpicker" v-if="datainfo.nrtsj">
- <image :src="closedimg" class="closed" @click="datainfo.nrtsj=''"></image>
- </view>
-
- </view>
- </uni-forms-item>
- <view class="border"></view>
- <view class="info_tit">进度照片</view>
- <uni-forms-item name="ziranren" style='margin-bottom: 0;'>
- <view class="flexc infolist" style="background-color: #ffffff;">
- <view class="flexc infolist_add" @click="getAddPhoto" v-if="checkPermi(['projectV2:rate:add'])">
- <image :src="addimg"></image>
- <view>新增进度照片</view>
- </view>
- <view class="f16 fw c34 flex0 pr pl12">添加进度照片</view>
- <view class="flex1 txr flexc over ml8">
- <text class="flex1 f15 c34 over" v-if="datainfo.sbdw">{{datainfo.sbdw}}</text>
- <text class="f16 flex1 co80" v-else>请先选择添加进度照片</text>
- <!-- <view class="delimg flex0" >
- <image :src="delimg"></image>
- </view> -->
- <!-- <image :src="delimg" class="delimg"></image> -->
- </view>
- </view>
- </uni-forms-item>
- <!-- 进度照片展示 -->
- <view class="qibox" >
- <view class="flexc infolist qi" v-for="(ite,idx) in ratelist" :key="'info-'+idx" @click="getDetailPhoto(ite)">
- <view class="f15 fw c34 flex0 pr pl12 ">{{ite.rateType}}</view>
- <view class="flex1 txr flexc over ml8">
- <text class="flex1 f15 c34 over">{{ite.jdDescribe}}/</text>
- <view class="flexc" style="justify-content: flex-end;">
- <view v-for="(pit,pid) in ite.photo" :key="'info1-'+pid" class="pholist">
- <image :src="baseUrl+pit"></image>
- </view>
- </view>
-
- <view class="delimg flex0" @click.stop="getDelRate(ite.id,idx)" v-if="checkPermi(['projectV2:rate:remove'])">
- <image :src="delimg"></image>
- </view>
-
- </view>
- </view>
- </view>
- <view class="border"></view>
- <uni-forms-item name="czwt" style='margin-bottom: 0;'>
- <view class="flexc infolist" style="align-items: flex-start;">
- <view class="f16 fw c34 flex0 pr pl12">存在问题</view>
- <uni-easyinput :inputBorder='false' type="textarea" v-model="datainfo.czwt" placeholder="请输入存在问题" placeholderStyle='text-align: right;font-size:32rpx;color:#808080'></uni-easyinput>
- </view>
- </uni-forms-item>
- <uni-forms-item name="zsyzFjList" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>附件</view>
- <view class="infolist_a co28" v-if="disabled">选择附件</view>
- <view class="infolist_a co28" v-else><lsj-upload
- ref="lsjUpload"
- childId="upload1"
- :width="width"
- :height="height"
- :option="option"
- :size="size"
- :formats="formats"
- :debug="debug"
- :instantly="instantly"
- @progress=""
- @uploadEnd="onuploadEnd" >
- <view class="btn" :style="{width: width,height: height}">选择附件</view>
- </lsj-upload></view>
- </view>
- </uni-forms-item>
- <view class=" cldelistbf" v-for="(ite,idx) in filelist" :key='idx'>
- <view class="flext f15 c6" @click="getDown(ite.path)">
- <view class="imgl"><image :src="wimg" ></image></view>
- <view>{{ite.fjName}}</view>
- </view>
- <!-- 删除 -->
- <view class="delimg flex0" @click.stop="getDelFj(idx)">
- <image :src="delimg"></image>
- </view>
- </view>
- <view class="infolist_b"><text>*</text>请上传大小不超过<text>100MB</text>格式为<text>doc/xls/ppt/txt/pdf/zip/rar/word</text>的文件</view>
- <view class="infolist_b" style="margin-top: 20rpx;"><text>*</text>土地证复印件/房屋租赁合同复印件、开工照片、项目开工申报表</view>
- <!-- 修改 -->
- <view v-if="checkPermi(['projectV2:kgxx:edit','projectV2:kgxx:add'])&&((progress==3&&xmStatus==2)||(progress==4&&xmStatus!=2))" class="infobtn flexcc cf f16 f500" @click="getSubmit">提交</view>
- <!-- 返回修改 -->
- <view v-if="checkPermi(['projectV2:kgxx:editKg'])&&(progress==4&&xmStatus==2||(progress==5&&xmStatus!=2))" class="infobtn flexcc cf f16 f500" @click="getSubmit">提交</view>
- </uni-forms>
- <!-- 弹框 -->
- <view class="bgbox" @click="getClose" v-if="addflag"></view>
- <view class="fixedbox" v-if="addflag">
- <image :src="closeimg" class="choseimg" @click="getClose"></image>
- <view class="top">添加进度照片</view>
- <view class="boxs" style="padding: 60rpx 0;">
- <!-- 进度照片 -->
- <uni-forms ref="phoform" :rules="phorules" :value="phoinfo">
- <!-- <uni-forms-item name="companyName" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12">时间</view>
- <picker mode="date" :value="phoinfo.nrtsj" class="infolist_a" @change='bindDateChangeg'>
- <view :class="phoinfo.nrtsj?'':'f16 co80'">{{phoinfo.nrtsj||"请选择拟入统日期"}}</view>
- </picker>
- </view>
- </uni-forms-item> -->
- <uni-forms-item name="rateType" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>进度</view>
- <input placeholder="请输入进度" v-model="phoinfo.rateType" class="f16 c34 flex1 txr"/>
- </view>
- </uni-forms-item>
- <uni-forms-item name="jdDescribe" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12">描述</view>
- <input placeholder="请输入描述详情" v-model="phoinfo.jdDescribe" class="f16 c34 flex1 txr"/>
- </view>
- </uni-forms-item>
- <uni-forms-item name="photo" style='margin-bottom: 0;'>
- <view class="flexc infolist">
- <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>照片</view>
- </view>
- </uni-forms-item>
-
- <view class="photoimg">
- <view class="photos" v-for="(item,index) in file" :key='index'>
- <view class="photolist" @click="getPreview(file,index)">
- <image :src="baseUrl+item" class="listimg"></image>
- <image :src="delimgs" class="del" @click.stop="delimgFn(index)" v-if="checkPermi(['projectV2:rate:add','projectV2:rate:edit'])"></image>
- </view>
- </view>
- <view class="photos" v-if="file.length<9&&checkPermi(['projectV2:rate:add','projectV2:rate:edit'])">
- <view class="photolist" @click.stop="getphotoFn">
- <image :src="addimgs" class="addimg"></image>
- </view>
- </view>
-
- </view>
- <!-- <view class=" cldelistbf" >
- <view class="flext f15 c6">
- <view class="imgl"><image :src="wimg" ></image></view>
- <view>照片名称fjName</view>
- </view>
- <view class="flexc f15 co28 flex0">
- <image :src="downimg" class="imgr"></image>预览
- </view>
- </view> -->
-
- </uni-forms>
- </view>
- <view class="fixedbtn mt20" @click="getyjSubmit" v-if="checkPermi(['projectV2:rate:add','projectV2:rate:edit'])">确认</view>
- </view>
- </view>
- </template>
- <script>
- import {uploadmore} from '@/utils/common.js'
- import {uploadPhoto} from '@/api/system/user.js'
- import {getkgxxAddFn,getkgxxPutFn,getrateAddFn,getratePutFn,getrateDelFn,getrateListFn,gekgxxputKg} from "@/api/work/addclue.js"
- import {getkgxxdetail} from "@/api/work/clue.js"
- import config from '@/config'
- const baseUrl = config.baseUrl
- import { getToken } from '@/utils/auth'
- import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
- export default {
- data() {
- return {
- //附件
- option: {
- // 上传服务器地址,需要替换为你的接口地址
- url: baseUrl+'/common/upload', // 该地址非真实路径,需替换为你项目自己的接口地址
- // 上传附件的key
- name: 'file',
- // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
- header: {
- // 示例参数可删除
- 'Authorization': 'Bearer ' + getToken(),
- },
- // 根据你接口需求自定义body参数
- formData: {
- }
- },
- // 选择文件后是否立即自动上传,true=选择后立即上传
- instantly: true,
- // 必传宽高且宽高应与slot宽高保持一致
- width: '',
- height: '48rpx',
- // 限制允许上传的格式,空串=不限制,默认为空
- formats: 'doc,docx,xls,ppt,txt,pdf,zip,rar,word',
- // 文件上传大小限制
- size: 100,
- // 文件数量限制 默认10
- count: 5,
- // 文件回显列表
- files: new Map(),
- // 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
- wxFiles: [],
- // 是否打印日志
- debug: false,
- filelist:[],
-
- selectDate: '',
- defaultPhoneHeight: '', //屏幕默认高度
- nowPhoneHeight: '', //屏幕现在的高度
- bottom:0,
- type:1,
- baseUrl:'',
- datainfo:{
- "xmId":"",//项目ID
- "xmbh":"",//项目编号
- "xmmc":"",//项目名称
- "kgrq":"",//开工日期
- "njgrq":"",//拟竣工日期
- "sscrq":"",//试生产日期
- "ntcsj":"",//拟投产时间
- "rtsj":"",//入统时间
- "nrtsj":"",//拟入统时间
- "kggjrsjh":"",//开工跟进人手机号
- 'czwt':'',//存在问题
- zsyzFjList:[],//附件地址
- },
- phoinfo:{
- photo:'',
- jdDescribe:'',
- rateType:'',
- },
- tanfalg:false,
- addflag:false,
- imageValue:[],
- closedimg:require("@/static/images/del.png"),
- addimg:require("@/static/images/mine/add.png"),
- addimgs:require('@/static/images/index/add.png'),
- delimg:require("@/static/images/mine/del.png"),
- delimgs:require("@/static/images/index/del.png"),
- checknimg:require("@/static/images/mine/jnicon.png"),
- bgimg:require("@/static/images/banner.png"),
- gcheckimg:require("@/static/images/mine/jicon.png"),
- closeimg:require('@/static/images/close.png'),
- wimg:require('@/static/images/index/wicon.png'),
- downimg:require('@/static/images/index/down.png'),
- rules: {
- kgrq: {rules: [{required: true,errorMessage: '请选择开工日期'}]},
- njgrq: {rules: [{required: true,errorMessage: '请选择拟竣工日期',}]},
- sscrq: {rules: [{required: true,errorMessage: '请选择试生产日期' } ]},
- ntcsj: {rules: [{required: true,errorMessage: '请选择拟投产日期'} ]},
- zsyzFjList: {rules: [{required: true,errorMessage: '请上传附件'} ]},
-
- },
- phorules:{
- rateType: {rules: [{required: true,errorMessage: '请输入进度'}]},
- photo: {rules: [{required: true,errorMessage: '请上传图片'}]},
-
- },
- map:{text:'label',value:'id'},
-
- file:[],
- images:[],
- pagetype:'add',
- ratelist:[],
- disabled:false,
- xmmc:'',
- progress:'',
- xmStatus:'',
- }
- },
- onLoad(e) {
- this.baseUrl=baseUrl;
- var newObj=JSON.parse(decodeURIComponent(e.data))
- this.pagetype=newObj.pagetype||'add';
- this.datainfo.xmId=newObj.xmId;
- this.datainfo.xmbh=newObj.xmbh;
- this.progress=newObj.progress||'';
- this.xmStatus=newObj.xmStatus||'';
- this.xmmc=newObj.xmmc;
- if(this.pagetype=='update'){
- // 获取详情 修改
- if(newObj.dis){
- this.disabled=true;
- }else{
- this.disabled=false;
- }
- this.init();
- this.getDataFn()
- }else{
- this.datainfo.xmmc=newObj.xmmc;
- }
- // #ifdef APP
- uni.onKeyboardHeightChange(res=> { //监听键盘高度变化
- const res_keyboard = uni.getSystemInfoSync();
- let key_height = res.height - (res_keyboard.screenHeight - res_keyboard.windowHeight)
- // let key_height = res.height - (res_keyboard.screenHeight - res_keyboard.windowHeight + res_keyboard.safeAreaInsets.bottom)
- this.bottom = `${ key_height>0 ? key_height : 0}px`;
- })
- // #endif
- },
- onHide() {
- // #ifdef APP-PLUS
- uni.offKeyboardHeightChange(); // 取消监听键盘高度变化事件,避免内存消耗
- // #endif
- },
- onReady() {
- // this.$refs.form.setRules(this.rules)
- },
- methods: {
- checkPermi, checkRole,
- // 开工详情
- getDataFn(){
- getkgxxdetail(this.datainfo.xmId).then(res=>{
- if(res.code==200){
- this.datainfo=res.data;
- this.datainfo.xmmc=this.xmmc;
- if(res.data.zsyzFjList&&res.data.zsyzFjList.length){
- this.filelist=JSON.parse(JSON.stringify(res.data.zsyzFjList))
- }
- }else{
- this.$toast(res.msg)
- }
- })
- },
- // 查看照片
- getPreview(iurl,idx) {
- var newArr=[];
- iurl.forEach(ite=>{
- var ds=this.baseUrl+ite
- newArr.push(ds)
- })
- uni.previewImage({
- urls: newArr,
- current:idx,
- success: function(data) {
-
- },
- fail: function(err) {
- console.log(err.errMsg);
- }
- });
- },
- init(){
- this.getRateList()//项目进度
- },
- bindDateChangea(e){//开工日期
- this.datainfo.kgrq=e.detail.value
- },
- bindDateChangeb(e){//拟竣工日期
- this.datainfo.njgrq=e.detail.value
- },
- bindDateChangec(e){//试生产日期
- this.datainfo.sscrq=e.detail.value
- },
- bindDateChanged(e){//拟投产日期
- this.datainfo.ntcsj=e.detail.value
- },
- bindDateChangee(e){//入统日期
- this.datainfo.rtsj=e.detail.value
- },
- bindDateChangef(e){//拟入统日期
- this.datainfo.nrtsj=e.detail.value
- },
- getAddPhoto(){
- this.phoinfo={
- photo:'',
- jdDescribe:'',
- rateType:'',
- };
- this.file=[];
- this.addflag=true;
- },
- getDetailPhoto(ite){
- var newStr=JSON.parse(JSON.stringify(ite))
- this.phoinfo=newStr;
- this.file=newStr.photo;
- var newStr=newStr.photo.join(',');
- this.phoinfo.photo=newStr;
- this.addflag=true;
- },
- getDelRate(id,idx){ //删除进度
- var that=this;
- uni.showModal({
- title: '确认删除',
- content: "是否确认删除",
- cancelText: '取消',
- confirmText: '确认',
- success: function(res) {
- if (res.confirm) {
- // var params={
- // id:id
- // }
- getrateDelFn(id).then(res=>{
- if(res.code==200){
- that.$toast('删除成功')
-
- that.ratelist.splice(idx,1)
- }else{
- that.$toast(res.msg)
- }
- })
- } else if (res.cancel) {
- }
- }
- });
- },
- // 项目列表
- getRateList(){
- var params={
- xmbh:this.datainfo.xmbh,
- xmId:this.datainfo.xmId
- }
- getrateListFn(params).then(res=>{
- if(res.code==200){
- //
- var newArr=res.rows||[];
- if(newArr.length){
- newArr.forEach(ite=>{
- ite.photo=ite.photo.split(',')
- })
- }
- this.ratelist=newArr
- // if(res.rows.length){
- // this.qiziflag=true
- // }
- }else{
- this.$toast(res.msg)
- }
- })
- },
- getyjSubmit(){
- // 项目进度
- var that=this;
- this.$refs.phoform.validate().then(res => {
- var params=this.phoinfo;
- params.xmbh=this.datainfo.xmbh;
- params.xmId=this.datainfo.xmId;
- if(params.id){
- // 修改
- getratePutFn(params).then(res=>{
- if(res.code==200){
- this.$toast('修改成功');
- setTimeout(function(){
- that.addflag=false;
- // 获取列表
- that.getRateList()
- },1500)
-
- }else{
- this.$toast(res.msg)
- }
- })
- }else{
- // 新增
- getrateAddFn(params).then(res=>{
- if(res.code==200){
- this.$toast('添加成功');
- setTimeout(function(){
- that.addflag=false;
- // 获取列表
- that.getRateList()
- },1500)
-
- }else{
- this.$toast(res.msg)
- }
- })
- }
-
- })
- },
- delimgFn(e){
- var that = this;
- that.file.splice(e,1);
- this.phoinfo.photo=that.file.join(',')
- },
- getphotoFn(){
- let that = this;
- let file = that.file;
- if(file.length < 9){
- uni.chooseImage({
- count: 9 - parseInt(file.length),
- success:function(res){
- let img= res.tempFilePaths;
- if(img.length + file.length > 9){
- uni.showToast({
- title: '最多上传9张图片',
- icon: 'none',
- duration: 2000
- })
- }else{
- let imglen = res.tempFilePaths.length;
- var fuwufile = [];
- uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
- that.file = that.file.concat(rs);
- that.phoinfo.photo=that.file.join(',')
- // console.log(that.phoinfo.photo,85)
- })
- }
- }
- });
- }
- },
- getClose(){
- this.addflag=false;
- },
- getAddFn(){
- this.addflag=true;
- },
- getSubmit() {
- var that=this;
- this.datainfo.zsyzFjList=JSON.parse(JSON.stringify(this.filelist));
- this.$refs.form.validate().then(res => {
- var params=this.datainfo;
- // params.zsyzFjList=this.filelist
- if(!params.rtsj&&!params.nrtsj){
- this.$toast('请选择入统时间或者拟入统时间');
- return
- }
- if(this.pagetype=='add'){
- getkgxxAddFn(params).then(res=>{
- if(res.code==200){
- this.$toast('上报开工信息成功')
- setTimeout(function() {
- uni.$emit('refreshdata');
- uni.navigateBack({delta: 1});
- },1500);
- }else{
- this.$toast(res.msg)
- }
-
- })
- }else{
- if(this.disabled){
- var obj={
- id:params.id,
- rtsj:params.rtsj,
- nrtsj:params.nrtsj,
- xmId:params.xmId
- }
- gekgxxputKg(obj).then(res=>{
- if(res.code==200){
- this.$toast('修改开工信息成功')
- setTimeout(function() {
- uni.$emit('refreshdata');
- uni.navigateBack({delta: 1});
- },1500);
- }else{
- this.$toast(res.msg)
- }
-
- })
- }else{
- getkgxxPutFn(params).then(res=>{
- if(res.code==200){
- this.$toast('修改开工信息成功')
- setTimeout(function() {
- uni.$emit('refreshdata');
- uni.navigateBack({delta: 1});
- },1500);
- }else{
- this.$toast(res.msg)
- }
-
- })
- }
-
- }
-
- })
- },
- onuploadEnd(item) {
- var newobj={}
- var responseText=JSON.parse(item.responseText)
- newobj.fjName=responseText.originalFilename;
- newobj.path=responseText.fileName;
- this.filelist.push(newobj)
- this.datainfo.zsyzFjList=JSON.parse(JSON.stringify(this.filelist))
- },
- getDelFj(idx){
- var that=this;
- if(!this.disabled){
- uni.showModal({
- title: '确认删除',
- content: "是否确认删除",
- cancelText: '取消',
- confirmText: '确认',
- success: function(res) {
- if (res.confirm) {
- that.filelist.splice(idx,1)
- that.datainfo.zsyzFjList=JSON.parse(JSON.stringify(that.filelist))
- } else if (res.cancel) {
- }
- }
- });
- }
- },
- getDown(e){
- uni.showLoading({
- title: '加载中'
- });
- var url=baseUrl+e;
- uni.downloadFile({
- url: url,//文件的下载路径
- success(result) {
- uni.hideLoading()
- var filePath = result.tempFilePath;
- uni.openDocument({
- filePath: filePath,
- showMenu: true,
- success: function (res) {
- // console.log('打开文档成功');
- }
- });
- },
- fail(res) {uni.hideLoading()}
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .inform{padding-top: 30rpx; padding-bottom: 160rpx;}
- .infolist{padding: 30rpx 32rpx 30rpx 24rpx;position: relative;
- .cir{position: absolute;font-size: 36rpx;font-weight: bold;color: #FE5706;left: 0rpx;}
- // .delimg{width: 30rpx;height:30rpx;margin-left: 8rpx;}
- }
- .delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;
- image{width: 30rpx;height: 30rpx;}
- }
- .infobtn{width: 100%;height: 88rpx;background: #FA5F03;line-height: 88rpx;position: fixed;left: 0;right: 0;bottom: 0;z-index: 3;}
- .input_ye image{width: 34rpx;height: 18rpx;}
- .info_tit{font-size: 32rpx;color: #FE5706;padding: 30rpx 26rpx;font-weight: bold;}
- .infolist_a{height: 44rpx;flex: 1;text-align: right;font-size: 32rpx;color: #343434;}
- .infolist_add{position: absolute;right: 0;top: -40rpx;font-size: 28rpx;color: #41C942;padding-right: 30rpx;
- image{width: 30rpx;height: 30rpx;margin-right: 20rpx;}
- }
- .fixedbtn{width:100%;height: 80rpx;background: #FF6400;
- border-radius: 10rpx;display: flex;align-items: center;justify-content: center;font-size: 32rpx;font-weight: bold;color: #FFFFFF;
- &.btn1{background-color: #20ACCF;margin-bottom: 36rpx;}
- }
- .fixedbox .infolist{padding: 30rpx 0;}
- .inform /deep/ .uni-forms-item__error{margin-top: -30rpx;margin-left: 24rpx;}
- .fixedbox /deep/ .uni-forms-item__error{margin-top: -30rpx;margin-left: 24rpx;}
- .inform .pl12{margin-right: 10rpx;}
- .fixedbox .pl12{margin-right: 10rpx;}
- .pholist{
- display: flex;align-items: center;max-width: 220rpx;overflow: hidden;
- image{
- width: 44rpx;height: 44rpx;margin-left: 10rpx;flex: 0 0 auto;
- }
- }
- .disabledbox{
- .infolist{background-color: #F5f5f5;}
- }
- </style>
|