Conflicts: utils/API.jsrongxin_dev
| @@ -18,7 +18,11 @@ Page({ | |||||
| payeePaymentLines: "", //联行号 //必填 | payeePaymentLines: "", //联行号 //必填 | ||||
| } | } | ||||
| }, | }, | ||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| @@ -60,7 +64,6 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onConfirm(even){ | onConfirm(even){ | ||||
| console.log(even); | |||||
| var that = this ; | var that = this ; | ||||
| if(even.currentTarget.dataset.name == "showBankType"){ | if(even.currentTarget.dataset.name == "showBankType"){ | ||||
| // 付款方式类型字典查询 | // 付款方式类型字典查询 | ||||
| @@ -79,7 +82,6 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onConfirmDeposit(even){ | onConfirmDeposit(even){ | ||||
| console.log(even); | |||||
| this.setData({ | this.setData({ | ||||
| [even.currentTarget.dataset.value]:even.detail.value.bankDeposit, | [even.currentTarget.dataset.value]:even.detail.value.bankDeposit, | ||||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.bankDeposit, | [even.currentTarget.dataset.value+"Text"]:even.detail.value.bankDeposit, | ||||
| @@ -94,23 +96,39 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| goSubmit(){ | goSubmit(){ | ||||
| console.log(this.data.form); | |||||
| var that = this; | |||||
| that.data.form.method = 'POST'; | |||||
| UTIL.httpRequest(API.URL_GET_DEPOSITADD, that.data.form, { | |||||
| success: (res) => { | |||||
| wx.showToast({ | |||||
| title: "提交成功!", | |||||
| duration: 2000, | |||||
| icon:"success" | |||||
| }) | |||||
| setTimeout(function(){ | |||||
| wx.navigateBack({ | |||||
| delta:1 | |||||
| if(this.data.form.sheng===''||this.data.form.code==sheng){ //省 | |||||
| UTIL.showToastNoneIcon('请填写省!'); | |||||
| return false; | |||||
| }else if(this.data.form.shi===''||this.data.form.shi==null){ //市 | |||||
| UTIL.showToastNoneIcon('请输入市!'); | |||||
| return false; | |||||
| }else if(this.data.form.bankType===''||this.data.form.bankType==null){ //所属银行 | |||||
| UTIL.showToastNoneIcon('请输入所属银行!'); | |||||
| return false; | |||||
| }else if(this.data.form.bankDeposit===''||this.data.form.bankDeposit==null){ //开户行 | |||||
| UTIL.showToastNoneIcon('请输入开户行!'); | |||||
| return false; | |||||
| }else if(this.data.form.payeePaymentLines === ''||this.data.form.payeePaymentLines==null){//联行号 | |||||
| UTIL.showToastNoneIcon('请输入联行号!'); | |||||
| return false; | |||||
| }else{ | |||||
| var that = this; | |||||
| that.data.form.method = 'POST'; | |||||
| UTIL.httpRequest(API.URL_GET_DEPOSITADD, that.data.form, { | |||||
| success: (res) => { | |||||
| wx.showToast({ | |||||
| title: "提交成功!", | |||||
| duration: 2000, | |||||
| icon:"success" | |||||
| }) | }) | ||||
| },2000) | |||||
| } | |||||
| }) | |||||
| setTimeout(function(){ | |||||
| wx.navigateBack({ | |||||
| delta:1 | |||||
| }) | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| @@ -1,7 +1,7 @@ | |||||
| <!--pages/payee/add/add.wxml--> | <!--pages/payee/add/add.wxml--> | ||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | ||||
| <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
| <text style="top:{{isIPX?'54px':'30px'}};">新增开户行</text> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"查看":"新增"}}开户行</text> | |||||
| </view> | </view> | ||||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
| @@ -30,8 +30,8 @@ | |||||
| data-value="form.bankDeposit" | data-value="form.bankDeposit" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field readonly label="开户行" value="{{ form.bankDepositText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showDeposit" /> | |||||
| <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||||
| <van-field label="开户行" value="{{ form.bankDepositText }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.bankDepositText" /> | |||||
| <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入联行号" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||||
| </view> | </view> | ||||
| <view class="bottom"> | <view class="bottom"> | ||||
| <view class="btn2" bindtap="goSubmit">确认</view> | <view class="btn2" bindtap="goSubmit">确认</view> | ||||
| @@ -10,7 +10,8 @@ Page({ | |||||
| data: { | data: { | ||||
| isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
| depositList:[], | depositList:[], | ||||
| bankTypeOptions:[] | |||||
| bankTypeOptions:[], | |||||
| value:"" | |||||
| }, | }, | ||||
| goAdd(){ | goAdd(){ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| @@ -26,14 +27,14 @@ Page({ | |||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad(options) { | onLoad(options) { | ||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onReady() { | onReady() { | ||||
| this.onShow(); | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -45,27 +46,34 @@ Page({ | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | ||||
| success: (res) => { | success: (res) => { | ||||
| this.setData({ | this.setData({ | ||||
| bankTypeOptions:res.data | |||||
| bankTypeOptions:res.data, | |||||
| }); | }); | ||||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET'},{ | |||||
| let param = { | |||||
| 'bankDeposit':this.data.value | |||||
| } | |||||
| console.log(2); | |||||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, param,{ | |||||
| success: (response) => { | success: (response) => { | ||||
| if (response.code == API.SUCCESS_CODE) { | if (response.code == API.SUCCESS_CODE) { | ||||
| for (let i = 0; i < response.rows.length; i++) { | for (let i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].bankTypeText = UTIL.getTransform(response.rows[i].bankType,res.data); | response.rows[i].bankTypeText = UTIL.getTransform(response.rows[i].bankType,res.data); | ||||
| response.rows[i].payeePaymentLines = response.rows[i].payeePaymentLines.substr(0,4)+'****' | response.rows[i].payeePaymentLines = response.rows[i].payeePaymentLines.substr(0,4)+'****' | ||||
| if(i == response.rows.length-1){ | |||||
| that.setData({ | |||||
| depositList:response.rows | |||||
| }) | |||||
| } | |||||
| } | } | ||||
| that.setData({ | |||||
| depositList:response.rows | |||||
| }) | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| goSearch(e){ | |||||
| this.setData({'value':e.detail}) | |||||
| this.onShow() | |||||
| }, | |||||
| delete(e){ | delete(e){ | ||||
| var that = this; | var that = this; | ||||
| UTIL.httpRequest(API.URL_GET_DEPOSITDELETE + e.currentTarget.dataset.id, {method:'GET'},{ | UTIL.httpRequest(API.URL_GET_DEPOSITDELETE + e.currentTarget.dataset.id, {method:'GET'},{ | ||||
| @@ -84,8 +92,10 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| goUpdate(){ | |||||
| goUpdate(e){ | |||||
| wx.navigateTo({ | |||||
| url: 'add/add?id='+ e.currentTarget.dataset.id, | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| @@ -86,23 +86,51 @@ Page({ | |||||
| }); | }); | ||||
| }, | }, | ||||
| goSubmit(){ | goSubmit(){ | ||||
| //三、 新增银行汇票 | |||||
| var that = this; | |||||
| that.data.form.method = 'POST'; | |||||
| UTIL.httpRequest(API.URL_GET_MONEYORDERADD, that.data.form , { | |||||
| success: (res) => { | |||||
| wx.showToast({ | |||||
| title: '保存成功', | |||||
| icon: 'success', | |||||
| duration: 2000, | |||||
| complete(){ | |||||
| setTimeout(function(){ | |||||
| that.back(); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| if(this.data.form.orderNum===''||this.data.form.orderNum==null){ //汇票号码 | |||||
| UTIL.showToastNoneIcon('请填写汇票号码!'); | |||||
| return false; | |||||
| }else if(this.data.form.orderType===''||this.data.form.orderType==null){ //汇票类型 | |||||
| UTIL.showToastNoneIcon('汇票类型不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.orderAmount===''||this.data.form.orderAmount==null){ //出票金额 | |||||
| UTIL.showToastNoneIcon('请输入出票金额!'); | |||||
| return false; | |||||
| }else if(this.data.form.billPayUnit===''||this.data.form.billPayUnit==null){ //付飘单位 | |||||
| UTIL.showToastNoneIcon('请输入付飘单位!'); | |||||
| return false; | |||||
| }else if(this.data.form.billReceiveUnit === ''||this.data.form.billReceiveUnit==null){//收票单位 | |||||
| UTIL.showToastNoneIcon('请输入收票单位!'); | |||||
| return false; | |||||
| }else if(this.data.form.startTime === ''||this.data.form.startTime==null){//开票日期 | |||||
| UTIL.showToastNoneIcon('请输入开票日期!'); | |||||
| return false; | |||||
| }else if(this.data.form.endTime === ''||this.data.form.endTime==null){//到期日期 | |||||
| UTIL.showToastNoneIcon('请输入到期日期!'); | |||||
| return false; | |||||
| }else if(this.data.form.orderStatus === ''||this.data.form.orderStatus==null){//联行号 | |||||
| UTIL.showToastNoneIcon('汇票状态不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.orderStatus === ''||this.data.form.orderStatus==null){//联行号 | |||||
| UTIL.showToastNoneIcon('汇票状态不能为空!'); | |||||
| return false; | |||||
| }else{ | |||||
| var that = this; | |||||
| that.data.form.method = 'POST'; | |||||
| UTIL.httpRequest(API.URL_GET_MONEYORDERADD, that.data.form , { | |||||
| success: (res) => { | |||||
| wx.showToast({ | |||||
| title: '保存成功', | |||||
| icon: 'success', | |||||
| duration: 2000, | |||||
| complete(){ | |||||
| setTimeout(function(){ | |||||
| that.back(); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | }, | ||||
| onConfirmTime(event){ | onConfirmTime(event){ | ||||
| this.setData({ | this.setData({ | ||||
| @@ -44,7 +44,7 @@ | |||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field label="汇票状态" value="{{ form.orderStatusText }}" placeholder="汇票状态" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderStatus" is-link arrow-direction ="down" bindtap="openBox" data-name="showOrderStatus"/> | <van-field label="汇票状态" value="{{ form.orderStatusText }}" placeholder="汇票状态" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderStatus" is-link arrow-direction ="down" bindtap="openBox" data-name="showOrderStatus"/> | ||||
| <van-field label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.remark"/> | |||||
| <van-field label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" data-value="form.remark"/> | |||||
| </view> | </view> | ||||
| <view class="bottom"> | <view class="bottom"> | ||||
| <view class="btn2" bindtap="goSubmit">确认</view> | <view class="btn2" bindtap="goSubmit">确认</view> | ||||
| @@ -1,6 +1,11 @@ | |||||
| // pages/bankDraft/bankDraft.js | // pages/bankDraft/bankDraft.js | ||||
| import * as UTIL from '../../utils/util.js'; | import * as UTIL from '../../utils/util.js'; | ||||
| import * as API from '../../utils/API.js'; | import * as API from '../../utils/API.js'; | ||||
| let EVN_CONFIG = require('../../env/env'); | |||||
| const DISTRIBUTE_ENVIROMENT = 'IMGURL'; | |||||
| let { | |||||
| URL_PREFIX, | |||||
| } = EVN_CONFIG[DISTRIBUTE_ENVIROMENT]; | |||||
| const app = getApp(); | const app = getApp(); | ||||
| Page({ | Page({ | ||||
| @@ -23,14 +28,40 @@ Page({ | |||||
| ], | ], | ||||
| value1: '', | value1: '', | ||||
| value2: '', | value2: '', | ||||
| moneyorderList:[] | |||||
| moneyorderList:[], | |||||
| value:'', | |||||
| pageNums:1, | |||||
| showUpload:false, | |||||
| uploadOptions:[], | |||||
| fileList:[], | |||||
| itemId:"", | |||||
| list:[], | |||||
| fileEvent:{}, | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad(options) { | onLoad(options) { | ||||
| var _this = this; | |||||
| let qu = wx.createSelectorQuery() | |||||
| qu.select("#top_view").boundingClientRect() | |||||
| qu.select("#top_ban").boundingClientRect() | |||||
| qu.select("#top_view1").boundingClientRect() | |||||
| qu.select("#top_view2").boundingClientRect() | |||||
| qu.exec(res => { | |||||
| _this.setData({ | |||||
| scrollHeight:wx.getSystemInfoSync().windowHeight-res[3].top | |||||
| }) | |||||
| }) | |||||
| //获取附件字典 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'common_attach', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| this.setData({ | |||||
| uploadOptions:res.data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| goAdd(){ | goAdd(){ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| @@ -46,9 +77,19 @@ Page({ | |||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onReady() { | onReady() { | ||||
| }, | |||||
| goSearch(e){ | |||||
| this.setData({'value':e.detail}) | |||||
| this.onShow(); | |||||
| }, | |||||
| paging(){ | |||||
| console.log(1); | |||||
| this.setData({ | |||||
| pageNums:this.data.pageNums+1, | |||||
| }) | |||||
| this.onShow(); | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| @@ -59,17 +100,20 @@ Page({ | |||||
| this.setData({ | this.setData({ | ||||
| orderTypeOptions:res.data | orderTypeOptions:res.data | ||||
| }); | }); | ||||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, {method:'GET'},{ | |||||
| let param = { | |||||
| 'billPayUnit' : this.data.value, | |||||
| pageNum:this.data.pageNums, | |||||
| pageSize:10, | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, param,{ | |||||
| success: (response) => { | success: (response) => { | ||||
| if (response.code == API.SUCCESS_CODE) { | if (response.code == API.SUCCESS_CODE) { | ||||
| for (let i = 0; i < response.rows.length; i++) { | for (let i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | ||||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | ||||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | ||||
| response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | ||||
| } | } | ||||
| that.setData({ | that.setData({ | ||||
| moneyorderList:response.rows | moneyorderList:response.rows | ||||
| }) | }) | ||||
| @@ -78,9 +122,26 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| delete(e){ | |||||
| var that = this; | |||||
| UTIL.httpRequest(API.URL_GET_MONEYORDERDELETE + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
| success: (res) => { | |||||
| if (res.code == API.SUCCESS_CODE) { | |||||
| let list = that.data.moneyorderList | |||||
| list.splice(e.currentTarget.dataset.index, 1); | |||||
| wx.showToast({ | |||||
| title: '删除成功!', | |||||
| icon: 'success', | |||||
| duration: 2000 | |||||
| }) | |||||
| that.setData({ | |||||
| moneyorderList : list, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| changeTab(e){ | changeTab(e){ | ||||
| var that = this ; | var that = this ; | ||||
| that.setData({value1:e.detail}) | that.setData({value1:e.detail}) | ||||
| @@ -137,7 +198,160 @@ Page({ | |||||
| }, | }, | ||||
| upload(e){ | |||||
| this.setData({itemId:e.currentTarget.dataset.id}); | |||||
| this.asyncFun(e.currentTarget.dataset.id) | |||||
| }, | |||||
| asyncFun(id){ | |||||
| this.setData({"fileList":[]}) | |||||
| let uploadList = this.data.uploadOptions | |||||
| let newList = [] | |||||
| let _this = this | |||||
| uploadList.map( res => { | |||||
| let oData = { | |||||
| tableId: id, | |||||
| tableName: "t_yinnong_moneyorder", //上传表 | |||||
| bizPath: "yinnong", | |||||
| fileType: res.dictValue, //附件类型 1原始发票 2会议纪要 3会议照片 4 参会人员签字 | |||||
| method:'GET' | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||||
| success: (rr) => { | |||||
| if(rr.rows.length>0){ | |||||
| rr.rows.map((rrr,index) => { | |||||
| rrr.url = URL_PREFIX + rrr.fileUrl | |||||
| if(index==rr.rows.length-1){ | |||||
| newList.push(Object.assign({},res,{"list":rr.rows})) | |||||
| _this.setData({"fileList":_this.data.fileList.concat(newList)}); | |||||
| _this.setData({"showUpload":true}) | |||||
| } | |||||
| }) | |||||
| }else{ | |||||
| let newuploadList = uploadList | |||||
| newuploadList.map(rd => { | |||||
| rd.list = newList | |||||
| }) | |||||
| _this.setData({"fileList":newuploadList}); | |||||
| _this.setData({"showUpload":true}) | |||||
| } | |||||
| }, | |||||
| fail:(rr) =>{ | |||||
| }, | |||||
| complete:(rr) => { | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| closeBox(){ | |||||
| this.setData({"showUpload":false}) | |||||
| }, | |||||
| deleteImg(event){ | |||||
| this.setData({"fileEvent":event}) | |||||
| this.setData({"showPopup":true}); | |||||
| }, | |||||
| cancelTem:function(e){ | |||||
| this.setData({"fileEvent":"{}"}); | |||||
| this.setData({"showPopup":false}); | |||||
| }, | |||||
| confirmTem:function(e){ | |||||
| let event = this.data.fileEvent | |||||
| console.log(event); | |||||
| UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.code==200){ | |||||
| let ll = this.data.fileList | |||||
| var jsonlist = ll[event.target.dataset.idx].list; | |||||
| jsonlist.splice(event.detail.index, 1) | |||||
| ll[event.target.dataset.idx].list = jsonlist | |||||
| this.setData({"fileList":ll}) | |||||
| this.setData({showPopup:false}); | |||||
| wx.showToast({ | |||||
| title: '删除成功!', | |||||
| icon: 'success', | |||||
| duration: 2000, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| uploadFile(uploadFile,event) { | |||||
| let _this = this | |||||
| return new Promise((resolve, reject) => { | |||||
| wx.uploadFile({ | |||||
| url: API.URL_GET_UPLOAD, | |||||
| filePath: uploadFile.file.file[0].url, | |||||
| name: 'file', | |||||
| header: { | |||||
| "Content-Type": "multipart/form-data",//记得设置 | |||||
| "chartset":"utf-8", | |||||
| 'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
| }, | |||||
| formData:uploadFile, | |||||
| success: (res) => { | |||||
| res.data = JSON.parse(res.data); | |||||
| if(res.statusCode == 200){ | |||||
| let files = _this.data.fileList | |||||
| let fName = res.data.fileUrl.split('/') | |||||
| let fLength = fName.length | |||||
| files[event.currentTarget.dataset.idx].list.push({ | |||||
| "fileName": fName[fLength-1], | |||||
| "fileType": "0", | |||||
| "fileUrl":res.data.fileUrl , | |||||
| "id": res.data.id, | |||||
| "tableId": 6, | |||||
| "url":URL_PREFIX+res.data.fileUrl | |||||
| }) | |||||
| _this.setData({"fileList":files}) | |||||
| wx.hideLoading() | |||||
| } | |||||
| }, | |||||
| fail: (err) => { | |||||
| //上传失败:修改pedding为reject | |||||
| reject(err) | |||||
| } | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| afterRead(event) { | |||||
| let _this = this | |||||
| wx.showLoading({ | |||||
| title: '上传中...' | |||||
| }) | |||||
| let fileForm={ | |||||
| file: event.detail, | |||||
| fileType:event.currentTarget.dataset.idx, | |||||
| tableName: "t_yinnong_moneyorder", //上传表 | |||||
| bizPath: "yinnong", | |||||
| tableId:_this.data.itemId | |||||
| } | |||||
| this.uploadFile(fileForm,event) | |||||
| }, | |||||
| lookDown(file,detail){ | |||||
| // 获取指定字符串最后一次出现的位置,返回index | |||||
| var index1 = file.detail.url.lastIndexOf('.'); | |||||
| // substr(start, length) 抽取从start下标开始的length个字符,返回新的字符串; | |||||
| var style = file.detail.url.substr(index1 + 1) | |||||
| //判断图片类型,不需要下载,不做处理 | |||||
| if(style=='png'||style=='jpg'||style=='jpeg'||style=='bmp'||style=='gif'||style=='webp'||style=='psd'||style== 'svg'||style=='tiff'){ | |||||
| //判断非图片类型 | |||||
| }else{ | |||||
| wx.downloadFile({ | |||||
| url: file.detail.url, | |||||
| success(data){ | |||||
| wx.openDocument({ | |||||
| filePath: data.tempFilePath, | |||||
| fileType: style, | |||||
| showMenu:true, | |||||
| success(res){ | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| */ | */ | ||||
| @@ -10,6 +10,8 @@ | |||||
| "van-swipe-cell": "@vant/weapp/swipe-cell/index", | "van-swipe-cell": "@vant/weapp/swipe-cell/index", | ||||
| "van-dropdown-menu": "@vant/weapp/dropdown-menu/index", | "van-dropdown-menu": "@vant/weapp/dropdown-menu/index", | ||||
| "van-dropdown-item": "@vant/weapp/dropdown-item/index", | "van-dropdown-item": "@vant/weapp/dropdown-item/index", | ||||
| "van-tag": "@vant/weapp/tag/index" | |||||
| "van-action-sheet": "@vant/weapp/action-sheet/index", | |||||
| "van-tag": "@vant/weapp/tag/index", | |||||
| "van-upload": "@vant/weapp/uploader/index" | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,10 +1,10 @@ | |||||
| <!--pages/bank/bank.wxml--> | <!--pages/bank/bank.wxml--> | ||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <view class="ns" id="top_ban" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
| <text style="top:{{isIPX?'54px':'30px'}};">银行汇票</text> | <text style="top:{{isIPX?'54px':'30px'}};">银行汇票</text> | ||||
| </view> | </view> | ||||
| <view class="search_box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
| <view class="search_box" id="top_view" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
| <van-search | <van-search | ||||
| value="{{ value }}" | value="{{ value }}" | ||||
| shape="round" | shape="round" | ||||
| @@ -16,12 +16,12 @@ | |||||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | ||||
| </view> | </view> | ||||
| <van-dropdown-menu active-color="#5CAE77" bind:change="changeTab"> | |||||
| <van-dropdown-menu active-color="#5CAE77" bind:change="changeTab" id="top_view1" > | |||||
| <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab" /> | <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab" /> | ||||
| <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | ||||
| </van-dropdown-menu> | </van-dropdown-menu> | ||||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{moneyorderList}}" wx:key="index"> | |||||
| <scroll-view scroll-y refresher-threshold="0" id="top_view2" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100"> | |||||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{moneyorderList}}" wx:key="index"> | |||||
| <view class="li" bindtap="goUpdate"> | <view class="li" bindtap="goUpdate"> | ||||
| <view class="tit_box"> | <view class="tit_box"> | ||||
| <view class="tit_box_left"> | <view class="tit_box_left"> | ||||
| @@ -51,12 +51,36 @@ | |||||
| <view class="detail_time"> | <view class="detail_time"> | ||||
| <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | ||||
| <text>{{item.startTime}} - {{item.endTime}}</text> | |||||
| <text>{{item.startTime}} ~ {{item.endTime}}</text> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | ||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | ||||
| </view> | </view> | ||||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
| <image src="../../image/apply/icon_add.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"></image> | |||||
| </view> | |||||
| </view> | </view> | ||||
| </van-swipe-cell> | |||||
| </van-swipe-cell> | |||||
| </scroll-view> | |||||
| <van-action-sheet show="{{showUpload}}" title="附件" bind:close="closeBox"> | |||||
| <scroll-view scroll-y="true" style="height: 600rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0"> | |||||
| <view class="fj-box"> | |||||
| <view class="fj-li" wx:for="{{fileList}}" wx:key="index" wx:for-item="item" > | |||||
| <view> | |||||
| <text>{{item.dictLabel}}</text> | |||||
| </view> | |||||
| <view class="img_box"> | |||||
| <view class="img_li"> | |||||
| <van-upload file-list="{{ item.list }}" bind:after-read="afterRead" bind:delete="deleteImg" bind:click-preview="lookDown" multiple="{{true}}" data-idx="{{index}}"> | |||||
| </van-upload> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </scroll-view> | |||||
| </van-action-sheet> | |||||
| <modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | |||||
| </modal> | |||||
| @@ -64,7 +64,7 @@ text{display: block;} | |||||
| color: #31936c; | color: #31936c; | ||||
| } | } | ||||
| .deleteBox{ | .deleteBox{ | ||||
| width: 65px; | |||||
| width: 130px; | |||||
| text-align: center; | text-align: center; | ||||
| height: 100%; | height: 100%; | ||||
| background: #F6F6F6; | background: #F6F6F6; | ||||
| @@ -321,4 +321,31 @@ text{display: block;} | |||||
| } | } | ||||
| .van-dropdown-menu { | .van-dropdown-menu { | ||||
| margin-bottom: 15px; | margin-bottom: 15px; | ||||
| } | |||||
| .fj-box text{ | |||||
| background-color: #5CAE77; | |||||
| color: #ffffff; | |||||
| text-align: center; | |||||
| border-radius: 5px; | |||||
| white-space:pre-wrap; | |||||
| padding: 5rpx 8rpx; | |||||
| width: 50rpx; | |||||
| margin: 0px 14px; | |||||
| font-size: 24rpx; | |||||
| } | |||||
| .fj-li{ | |||||
| margin-top: 20px; | |||||
| display: flex; | |||||
| /* flex-wrap: wrap; */ | |||||
| } | |||||
| .fj-li .img_li{ | |||||
| width: 100%; | |||||
| height: 18.5vw; | |||||
| } | |||||
| .fj-li .img_add{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .van-icon-description{ | |||||
| font-size: 60px; | |||||
| } | } | ||||
| @@ -62,9 +62,19 @@ Page({ | |||||
| var that = this ; | var that = this ; | ||||
| let data = that.data.form; | let data = that.data.form; | ||||
| data.method = 'POST'; | data.method = 'POST'; | ||||
| UTIL.httpRequest(API.URL_GET_PROJECTADD, data, { | UTIL.httpRequest(API.URL_GET_PROJECTADD, data, { | ||||
| success: (res) => { | success: (res) => { | ||||
| wx.showToast({ | |||||
| title: "提交成功!", | |||||
| duration: 2000, | |||||
| icon:"success" | |||||
| }) | |||||
| setTimeout(function(){ | |||||
| wx.navigateBack({ | |||||
| delta:1 | |||||
| }) | |||||
| },2000) | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -1,6 +1,11 @@ | |||||
| // pages/project/project.js | // pages/project/project.js | ||||
| import * as UTIL from '../../utils/util.js'; | import * as UTIL from '../../utils/util.js'; | ||||
| import * as API from '../../utils/API.js'; | import * as API from '../../utils/API.js'; | ||||
| let EVN_CONFIG = require('../../env/env'); | |||||
| const DISTRIBUTE_ENVIROMENT = 'IMGURL'; | |||||
| let { | |||||
| URL_PREFIX, | |||||
| } = EVN_CONFIG[DISTRIBUTE_ENVIROMENT]; | |||||
| const app = getApp(); | const app = getApp(); | ||||
| Page({ | Page({ | ||||
| @@ -9,20 +14,49 @@ Page({ | |||||
| */ | */ | ||||
| data: { | data: { | ||||
| isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
| name:"", | |||||
| value:'', | |||||
| pageNums:1, | |||||
| showUpload:false, | |||||
| uploadOptions:[], | |||||
| fileList:[], | |||||
| itemId:"", | |||||
| list:[], | |||||
| fileEvent:{}, | |||||
| projectList:[] | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad(options) { | onLoad(options) { | ||||
| var _this = this; | |||||
| let qu = wx.createSelectorQuery() | |||||
| qu.select("#top_view").boundingClientRect() | |||||
| qu.exec(res => { | |||||
| _this.setData({ | |||||
| scrollHeight:wx.getSystemInfoSync().windowHeight-res[0].height-res[0].top | |||||
| }) | |||||
| }) | |||||
| //获取附件字典 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'common_attach', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| this.setData({ | |||||
| uploadOptions:res.data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onReady() { | onReady() { | ||||
| this.onShow(); | |||||
| }, | |||||
| goSearch(e){ | |||||
| this.setData({name:e.detail}) | |||||
| this.onShow(); | |||||
| }, | }, | ||||
| goAdd(){ | goAdd(){ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| @@ -44,10 +78,13 @@ Page({ | |||||
| this.setData({ | this.setData({ | ||||
| ynProjcetStatusOptions:res.data | ynProjcetStatusOptions:res.data | ||||
| }); | }); | ||||
| UTIL.httpRequest(API.URL_GET_GETPROJECTLIST, {method:'GET'},{ | |||||
| let params= { | |||||
| projectName:this.data.name, | |||||
| method:'GET' | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_GETPROJECTLIST, params,{ | |||||
| success: (response) => { | success: (response) => { | ||||
| if (response.code == API.SUCCESS_CODE) { | if (response.code == API.SUCCESS_CODE) { | ||||
| for (let i = 0; i < response.rows.length; i++) { | for (let i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].ynProjcetStatusText = UTIL.getTransform(response.rows[i].ynProjcetStatus,res.data); | response.rows[i].ynProjcetStatusText = UTIL.getTransform(response.rows[i].ynProjcetStatus,res.data); | ||||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | ||||
| @@ -64,7 +101,234 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| delete(e){ | |||||
| var that = this; | |||||
| UTIL.httpRequest(API.URL_GET_PROJECTDELETE + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
| success: (res) => { | |||||
| if (res.code == API.SUCCESS_CODE) { | |||||
| let list = that.data.projectList | |||||
| list.splice(e.currentTarget.dataset.index, 1); | |||||
| wx.showToast({ | |||||
| title: '删除成功!', | |||||
| icon: 'success', | |||||
| duration: 2000 | |||||
| }) | |||||
| that.setData({ | |||||
| projectList : list, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| changeTab(e){ | |||||
| var that = this ; | |||||
| that.setData({value1:e.detail}) | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, {method:'GET',orderType:that.data.value1,orderStatus:that.data.value2},{ | |||||
| success: (response) => { | |||||
| if (response.code == API.SUCCESS_CODE) { | |||||
| for (let i = 0; i < response.rows.length; i++) { | |||||
| response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | |||||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | |||||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | |||||
| response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | |||||
| } | |||||
| that.setData({ | |||||
| moneyorderList:response.rows | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| changeTab2(e){ | |||||
| var that = this ; | |||||
| that.setData({value2:e.detail}) | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, {method:'GET',orderType:that.data.value1,orderStatus:that.data.value2},{ | |||||
| success: (response) => { | |||||
| if (response.code == API.SUCCESS_CODE) { | |||||
| for (let i = 0; i < response.rows.length; i++) { | |||||
| response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | |||||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | |||||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | |||||
| response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | |||||
| } | |||||
| that.setData({ | |||||
| moneyorderList:response.rows | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| upload(e){ | |||||
| this.setData({itemId:e.currentTarget.dataset.id}); | |||||
| this.asyncFun(e.currentTarget.dataset.id) | |||||
| }, | |||||
| asyncFun(id){ | |||||
| this.setData({"fileList":[]}) | |||||
| let uploadList = this.data.uploadOptions | |||||
| let newList = [] | |||||
| let _this = this | |||||
| uploadList.map( res => { | |||||
| let oData = { | |||||
| tableId: id, | |||||
| tableName: "t_yinnong_project", //上传表 | |||||
| bizPath: "yinnong", | |||||
| fileType: res.dictValue, //附件类型 1原始发票 2会议纪要 3会议照片 4 参会人员签字 | |||||
| method:'GET' | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||||
| success: (rr) => { | |||||
| if(rr.rows.length>0){ | |||||
| rr.rows.map((rrr,index) => { | |||||
| rrr.url = URL_PREFIX + rrr.fileUrl | |||||
| if(index==rr.rows.length-1){ | |||||
| newList.push(Object.assign({},res,{"list":rr.rows})) | |||||
| _this.setData({"fileList":_this.data.fileList.concat(newList)}); | |||||
| _this.setData({"showUpload":true}) | |||||
| } | |||||
| }) | |||||
| }else{ | |||||
| let newuploadList = uploadList | |||||
| newuploadList.map(rd => { | |||||
| rd.list = newList | |||||
| }) | |||||
| _this.setData({"fileList":newuploadList}); | |||||
| _this.setData({"showUpload":true}) | |||||
| } | |||||
| }, | |||||
| fail:(rr) =>{ | |||||
| }, | |||||
| complete:(rr) => { | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| closeBox(){ | |||||
| this.setData({"showUpload":false}) | |||||
| }, | |||||
| deleteImg(event){ | |||||
| this.setData({"fileEvent":event}) | |||||
| this.setData({"showPopup":true}); | |||||
| }, | |||||
| cancelTem:function(e){ | |||||
| this.setData({"fileEvent":"{}"}); | |||||
| this.setData({"showPopup":false}); | |||||
| }, | |||||
| confirmTem:function(e){ | |||||
| let event = this.data.fileEvent | |||||
| console.log(event); | |||||
| UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.code==200){ | |||||
| let ll = this.data.fileList | |||||
| var jsonlist = ll[event.target.dataset.idx].list; | |||||
| jsonlist.splice(event.detail.index, 1) | |||||
| ll[event.target.dataset.idx].list = jsonlist | |||||
| this.setData({"fileList":ll}) | |||||
| this.setData({showPopup:false}); | |||||
| wx.showToast({ | |||||
| title: '删除成功!', | |||||
| icon: 'success', | |||||
| duration: 2000, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| uploadFile(uploadFile,event) { | |||||
| let _this = this | |||||
| return new Promise((resolve, reject) => { | |||||
| wx.uploadFile({ | |||||
| url: API.URL_GET_UPLOAD, | |||||
| filePath: uploadFile.file.file[0].url, | |||||
| name: 'file', | |||||
| header: { | |||||
| "Content-Type": "multipart/form-data",//记得设置 | |||||
| "chartset":"utf-8", | |||||
| 'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
| }, | |||||
| formData:uploadFile, | |||||
| success: (res) => { | |||||
| res.data = JSON.parse(res.data); | |||||
| if(res.statusCode == 200){ | |||||
| let files = _this.data.fileList | |||||
| let fName = res.data.fileUrl.split('/') | |||||
| let fLength = fName.length | |||||
| files[event.currentTarget.dataset.idx].list.push({ | |||||
| "fileName": fName[fLength-1], | |||||
| "fileType": "0", | |||||
| "fileUrl":res.data.fileUrl , | |||||
| "id": res.data.id, | |||||
| "tableId": 6, | |||||
| "url":URL_PREFIX+res.data.fileUrl | |||||
| }) | |||||
| _this.setData({"fileList":files}) | |||||
| wx.hideLoading() | |||||
| } | |||||
| }, | |||||
| fail: (err) => { | |||||
| //上传失败:修改pedding为reject | |||||
| reject(err) | |||||
| } | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| afterRead(event) { | |||||
| let _this = this | |||||
| wx.showLoading({ | |||||
| title: '上传中...' | |||||
| }) | |||||
| let fileForm={ | |||||
| file: event.detail, | |||||
| fileType:event.currentTarget.dataset.idx, | |||||
| tableName: "t_yinnong_project", //上传表 | |||||
| bizPath: "yinnong", | |||||
| tableId:_this.data.itemId | |||||
| } | |||||
| this.uploadFile(fileForm,event) | |||||
| }, | |||||
| lookDown(file,detail){ | |||||
| // 获取指定字符串最后一次出现的位置,返回index | |||||
| var index1 = file.detail.url.lastIndexOf('.'); | |||||
| // substr(start, length) 抽取从start下标开始的length个字符,返回新的字符串; | |||||
| var style = file.detail.url.substr(index1 + 1) | |||||
| //判断图片类型,不需要下载,不做处理 | |||||
| if(style=='png'||style=='jpg'||style=='jpeg'||style=='bmp'||style=='gif'||style=='webp'||style=='psd'||style== 'svg'||style=='tiff'){ | |||||
| //判断非图片类型 | |||||
| }else{ | |||||
| wx.downloadFile({ | |||||
| url: file.detail.url, | |||||
| success(data){ | |||||
| wx.openDocument({ | |||||
| filePath: data.tempFilePath, | |||||
| fileType: style, | |||||
| showMenu:true, | |||||
| success(res){ | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| */ | */ | ||||
| @@ -10,6 +10,8 @@ | |||||
| "van-swipe-cell": "@vant/weapp/swipe-cell/index", | "van-swipe-cell": "@vant/weapp/swipe-cell/index", | ||||
| "van-dropdown-menu": "@vant/weapp/dropdown-menu/index", | "van-dropdown-menu": "@vant/weapp/dropdown-menu/index", | ||||
| "van-dropdown-item": "@vant/weapp/dropdown-item/index", | "van-dropdown-item": "@vant/weapp/dropdown-item/index", | ||||
| "van-tag": "@vant/weapp/tag/index" | |||||
| "van-tag": "@vant/weapp/tag/index", | |||||
| "van-action-sheet": "@vant/weapp/action-sheet/index", | |||||
| "van-upload": "@vant/weapp/uploader/index" | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,12 +1,12 @@ | |||||
| <!--pages/project/project.wxml--> | <!--pages/project/project.wxml--> | ||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | |||||
| <view class="ns" id="top_ban" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back" referrer="no-referrer|origin|unsafe-url"></image> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">工程项目</text> | <text style="top:{{isIPX?'54px':'30px'}};">工程项目</text> | ||||
| </view> | </view> | ||||
| <view class="search_box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
| <view class="search_box" id="top_view" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
| <van-search | <van-search | ||||
| value="{{ value }}" | |||||
| value="{{ name }}" | |||||
| shape="round" | shape="round" | ||||
| background="transparent" | background="transparent" | ||||
| placeholder="请输入搜索关键词" | placeholder="请输入搜索关键词" | ||||
| @@ -15,8 +15,8 @@ | |||||
| /> | /> | ||||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | ||||
| </view> | </view> | ||||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{projectList}}" wx:key="index"> | |||||
| <scroll-view scroll-y refresher-threshold="0" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100"> | |||||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{projectList}}" wx:key="index"> | |||||
| <view class="li" bindtap="goUpdate"> | <view class="li" bindtap="goUpdate"> | ||||
| <view class="tit_box"> | <view class="tit_box"> | ||||
| <view class="tit_box_left"> | <view class="tit_box_left"> | ||||
| @@ -36,7 +36,7 @@ | |||||
| <view class="detail_time_box"> | <view class="detail_time_box"> | ||||
| <view class="detail_time"> | <view class="detail_time"> | ||||
| <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | ||||
| <text>{{item.startTime}}-{{item.endTime}}</text> | |||||
| <text>{{item.startTime}} ~ {{item.endTime}}</text> | |||||
| </view> | </view> | ||||
| <view class="detail_time"> | <view class="detail_time"> | ||||
| <text class="detail_box_money"><text style="font-size:12px;display: inline-block;color: #E90000;">¥</text>{{item.projectAmount}}</text> | <text class="detail_box_money"><text style="font-size:12px;display: inline-block;color: #E90000;">¥</text>{{item.projectAmount}}</text> | ||||
| @@ -47,5 +47,29 @@ | |||||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | ||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | ||||
| </view> | </view> | ||||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
| <image src="../../image/apply/icon_add.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"></image> | |||||
| </view> | |||||
| </view> | </view> | ||||
| </van-swipe-cell> | </van-swipe-cell> | ||||
| </scroll-view> | |||||
| <van-action-sheet show="{{showUpload}}" title="附件" bind:close="closeBox"> | |||||
| <scroll-view scroll-y="true" style="height: 600rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0"> | |||||
| <view class="fj-box"> | |||||
| <view class="fj-li" wx:for="{{fileList}}" wx:key="index" wx:for-item="item" > | |||||
| <view> | |||||
| <text>{{item.dictLabel}}</text> | |||||
| </view> | |||||
| <view class="img_box"> | |||||
| <view class="img_li"> | |||||
| <van-upload file-list="{{ item.list }}" bind:after-read="afterRead" bind:delete="deleteImg" bind:click-preview="lookDown" multiple="{{true}}" data-idx="{{index}}"> | |||||
| </van-upload> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </scroll-view> | |||||
| </van-action-sheet> | |||||
| <modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | |||||
| </modal> | |||||
| @@ -64,7 +64,7 @@ text{display: block;} | |||||
| color: #31936c; | color: #31936c; | ||||
| } | } | ||||
| .deleteBox{ | .deleteBox{ | ||||
| width: 65px; | |||||
| width: 130px; | |||||
| text-align: center; | text-align: center; | ||||
| height: 100%; | height: 100%; | ||||
| background: #F6F6F6; | background: #F6F6F6; | ||||
| @@ -127,9 +127,6 @@ text{display: block;} | |||||
| .detail_box text{ | .detail_box text{ | ||||
| color:#878787; | color:#878787; | ||||
| } | } | ||||
| .li view text{ | |||||
| /* margin-top: 15px; */ | |||||
| } | |||||
| .fkmc { | .fkmc { | ||||
| line-height: 20px; | line-height: 20px; | ||||
| font-size: 16px; | font-size: 16px; | ||||
| @@ -165,9 +162,6 @@ text{display: block;} | |||||
| color: #666666; | color: #666666; | ||||
| font-size: 12px; | font-size: 12px; | ||||
| text-align: center; | text-align: center; | ||||
| } | |||||
| .li .detail_box_right{ | |||||
| } | } | ||||
| .li .detail_box_right text{ | .li .detail_box_right text{ | ||||
| text-align: center; | text-align: center; | ||||
| @@ -324,4 +318,31 @@ text{display: block;} | |||||
| } | } | ||||
| .van-dropdown-menu { | .van-dropdown-menu { | ||||
| margin-bottom: 15px; | margin-bottom: 15px; | ||||
| } | |||||
| .fj-box text{ | |||||
| background-color: #5CAE77; | |||||
| color: #ffffff; | |||||
| text-align: center; | |||||
| border-radius: 5px; | |||||
| white-space:pre-wrap; | |||||
| padding: 5rpx 8rpx; | |||||
| width: 50rpx; | |||||
| margin: 0px 14px; | |||||
| font-size: 24rpx; | |||||
| } | |||||
| .fj-li{ | |||||
| margin-top: 20px; | |||||
| display: flex; | |||||
| /* flex-wrap: wrap; */ | |||||
| } | |||||
| .fj-li .img_li{ | |||||
| width: 100%; | |||||
| height: 18.5vw; | |||||
| } | |||||
| .fj-li .img_add{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .van-icon-description{ | |||||
| font-size: 60px; | |||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| { | { | ||||
| "setting": { | "setting": { | ||||
| "compileHotReLoad": false | |||||
| "compileHotReLoad": true | |||||
| }, | }, | ||||
| "condition": { | "condition": { | ||||
| "miniprogram": { | "miniprogram": { | ||||
| @@ -236,6 +236,9 @@ const URL_GET_ATTACHMENTLIST = `${URL_PREFIX}/system/attachment/query/`; | |||||
| //新增银行汇票 | //新增银行汇票 | ||||
| const URL_GET_MONEYORDERADD = `${URL_PREFIX}/yinnong/moneyorder/add`; | const URL_GET_MONEYORDERADD = `${URL_PREFIX}/yinnong/moneyorder/add`; | ||||
| //删除银行汇票 | |||||
| const URL_GET_MONEYORDERDELETE = `${URL_PREFIX}/yinnong/moneyorder/remove/`; | |||||
| //新增工程项目 | //新增工程项目 | ||||
| const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | ||||
| @@ -263,6 +266,8 @@ const URL_GET_FINANCIALLIST = `${URL_PREFIX}/finance/open/financialAmountPublicM | |||||
| //删除开户行 | //删除开户行 | ||||
| const URL_GET_DEPOSITDELETE = `${URL_PREFIX}/yinnong/deposit/remove/`; | const URL_GET_DEPOSITDELETE = `${URL_PREFIX}/yinnong/deposit/remove/`; | ||||
| //删除工程项目 | |||||
| const URL_GET_PROJECTDELETE = `${URL_PREFIX}/yinnong/project/remove/`; | |||||
| //支付口令修改 | //支付口令修改 | ||||
| const URL_GET_PASSWORDEDIT = `${URL_PREFIX}/cashier/account/editPassWord`; | const URL_GET_PASSWORDEDIT = `${URL_PREFIX}/cashier/account/editPassWord`; | ||||
| @@ -371,6 +376,9 @@ export { | |||||
| URL_POST_PERMANENTUPDATE, | URL_POST_PERMANENTUPDATE, | ||||
| URL_GET_FINANCIALLIST, | URL_GET_FINANCIALLIST, | ||||
| URL_GET_SUBJECTLIST, | URL_GET_SUBJECTLIST, | ||||
| URL_GET_MONEYORDERDELETE, | |||||
| URL_GET_PROJECTADD, | |||||
| URL_GET_PROJECTDELETE, | |||||
| URL_GET_PASSWORDEDIT, | URL_GET_PASSWORDEDIT, | ||||
| URL_GET_PAYEEEDIT | URL_GET_PAYEEEDIT | ||||
| } | } | ||||
| @@ -438,7 +438,6 @@ function convertToChinaNum (num) { | |||||
| } | } | ||||
| function getTransform(dictValue,options){ | function getTransform(dictValue,options){ | ||||
| var dictLabel2 = ""; | var dictLabel2 = ""; | ||||
| console.log(options); | |||||
| options.map(item=>{ | options.map(item=>{ | ||||
| if(item.dictValue == dictValue){ | if(item.dictValue == dictValue){ | ||||
| dictLabel2 = item.dictLabel | dictLabel2 = item.dictLabel | ||||