@@ -1,25 +1,17 @@ | |||||
let APP = getApp(); | |||||
import * as STORAGE from './utils/storage' | import * as STORAGE from './utils/storage' | ||||
import * as UTIL from './utils/util' | import * as UTIL from './utils/util' | ||||
import * as API from './utils/API' | import * as API from './utils/API' | ||||
let APP = getApp(); | |||||
App({ | App({ | ||||
onLaunch() { | onLaunch() { | ||||
var that = this; | var that = this; | ||||
//存储storage初始化globalData数据-- | //存储storage初始化globalData数据-- | ||||
//何时存储,用来判断,不用获取code | //何时存储,用来判断,不用获取code | ||||
that.initGlobalData(); | that.initGlobalData(); | ||||
//获取code | |||||
UTIL.getCOdeFromWX({ | |||||
complate: (code) => { | |||||
// //获取openId | |||||
that.getOpenIdFromFW(code); | |||||
} | |||||
}); | |||||
//获取设备信息 | //获取设备信息 | ||||
wx.getSystemInfo({ | wx.getSystemInfo({ | ||||
success: function (res) { | success: function (res) { | ||||
that.globalData.systemType = res.system.indexOf("Android") >= 0 ? "Android" : "IOS"; | that.globalData.systemType = res.system.indexOf("Android") >= 0 ? "Android" : "IOS"; | ||||
that.globalData.isIphoneX = res.model.indexOf("iPhone X") >= 0 || res.model.indexOf("iPhone 1") >= 0; | that.globalData.isIphoneX = res.model.indexOf("iPhone X") >= 0 || res.model.indexOf("iPhone 1") >= 0; | ||||
} | } | ||||
@@ -40,36 +32,6 @@ App({ | |||||
//更新机制 | //更新机制 | ||||
this.wxappUpdateManager(); | this.wxappUpdateManager(); | ||||
}, | }, | ||||
globalData: { | |||||
// 系统用户登录信息(用户id、token) | |||||
userInfo: { | |||||
token: '', | |||||
toastTimeout:null | |||||
}, | |||||
//微信用户登陆信息(昵称、头像、省、城市) | |||||
wxUserInfo: { | |||||
nickName: '', | |||||
avatarUrl: '', | |||||
province: '', | |||||
city: '' | |||||
} | |||||
, | |||||
/** | |||||
* 小程序设置 | |||||
*/ | |||||
setInfo: { | |||||
//定位授权 | |||||
locationOpenIdWX: false, | |||||
//纬度 | |||||
latitude:'', | |||||
//经度 | |||||
longitude:'', | |||||
} | |||||
, | |||||
systemType:'',//设备类型 Android IOS | |||||
isIphoneX: false, // 用来标识当前手机机型是否为 iPhone X | |||||
isIPX:false | |||||
}, | |||||
/** | /** | ||||
* 从服务端获取openId | * 从服务端获取openId | ||||
*/ | */ | ||||
@@ -77,18 +39,20 @@ App({ | |||||
let sendData = { | let sendData = { | ||||
code: code | code: code | ||||
} | } | ||||
console.log(wx.getStorageSync('dressCode')+API.URL_GET_OPENID); | |||||
UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { | UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
// UTIL.showToastNoneIcon("openId:" + res._data.openid); | // UTIL.showToastNoneIcon("openId:" + res._data.openid); | ||||
STORAGE.setToken(res.token) | |||||
STORAGE.setOpenId(res.data.openId) | |||||
STORAGE.setSessionKey(res.data.sessionKey) | |||||
wx.setStorageSync('token', res.token); | |||||
wx.setStorageSync('openId', res.data.openId); | |||||
wx.setStorageSync('sessionKey', res.data.sessionKey); | |||||
getApp().globalData.userInfo.token = res.token; | getApp().globalData.userInfo.token = res.token; | ||||
} else { | } else { | ||||
//未获取到openId | //未获取到openId | ||||
STORAGE.setOpenId(res.data.openId) | |||||
STORAGE.setSessionKey(res.data.sessionKey) | |||||
wx.setStorageSync('openId', res.data.openId); | |||||
wx.setStorageSync('sessionKey', res.data.sessionKey); | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -98,7 +62,7 @@ App({ | |||||
*/ | */ | ||||
initGlobalData() { | initGlobalData() { | ||||
var userInfo = { | var userInfo = { | ||||
token: STORAGE.getToken() | |||||
token: wx.getStorageSync('token') | |||||
} | } | ||||
console.log(userInfo) | console.log(userInfo) | ||||
this.globalData.userInfo = userInfo; | this.globalData.userInfo = userInfo; | ||||
@@ -166,5 +130,34 @@ App({ | |||||
}); | }); | ||||
}, 2000); | }, 2000); | ||||
}, | }, | ||||
globalData: { | |||||
// 系统用户登录信息(用户id、token) | |||||
userInfo: { | |||||
token: '', | |||||
toastTimeout:null | |||||
}, | |||||
//微信用户登陆信息(昵称、头像、省、城市) | |||||
wxUserInfo: { | |||||
nickName: '', | |||||
avatarUrl: '', | |||||
province: '', | |||||
city: '' | |||||
}, | |||||
/** | |||||
* 小程序设置 | |||||
*/ | |||||
setInfo: { | |||||
//定位授权 | |||||
locationOpenIdWX: false, | |||||
//纬度 | |||||
latitude:'', | |||||
//经度 | |||||
longitude:'', | |||||
}, | |||||
systemType:'',//设备类型 Android IOS | |||||
isIphoneX: false, // 用来标识当前手机机型是否为 iPhone X | |||||
isIPX:false, | |||||
userDress:'重庆市', | |||||
APIURL:wx.getStorageSync('dressCode') | |||||
}, | |||||
}) | }) |
@@ -5,44 +5,18 @@ | |||||
"pages/index/settle/index", | "pages/index/settle/index", | ||||
"pages/index/settle/passWord/index", | "pages/index/settle/passWord/index", | ||||
"pages/index/settle/eSign/index", | "pages/index/settle/eSign/index", | ||||
"pages/handle/liist", | |||||
"pages/handle/expenditureAudit/expenditureAudit", | |||||
"pages/apply/index", | |||||
"pages/apply/paymentTemplate/paymentTemplate", | |||||
"pages/apply/approval/approval", | |||||
"pages/inCome/inCome", | |||||
"pages/inCome/accounting/index", | |||||
"pages/apply/paymentTemplate/see/see", | |||||
"pages/apply/paymentTemplate/add/add", | |||||
"pages/payee/index", | |||||
"pages/payee/add/add", | |||||
"component/pop-up/index", | "component/pop-up/index", | ||||
"pages/Bookkeeping/Bookkeeping", | |||||
"pages/payee/list/list", | |||||
"pages/drawee/drawee", | "pages/drawee/drawee", | ||||
"pages/drawee/add/add", | "pages/drawee/add/add", | ||||
"pages/Bookkeeping/update/update", | |||||
"pages/Bookkeeping/updateZC/update", | |||||
"pages/bank/bank", | |||||
"pages/bank/add/add", | |||||
"pages/bankDraft/bankDraft", | "pages/bankDraft/bankDraft", | ||||
"pages/bankDraft/add/add", | "pages/bankDraft/add/add", | ||||
"pages/project/project", | "pages/project/project", | ||||
"pages/project/add/add", | "pages/project/add/add", | ||||
"pages/contract/contract", | |||||
"pages/contract/add/add", | |||||
"pages/fixedAssets/fixedAssets", | |||||
"pages/fixedAssets/add/add", | |||||
"pages/finance/finance", | "pages/finance/finance", | ||||
"pages/Bookkeeping/seeBook/seeBook", | |||||
"pages/Bookkeeping/seeBookZC/seeBookZC", | |||||
"pages/finance/voucher/voucher", | |||||
"pages/pay/detail", | "pages/pay/detail", | ||||
"pages/pay/payee/payee", | "pages/pay/payee/payee", | ||||
"pages/apply/paymentTemplate/add/upLoad/upLoad", | |||||
"pages/apply/paymentTemplate/add/upError/upError", | |||||
"pages/apply/paymentTemplate/add/payeeList/payee", | |||||
"pages/contractAssets/fixedAssets", | "pages/contractAssets/fixedAssets", | ||||
"pages/fixedAssets/change/change", | |||||
"pages/paymentManager/paymentManager", | "pages/paymentManager/paymentManager", | ||||
"pages/paymentManager/toPay/toPay", | "pages/paymentManager/toPay/toPay", | ||||
"pages/majorEvent/majorEvent", | "pages/majorEvent/majorEvent", | ||||
@@ -50,7 +24,118 @@ | |||||
"pages/regular/regular", | "pages/regular/regular", | ||||
"pages/transferAccounts/transferAccounts", | "pages/transferAccounts/transferAccounts", | ||||
"pages/bill/bill", | "pages/bill/bill", | ||||
"pages/billUse/billUse" | |||||
"pages/statistics/statistics", | |||||
"pages/user/region/region", | |||||
"pages/finance/index", | |||||
"pages/index/majorDetail/majorDetail", | |||||
"pages/resources/resources", | |||||
"pages/resources/detail/detail", | |||||
"pages/resources/edit/edit" | |||||
], | |||||
"subPackages": [ | |||||
{ | |||||
"root": "pages/handle/", | |||||
"pages": [ | |||||
"liist", | |||||
"expenditureAudit/expenditureAudit" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/apply/", | |||||
"pages": [ | |||||
"index", | |||||
"paymentTemplate/paymentTemplate", | |||||
"approval/approval", | |||||
"paymentTemplate/see/see", | |||||
"paymentTemplate/add/add", | |||||
"paymentTemplate/add/upLoad/upLoad", | |||||
"paymentTemplate/add/upError/upError", | |||||
"paymentTemplate/add/payeeList/payee" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/payee/", | |||||
"pages": [ | |||||
"index", | |||||
"add/add", | |||||
"list/list" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/Bookkeeping/", | |||||
"pages": [ | |||||
"Bookkeeping", | |||||
"update/update", | |||||
"updateZC/update", | |||||
"seeBook/seeBook", | |||||
"seeBookZC/seeBookZC" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/fixedAssets/", | |||||
"pages": [ | |||||
"fixedAssets", | |||||
"add/add", | |||||
"change/change", | |||||
"list/list", | |||||
"list/add/add", | |||||
"list/detail/detail" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/billUse/", | |||||
"pages": [ | |||||
"billUse", | |||||
"flowAdd/flowAdd", | |||||
"add/add", | |||||
"edit/edit" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/transaction/", | |||||
"pages": [ | |||||
"transaction", | |||||
"transactionDetail/transactionDetail", | |||||
"receipt/receipt" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/escrowAccount/", | |||||
"pages": [ | |||||
"escrowAccount", | |||||
"add/add", | |||||
"edit/edit", | |||||
"detail/detail", | |||||
"balance/balance" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/inCome/", | |||||
"pages": [ | |||||
"inCome", | |||||
"accounting/index", | |||||
"index" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/bank/", | |||||
"pages": [ | |||||
"bank", | |||||
"add/add", | |||||
"bankList" | |||||
] | |||||
}, | |||||
{ | |||||
"root": "pages/contract/", | |||||
"pages": [ | |||||
"contract", | |||||
"add/add", | |||||
"list/list", | |||||
"list/add", | |||||
"list/edit", | |||||
"list/detail" | |||||
] | |||||
} | |||||
], | ], | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
@@ -0,0 +1,265 @@ | |||||
import WxCanvas from './wx-canvas'; | |||||
import * as echarts from './echarts'; | |||||
let ctx; | |||||
function compareVersion(v1, v2) { | |||||
v1 = v1.split('.') | |||||
v2 = v2.split('.') | |||||
const len = Math.max(v1.length, v2.length) | |||||
while (v1.length < len) { | |||||
v1.push('0') | |||||
} | |||||
while (v2.length < len) { | |||||
v2.push('0') | |||||
} | |||||
for (let i = 0; i < len; i++) { | |||||
const num1 = parseInt(v1[i]) | |||||
const num2 = parseInt(v2[i]) | |||||
if (num1 > num2) { | |||||
return 1 | |||||
} else if (num1 < num2) { | |||||
return -1 | |||||
} | |||||
} | |||||
return 0 | |||||
} | |||||
Component({ | |||||
properties: { | |||||
canvasId: { | |||||
type: String, | |||||
value: 'ec-canvas' | |||||
}, | |||||
ec: { | |||||
type: Object | |||||
}, | |||||
forceUseOldCanvas: { | |||||
type: Boolean, | |||||
value: false | |||||
} | |||||
}, | |||||
data: { | |||||
isUseNewCanvas: false | |||||
}, | |||||
ready: function () { | |||||
// Disable prograssive because drawImage doesn't support DOM as parameter | |||||
// See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html | |||||
echarts.registerPreprocessor(option => { | |||||
if (option && option.series) { | |||||
if (option.series.length > 0) { | |||||
option.series.forEach(series => { | |||||
series.progressive = 0; | |||||
}); | |||||
} | |||||
else if (typeof option.series === 'object') { | |||||
option.series.progressive = 0; | |||||
} | |||||
} | |||||
}); | |||||
if (!this.data.ec) { | |||||
console.warn('组件需绑定 ec 变量,例:<ec-canvas id="mychart-dom-bar" ' | |||||
+ 'canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>'); | |||||
return; | |||||
} | |||||
if (!this.data.ec.lazyLoad) { | |||||
this.init(); | |||||
} | |||||
}, | |||||
methods: { | |||||
init: function (callback) { | |||||
const version = wx.getSystemInfoSync().SDKVersion | |||||
const canUseNewCanvas = compareVersion(version, '2.9.0') >= 0; | |||||
const forceUseOldCanvas = this.data.forceUseOldCanvas; | |||||
const isUseNewCanvas = canUseNewCanvas && !forceUseOldCanvas; | |||||
this.setData({ isUseNewCanvas }); | |||||
if (forceUseOldCanvas && canUseNewCanvas) { | |||||
console.warn('开发者强制使用旧canvas,建议关闭'); | |||||
} | |||||
if (isUseNewCanvas) { | |||||
// console.log('微信基础库版本大于2.9.0,开始使用<canvas type="2d"/>'); | |||||
// 2.9.0 可以使用 <canvas type="2d"></canvas> | |||||
this.initByNewWay(callback); | |||||
} else { | |||||
const isValid = compareVersion(version, '1.9.91') >= 0 | |||||
if (!isValid) { | |||||
console.error('微信基础库版本过低,需大于等于 1.9.91。' | |||||
+ '参见:https://github.com/ecomfe/echarts-for-weixin' | |||||
+ '#%E5%BE%AE%E4%BF%A1%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82'); | |||||
return; | |||||
} else { | |||||
console.warn('建议将微信基础库调整大于等于2.9.0版本。升级后绘图将有更好性能'); | |||||
this.initByOldWay(callback); | |||||
} | |||||
} | |||||
}, | |||||
initByOldWay(callback) { | |||||
// 1.9.91 <= version < 2.9.0:原来的方式初始化 | |||||
ctx = wx.createCanvasContext(this.data.canvasId, this); | |||||
const canvas = new WxCanvas(ctx, this.data.canvasId, false); | |||||
echarts.setCanvasCreator(() => { | |||||
return canvas; | |||||
}); | |||||
// const canvasDpr = wx.getSystemInfoSync().pixelRatio // 微信旧的canvas不能传入dpr | |||||
const canvasDpr = 1 | |||||
var query = wx.createSelectorQuery().in(this); | |||||
query.select('.ec-canvas').boundingClientRect(res => { | |||||
if (typeof callback === 'function') { | |||||
this.chart = callback(canvas, res.width, res.height, canvasDpr); | |||||
} | |||||
else if (this.data.ec && typeof this.data.ec.onInit === 'function') { | |||||
this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr); | |||||
} | |||||
else { | |||||
this.triggerEvent('init', { | |||||
canvas: canvas, | |||||
width: res.width, | |||||
height: res.height, | |||||
canvasDpr: canvasDpr // 增加了dpr,可方便外面echarts.init | |||||
}); | |||||
} | |||||
}).exec(); | |||||
}, | |||||
initByNewWay(callback) { | |||||
// version >= 2.9.0:使用新的方式初始化 | |||||
const query = wx.createSelectorQuery().in(this) | |||||
query | |||||
.select('.ec-canvas') | |||||
.fields({ node: true, size: true }) | |||||
.exec(res => { | |||||
const canvasNode = res[0].node | |||||
this.canvasNode = canvasNode | |||||
const canvasDpr = wx.getSystemInfoSync().pixelRatio | |||||
const canvasWidth = res[0].width | |||||
const canvasHeight = res[0].height | |||||
const ctx = canvasNode.getContext('2d') | |||||
const canvas = new WxCanvas(ctx, this.data.canvasId, true, canvasNode) | |||||
echarts.setCanvasCreator(() => { | |||||
return canvas | |||||
}) | |||||
if (typeof callback === 'function') { | |||||
this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr) | |||||
} else if (this.data.ec && typeof this.data.ec.onInit === 'function') { | |||||
this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr) | |||||
} else { | |||||
this.triggerEvent('init', { | |||||
canvas: canvas, | |||||
width: canvasWidth, | |||||
height: canvasHeight, | |||||
dpr: canvasDpr | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
canvasToTempFilePath(opt) { | |||||
if (this.data.isUseNewCanvas) { | |||||
// 新版 | |||||
const query = wx.createSelectorQuery().in(this) | |||||
query | |||||
.select('.ec-canvas') | |||||
.fields({ node: true, size: true }) | |||||
.exec(res => { | |||||
const canvasNode = res[0].node | |||||
opt.canvas = canvasNode | |||||
wx.canvasToTempFilePath(opt) | |||||
}) | |||||
} else { | |||||
// 旧的 | |||||
if (!opt.canvasId) { | |||||
opt.canvasId = this.data.canvasId; | |||||
} | |||||
ctx.draw(true, () => { | |||||
wx.canvasToTempFilePath(opt, this); | |||||
}); | |||||
} | |||||
}, | |||||
touchStart(e) { | |||||
if (this.chart && e.touches.length > 0) { | |||||
var touch = e.touches[0]; | |||||
var handler = this.chart.getZr().handler; | |||||
handler.dispatch('mousedown', { | |||||
zrX: touch.x, | |||||
zrY: touch.y, | |||||
preventDefault: () => {}, | |||||
stopImmediatePropagation: () => {}, | |||||
stopPropagation: () => {} | |||||
}); | |||||
handler.dispatch('mousemove', { | |||||
zrX: touch.x, | |||||
zrY: touch.y, | |||||
preventDefault: () => {}, | |||||
stopImmediatePropagation: () => {}, | |||||
stopPropagation: () => {} | |||||
}); | |||||
handler.processGesture(wrapTouch(e), 'start'); | |||||
} | |||||
}, | |||||
touchMove(e) { | |||||
if (this.chart && e.touches.length > 0) { | |||||
var touch = e.touches[0]; | |||||
var handler = this.chart.getZr().handler; | |||||
handler.dispatch('mousemove', { | |||||
zrX: touch.x, | |||||
zrY: touch.y, | |||||
preventDefault: () => {}, | |||||
stopImmediatePropagation: () => {}, | |||||
stopPropagation: () => {} | |||||
}); | |||||
handler.processGesture(wrapTouch(e), 'change'); | |||||
} | |||||
}, | |||||
touchEnd(e) { | |||||
if (this.chart) { | |||||
const touch = e.changedTouches ? e.changedTouches[0] : {}; | |||||
var handler = this.chart.getZr().handler; | |||||
handler.dispatch('mouseup', { | |||||
zrX: touch.x, | |||||
zrY: touch.y, | |||||
preventDefault: () => {}, | |||||
stopImmediatePropagation: () => {}, | |||||
stopPropagation: () => {} | |||||
}); | |||||
handler.dispatch('click', { | |||||
zrX: touch.x, | |||||
zrY: touch.y, | |||||
preventDefault: () => {}, | |||||
stopImmediatePropagation: () => {}, | |||||
stopPropagation: () => {} | |||||
}); | |||||
handler.processGesture(wrapTouch(e), 'end'); | |||||
} | |||||
} | |||||
} | |||||
}); | |||||
function wrapTouch(event) { | |||||
for (let i = 0; i < event.touches.length; ++i) { | |||||
const touch = event.touches[i]; | |||||
touch.offsetX = touch.x; | |||||
touch.offsetY = touch.y; | |||||
} | |||||
return event; | |||||
} |
@@ -0,0 +1,4 @@ | |||||
{ | |||||
"component": true, | |||||
"usingComponents": {} | |||||
} |
@@ -0,0 +1,4 @@ | |||||
<!-- 新的:接口对其了H5 --> | |||||
<canvas wx:if="{{isUseNewCanvas}}" type="2d" class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas> | |||||
<!-- 旧的 --> | |||||
<canvas wx:else class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas> |
@@ -0,0 +1,4 @@ | |||||
.ec-canvas { | |||||
width: 100%; | |||||
height: 100%; | |||||
} |
@@ -0,0 +1,111 @@ | |||||
export default class WxCanvas { | |||||
constructor(ctx, canvasId, isNew, canvasNode) { | |||||
this.ctx = ctx; | |||||
this.canvasId = canvasId; | |||||
this.chart = null; | |||||
this.isNew = isNew | |||||
if (isNew) { | |||||
this.canvasNode = canvasNode; | |||||
} | |||||
else { | |||||
this._initStyle(ctx); | |||||
} | |||||
// this._initCanvas(zrender, ctx); | |||||
this._initEvent(); | |||||
} | |||||
getContext(contextType) { | |||||
if (contextType === '2d') { | |||||
return this.ctx; | |||||
} | |||||
} | |||||
// canvasToTempFilePath(opt) { | |||||
// if (!opt.canvasId) { | |||||
// opt.canvasId = this.canvasId; | |||||
// } | |||||
// return wx.canvasToTempFilePath(opt, this); | |||||
// } | |||||
setChart(chart) { | |||||
this.chart = chart; | |||||
} | |||||
addEventListener() { | |||||
// noop | |||||
} | |||||
attachEvent() { | |||||
// noop | |||||
} | |||||
detachEvent() { | |||||
// noop | |||||
} | |||||
_initCanvas(zrender, ctx) { | |||||
zrender.util.getContext = function () { | |||||
return ctx; | |||||
}; | |||||
zrender.util.$override('measureText', function (text, font) { | |||||
ctx.font = font || '12px sans-serif'; | |||||
return ctx.measureText(text); | |||||
}); | |||||
} | |||||
_initStyle(ctx) { | |||||
ctx.createRadialGradient = () => { | |||||
return ctx.createCircularGradient(arguments); | |||||
}; | |||||
} | |||||
_initEvent() { | |||||
this.event = {}; | |||||
const eventNames = [{ | |||||
wxName: 'touchStart', | |||||
ecName: 'mousedown' | |||||
}, { | |||||
wxName: 'touchMove', | |||||
ecName: 'mousemove' | |||||
}, { | |||||
wxName: 'touchEnd', | |||||
ecName: 'mouseup' | |||||
}, { | |||||
wxName: 'touchEnd', | |||||
ecName: 'click' | |||||
}]; | |||||
eventNames.forEach(name => { | |||||
this.event[name.wxName] = e => { | |||||
const touch = e.touches[0]; | |||||
this.chart.getZr().handler.dispatch(name.ecName, { | |||||
zrX: name.wxName === 'tap' ? touch.clientX : touch.x, | |||||
zrY: name.wxName === 'tap' ? touch.clientY : touch.y, | |||||
preventDefault: () => {}, | |||||
stopImmediatePropagation: () => {}, | |||||
stopPropagation: () => {} | |||||
}); | |||||
}; | |||||
}); | |||||
} | |||||
set width(w) { | |||||
if (this.canvasNode) this.canvasNode.width = w | |||||
} | |||||
set height(h) { | |||||
if (this.canvasNode) this.canvasNode.height = h | |||||
} | |||||
get width() { | |||||
if (this.canvasNode) | |||||
return this.canvasNode.width | |||||
return 0 | |||||
} | |||||
get height() { | |||||
if (this.canvasNode) | |||||
return this.canvasNode.height | |||||
return 0 | |||||
} | |||||
} |
@@ -1,29 +1,25 @@ | |||||
module.exports = { | |||||
DEV: { | |||||
URL_PREFIX: 'http://192.168.31.178/api', | |||||
}, | |||||
PRE: { | |||||
URL_PREFIX: 'http://192.168.31.178:8080/api', | |||||
}, | |||||
PROD: { | |||||
URL_PREFIX: 'http://192.168.31.178:8080/api', | |||||
}, | |||||
IMGURL: { | |||||
URL_PREFIX: 'http://192.168.31.178:8080', | |||||
function getURL(location){ | |||||
let url = wx.getStorageSync('dressCode'); | |||||
if (location) { | |||||
url = location; | |||||
} | } | ||||
return url | |||||
} | |||||
export { | |||||
getURL, | |||||
} | } | ||||
// module.exports = { | // module.exports = { | ||||
// DEV: { | // DEV: { | ||||
// URL_PREFIX: 'https://dazu.nongshen.net/api', | |||||
// wx.getStorageSync('dressCode'): 'https://dazu.nongshen.net/api', | |||||
// }, | // }, | ||||
// PRE: { | // PRE: { | ||||
// URL_PREFIX: 'https://dazu.nongshen.net/api', | |||||
// wx.getStorageSync('dressCode'): 'https://dazu.nongshen.net/api', | |||||
// }, | // }, | ||||
// PROD: { | // PROD: { | ||||
// URL_PREFIX: 'https://dazu.nongshen.net/api', | |||||
// wx.getStorageSync('dressCode'): 'https://dazu.nongshen.net/api', | |||||
// }, | // }, | ||||
// IMGURL: { | // IMGURL: { | ||||
// URL_PREFIX: 'https://dazu.nongshen.net/api', | |||||
// wx.getStorageSync('dressCode'): 'https://dazu.nongshen.net/api', | |||||
// } | // } | ||||
// } | // } |
@@ -275,7 +275,7 @@ Page({ | |||||
UTIL.showToastNoneIcon('至少选择一个收入事项!'); | UTIL.showToastNoneIcon('至少选择一个收入事项!'); | ||||
return; | return; | ||||
} | } | ||||
let url = API.URL_GET_GETBOOKKEEP | |||||
let url = wx.getStorageSync('dressCode')+ API.URL_GET_GETBOOKKEEP | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
method:"POST", | method:"POST", | ||||
@@ -301,7 +301,7 @@ Page({ | |||||
UTIL.showToastNoneIcon('至少选择一个支出事项!'); | UTIL.showToastNoneIcon('至少选择一个支出事项!'); | ||||
return; | return; | ||||
} | } | ||||
let url = API.URL_GET_GETBOOKKEEP | |||||
let url =wx.getStorageSync('dressCode')+ API.URL_GET_GETBOOKKEEP | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
method:"POST", | method:"POST", | ||||
@@ -48,10 +48,16 @@ | |||||
</view> | </view> | ||||
<view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(255,0,0,0.2);"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(255,0,0,0.2);"> | ||||
<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> | |||||
<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> | |||||
<text style="color: #e90000;">删除</text> | |||||
</view> | |||||
</view> | </view> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(252, 154, 85,0.2);"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(252, 154, 85,0.2);"> | ||||
<image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdate"></image> | |||||
<view> | |||||
<image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdate"></image> | |||||
<text style="color: #F5A327;">修改</text> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
@@ -81,10 +87,16 @@ | |||||
</view> | </view> | ||||
<view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(255,0,0,0.2);"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(255,0,0,0.2);"> | ||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete2"></image> | |||||
<view> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete2"></image> | |||||
<text style="color: #e90000;">删除</text> | |||||
</view> | |||||
</view> | </view> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(252, 154, 85,0.2);"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(252, 154, 85,0.2);"> | ||||
<image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdateZC"></image> | |||||
<view> | |||||
<image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdateZC"></image> | |||||
<text style="color: #F5A327;">修改</text> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -164,14 +161,14 @@ Page({ | |||||
let fileForm = that.data.fileForm?that.data.fileForm:[]; | let fileForm = that.data.fileForm?that.data.fileForm:[]; | ||||
res2.data.forEach((item2,index2)=>{ | res2.data.forEach((item2,index2)=>{ | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:index+1, | fileType:index+1, | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_cashier_account_flow', | tableName:'t_cashier_account_flow', | ||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
}) | }) | ||||
@@ -478,20 +475,16 @@ Page({ | |||||
}, | }, | ||||
imgPreviewImage(e){ | imgPreviewImage(e){ | ||||
let currentImgList = e.currentTarget.dataset; | |||||
//获取当前附件列表 | |||||
let currentStatus = this.data[currentImgList.status]; | |||||
//当前选中图片index | |||||
let currentIndex = currentImgList.id; | |||||
let imgList = [] | |||||
for(let i = 0; i<currentStatus.length; i++){ | |||||
imgList.push(currentStatus[i].file) | |||||
} | |||||
let array = []; | |||||
console.log(e); | |||||
e.currentTarget.dataset.option.forEach(item=>{ | |||||
array.push(item.tempFilePath) | |||||
}) | |||||
console.log(array); | |||||
wx.previewImage({ | wx.previewImage({ | ||||
current: imgList[currentIndex], // 当前显示图片的http链接 | |||||
urls: imgList // 需要预览的图片http链接列表 | |||||
urls: array, | |||||
showmenu:true, | |||||
current:array[e.currentTarget.dataset.index] | |||||
}) | }) | ||||
}, | }, | ||||
@@ -1,7 +1,7 @@ | |||||
<!--pages/apply/index.wxml--> | <!--pages/apply/index.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'}};">查看收入事项</text> | |||||
</view> | </view> | ||||
<!-- 付款单位开始 --> | <!-- 付款单位开始 --> | ||||
<view class="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
@@ -34,16 +34,16 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="flex-block"><text class="rules no">单据编码</text> <input disabled class="wrap" bindinput="inputChange" data-prop="formData.billNum" value="{{formData.billNum}}" placeholder="单据编码"/></view> | <view class="flex-block"><text class="rules no">单据编码</text> <input disabled class="wrap" bindinput="inputChange" data-prop="formData.billNum" value="{{formData.billNum}}" placeholder="单据编码"/></view> | ||||
<view class="flex-block"> | |||||
<!-- <view class="flex-block"> | |||||
<text class="rules no">对方科目</text> | <text class="rules no">对方科目</text> | ||||
<view class="wrap"> | <view class="wrap"> | ||||
<text>{{formData.subjectNameAll == null ? '':formData.subjectNameAll}}</text> | <text>{{formData.subjectNameAll == null ? '':formData.subjectNameAll}}</text> | ||||
</view> | </view> | ||||
</view> | |||||
</view> --> | |||||
<view class="flex-block"><text class="rules">备注说明</text> <input disabled class="wrap" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入备注说明" value="{{formData.accountSummary}}"/></view> | <view class="flex-block"><text class="rules">备注说明</text> <input disabled class="wrap" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入备注说明" value="{{formData.accountSummary}}"/></view> | ||||
<view class="flex-block" wx:if="{{formData.checkedStatus == 4}}"><text class="rules">挂起原因</text> <input disabled class="wrap" bindinput="inputChange" data-prop="formData.remark" placeholder="挂起原因" value="{{formData.remark}}"/></view> | <view class="flex-block" wx:if="{{formData.checkedStatus == 4}}"><text class="rules">挂起原因</text> <input disabled class="wrap" bindinput="inputChange" data-prop="formData.remark" placeholder="挂起原因" value="{{formData.remark}}"/></view> | ||||
</view> | </view> | ||||
<block wx:if="{{incomeType == 2}}"> | |||||
<block wx:if="{{formData.incomeType == 2}}"> | |||||
<view class="title"> | <view class="title"> | ||||
<text>关联合同</text> | <text>关联合同</text> | ||||
</view> | </view> | ||||
@@ -81,7 +81,7 @@ | |||||
<view class="img_box"> | <view class="img_box"> | ||||
<view class="img_list" wx:for="{{item.Pics}}" wx:for-index="childrenIndex" wx:for-item="item2" wx:key="childrenIndex"> | <view class="img_list" wx:for="{{item.Pics}}" wx:for-index="childrenIndex" wx:for-item="item2" wx:key="childrenIndex"> | ||||
<image class="img_li" src="{{item2.tempFilePath}}" bindlongpress="bindlongpressimg" data-status="sjPics" bindtap="imgPreviewImage" data-id='{{childrenIndex}}'></image> | |||||
<image class="img_li" src="{{item2.tempFilePath}}" bindlongpress="bindlongpressimg" data-status="sjPics" bindtap="imgPreviewImage" data-id='{{childrenIndex}}' data-option="{{item.Pics}}" data-index="{{childrenIndex}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -165,14 +162,14 @@ Page({ | |||||
let fileForm = that.data.fileForm?that.data.fileForm:[]; | let fileForm = that.data.fileForm?that.data.fileForm:[]; | ||||
res2.data.forEach((item2,index2)=>{ | res2.data.forEach((item2,index2)=>{ | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:index+1, | fileType:index+1, | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_cashier_account_flow', | tableName:'t_cashier_account_flow', | ||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
}) | }) | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -164,14 +161,14 @@ Page({ | |||||
let fileForm = that.data.fileForm?that.data.fileForm:[]; | let fileForm = that.data.fileForm?that.data.fileForm:[]; | ||||
res2.data.forEach((item2,index2)=>{ | res2.data.forEach((item2,index2)=>{ | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:index+1, | fileType:index+1, | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_cashier_account_flow', | tableName:'t_cashier_account_flow', | ||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
}) | }) | ||||
@@ -312,7 +309,7 @@ Page({ | |||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
wx.chooseImage({ | |||||
wx.chooseMedia({ | |||||
count: that.data.count, // 最多可以选择的图片张数,默认9 | count: that.data.count, // 最多可以选择的图片张数,默认9 | ||||
sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 | sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 | ||||
sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 | sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 | ||||
@@ -320,16 +317,16 @@ Page({ | |||||
console.log(res) | console.log(res) | ||||
let fileForm = that.data.fileForm; | let fileForm = that.data.fileForm; | ||||
let tem = that.data.uploadOptions[e.currentTarget.dataset.index].Pics?that.data.uploadOptions[e.currentTarget.dataset.index].Pics:[]; | let tem = that.data.uploadOptions[e.currentTarget.dataset.index].Pics?that.data.uploadOptions[e.currentTarget.dataset.index].Pics:[]; | ||||
res.tempFilePaths.forEach(item => { | |||||
res.tempFiles.forEach(item => { | |||||
fileForm.push({ | fileForm.push({ | ||||
file: item, | |||||
file: item.tempFilePath, | |||||
fileType:e.currentTarget.dataset.index+1, | fileType:e.currentTarget.dataset.index+1, | ||||
bizPath:'cashier', | bizPath:'cashier', | ||||
tableName:'t_cashier_account_flow', | tableName:'t_cashier_account_flow', | ||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
tem.push({ | tem.push({ | ||||
tempFilePath:item | |||||
tempFilePath:item.tempFilePath | |||||
}) | }) | ||||
}) | }) | ||||
that.setData({ | that.setData({ | ||||
@@ -424,7 +421,10 @@ Page({ | |||||
let data = this.data.formData; | let data = this.data.formData; | ||||
data.method = "POST"; | data.method = "POST"; | ||||
data.checkedStatus = codeStr; | data.checkedStatus = codeStr; | ||||
console.log(data); | |||||
wx.showLoading({ | |||||
title: codeStr == 1 ? '正在保存':'正在提交', | |||||
mask:true | |||||
}) | |||||
UTIL.httpRequest(API.URL_POST_GERFLOWEDIT,data,{ | UTIL.httpRequest(API.URL_POST_GERFLOWEDIT,data,{ | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code == 200){ | if(res.code == 200){ | ||||
@@ -437,7 +437,7 @@ Page({ | |||||
let arrData=updataList[i]; | let arrData=updataList[i]; | ||||
arrData.tableId = vouerId; | arrData.tableId = vouerId; | ||||
wx.uploadFile({ | wx.uploadFile({ | ||||
url: API.URL_GET_UPLOAD, | |||||
url: wx.getStorageSync('dressCode')+API.URL_GET_UPLOAD, | |||||
filePath: arrData.file, | filePath: arrData.file, | ||||
name: 'file', | name: 'file', | ||||
header: { | header: { | ||||
@@ -454,9 +454,11 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
wx.hideLoading(); | |||||
wx.showToast({ | wx.showToast({ | ||||
title: '修改成功', | |||||
title: codeStr == 1 ? '保存成功':'提交成功', | |||||
icon: 'success', | icon: 'success', | ||||
mask:true, | |||||
duration: 2000 | duration: 2000 | ||||
}) | }) | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -477,23 +479,17 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
imgPreviewImage(e){ | imgPreviewImage(e){ | ||||
let currentImgList = e.currentTarget.dataset; | |||||
//获取当前附件列表 | |||||
let currentStatus = this.data[currentImgList.status]; | |||||
//当前选中图片index | |||||
let currentIndex = currentImgList.id; | |||||
let imgList = [] | |||||
for(let i = 0; i<currentStatus.length; i++){ | |||||
imgList.push(currentStatus[i].file) | |||||
} | |||||
let array = []; | |||||
console.log(e); | |||||
e.currentTarget.dataset.option.forEach(item=>{ | |||||
array.push(item.tempFilePath) | |||||
}) | |||||
console.log(array); | |||||
wx.previewImage({ | wx.previewImage({ | ||||
current: imgList[currentIndex], // 当前显示图片的http链接 | |||||
urls: imgList // 需要预览的图片http链接列表 | |||||
urls: array, | |||||
showmenu:true, | |||||
current:array[e.currentTarget.dataset.index] | |||||
}) | }) | ||||
}, | }, | ||||
@@ -1,7 +1,7 @@ | |||||
<!--pages/apply/index.wxml--> | <!--pages/apply/index.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'}};">修改收入登记</text> | |||||
</view> | </view> | ||||
<!-- 付款单位开始 --> | <!-- 付款单位开始 --> | ||||
<view class="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
@@ -76,23 +76,23 @@ | |||||
</picker> --> | </picker> --> | ||||
</van-popup> | </van-popup> | ||||
<view class="flex-block"><text class="rules no">单据编码</text> <input class="wrap" bindinput="inputChange" data-prop="formData.billNum" value="{{formData.billNum}}" placeholder="请输入单据编码"/></view> | <view class="flex-block"><text class="rules no">单据编码</text> <input class="wrap" bindinput="inputChange" data-prop="formData.billNum" value="{{formData.billNum}}" placeholder="请输入单据编码"/></view> | ||||
<view class="flex-block"> | |||||
<text class="rules no">对方科目</text> | |||||
<view class="wrap" bindtap="selectKM"> | |||||
<text wx:if="{{formData.subjectNameAll==''||formData.subjectNameAll==null}}" class="color-gray">请选择对方科目</text> | |||||
<text wx:else>{{formData.subjectNameAll}}</text> | |||||
</view> | |||||
<van-popup show="{{showKm}}" round position="bottom" bind:close="closeBoxKM" > | |||||
<van-picker | |||||
columns="{{subjectOptions}}" | |||||
show-toolbar | |||||
value-key="subjectNameAll" | |||||
bind:cancel="closeBoxKM" | |||||
bind:confirm="onConfirmContractionKm" | |||||
/> | |||||
</van-popup> | |||||
<!-- <view class="flex-block"> | |||||
<text class="rules no">对方科目</text> | |||||
<view class="wrap" bindtap="selectKM"> | |||||
<text wx:if="{{formData.subjectNameAll==''||formData.subjectNameAll==null}}" class="color-gray">请选择对方科目</text> | |||||
<text wx:else>{{formData.subjectNameAll}}</text> | |||||
</view> | </view> | ||||
<van-popup show="{{showKm}}" round position="bottom" bind:close="closeBoxKM" > | |||||
<van-picker | |||||
columns="{{subjectOptions}}" | |||||
show-toolbar | |||||
value-key="subjectNameAll" | |||||
bind:cancel="closeBoxKM" | |||||
bind:confirm="onConfirmContractionKm" | |||||
/> | |||||
</van-popup> | |||||
</view> --> | |||||
<view class="flex-block"><text class="rules">备注说明</text> <input class="wrap" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入备注说明" value="{{formData.accountSummary}}"/></view> | <view class="flex-block"><text class="rules">备注说明</text> <input class="wrap" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入备注说明" value="{{formData.accountSummary}}"/></view> | ||||
<view class="flex-block" wx:if="{{formData.checkedStatus == 4}}"><text class="rules">挂起原因</text> <input class="wrap" bindinput="inputChange" data-prop="formData.remark" placeholder="请输入挂起原因" value="{{formData.remark}}"/></view> | <view class="flex-block" wx:if="{{formData.checkedStatus == 4}}"><text class="rules">挂起原因</text> <input class="wrap" bindinput="inputChange" data-prop="formData.remark" placeholder="请输入挂起原因" value="{{formData.remark}}"/></view> | ||||
</view> | </view> | ||||
@@ -147,7 +147,7 @@ | |||||
<view class="img_box"> | <view class="img_box"> | ||||
<view class="img_list" wx:for="{{item.Pics}}" wx:for-index="childrenIndex" wx:for-item="item2" wx:key="childrenIndex"> | <view class="img_list" wx:for="{{item.Pics}}" wx:for-index="childrenIndex" wx:for-item="item2" wx:key="childrenIndex"> | ||||
<image class="img_li" src="{{item2.tempFilePath}}" bindlongpress="bindlongpressimg" data-status="sjPics" bindtap="imgPreviewImage" data-id='{{childrenIndex}}'></image> | |||||
<image class="img_li" src="{{item2.tempFilePath}}" bindlongpress="bindlongpressimg" data-status="sjPics" bindtap="imgPreviewImage" data-id='{{childrenIndex}}' data-option="{{item.Pics}}" data-index="{{childrenIndex}}" ></image> | |||||
<van-icon name="/image/apply/img_delete.png" data-id="{{childrenIndex}}" data-imgid="{{item2.id}}" size="20px" data-status="uploadOptions[{{index}}]" data-index="{{index}}" bindtap="deleteimg" /> | <van-icon name="/image/apply/img_delete.png" data-id="{{childrenIndex}}" data-imgid="{{item2.id}}" size="20px" data-status="uploadOptions[{{index}}]" data-index="{{index}}" bindtap="deleteimg" /> | ||||
</view> | </view> | ||||
<view class="img_list"> | <view class="img_list"> | ||||
@@ -215,8 +215,8 @@ | |||||
<view class="bottom"> | <view class="bottom"> | ||||
<!-- <view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> --> | <!-- <view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> --> | ||||
<view class="btn1" data-code="1" bindtap="swichAccounting">暂存</view> | |||||
<view class="btn2" data-code="2" bindtap="swichAccounting">提交</view> | |||||
<view class="btn1" data-code="1" bindtap="swichAccounting">保存</view> | |||||
<view class="btn2" data-code="2" bindtap="swichAccounting">保存并提交</view> | |||||
</view> | </view> | ||||
<!-- <view class="main-box table-box" style="margin-top: 30rpx;"> | <!-- <view class="main-box table-box" style="margin-top: 30rpx;"> | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -165,14 +162,14 @@ Page({ | |||||
let fileForm = that.data.fileForm?that.data.fileForm:[]; | let fileForm = that.data.fileForm?that.data.fileForm:[]; | ||||
res2.data.forEach((item2,index2)=>{ | res2.data.forEach((item2,index2)=>{ | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:index+1, | fileType:index+1, | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_cashier_account_flow', | tableName:'t_cashier_account_flow', | ||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
}) | }) | ||||
@@ -77,7 +77,7 @@ Page({ | |||||
}, | }, | ||||
getApprovalItemsById(){ | getApprovalItemsById(){ | ||||
let _this = this | let _this = this | ||||
let url = API.URL_GET_APPROVALITEMSBYID+this.data.itemId | |||||
let url = wx.getStorageSync('dressCode')+API.URL_GET_APPROVALITEMSBYID+this.data.itemId | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
method:"GET", | method:"GET", | ||||
@@ -289,7 +289,7 @@ Page({ | |||||
id:ids, | id:ids, | ||||
status:"1" | status:"1" | ||||
} | } | ||||
let url = API.URL_GET_MOBILEREMOVE | |||||
let url = wx.getStorageSync('dressCode')+API.URL_GET_MOBILEREMOVE | |||||
let _this = this | let _this = this | ||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
@@ -317,7 +317,7 @@ Page({ | |||||
}, | }, | ||||
townList:function(){ | townList:function(){ | ||||
let _this = this | let _this = this | ||||
let url = API.URL_GET_TOWNINFOBYDEPTID+0 | |||||
let url = wx.getStorageSync('dressCode')+API.URL_GET_TOWNINFOBYDEPTID+0 | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
method:"GET", | method:"GET", | ||||
@@ -451,7 +451,7 @@ Page({ | |||||
for (let index = 0; index < list.length; index++) { | for (let index = 0; index < list.length; index++) { | ||||
list[index].approvalTemplateId = _this.data.itemId; | list[index].approvalTemplateId = _this.data.itemId; | ||||
} | } | ||||
let url = API.URL_GET_GETAPPROVALPROCESSADD | |||||
let url = wx.getStorageSync('dressCode')+API.URL_GET_GETAPPROVALPROCESSADD | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
data: list, | data: list, | ||||
@@ -502,7 +502,7 @@ Page({ | |||||
list[index].approvalTemplateId = _this.data.itemId; | list[index].approvalTemplateId = _this.data.itemId; | ||||
} | } | ||||
let url = API.URL_GET_GETAPPROVALPROCESSADD | |||||
let url = wx.getStorageSync('dressCode') + API.URL_GET_GETAPPROVALPROCESSADD | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
data: _this.data.templateDetailList, | data: _this.data.templateDetailList, | ||||
@@ -541,7 +541,7 @@ Page({ | |||||
// }) | // }) | ||||
}, | }, | ||||
requestSubmit:function(){ | requestSubmit:function(){ | ||||
let url = API.URL_POST_APPROVALITEMSSUBMIT+this.data.itemId | |||||
let url = wx.getStorageSync('dressCode')+ API.URL_POST_APPROVALITEMSSUBMIT+this.data.itemId | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
method:"POST", | method:"POST", | ||||
@@ -129,11 +129,9 @@ swichPaymentApply:function(e){ | |||||
var sendData3 = { | var sendData3 = { | ||||
pageNum:'1', | pageNum:'1', | ||||
pageSize:'100', | pageSize:'100', | ||||
accountName:'', | |||||
bankAccountNumber:'', | |||||
status:'N', | |||||
payeeType:'4', | |||||
status:'0', | |||||
method:'GET', | method:'GET', | ||||
accountType:100 | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
@@ -183,13 +181,12 @@ swichPaymentApply:function(e){ | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData3,{ | |||||
UTIL.httpRequest(API.URL_GET_SELECTLIST, sendData3,{ | |||||
success: (res) => { | success: (res) => { | ||||
for (let i = 0; i < res.rows.length; i++) { | for (let i = 0; i < res.rows.length; i++) { | ||||
// if(res.rows[i].bankAccountNumber==null){continue;} | |||||
// res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 "); | |||||
res.rows[i].balance = parseFloat(res.rows[i].balance).toFixed(2); | |||||
console.log(res.rows[i].balance) | |||||
res.rows[i].payeeAccount = res.rows[i].payeeAccount.replace(/(\d{4})(?=\d)/g, "$1 "); | |||||
res.rows[i].payeePaymentLines = Number(res.rows[i].payeePaymentLines).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, ""); | |||||
} | } | ||||
that.setData({ | that.setData({ | ||||
accountListGWK:res.rows | accountListGWK:res.rows | ||||
@@ -62,22 +62,24 @@ | |||||
<!-- <van-empty wx:if="{{accountList.length == 0}}" description="暂无银行账户" /> --> | <!-- <van-empty wx:if="{{accountList.length == 0}}" description="暂无银行账户" /> --> | ||||
</van-tab> | </van-tab> | ||||
<!-- <van-tab title="公务卡"> | |||||
<van-tab title="公务卡"> | |||||
<!-- wx:for="{{accountListGWK}}" wx:key="index" --> | |||||
<view class="bank_box" wx:for="{{accountListGWK}}" wx:key="index"> | <view class="bank_box" wx:for="{{accountListGWK}}" wx:key="index"> | ||||
<view class="bank_content gwk"> | <view class="bank_content gwk"> | ||||
<view class="bankName"> | <view class="bankName"> | ||||
<image src="../../image/apply/icon_GWK.png" style="width: 25px" mode="widthFix"></image> | <image src="../../image/apply/icon_GWK.png" style="width: 25px" mode="widthFix"></image> | ||||
<text>公务卡</text> | <text>公务卡</text> | ||||
</view> | </view> | ||||
<view style="margin-top: 2vh;">6217 0021 9000 7972 186<text>卡号</text></view> | |||||
<view>可用余额</view> | |||||
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">10,288.83</view> | |||||
<view style="margin-top: 2vh;">{{item.payeeAccount}}<text>卡号</text></view> | |||||
<view>{{item.bankDeposit}}</view> | |||||
<!-- <view>可用余额</view> | |||||
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">{{item.payeePaymentLines}}</view> --> | |||||
</view> | </view> | ||||
<view class="holder">持有人:王强</view> | |||||
<view class="holder">持有人:{{item.payee}}</view> | |||||
</view> | </view> | ||||
</van-tab> --> | |||||
</van-tab> | |||||
</van-tabs> | </van-tabs> | ||||
</view> | </view> | ||||
@@ -41,27 +41,27 @@ | |||||
padding: 2vh; | padding: 2vh; | ||||
} | } | ||||
.XJ{ | .XJ{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_XJ.png') no-repeat center; | |||||
background:url('https://www.nongshen.net/static/wechat/bg_XJ.png') no-repeat center; | |||||
background-size: 105% 105%; | background-size: 105% 105%; | ||||
} | } | ||||
.ICBC{ | .ICBC{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_ICBC.png') no-repeat center; | |||||
background:url('https://www.nongshen.net/static/wechat/bg_ICBC.png') no-repeat center; | |||||
background-size: 105% 105%; | background-size: 105% 105%; | ||||
} | } | ||||
.ABC{ | .ABC{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_ABC.png') no-repeat center; | |||||
background:url('https://www.nongshen.net/static/wechat/bg_ABC.png') no-repeat center; | |||||
background-size: 105% 105%; | background-size: 105% 105%; | ||||
} | } | ||||
.CCB{ | .CCB{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_CCB.png') no-repeat center; | |||||
background:url('https://www.nongshen.net/static/wechat/bg_CCB.png') no-repeat center; | |||||
background-size: 105% 105%; | background-size: 105% 105%; | ||||
} | } | ||||
.RCB{ | .RCB{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_RCB.png') no-repeat center; | |||||
background:url('https://www.nongshen.net/static/wechat/bg_RCB.png') no-repeat center; | |||||
background-size: 105% 105%; | background-size: 105% 105%; | ||||
} | } | ||||
.gwk{ | .gwk{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_GWK.png') no-repeat center; | |||||
background:url('https://www.nongshen.net/static/wechat/bg_GWK.png') no-repeat center; | |||||
background-size: 105% 105%; | background-size: 105% 105%; | ||||
} | } | ||||
.addBtn{ | .addBtn{ | ||||
@@ -131,7 +131,7 @@ | |||||
border-top-left-radius: 30px; | border-top-left-radius: 30px; | ||||
border-bottom-left-radius: 30px; | border-bottom-left-radius: 30px; | ||||
position:absolute; | position:absolute; | ||||
bottom:20%; | |||||
top: 2vh; | |||||
right:0; | right:0; | ||||
} | } | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -213,6 +210,7 @@ Page({ | |||||
templateModel:JSON.parse(options.option), | templateModel:JSON.parse(options.option), | ||||
formType:options.type, | formType:options.type, | ||||
}) | }) | ||||
var perames = { | var perames = { | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:999, | pageSize:999, | ||||
@@ -225,6 +223,7 @@ Page({ | |||||
// 付款方列表 | // 付款方列表 | ||||
UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { | UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
that.setData({ | that.setData({ | ||||
accountOptions:res.rows, | accountOptions:res.rows, | ||||
["form.transfers[0].applyDate"]: UTIL.formatDate(new Date()), | ["form.transfers[0].applyDate"]: UTIL.formatDate(new Date()), | ||||
@@ -240,8 +239,19 @@ Page({ | |||||
list.applyData.transfers[i].payeeList.forEach((item2,index2)=>{ | list.applyData.transfers[i].payeeList.forEach((item2,index2)=>{ | ||||
list.applyData.transfers[i].payeeList[index2].incomeAmount = parseFloat(0).toFixed(2); | list.applyData.transfers[i].payeeList[index2].incomeAmount = parseFloat(0).toFixed(2); | ||||
}) | }) | ||||
console.log(that.data.capitalExpenditureTypeOptions); | |||||
list.applyData.transfers[i].balance = that.data.accountOptions.filter(function (e) { return e.accountName == list.applyData.transfers[i].payer; })[0].balance; | |||||
console.log(list.applyData.transfers[i].payeeList.length); | |||||
if (list.applyData.transfers[i].payeeList.length > 1) { | |||||
list.applyData.transfers[i].payeeList = [{//收款方账户集合 | |||||
payeeId:'0',//收款方id | |||||
payee:'',//收款方 | |||||
bankDeposit:'',//开户行 | |||||
incomeAmount:'',//收入金额 | |||||
bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | |||||
payeeAccount:'',//收款账户 | |||||
}]; | |||||
} | |||||
// console.log(that.data.capitalExpenditureTypeOptions); | |||||
list.applyData.transfers[i].capitalExpenditureTypeText = UTIL.getTransform(list.applyData.transfers[i].capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | list.applyData.transfers[i].capitalExpenditureTypeText = UTIL.getTransform(list.applyData.transfers[i].capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | ||||
list.applyData.transfers[i].transferTypeText = UTIL.getTransform(list.applyData.transfers[i].paymentPattern,that.data.transferTypeOptions); | list.applyData.transfers[i].transferTypeText = UTIL.getTransform(list.applyData.transfers[i].paymentPattern,that.data.transferTypeOptions); | ||||
@@ -330,7 +340,7 @@ Page({ | |||||
// let list2 = []; | // let list2 = []; | ||||
// res.data.forEach((item2,index2)=>{ | // res.data.forEach((item2,index2)=>{ | ||||
// wx.downloadFile({ | // wx.downloadFile({ | ||||
// url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
// url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
// success (response) { | // success (response) { | ||||
// if (response.statusCode === 200) { | // if (response.statusCode === 200) { | ||||
// fileForm.push({ | // fileForm.push({ | ||||
@@ -370,7 +380,7 @@ Page({ | |||||
// res.data.forEach((item2,index2)=>{ | // res.data.forEach((item2,index2)=>{ | ||||
// wx.downloadFile({ | // wx.downloadFile({ | ||||
// url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
// url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
// success (response) { | // success (response) { | ||||
// if (response.statusCode === 200) { | // if (response.statusCode === 200) { | ||||
// fileForm.push({ | // fileForm.push({ | ||||
@@ -409,7 +419,7 @@ Page({ | |||||
// res.data.forEach((item2,index2)=>{ | // res.data.forEach((item2,index2)=>{ | ||||
// wx.downloadFile({ | // wx.downloadFile({ | ||||
// url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
// url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
// success (response) { | // success (response) { | ||||
// if (response.statusCode === 200) { | // if (response.statusCode === 200) { | ||||
// fileForm.push({ | // fileForm.push({ | ||||
@@ -462,6 +472,22 @@ Page({ | |||||
},3000) | },3000) | ||||
}else if(options.id && options.type != 'template'){ | }else if(options.id && options.type != 'template'){ | ||||
UTIL.showLoadingHaveMask(); | UTIL.showLoadingHaveMask(); | ||||
var perames = { | |||||
pageNum:1, | |||||
pageSize:999, | |||||
accountType:'102', | |||||
method:'POST' | |||||
} | |||||
// 付款方列表 | |||||
UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { | |||||
success: (res) => { | |||||
console.log(res); | |||||
that.setData({ | |||||
accountOptions:res.rows, | |||||
}) | |||||
} | |||||
}) | |||||
setTimeout(function(){ | setTimeout(function(){ | ||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMS+options.id, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_APPROVALITEMS+options.id, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
@@ -474,12 +500,15 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
applyDate: res.data.transfers[0].applyDate, | applyDate: res.data.transfers[0].applyDate, | ||||
}) | }) | ||||
res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | ||||
console.log(item.paymentPattern); | |||||
console.log(that.data.transferTypeOptions); | |||||
console.log(that.data.accountOptions); | |||||
console.log(res.data.transfers[index].payer); | |||||
console.log(that.data.accountOptions.filter(function (e) { return e.accountName == res.data.transfers[index].payer; })); | |||||
res.data.transfers[index].balance = that.data.accountOptions.filter(function (e) { return e.accountName == res.data.transfers[index].payer; })[0].balance; | |||||
res.data.transfers[index].cashierType = res.data.transfers[index].cashierId != '' && res.data.transfers[index].cashierId != null && res.data.transfers[index].cashierId != null ? 'edit':'add' ; | res.data.transfers[index].cashierType = res.data.transfers[index].cashierId != '' && res.data.transfers[index].cashierId != null && res.data.transfers[index].cashierId != null ? 'edit':'add' ; | ||||
res.data.transfers[index].transferTypeText = UTIL.getTransform(item.paymentPattern,that.data.transferTypeOptions); | res.data.transfers[index].transferTypeText = UTIL.getTransform(item.paymentPattern,that.data.transferTypeOptions); | ||||
@@ -565,14 +594,14 @@ Page({ | |||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:'1', | fileType:'1', | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_yinnong_transfer', | tableName:'t_yinnong_transfer', | ||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
that.setData({ | that.setData({ | ||||
@@ -599,14 +628,14 @@ Page({ | |||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:'2', | fileType:'2', | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_yinnong_transfer', | tableName:'t_yinnong_transfer', | ||||
tableId:item.id | tableId:item.id | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
that.setData({ | that.setData({ | ||||
@@ -631,14 +660,14 @@ Page({ | |||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
fileForm.push({ | fileForm.push({ | ||||
file: URL_PREFIX+item2.fileUrl, | |||||
file: wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
fileType:'3', | fileType:'3', | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_yinnong_transfer', | tableName:'t_yinnong_transfer', | ||||
tableId:item.id | tableId:item.id | ||||
}) | }) | ||||
list.push({ | list.push({ | ||||
tempFilePath:URL_PREFIX+item2.fileUrl, | |||||
tempFilePath:wx.getStorageSync('dressCode')+item2.fileUrl, | |||||
id:item2.id | id:item2.id | ||||
}) | }) | ||||
that.setData({ | that.setData({ | ||||
@@ -679,13 +708,11 @@ Page({ | |||||
pageSize:999, | pageSize:999, | ||||
accountType:'102', | accountType:'102', | ||||
method:'post', | method:'post', | ||||
params: { | |||||
"townAccountType":"0" | |||||
} | |||||
} | } | ||||
// 付款方列表 | // 付款方列表 | ||||
UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { | UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
that.setData({ | that.setData({ | ||||
accountOptions:res.rows, | accountOptions:res.rows, | ||||
["form.transfers[0].applyDate"]: UTIL.formatDate(new Date()), | ["form.transfers[0].applyDate"]: UTIL.formatDate(new Date()), | ||||
@@ -776,10 +803,19 @@ Page({ | |||||
[event.currentTarget.dataset.name]: false, | [event.currentTarget.dataset.name]: false, | ||||
[event.currentTarget.dataset.value+'.payer']: event.detail.value.accountName, | [event.currentTarget.dataset.value+'.payer']: event.detail.value.accountName, | ||||
[event.currentTarget.dataset.value+'.cashierId']: event.detail.value.id, | [event.currentTarget.dataset.value+'.cashierId']: event.detail.value.id, | ||||
[event.currentTarget.dataset.value+'.payerAccount']: event.detail.value.bankAccountNumber, | |||||
[event.currentTarget.dataset.value+'.bankAccountNumber']: event.detail.value.bankAccountNumber, | |||||
[event.currentTarget.dataset.value+'.bankTypeText']: UTIL.getTransform(event.detail.value.bankType,that.data.bankTypeOptions), | [event.currentTarget.dataset.value+'.bankTypeText']: UTIL.getTransform(event.detail.value.bankType,that.data.bankTypeOptions), | ||||
[event.currentTarget.dataset.value+'.bankType']: event.detail.value.bankType, | [event.currentTarget.dataset.value+'.bankType']: event.detail.value.bankType, | ||||
[event.currentTarget.dataset.value+'.payerAccount']:event.detail.value.balance, | |||||
[event.currentTarget.dataset.value+'.payerAccount']:event.detail.value.bankAccountNumber, | |||||
[event.currentTarget.dataset.value+'.balance']:event.detail.value.balance, | |||||
[event.currentTarget.dataset.value+'.payeeList'] : [{//收款方账户集合 | |||||
payeeId:'0',//收款方id | |||||
payee:'',//收款方 | |||||
bankDeposit:'',//开户行 | |||||
incomeAmount:'',//收入金额 | |||||
bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | |||||
payeeAccount:'',//收款账户 | |||||
}] | |||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
@@ -977,7 +1013,7 @@ Page({ | |||||
}, | }, | ||||
goPayee(event){ | goPayee(event){ | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: 'payeeList/payee?options='+JSON.stringify(event.currentTarget.dataset.option) | |||||
url: '/pages/pay/payee/payee?options='+JSON.stringify(event.currentTarget.dataset.option) | |||||
}) | }) | ||||
}, | }, | ||||
onChange(event){ | onChange(event){ | ||||
@@ -1067,12 +1103,17 @@ Page({ | |||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
this.setData({ | this.setData({ | ||||
// ["form.transfers["+event.currentTarget.dataset.index+"].payeeList["+event.currentTarget.dataset.childrenindex+"].incomeAmount"]: event.detail, | // ["form.transfers["+event.currentTarget.dataset.index+"].payeeList["+event.currentTarget.dataset.childrenindex+"].incomeAmount"]: event.detail, | ||||
["form.transfers["+event.currentTarget.dataset.index+"].payeeList[0].incomeAmount"]: event.detail, | ["form.transfers["+event.currentTarget.dataset.index+"].payeeList[0].incomeAmount"]: event.detail, | ||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail, | ["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail, | ||||
// ["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail, | // ["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail, | ||||
}) | }) | ||||
if(event.detail == ''){ | |||||
that.data.form.transfers[event.currentTarget.dataset.index].payeeList[0].incomeAmount = parseFloat(0).toFixed(2); | |||||
that.data.form.transfers[event.currentTarget.dataset.index].expenditureAmount = parseFloat(0).toFixed(2); | |||||
} | |||||
console.log(that.data.form); | console.log(that.data.form); | ||||
var moneyCount = 0 ; | var moneyCount = 0 ; | ||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | for (let i = 0; i < that.data.form.transfers.length; i++) { | ||||
@@ -1087,12 +1128,9 @@ Page({ | |||||
// }) | // }) | ||||
} | } | ||||
} | } | ||||
console.log(moneyCount.toFixed(2)); | |||||
this.setData({ | this.setData({ | ||||
["form.approvalItemTemplate.totalAmount"]:moneyCount.toFixed(2), | ["form.approvalItemTemplate.totalAmount"]:moneyCount.toFixed(2), | ||||
}) | }) | ||||
console.log(that.data.form); | |||||
console.log(allCount.toFixed(2)); | |||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
@@ -1250,7 +1288,7 @@ Page({ | |||||
that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id | that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id | ||||
const element = that.data.form.transfers[j].fileForm[i]; | const element = that.data.form.transfers[j].fileForm[i]; | ||||
wx.uploadFile({ | wx.uploadFile({ | ||||
url: API.URL_GET_UPLOAD, | |||||
url: wx.getStorageSync('dressCode')+API.URL_GET_UPLOAD, | |||||
filePath: element.file, | filePath: element.file, | ||||
name: 'file', | name: 'file', | ||||
header: { | header: { | ||||
@@ -58,7 +58,7 @@ | |||||
<van-cell title="{{item.payeeList[0].payee}}" wx:if="{{form.transfers[index].payeeList.length < 2}}" center border="{{ false }}"> | <van-cell title="{{item.payeeList[0].payee}}" wx:if="{{form.transfers[index].payeeList.length < 2}}" center border="{{ false }}"> | ||||
<view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | <view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="共{{form.transfers[index].payeeList.length}}条" wx:if="{{form.transfers[index].payeeList.length > 2}}" center border="{{ false }}"> | |||||
<van-cell title="共{{form.transfers[index].payeeList.length}}条" wx:if="{{form.transfers[index].payeeList.length > 1}}" center border="{{ false }}"> | |||||
<view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | <view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | ||||
</van-cell> | </van-cell> | ||||
<view class="btnBox"> | <view class="btnBox"> | ||||
@@ -221,6 +221,7 @@ | |||||
<block wx:else> | <block wx:else> | ||||
<van-field required readonly label="付款账号" value="{{ form.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field required readonly label="付款账号" value="{{ form.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
<van-field required readonly label="所属银行" value="{{ form.transfers[index].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field required readonly label="所属银行" value="{{ form.transfers[index].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
<van-field readonly label="可用余额(元)" value="{{ form.transfers[index].balance }}" placeholder="可用余额" border="{{ false }}" input-align="right"/> | |||||
</block> | </block> | ||||
</view> | </view> | ||||
@@ -276,7 +277,7 @@ | |||||
<van-collapse-item name="{{childrenIndex}}" wx:for="{{form.transfers[index].payeeList}}" wx:if="{{childrenIndex<10}}" wx:for-index="childrenIndex" wx:key="payeeId"> | <van-collapse-item name="{{childrenIndex}}" wx:for="{{form.transfers[index].payeeList}}" wx:if="{{childrenIndex<10}}" wx:for-index="childrenIndex" wx:key="payeeId"> | ||||
<view slot="title"> | <view slot="title"> | ||||
{{ form.transfers[index].payeeList[childrenIndex].payee }}<van-tag wx:if="{{ form.transfers[index].activeName == childrenIndex && form.transfers[index].activeName != '' }}" plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款人</van-tag> | |||||
{{ form.transfers[index].payeeList[childrenIndex].payee }}<van-tag wx:if="{{ form.transfers[index].activeName == childrenIndex && form.transfers[index].activeName != '' }}" plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag> | |||||
</view> | </view> | ||||
<view slot="value" wx:if="{{ form.transfers[index].activeName != childrenIndex }}"> | <view slot="value" wx:if="{{ form.transfers[index].activeName != childrenIndex }}"> | ||||
¥{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }} | ¥{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }} | ||||
@@ -56,6 +56,11 @@ Page({ | |||||
isPeers:'' | isPeers:'' | ||||
}) | }) | ||||
} | } | ||||
if (options.bankType == '5') { | |||||
this.setData({ | |||||
isPeers:'' | |||||
}) | |||||
} | |||||
}, | }, | ||||
/** | /** | ||||
@@ -73,6 +78,7 @@ Page({ | |||||
}, | }, | ||||
uploadFile(e){ | uploadFile(e){ | ||||
var that = this; | var that = this; | ||||
console.log(that.data.isPeers); | |||||
wx.chooseMessageFile({ | wx.chooseMessageFile({ | ||||
count: 1, | count: 1, | ||||
type: 'file', | type: 'file', | ||||
@@ -85,7 +91,7 @@ Page({ | |||||
// tempFilePath可以作为 img 标签的 src 属性显示图片 | // tempFilePath可以作为 img 标签的 src 属性显示图片 | ||||
const tempFilePaths = res.tempFiles | const tempFilePaths = res.tempFiles | ||||
wx.uploadFile({ | wx.uploadFile({ | ||||
url: API.URL_GET_UPLOADFILE, | |||||
url: wx.getStorageSync('dressCode') + API.URL_GET_UPLOADFILE, | |||||
filePath: tempFilePaths[0].path, | filePath: tempFilePaths[0].path, | ||||
name: 'file', | name: 'file', | ||||
header: { | header: { | ||||
@@ -125,6 +131,7 @@ Page({ | |||||
// }) | // }) | ||||
}, | }, | ||||
fail(res){ | fail(res){ | ||||
console.log(res); | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
@@ -156,7 +163,8 @@ Page({ | |||||
prevPage.setData({ | prevPage.setData({ | ||||
["form.transfers["+that.data.index+"].payeeList"]: that.data.payeeList,//将想要传的信息赋值给上一个页面data中的值 | ["form.transfers["+that.data.index+"].payeeList"]: that.data.payeeList,//将想要传的信息赋值给上一个页面data中的值 | ||||
["form.transfers["+that.data.index+"].expenditureAmount"]: moneyCount.toFixed(2), | ["form.transfers["+that.data.index+"].expenditureAmount"]: moneyCount.toFixed(2), | ||||
["form.approvalItemTemplate.totalAmount"]:totalAmount.toFixed(2) | |||||
["form.approvalItemTemplate.totalAmount"]:totalAmount.toFixed(2), | |||||
["form.transfers["+that.data.index+"].amountReadonly"]:true | |||||
}) | }) | ||||
that.back() | that.back() | ||||
} | } | ||||
@@ -33,7 +33,7 @@ | |||||
</van-cell> | </van-cell> | ||||
</view> | </view> | ||||
<view class="main-box" wx:if="{{!showBox}}"> | |||||
<view class="main-box" wx:if="{{!showBox && bankType != 5 }}"> | |||||
<van-cell title="是否同行" center border="{{false}}"> | <van-cell title="是否同行" center border="{{false}}"> | ||||
<view style="float: right;"> | <view style="float: right;"> | ||||
<van-radio-group | <van-radio-group | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -236,7 +233,7 @@ Page({ | |||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
wx.downloadFile({ | wx.downloadFile({ | ||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | success (response) { | ||||
if (response.statusCode === 200) { | if (response.statusCode === 200) { | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
@@ -278,7 +275,7 @@ Page({ | |||||
let list = []; | let list = []; | ||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
wx.downloadFile({ | wx.downloadFile({ | ||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | success (response) { | ||||
if (response.statusCode === 200) { | if (response.statusCode === 200) { | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
@@ -317,7 +314,7 @@ Page({ | |||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
wx.downloadFile({ | wx.downloadFile({ | ||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | success (response) { | ||||
if (response.statusCode === 200) { | if (response.statusCode === 200) { | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -95,7 +92,7 @@ Page({ | |||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
wx.downloadFile({ | wx.downloadFile({ | ||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | success (response) { | ||||
if (response.statusCode === 200) { | if (response.statusCode === 200) { | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
@@ -137,7 +134,7 @@ Page({ | |||||
let list = []; | let list = []; | ||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
wx.downloadFile({ | wx.downloadFile({ | ||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | success (response) { | ||||
if (response.statusCode === 200) { | if (response.statusCode === 200) { | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
@@ -176,7 +173,7 @@ Page({ | |||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
res.data.forEach((item2,index2)=>{ | res.data.forEach((item2,index2)=>{ | ||||
wx.downloadFile({ | wx.downloadFile({ | ||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
url: wx.getStorageSync('dressCode')+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | success (response) { | ||||
if (response.statusCode === 200) { | if (response.statusCode === 200) { | ||||
let fileForm = item.fileForm?item.fileForm:[]; | let fileForm = item.fileForm?item.fileForm:[]; | ||||
@@ -45,7 +45,7 @@ Page({ | |||||
UTIL.httpRequest(API.URL_GET_DEPOSITDETAIL + this.data.id, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_DEPOSITDETAIL + this.data.id, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
this.setData({'form':res.data}) | this.setData({'form':res.data}) | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type_all', {method:'GET'}, { | |||||
success: (r) => { | success: (r) => { | ||||
if(r.data.length>0){ | if(r.data.length>0){ | ||||
that.setData({ | that.setData({ | ||||
@@ -63,7 +63,7 @@ Page({ | |||||
}) | }) | ||||
}else{ | }else{ | ||||
let that = this | let that = this | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type_all', {method:'GET'}, { | |||||
success: (r) => { | success: (r) => { | ||||
if(r.data.length>0){ | if(r.data.length>0){ | ||||
that.setData({ | that.setData({ | ||||
@@ -90,7 +90,7 @@ Page({ | |||||
onShow() { | onShow() { | ||||
var that = this; | var that = this; | ||||
//所属银行 | //所属银行 | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type_all', {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
this.setData({ | this.setData({ | ||||
bankTypeOptions:res.data | bankTypeOptions:res.data | ||||
@@ -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'}};height: 19.0909px;" mode="widthFix" bindtap="back"></image> | <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};height: 19.0909px;" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"":"新增"}}开户行</text> | |||||
<text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"修改":"新增"}}开户行</text> | |||||
</view> | </view> | ||||
<view class="main-box table-box table-boxs" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box table-box table-boxs" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
@@ -0,0 +1,186 @@ | |||||
// pages/bank/bank.js | |||||
import * as UTIL from '../../utils/util.js'; | |||||
import * as API from '../../utils/API.js'; | |||||
const app = getApp(); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
isIPX: app.globalData.isIPX, | |||||
depositList:[], | |||||
bankTypeOptions:[], | |||||
value:"", | |||||
scrollHeight:'', | |||||
itemId:'', | |||||
itemIndex:'' | |||||
}, | |||||
goAdd(){ | |||||
wx.navigateTo({ | |||||
url: 'add/add', | |||||
}) | |||||
}, | |||||
back:function(){ | |||||
wx.navigateBack({ | |||||
delta: 1 | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad(options) { | |||||
var _this = this; | |||||
_this.setData({banktype:options.banktype}) | |||||
let qu = wx.createSelectorQuery() | |||||
qu.select("#top_view2").boundingClientRect() | |||||
qu.exec(res => { | |||||
_this.setData({ | |||||
scrollHeight:wx.getSystemInfoSync().windowHeight-res[0].top | |||||
}) | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady() { | |||||
this.onShow(); | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow() { | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
//所属银行 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
bankTypeOptions:res.data, | |||||
}); | |||||
let param = { | |||||
'bankDeposit':that.data.value, | |||||
bankType:that.data.banktype | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_DEPOSITLIST, param,{ | |||||
success: (response) => { | |||||
if (response.code == API.SUCCESS_CODE) { | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
response.rows[i].bankTypeText = UTIL.getTransform(response.rows[i].bankType,res.data); | |||||
response.rows[i].payeePaymentLinesShow = response.rows[i].payeePaymentLines.substr(0,4)+'****' | |||||
} | |||||
that.setData({ | |||||
depositList:response.rows | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
},1000) | |||||
}, | |||||
goSearch(e){ | |||||
this.setData({'value':e.detail}) | |||||
this.onShow() | |||||
}, | |||||
delete(e){ | |||||
this.setData({ | |||||
'itemId':e.currentTarget.dataset.id, | |||||
'itemIndex':e.currentTarget.dataset.index, | |||||
"showPopupDel":true | |||||
}); | |||||
}, | |||||
cancelTemDel:function(e){ | |||||
this.setData({ | |||||
"itemId":"", | |||||
"itemIndex":"", | |||||
"showPopupDel":false | |||||
}); | |||||
}, | |||||
confirmTemDel:function(e){ | |||||
this.setData({ | |||||
"showPopupDel":false | |||||
}); | |||||
UTIL.httpRequest(API.URL_GET_DEPOSITDELETE+this.data.itemId , {method:'GET'}, { | |||||
success: (res) => { | |||||
if(res.code==200){ | |||||
let new_list = this.data.depositList | |||||
new_list.splice(this.data.itemIndex,1) | |||||
this.setData({'depositList':new_list}) | |||||
UTIL.showToastNoneIcon('删除成功!'); | |||||
}else{ | |||||
UTIL.showToastNoneIcon('删除失败!'); | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goUpdate(e){ | |||||
wx.navigateTo({ | |||||
url: 'add/add?id='+ e.currentTarget.dataset.id, | |||||
}) | |||||
}, | |||||
onChange(event) { | |||||
console.log(event); | |||||
this.setData({ | |||||
result: event.detail, | |||||
}); | |||||
}, | |||||
goSubmit(){ | |||||
var that = this; | |||||
if(that.data.result == ''){ | |||||
UTIL.showToastNoneIcon('请选择一个开户行!'); | |||||
return; | |||||
} | |||||
console.log(that.data.result); | |||||
let array = that.data.depositList.filter(function (e) { return e.id == that.data.result; }); | |||||
console.log(array); | |||||
let pages = getCurrentPages(); | |||||
let currentPage = null; //当前页面 | |||||
let prevPage = null; //上一个页面 | |||||
currentPage = pages[pages.length - 1]; //获取当前页面,将其赋值 | |||||
prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | |||||
if (prevPage) { | |||||
prevPage.setData({ | |||||
["form.bankDeposit"]: array[0].bankDeposit,//将想要传的信息赋值给上一个页面data中的值 | |||||
["form.payeePaymentLines"]:array[0].payeePaymentLines | |||||
}) | |||||
that.back() | |||||
} | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload() { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh() { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom() { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage() { | |||||
} | |||||
}) |
@@ -0,0 +1,13 @@ | |||||
{ | |||||
"usingComponents": { | |||||
"van-checkbox": "@vant/weapp/checkbox/index", | |||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index", | |||||
"van-cell": "@vant/weapp/cell/index", | |||||
"van-cell-group": "@vant/weapp/cell-group/index", | |||||
"van-search": "@vant/weapp/search/index", | |||||
"van-radio": "@vant/weapp/radio/index", | |||||
"van-radio-group": "@vant/weapp/radio-group/index", | |||||
"van-swipe-cell": "@vant/weapp/swipe-cell/index", | |||||
"van-empty": "@vant/weapp/empty/index" | |||||
} | |||||
} |
@@ -0,0 +1,70 @@ | |||||
<!--pages/bank/bank.wxml--> | |||||
<view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | |||||
<image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};height: 19.0909px;" mode="widthFix" bindtap="back"></image> | |||||
<text style="top:{{isIPX?'54px':'30px'}};">开户行</text> | |||||
</view> | |||||
<view class="search_box" id="top_view" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<van-search | |||||
value="{{ value }}" | |||||
shape="round" | |||||
background="transparent" | |||||
placeholder="请输入开户行名称" | |||||
clearable | |||||
bind:change="goSearch" | |||||
/> | |||||
<view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||||
</view> | |||||
<scroll-view scroll-y refresher-threshold="0" id="top_view2" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100"> | |||||
<van-radio-group value="{{ result }}" bind:change="onChange"> | |||||
<van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{depositList}}" wx:key="index" wx:for-item="item"> | |||||
<view class="li" bindtap="goUpdate" data-id="{{item.id}}"> | |||||
<van-radio | |||||
catch:tap="noop" | |||||
checked-color="#2C8E68" | |||||
class="checkboxes-{{ index }}" | |||||
name="{{ item.id }}" | |||||
/> | |||||
<view style="flex: 1;"> | |||||
<view class="tit_box"> | |||||
<image src="/image/apply/{{iOf.indexOf(item.bankTypeText,'中国银行') > -1 ? 'ICBC':iOf.indexOf(item.bankTypeText,'农商行') > -1 ? 'RCB':iOf.indexOf(item.bankTypeText,'农业银行') > -1 ? 'ABC':iOf.indexOf(item.bankTypeText,'建设银行') > -1 ? 'CCB':'QT'}}.png" style="width: 25px;height: 25px;"></image> | |||||
<text class="tit">{{item.bankDeposit}}</text> | |||||
</view> | |||||
<view class="detail_box"> | |||||
<view style="width: 35%;">{{item.bankTypeText}}</view> | |||||
<view style="width: 30%;display: flex;justify-content: center;"> | |||||
<image src="/image/icon/dress.png" style="width: 9px;height: 12px;margin-right: 5px;"></image> | |||||
<text>{{item.sheng+item.shi}}</text> | |||||
</view> | |||||
<view><text>联行号:{{item.payeePaymentLinesShow}}</text></view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view slot="right" class="deleteBox"> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||||
<view> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | |||||
<view> | |||||
<text style="color:red">删除</text> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</van-swipe-cell> | |||||
</van-radio-group> | |||||
<van-empty wx:if="{{depositList.length<1}}" description="暂无开户行" /> | |||||
<view style="height: 70px;"></view> | |||||
</scroll-view> | |||||
<modal hidden="{{!showPopupDel}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTemDel" bindconfirm="confirmTemDel"> | |||||
</modal> | |||||
<view class="bottom"> | |||||
<view class="btn2" bindtap="goSubmit">确认</view> | |||||
</view> | |||||
<wxs module="iOf"> | |||||
var indexOf = function(name,value){ | |||||
return name.indexOf(value); | |||||
} | |||||
module.exports.indexOf = indexOf; | |||||
</wxs> |
@@ -0,0 +1,247 @@ | |||||
/* pages/bank/bank.wxss */ | |||||
.van-search__content { | |||||
border: 1px solid #5CAE77!important; | |||||
background: #fff!important; | |||||
} | |||||
van-search { | |||||
flex: 0.8; | |||||
} | |||||
.search_box{ | |||||
display: flex; | |||||
} | |||||
.add_btn{ | |||||
flex: 0.2; | |||||
padding: var(--search-padding,10px 12px); | |||||
padding-left: 0; | |||||
} | |||||
.add_btn text{ | |||||
background-color: #62AD66; | |||||
display: block; | |||||
height: 100%; | |||||
text-align: center; | |||||
line-height: 36px; | |||||
color: #fff; | |||||
border-radius: 36px; | |||||
box-shadow: 0px 5px 5px #ddd; | |||||
} | |||||
text{display: block;} | |||||
.work_plan{ | |||||
padding: 40rpx 32.5rpx 30rpx; | |||||
display: flex; | |||||
} | |||||
.work_plan .menu_item{ | |||||
background-color: #fff; | |||||
box-shadow: 2px 5px 5px #ddd; | |||||
border-radius: 60rpx; | |||||
text-align: center; | |||||
position: relative; | |||||
margin-right: 20px; | |||||
padding: 8px 10px; | |||||
} | |||||
.work_plan .menu_item.active{ | |||||
background-color: #2C8E68; | |||||
color: #fff; | |||||
} | |||||
.work_plan .menu_item .remind{ | |||||
height: 30rpx; | |||||
background: #e90101; | |||||
color: #fff; | |||||
font-size: 26rpx; | |||||
position: absolute; | |||||
line-height: 30rpx; | |||||
padding:0 10rpx; | |||||
border-radius: 25px; | |||||
top: -10rpx; | |||||
right: -10rpx; | |||||
} | |||||
.work_plan .more{ | |||||
flex: 1; | |||||
text-align: center; | |||||
line-height: 60rpx; | |||||
font-size: 36rpx; | |||||
color: #31936c; | |||||
} | |||||
.deleteBox{ | |||||
width: 65px; | |||||
text-align: center; | |||||
height: 100%; | |||||
background: #F6F6F6; | |||||
align-items: center; | |||||
display: flex; | |||||
} | |||||
.workflow .workflow_list{ | |||||
height: 150rpx; | |||||
background-color: #fff; | |||||
border-radius: 24rpx; | |||||
box-shadow:0rpx 0rpx 10rpx rgba(0,0,0,.1); | |||||
margin-bottom: 20rpx; | |||||
padding:15rpx 25rpx 10rpx 35rpx; | |||||
} | |||||
.workflow .workflow_list .process_intro{ | |||||
display: flex; | |||||
height: 62rpx; | |||||
align-items: center; | |||||
} | |||||
.workflow .process_intro .name{ | |||||
width: 390rpx; | |||||
font-size: 34rpx; | |||||
margin-right: 30rpx; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
} | |||||
.workflow .process_intro .name .name_tit{ | |||||
width: 290rpx; | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
} | |||||
.van-swipe-cell { | |||||
width: 94%; | |||||
background: #fff; | |||||
border-radius: 10px; | |||||
box-shadow: 2px 5px 5px #ddd; | |||||
margin: 0 auto; | |||||
margin-bottom: 15px; | |||||
} | |||||
.li{ | |||||
width: 100%; | |||||
padding: 14px; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.tit_box{ | |||||
display: flex; | |||||
} | |||||
.detail_box{ | |||||
margin-top: 10px; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
} | |||||
.li view text{ | |||||
/* margin-top: 15px; */ | |||||
} | |||||
.li .detail_box view{ | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.li .detail_box view text{ | |||||
color: #666666; | |||||
font-size: 12px; | |||||
} | |||||
.li view text:nth-child(1){ | |||||
margin-top: 0px; | |||||
} | |||||
.li .fksr{ | |||||
display: flex; | |||||
align-items: center; | |||||
margin-top: 15px; | |||||
color: #2C8E68; | |||||
font-size: 16px; | |||||
} | |||||
.li .wtj{ | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
padding: 3px 8px; | |||||
border-radius: 5px; | |||||
font-size: 14px; | |||||
} | |||||
.no{ | |||||
background-color:#fbe3e3; | |||||
color: #e90000; | |||||
} | |||||
.white{ | |||||
background-color:#feeadc; | |||||
color: #fc9a55; | |||||
} | |||||
.yes{ | |||||
background-color:#ddeee3; | |||||
color: #5cae77; | |||||
} | |||||
.other{ | |||||
background-color:#f0f1f6; | |||||
color: #878787; | |||||
} | |||||
.li .tit{ | |||||
font-size: 16px; | |||||
color: #444444; | |||||
line-height: 25px; | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 1; | |||||
word-break: break-all; | |||||
overflow: hidden; | |||||
} | |||||
.li .fj_name{ | |||||
font-size: 14px; | |||||
color: #B3DB62; | |||||
line-height: 25px; | |||||
} | |||||
.li .time{ | |||||
font-size: 14px; | |||||
color: #9B9CAA; | |||||
} | |||||
.li .money{ | |||||
font-size: 18px; | |||||
color: #5CAE77; | |||||
} | |||||
.van-checkbox__label { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
width: 100%; | |||||
} | |||||
.van-checkbox__icon-wrap { | |||||
border-radius: 5px; | |||||
} | |||||
.van-checkbox__icon { | |||||
border-radius: 5px; | |||||
border: 2px solid #2C8E68!important; | |||||
background-color: rgba(44, 142, 104, 0.2); | |||||
} | |||||
.bottom{ | |||||
width: 100%; | |||||
margin: 0 auto; | |||||
text-align: center; | |||||
padding: 15px 0; | |||||
display: flex; | |||||
position: fixed; | |||||
bottom: 0%; | |||||
background: #fff; | |||||
box-shadow: 0 0 5px #ddd; | |||||
} | |||||
.bottom view { | |||||
width: 47%; | |||||
margin: 0 auto; | |||||
border-radius: 30px; | |||||
display: inline-block; | |||||
} | |||||
.bottom .btn2{ | |||||
border: 1px solid transparent; | |||||
padding: 10px 0px; | |||||
background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||||
color: #fff; | |||||
} | |||||
.downView{ | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
padding: 0 20px; | |||||
border: 1px solid #5CAE77; | |||||
border-radius: 50px; | |||||
background: #fff; | |||||
margin-left: auto; | |||||
} | |||||
.downView image{ | |||||
width: 10px; | |||||
height: 8px; | |||||
margin-left: 10px; | |||||
} |
@@ -1,11 +1,11 @@ | |||||
<!--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'}};height: 19.0909px;" mode="widthFix" bindtap="back"></image> | <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};height: 19.0909px;" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"":"新增"}}银行汇票</text> | |||||
<text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"查看":"新增"}}银行汇票</text> | |||||
</view> | </view> | ||||
<view class="main-box table-box table-boxs" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box table-box table-boxs" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
<van-field label="汇票号码" value="{{ form.orderNum }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderNum"/> | |||||
<van-field readonly="{{form.id ? true:false}}" label="汇票号码" value="{{ form.orderNum }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderNum"/> | |||||
<view class="section" style="margin-top: -28rpx;"> | <view class="section" style="margin-top: -28rpx;"> | ||||
<view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>汇票类型</view> | <view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>汇票类型</view> | ||||
<picker bindchange="onConfirmorderType" value="{{orderTypeindex}}" range="{{orderTypeOptions}}" range-key="{{'dictLabel'}}"> | <picker bindchange="onConfirmorderType" value="{{orderTypeindex}}" range="{{orderTypeOptions}}" range-key="{{'dictLabel'}}"> | ||||
@@ -28,10 +28,10 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field label="汇票类型" value="{{ form.orderTypeText }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderType" is-link arrow-direction ="down" bindtap="openBox" data-name="showOrderType"/> --> | <van-field label="汇票类型" value="{{ form.orderTypeText }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderType" is-link arrow-direction ="down" bindtap="openBox" data-name="showOrderType"/> --> | ||||
<van-field label="出票金额" value="{{ form.orderAmount }}" type="digit" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderAmount"/> | |||||
<van-field readonly="{{form.id ? true:false}}" label="出票金额" value="{{ form.orderAmount }}" type="digit" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderAmount"/> | |||||
<van-field label="付票单位" value="{{ form.billPayUnit }}" placeholder="付票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billPayUnit" /> | |||||
<van-field label="收票单位" value="{{ form.billReceiveUnit }}" placeholder="收票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billReceiveUnit"/> | |||||
<van-field readonly="{{form.id ? true:false}}" label="付票单位" value="{{ form.billPayUnit }}" placeholder="付票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billPayUnit" /> | |||||
<van-field readonly="{{form.id ? true:false}}" label="收票单位" value="{{ form.billReceiveUnit }}" placeholder="收票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billReceiveUnit"/> | |||||
<view class="section" style="margin-top: -28rpx;"> | <view class="section" style="margin-top: -28rpx;"> | ||||
<view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>开票日期</view> | <view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>开票日期</view> | ||||
<picker mode="date" value="{{form.startTime}}" bindchange="onConfirmStartTime"> | <picker mode="date" value="{{form.startTime}}" bindchange="onConfirmStartTime"> | ||||
@@ -57,7 +57,7 @@ | |||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
<van-field label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" data-value="form.remark"/> | |||||
<van-field readonly="{{form.id ? true:false}}" label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" data-value="form.remark"/> | |||||
</view> | </view> | ||||
<view class="bottom" wx:if="{{showBtn}}"> | <view class="bottom" wx:if="{{showBtn}}"> | ||||
<view class="btn2" bindtap="goSubmit">保存</view> | <view class="btn2" bindtap="goSubmit">保存</view> |
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -239,7 +236,7 @@ Page({ | |||||
success: (rr) => { | success: (rr) => { | ||||
if(rr.code==200&&rr.rows.length>0){ | if(rr.code==200&&rr.rows.length>0){ | ||||
rr.rows.map((rrr,index) => { | rr.rows.map((rrr,index) => { | ||||
rrr.url = URL_PREFIX + rrr.fileUrl | |||||
rrr.url = wx.getStorageSync('dressCode') + rrr.fileUrl | |||||
if(index==rr.rows.length-1){ | if(index==rr.rows.length-1){ | ||||
newList.push(Object.assign({},res,{"list":rr.rows})) | newList.push(Object.assign({},res,{"list":rr.rows})) | ||||
_this.setData({"fileList":_this.data.fileList.concat(newList)}); | _this.setData({"fileList":_this.data.fileList.concat(newList)}); | ||||
@@ -320,7 +317,7 @@ Page({ | |||||
"fileUrl":res.data.fileUrl , | "fileUrl":res.data.fileUrl , | ||||
"id": res.data.id, | "id": res.data.id, | ||||
"tableId": 6, | "tableId": 6, | ||||
"url":URL_PREFIX+res.data.fileUrl | |||||
"url":wx.getStorageSync('dressCode')+res.data.fileUrl | |||||
}) | }) | ||||
_this.setData({"fileList":files}) | _this.setData({"fileList":files}) | ||||
wx.hideLoading() | wx.hideLoading() | ||||
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -15,14 +12,10 @@ Page({ | |||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
option1: [ | option1: [ | ||||
{ text: '收支类型', value: '' }, | |||||
{ text: '待支付', value: '1' }, | |||||
{ text: '银行受理', value: '3' }, | |||||
{ text: '支付失败', value: '4' }, | |||||
{ text: '部分失败', value: '5' }, | |||||
{text:'年份',value:''} | |||||
], | ], | ||||
option2: [ | option2: [ | ||||
{ text: '结算方式', value: '' }, | |||||
{ text: '业务类型', value: '' }, | |||||
{ text: '结算类', value: '1' }, | { text: '结算类', value: '1' }, | ||||
{ text: '工程项目类', value: '2' }, | { text: '工程项目类', value: '2' }, | ||||
{ text: '合同类', value: '4' }, | { text: '合同类', value: '4' }, | ||||
@@ -51,13 +44,77 @@ Page({ | |||||
}, 0); | }, 0); | ||||
}); | }); | ||||
}, | }, | ||||
deptOptions:[], | |||||
deptName:'', | |||||
deptId:'' | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
var that = this ; | |||||
console.log(new Date().getFullYear()); | |||||
//下发单位查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDEPTLIST, {method:'GET'}, { | |||||
success: (res2) => { | |||||
console.log(res2); | |||||
that.setData({ | |||||
deptOptions:res2.data, | |||||
}) | |||||
} | |||||
}) | |||||
var form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
year:'', | |||||
billType:'', | |||||
orderByColumn:'id', | |||||
isAsc:'desc', | |||||
method:'GET' | |||||
} | |||||
// 票据状态字典查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bill_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
let option3 = [{ | |||||
text: '票据状态', value: '' | |||||
}]; | |||||
res.data.map(rr=>{ | |||||
if (rr.dictValue == 2 ||rr.dictValue == 3 ||rr.dictValue == 5) { | |||||
option3.push({ | |||||
text: rr.dictLabel, value: rr.dictValue | |||||
}) | |||||
} | |||||
}) | |||||
that.setData({ | |||||
option3:option3, | |||||
billTypeOptions:res.data, | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLIST , form, { | |||||
success: (res2) => { | |||||
res2.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,res.data); | |||||
}) | |||||
that.setData({ | |||||
billList:res2.rows | |||||
}) | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
console.log(form); | |||||
}, | |||||
bindSelectTypePickerChange: function(e) { | |||||
var that = this; | |||||
var dictValue = that.data.deptOptions[e.detail.value].deptId; | |||||
var text = that.data.deptOptions[e.detail.value].deptName; | |||||
this.setData({ | |||||
deptId:dictValue, | |||||
deptName:text | |||||
}) | |||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
@@ -79,10 +136,158 @@ Page({ | |||||
result: event.detail, | result: event.detail, | ||||
}); | }); | ||||
}, | }, | ||||
showReceiptDialog(){ | |||||
showReceiptDialog(e){ | |||||
var that = this; | var that = this; | ||||
that.setData({ | that.setData({ | ||||
showReceiptDialog:true | |||||
showReceiptDialog:true, | |||||
projectId:e.currentTarget.dataset.id, | |||||
deptId:'', | |||||
deptName:'' | |||||
}) | |||||
}, | |||||
goQS(e){ | |||||
var that = this ; | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: '确认签收?', | |||||
success (res) { | |||||
if (res.confirm) { | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTGET+e.currentTarget.dataset.id , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '签收成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onLoad(); | |||||
}else{ | |||||
wx.showToast({ | |||||
title: '签收失败', | |||||
icon: 'error', | |||||
duration: 2000, | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消') | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goZF(e){ | |||||
var that = this ; | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: '确认作废', | |||||
success (res) { | |||||
if (res.confirm) { | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTCANCEL+e.currentTarget.dataset.id , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '作废成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onLoad(); | |||||
}else{ | |||||
wx.showToast({ | |||||
title: '作废失败', | |||||
icon: 'error', | |||||
duration: 2000, | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消') | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goXF(e){ | |||||
var that = this ; | |||||
if (that.data.deptId == '') { | |||||
UTIL.showToastNoneIcon('请选择下发单位!'); | |||||
return; | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTEDIT+that.data.projectId+'/'+that.data.deptId , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '下发成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.setData({ | |||||
showReceiptDialog:false | |||||
}) | |||||
that.onLoad(); | |||||
}else{ | |||||
wx.showToast({ | |||||
title: '下发失败', | |||||
icon: 'error', | |||||
duration: 2000, | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
changeTab1(event){ | |||||
this.setData({ | |||||
value1: event.detail | |||||
}); | |||||
var that = this ; | |||||
var form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
year:that.data.value1, | |||||
billType:that.data.value3, | |||||
orderByColumn:'id', | |||||
isAsc:'desc', | |||||
method:'GET' | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLIST , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
changeTab3(event){ | |||||
this.setData({ | |||||
value3: event.detail | |||||
}); | |||||
var that = this ; | |||||
var form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
year:that.data.value1, | |||||
billType:that.data.value3, | |||||
orderByColumn:'id', | |||||
isAsc:'desc', | |||||
method:'GET' | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLIST , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows | |||||
}) | |||||
} | |||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
@@ -96,7 +301,18 @@ Page({ | |||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow() { | onShow() { | ||||
var that = this ; | |||||
let year = new Date().getFullYear() | |||||
let years = that.data.option1; | |||||
for (let i = 0; i < 10; i++) { | |||||
years.push({ | |||||
text: year-i, | |||||
value: year-i | |||||
}) | |||||
} | |||||
that.setData({ | |||||
option1:years, | |||||
}) | |||||
}, | }, | ||||
/** | /** | ||||
@@ -1,57 +1,44 @@ | |||||
<!--pages/regular/index.wxml--> | <!--pages/regular/index.wxml--> | ||||
<view class="ns" id="top_ban" 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'}};height: 19.0909px;" mode="widthFix" bindtap="back" referrer="no-referrer|origin|unsafe-url"></image> | <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};height: 19.0909px;" 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?'88px':'64px'}};"> | |||||
<van-search | |||||
value="{{ value }}" | |||||
shape="round" | |||||
background="transparent" | |||||
placeholder="请输入搜索关键词" | |||||
clearable | |||||
bind:change="goSearch" | |||||
/> | |||||
<view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||||
</view> | |||||
<view class="top_view"> | |||||
<view class="top_view" style="margin-top:{{isIPX?'88px':'64px'}};"> | |||||
<van-dropdown-menu active-color="#5CAE77" bind:change="changeTab" id="top_view1" style="flex: 1;"> | <van-dropdown-menu active-color="#5CAE77" bind:change="changeTab" id="top_view1" style="flex: 1;"> | ||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab" /> | |||||
<van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | |||||
<van-dropdown-item value="{{ value3 }}" options="{{ option3 }}" bind:change="changeTab2" /> | |||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab1" /> | |||||
<van-dropdown-item value="{{ value3 }}" options="{{ option3 }}" bind:change="changeTab3" /> | |||||
</van-dropdown-menu> | </van-dropdown-menu> | ||||
<view class="sx_view" bindtap="showPopup"> | |||||
<text>筛选</text> | |||||
<image src="/image/icon/icon_sx.png" style="width: 15px;height: 15px;margin-left: 5px;"></image> | |||||
</view> | |||||
<!-- <view class="sx_view" bindtap="showPopup"> | |||||
<view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||||
</view> --> | |||||
</view> | </view> | ||||
<scroll-view scroll-y refresher-threshold="0" style="height:100%" bindscrolltolower="paging" lower-threshold="100"> | <scroll-view scroll-y refresher-threshold="0" style="height:100%" bindscrolltolower="paging" lower-threshold="100"> | ||||
<!-- wx:for="{{list}}" wx:key="index" wx:for-item="item" right-width="{{ 50 }}" --> | <!-- wx:for="{{list}}" wx:key="index" wx:for-item="item" right-width="{{ 50 }}" --> | ||||
<van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{5}}" > | |||||
<van-swipe-cell class="workflow" right-width="{{item.billType == '2'||item.billType == '3'?'65':''}}" wx:for="{{billList}}" wx:key="index" > | |||||
<view class="li" > | <view class="li" > | ||||
<view style="width:70%;flex:7;"> | <view style="width:70%;flex:7;"> | ||||
<view class="tit_box"> | <view class="tit_box"> | ||||
<text class="tit_tab4">批次编码</text> | <text class="tit_tab4">批次编码</text> | ||||
<text class="tit">202200001</text> | |||||
<text class="tit_tab">2021</text> | |||||
<text class="tit_tab5">已入库</text> | |||||
<text class="tit">{{item.batchNum}}</text> | |||||
<text class="tit_tab">{{item.year}}</text> | |||||
<text class="tit_tab5">{{item.billTypeText}}</text> | |||||
</view> | </view> | ||||
<view class="tit_box ju_c"> | <view class="tit_box ju_c"> | ||||
<view> | <view> | ||||
<image src="/image/icon/icon_ss.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | <image src="/image/icon/icon_ss.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | ||||
<text class="tit">000000001</text> | |||||
<text class="tit">{{item.startNum}}</text> | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<image src="/image/icon/icon_xj.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | <image src="/image/icon/icon_xj.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | ||||
<text class="tit">000000001</text> | |||||
<text class="tit">{{item.endNum}}</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="tit_box"> | <view class="tit_box"> | ||||
<text class="tit">下发单位 张村镇华景社区</text> | |||||
<text class="tit">下发单位:{{item.deptName}}</text> | |||||
</view> | </view> | ||||
<view class="tit_box mr_10"> | <view class="tit_box mr_10"> | ||||
<view> | |||||
<!-- <view> | |||||
<image src="/image/icon/icon_js1.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | <image src="/image/icon/icon_js1.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | ||||
<text class="tit">10</text> | <text class="tit">10</text> | ||||
</view> | </view> | ||||
@@ -62,33 +49,33 @@ | |||||
<view> | <view> | ||||
<image src="/image/icon/icon_js3.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | <image src="/image/icon/icon_js3.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | ||||
<text class="tit">100</text> | <text class="tit">100</text> | ||||
</view> | |||||
</view> --> | |||||
<view> | <view> | ||||
<text class="tit">第10本</text> | |||||
<image src="/image/icon/icon_js3.png" style="width: 14px;height: 14px;margin-right: 2px;"></image> | |||||
<text class="tit">第{{item.per}}本</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="list_btn"> | |||||
<!-- <view class="list_btn" wx:if="{{item.billType != 5}}"> | |||||
<view> | <view> | ||||
<view class="btn btn_qs">签收</view> | |||||
<view class="btn btn_zf">作废</view> | |||||
<!-- <view class="btn btn_xf">下发</view> --> | |||||
<view class="btn btn_qs" wx:if="{{item.billType == '2'}}" data-id="{{item.id}}" bindtap="goQS">签收</view> | |||||
<view class="btn btn_zf" wx:if="{{item.billType == '3'}}" data-id="{{item.id}}" bindtap="goZF">作废</view> | |||||
<view class="btn btn_xf" wx:if="{{item.billType == '2'}}" data-id="{{item.id}}" bindtap="showReceiptDialog">下发</view> | |||||
</view> | </view> | ||||
</view> | |||||
</view> --> | |||||
</view> | </view> | ||||
<view slot="right" class="cell_right"> | <view slot="right" class="cell_right"> | ||||
<!-- <view class="button_box"><view></view></view> --> | |||||
<view class="button_box" bindtap="showTransactionDialog"> | |||||
<view bindtap="showReceiptDialog"> | |||||
<view class="button_box qs" wx:if="{{item.billType == '2'}}" data-id="{{item.id}}" bindtap="goQS"> | |||||
<view> | |||||
<image src="/image/icon/icon_xg2.png" style="width: 20.55px;height: 20.55px;"></image> | <image src="/image/icon/icon_xg2.png" style="width: 20.55px;height: 20.55px;"></image> | ||||
<text>修改</text> | |||||
<text>签收</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="button_box" bindtap="goRegular"> | |||||
<view class="button_box zf" wx:if="{{item.billType == '3'}}" data-id="{{item.id}}" bindtap="goZF"> | |||||
<view> | <view> | ||||
<image src="/image/icon/icon_sc.png" style="width: 20.55px;height: 20.55px;"></image> | <image src="/image/icon/icon_sc.png" style="width: 20.55px;height: 20.55px;"></image> | ||||
<text>删除</text> | |||||
<text>作废</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -105,172 +92,6 @@ | |||||
</van-swipe-cell> | </van-swipe-cell> | ||||
</scroll-view> | </scroll-view> | ||||
<!-- <van-action-sheet show="{{showUpload}}" title="附件" bind:close="closeBox"> | |||||
<scroll-view scroll-y="true" style="height: 600rpx;" 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 }}" deletable="{{false}}" show-upload="{{false}}" bind:click-preview="lookDown"> | |||||
</van-upload> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</scroll-view> | |||||
</van-action-sheet>custom-style="height: 20%;" --> | |||||
<van-popup | |||||
show="{{ showPopup }}" | |||||
round | |||||
position="right" | |||||
custom-style="height: 100%;width:90%;" | |||||
bind:close="onClose" | |||||
> | |||||
<view class="sx_box" style="margin-top:{{isIPX?'88px':'64px'}};"> | |||||
<text class="sx_tit">我方账户</text> | |||||
<van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
<van-checkbox use-icon-slot name="a"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'a') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
乳山市徐家镇农村财务 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="b"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'b') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
重庆农商行 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
村级虚拟账户 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
张村基本账户 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
威海临港经济技术开发区草庙子镇毕家庄股份经济合作社 | |||||
</view> | |||||
</van-checkbox> | |||||
</van-checkbox-group> | |||||
<text class="sx_tit">业务类型</text> | |||||
<van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
<van-checkbox use-icon-slot name="a"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'a') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
国内汇票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="b"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'b') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
国外汇票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
人行大额 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
人行小额 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
现金存款 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
转账收入 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
汇票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
本票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
支票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
冲账 | |||||
</view> | |||||
</van-checkbox> | |||||
</van-checkbox-group> | |||||
<text class="sx_tit">来往帐标识</text> | |||||
<van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
<van-checkbox use-icon-slot name="a"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'a') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
全部 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="b"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'b') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
来账/汇入 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
往账/汇出 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
外部交易 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
内部往来 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
部分内部往来 | |||||
</view> | |||||
</van-checkbox> | |||||
</van-checkbox-group> | |||||
<text class="sx_tit">金额范围</text> | |||||
<view class="sx_input_box"> | |||||
<input placeholder="最低价" /><text> - </text><input placeholder="最高价" /> | |||||
</view> | |||||
<text class="sx_tit">交易日期</text> | |||||
<view class="sx_input_box"> | |||||
<input placeholder="开始日期" /><text> - </text><input placeholder="结束日期" /> | |||||
</view> | |||||
<view class="bottom"> | |||||
<!-- <view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> --> | |||||
<view class="btn1" bindtap="back">重置</view> | |||||
<view class="btn2" data-type="0" bindtap="goSubmit" hover-class="btnView">确定</view> | |||||
</view> | |||||
</view> | |||||
</van-popup> | |||||
<van-dialog | <van-dialog | ||||
use-slot | use-slot | ||||
show="{{ showReceiptDialog }}" | show="{{ showReceiptDialog }}" | ||||
@@ -278,13 +99,22 @@ | |||||
theme='round-button' | theme='round-button' | ||||
confirmButtonText="票本下发" | confirmButtonText="票本下发" | ||||
data-type="1" | data-type="1" | ||||
bind:confirm="edit" | |||||
bind:confirm="goXF" | |||||
before-close="{{beforeClose}}" | before-close="{{beforeClose}}" | ||||
closeOnClickOverlay="{{ true }}" | closeOnClickOverlay="{{ true }}" | ||||
> | > | ||||
<!-- <image src="/image/icon/icon_delete.png" style="width: 20px; height: 20px;position: absolute;top: 0;"></image> --> | <!-- <image src="/image/icon/icon_delete.png" style="width: 20px; height: 20px;position: absolute;top: 0;"></image> --> | ||||
<view style="text-align: center;padding: 20px;border-bottom: 1px dashed #e6e6e6;width: 92%;margin: 0 auto;color: #2C8E68;font-size: 18px;">查询回单明细参数</view> | |||||
<van-field value="{{ value }}" required label="下发单位" placeholder="请选择下发单位" input-align="right" is-link arrow-direction="down" bind:change="onChange" /> | |||||
<view style="text-align: center;padding: 20px;border-bottom: 1px dashed #e6e6e6;width: 92%;margin: 0 auto;color: #2C8E68;font-size: 18px;">票本下发</view> | |||||
<van-cell title="下发单位" required is-link arrow-direction="down"> | |||||
<view> | |||||
<picker bindchange="bindSelectTypePickerChange" range="{{deptOptions}}" data-name="selectType" range-key="deptName"> | |||||
<view class="picker"> | |||||
<text>{{deptName == '' ? '请选择下发单位':deptName}}</text> | |||||
</view> | |||||
</picker> | |||||
</view> | |||||
</van-cell> | |||||
</van-dialog> | </van-dialog> | ||||
<wxs module="iOf"> | <wxs module="iOf"> | ||||
var indexOf = function(name,value){ | var indexOf = function(name,value){ | ||||
@@ -10,16 +10,15 @@ van-search { | |||||
display: flex; | display: flex; | ||||
} | } | ||||
.add_btn{ | .add_btn{ | ||||
flex: 0.2; | |||||
padding: var(--search-padding,10px 12px); | |||||
padding-left: 0; | padding-left: 0; | ||||
flex:1 | |||||
} | } | ||||
.add_btn text{ | .add_btn text{ | ||||
background-color: #62AD66; | background-color: #62AD66; | ||||
display: block; | display: block; | ||||
height: 100%; | height: 100%; | ||||
text-align: center; | text-align: center; | ||||
line-height: 36px; | |||||
line-height: 28px; | |||||
color: #fff; | color: #fff; | ||||
border-radius: 36px; | border-radius: 36px; | ||||
box-shadow: 0px 5px 5px #ddd; | box-shadow: 0px 5px 5px #ddd; | ||||
@@ -125,7 +124,6 @@ text{display: block;} | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
margin-bottom: 10px; | margin-bottom: 10px; | ||||
justify-content: space-between; | |||||
} | } | ||||
.tit_box.ju_c{ | .tit_box.ju_c{ | ||||
justify-content: space-between; | justify-content: space-between; | ||||
@@ -133,6 +131,9 @@ text{display: block;} | |||||
.tit_box.mr_10 view{ | .tit_box.mr_10 view{ | ||||
margin-left: 15px; | margin-left: 15px; | ||||
} | } | ||||
.mr_10{ | |||||
margin-bottom: 0; | |||||
} | |||||
.tit_box.mr_10 view:nth-child(1){ | .tit_box.mr_10 view:nth-child(1){ | ||||
margin-left: 0px; | margin-left: 0px; | ||||
} | } | ||||
@@ -283,6 +284,7 @@ text{display: block;} | |||||
border-top-right-radius: 20px; | border-top-right-radius: 20px; | ||||
border-bottom-right-radius: 20px; | border-bottom-right-radius: 20px; | ||||
font-size: 12px; | font-size: 12px; | ||||
margin-left: auto; | |||||
} | } | ||||
.tit_tab2{ | .tit_tab2{ | ||||
color:#5CAE77!important; | color:#5CAE77!important; | ||||
@@ -298,12 +300,14 @@ text{display: block;} | |||||
border: 1px solid #B3DB62; | border: 1px solid #B3DB62; | ||||
padding:1px 5px; | padding:1px 5px; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
margin-right: 5px; | |||||
} | } | ||||
.tit_tab5{ | .tit_tab5{ | ||||
color:#5CAE77!important; | color:#5CAE77!important; | ||||
background-color: rgba(92, 174, 119, 0.2); | background-color: rgba(92, 174, 119, 0.2); | ||||
padding:1px 5px; | padding:1px 5px; | ||||
border-radius: 50px; | border-radius: 50px; | ||||
margin-left: 10px; | |||||
} | } | ||||
.tit_tab3{ | .tit_tab3{ | ||||
margin-left:auto; | margin-left:auto; | ||||
@@ -352,10 +356,10 @@ text{display: block;} | |||||
background-color: #B3DB62; | background-color: #B3DB62; | ||||
width: 6%; | width: 6%; | ||||
} */ | } */ | ||||
.button_box:nth-child(1){ | |||||
.button_box.qs{ | |||||
background-color: #FC9A55; | background-color: #FC9A55; | ||||
} | } | ||||
.button_box:nth-child(2){ | |||||
.button_box.zf{ | |||||
background-color: #E90000; | background-color: #E90000; | ||||
} | } | ||||
.button_box view text{ | .button_box view text{ | ||||
@@ -367,10 +371,11 @@ text{display: block;} | |||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
} | } | ||||
.sx_view{ | .sx_view{ | ||||
flex: 0.2; | |||||
background-color: #fff; | background-color: #fff; | ||||
padding: 0 3%; | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
padding: 0 3%; | |||||
} | } | ||||
.sx_box{ | .sx_box{ | ||||
padding: 3% 5%; | padding: 3% 5%; | ||||
@@ -0,0 +1,274 @@ | |||||
// pages/billUse/flowAdd/flowAdd.js | |||||
import * as UTIL from '../../../utils/util.js'; | |||||
import * as API from '../../../utils/API.js'; | |||||
let EVN_CONFIG = require('../../../env/env'); | |||||
const app = getApp(); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
isIPX: app.globalData.isIPX, | |||||
formData:{ | |||||
listId: '', //票据ID | |||||
billNum: '', //票据编号 必填 | |||||
billType: '4', //票据状态 | |||||
bookId: '', //账套ID | |||||
deptId: '', //系统机构代码 | |||||
billDate: '', //开票日期 必填 | |||||
accountSummary: '',//摘要 必填 | |||||
incomeExpensesType: "1", //收支类型 | |||||
settleStyle: '', //结算方式 | |||||
jieAmount: '', //收入金额 | |||||
daiAmount: '', //支出金额 | |||||
preparedBy: '', //经办人 必填 | |||||
payee: '', //收款方 必填 | |||||
payer: '', //付款方 必填 | |||||
accountId: '', //出纳账户ID | |||||
accountName: '', //出纳账户 | |||||
accountType: '', //账户类型 字典account_type | |||||
cashierFlowId: '' //出纳流水ID | |||||
}, | |||||
//收入时间弹窗显隐 | |||||
srShow:false, | |||||
minDate:new Date().getTime() - 180* 24 * 60 * 60 * 1000, | |||||
maxDate:new Date().getTime() + 180* 24 * 60 * 60 * 1000, | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad(options) { | |||||
var that = this ; | |||||
this.setData({ | |||||
["formData.billDate"]:this.getNewDate(new Date()) | |||||
}) | |||||
// 结算方式字典查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'settle_style', {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
jsfsOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_GETLISTQUERY, {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
pjbhOptions:res.rows, | |||||
}) | |||||
} | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_SUBJECTLIST , {method:'GET'}, { | |||||
success: (res2) => { | |||||
that.setData({ | |||||
subjectOptions:res2.rows, | |||||
}) | |||||
} | |||||
}) | |||||
//出纳账户 | |||||
var sendData = { | |||||
pageNum:'1', | |||||
pageSize:'100', | |||||
accountName:'', | |||||
bankAccountNumber:'', | |||||
status:'N', | |||||
method:'GET', | |||||
accountType:102 | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ | |||||
success: (res) => { | |||||
console.log(res.rows) | |||||
that.setData({ | |||||
accountList:res.rows | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
back:function(){ | |||||
wx.navigateBack({ | |||||
delta: 1 | |||||
}) | |||||
}, | |||||
onsrDate(){ | |||||
this.setData({srShow:true}) | |||||
}, | |||||
onClose(){ | |||||
this.setData({srShow:false}) | |||||
}, | |||||
onConfirm(e){ | |||||
console.log(e); | |||||
let data = this.getNewDate(new Date(e.detail)); | |||||
console.log(data); | |||||
this.setData({'formData.billDate':data}) | |||||
this.setData({srShow:false}) | |||||
}, | |||||
getNewDate(date){ | |||||
//date是传过来的时间戳,注意需为13位,10位需*1000 | |||||
//也可以不传,获取的就是当前时间 | |||||
var time = new Date(date); | |||||
var year= time.getFullYear() //年 | |||||
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月 | |||||
var day = ("0" + time.getDate()).slice(-2); //日 | |||||
var mydate = year + "-" + month + "-" + day; | |||||
return mydate | |||||
}, | |||||
onpjbhShow(){ | |||||
this.setData({pjbhShow:true}) | |||||
}, | |||||
onjsfsShow(){ | |||||
this.setData({jsfsShow:true}) | |||||
}, | |||||
oncnzhShow(){ | |||||
this.setData({cnzhShow:true}) | |||||
}, | |||||
onCancelcrzh(){ | |||||
this.setData({crzhShow:false}) | |||||
}, | |||||
onCancelcrlx(){ | |||||
this.setData({pjbhShow:false,}) | |||||
}, | |||||
onCanceljsfs(){ | |||||
this.setData({jsfsShow:false,}) | |||||
}, | |||||
onCancelcrcnzh(){ | |||||
this.setData({cnzhShow:false,}) | |||||
}, | |||||
bindPickerChange (e) { | |||||
console.log(e); | |||||
let obj = e.detail.value; | |||||
this.setData({ | |||||
pjbhShow:false, | |||||
["formData.billNum"]:obj.billNum, | |||||
["formData.listId"]:obj.id, | |||||
}) | |||||
}, | |||||
bindPickerChangeJsfs (e) { | |||||
console.log(e); | |||||
let obj = e.detail.value; | |||||
this.setData({ | |||||
jsfsShow:false, | |||||
["formData.settleStyle"]:obj.dictValue, | |||||
["formData.settleStyleText"]:obj.dictLabel, | |||||
}) | |||||
}, | |||||
bindPickerChangeCnzh (e) { | |||||
console.log(e); | |||||
let obj = e.detail.value; | |||||
this.setData({ | |||||
cnzhShow:false, | |||||
["formData.accountName"]:obj.accountName, | |||||
["formData.accountId"]:obj.accountId, | |||||
}) | |||||
}, | |||||
swichAccounting:function(e){ | |||||
var that = this; | |||||
let data = this.data.formData; | |||||
if(data.billNum == ''){ | |||||
UTIL.showToastNoneIcon('请选择票据编号!'); | |||||
} | |||||
if(data.billDate == ''){ | |||||
UTIL.showToastNoneIcon('请选择开票日期!'); | |||||
} | |||||
if(data.payee == ''){ | |||||
UTIL.showToastNoneIcon('请填写收款方!'); | |||||
} | |||||
if(data.payer == ''){ | |||||
UTIL.showToastNoneIcon('请填写付款方!'); | |||||
} | |||||
if(data.accountSummary == ''){ | |||||
UTIL.showToastNoneIcon('请填写结算事项!'); | |||||
} | |||||
if(data.settleStyle == ''){ | |||||
UTIL.showToastNoneIcon('请选择结算方式!'); | |||||
} | |||||
if(data.accountName == ''){ | |||||
UTIL.showToastNoneIcon('请选择出纳账户!'); | |||||
} | |||||
data.method = "POST"; | |||||
UTIL.httpRequest(API.URL_GET_GETBILLADD, data, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '新增成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
setTimeout(function(){ | |||||
that.back(); | |||||
},2000) | |||||
}else{ | |||||
UTIL.showToastNoneIcon(res.msg); | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
inputChange(e){ | |||||
var that = this ; | |||||
var obj = e.detail; | |||||
var name = e.currentTarget.dataset.name; | |||||
that.setData({ | |||||
[name] : obj.value | |||||
}) | |||||
}, | |||||
onChange(e){ | |||||
console.log(e); | |||||
this.setData({ | |||||
["formData.incomeExpensesType"] : e.detail, | |||||
["formData.jieAmount"]:'', | |||||
["formData.daiAmount"]:'', | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload() { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh() { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom() { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage() { | |||||
} | |||||
}) |
@@ -0,0 +1,14 @@ | |||||
{ | |||||
"usingComponents": { | |||||
"van-row": "@vant/weapp/row/index", | |||||
"van-col": "@vant/weapp/col/index", | |||||
"van-cell": "@vant/weapp/cell/index", | |||||
"van-tag": "@vant/weapp/tag/index", | |||||
"van-icon": "@vant/weapp/icon/index", | |||||
"van-popup": "@vant/weapp/popup/index", | |||||
"van-picker": "@vant/weapp/picker/index", | |||||
"van-radio": "@vant/weapp/radio/index", | |||||
"van-radio-group": "@vant/weapp/radio-group/index", | |||||
"van-calendar": "@vant/weapp/calendar/index" | |||||
} | |||||
} |
@@ -0,0 +1,125 @@ | |||||
<!--pages/billUse/flowAdd/flowAdd.wxml--> | |||||
<view class="ns" id="top_ban" style="height:{{isIPX?'88px':'64px'}};"> | |||||
<image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};height: 19.0909px;" mode="widthFix" bindtap="back" referrer="no-referrer|origin|unsafe-url"></image> | |||||
<text style="top:{{isIPX?'54px':'30px'}};">新增票据使用</text> | |||||
</view> | |||||
<view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<view class="headTit"><text>结算票据</text></view> | |||||
<view class="flex-block"> | |||||
<text class="rules">票据编号</text> | |||||
<view bindtap="onpjbhShow" class="wrap"> | |||||
<text wx:if="{{!formData.billNum}}" class="color-gray">请选择票据编号</text> | |||||
<text wx:else>{{formData.billNum}}</text> | |||||
</view> | |||||
</view> | |||||
<van-popup | |||||
show="{{ pjbhShow }}" | |||||
position="bottom" | |||||
bind:close="onCancelcrlx" | |||||
> | |||||
<van-picker | |||||
columns="{{ pjbhOptions }}" | |||||
value-key="billNum" | |||||
bind:cancel="onCancelcrlx" | |||||
show-toolbar="{{true}}" | |||||
bind:confirm="bindPickerChange"/> | |||||
</van-popup> | |||||
<view class="flex-block"> | |||||
<text class="rules">开票日期</text> | |||||
<view class="wrap" bindtap="onsrDate" > | |||||
{{formData.billDate}} | |||||
</view> | |||||
<van-calendar | |||||
show="{{ srShow }}" | |||||
min-date="{{ minDate }}" | |||||
max-date="{{ maxDate }}" | |||||
bind:close="onClose" | |||||
bind:confirm="onConfirm" | |||||
/> | |||||
</view> | |||||
<view class="payerBox" style="border: 1px dashed #DCDCDC;padding: 20px;"> | |||||
<view class="flex-block"> | |||||
<text class="rules">收款方</text> | |||||
<input class="wrap" value="{{formData.payee}}" data-name="formData.payee" bindinput="inputChange" placeholder="请输入收款方"/> | |||||
</view> | |||||
<view class="flex-block"> | |||||
<text class="rules">付款方</text> | |||||
<input class="wrap" value="{{formData.payer}}" data-name="formData.payer" bindinput="inputChange" placeholder="请输入付款方"/> | |||||
</view> | |||||
<view class="flex-block"> | |||||
<text class="rules">结算事项</text> | |||||
<input class="wrap" value="{{formData.accountSummary}}" data-name="formData.accountSummary" bindinput="inputChange" placeholder="请输入结算事项"/> | |||||
</view> | |||||
<view class="flex-block"> | |||||
<text>收支类型</text> | |||||
<van-radio-group | |||||
value="{{ formData.incomeExpensesType }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="formData.incomeExpensesType" | |||||
style="padding: 10px 0;" | |||||
> | |||||
<van-radio name="1" checked-color="#2C8E68">收入</van-radio> | |||||
<van-radio name="2" checked-color="#2C8E68">支出</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
<view class="flex-block"> | |||||
<text>结算方式</text> | |||||
<view bindtap="onjsfsShow" class="wrap"> | |||||
<text wx:if="{{!formData.settleStyle}}" class="color-gray">请选择结算方式</text> | |||||
<text wx:else>{{formData.settleStyleText}}</text> | |||||
</view> | |||||
<van-popup | |||||
show="{{ jsfsShow }}" | |||||
position="bottom" | |||||
bind:close="onCanceljsfs" | |||||
> | |||||
<van-picker | |||||
columns="{{ jsfsOptions }}" | |||||
value-key="dictLabel" | |||||
bind:cancel="onCanceljsfs" | |||||
show-toolbar="{{true}}" | |||||
bind:confirm="bindPickerChangeJsfs"/> | |||||
</van-popup> | |||||
</view> | |||||
<view class="flex-block" wx:if="{{ formData.incomeExpensesType == 1 }}"> | |||||
<text>收入金额</text> | |||||
<input class="wrap" value="{{formData.jieAmount}}" data-name="formData.jieAmount" bindinput="inputChange" placeholder="请输入收入金额"/> | |||||
</view> | |||||
<view class="flex-block" wx:if="{{ formData.incomeExpensesType == 2 }}"> | |||||
<text>支出金额</text> | |||||
<input class="wrap" value="{{formData.daiAmount}}" data-name="formData.daiAmount" bindinput="inputChange" placeholder="请输入支出金额"/> | |||||
</view> | |||||
</view> | |||||
<view class="flex-block" style="margin-top: 15px;"> | |||||
<text class="rules">出纳账户</text> | |||||
<view bindtap="oncnzhShow" class="wrap"> | |||||
<text wx:if="{{!formData.accountName}}" class="color-gray">请选择出纳账户</text> | |||||
<text wx:else>{{formData.accountName}}</text> | |||||
</view> | |||||
</view> | |||||
<van-popup | |||||
show="{{ cnzhShow }}" | |||||
position="bottom" | |||||
bind:close="onCancelcrcnzh" | |||||
> | |||||
<van-picker | |||||
columns="{{ accountList }}" | |||||
value-key="accountName" | |||||
bind:cancel="onCancelcrcnzh" | |||||
show-toolbar="{{true}}" | |||||
bind:confirm="bindPickerChangeCnzh"/> | |||||
</van-popup> | |||||
<view class="flex-block"><text>经办人</text> <input class="wrap" data-name="formData.preparedBy" bindinput="inputChange" data-prop="formData.billNum" value="{{formData.preparedBy}}" placeholder="请输入经办人"/></view> | |||||
</view> | |||||
<view class="bottom"> | |||||
<view class="btn2" data-code="2" bindtap="swichAccounting">保存</view> | |||||
</view> |
@@ -0,0 +1,319 @@ | |||||
/* pages/billUse/flowAdd/flowAdd.wxss */ | |||||
.inComeUnit{ | |||||
border:1rpx solid #ddd; | |||||
width:90%; | |||||
margin:0 auto; | |||||
} | |||||
.top{ | |||||
display: flex; | |||||
width: 94%; | |||||
margin: 0 auto; | |||||
border-radius: 10rpx; | |||||
margin-top: 3vw; | |||||
overflow: hidden; | |||||
} | |||||
.top view{ | |||||
padding: 40rpx 15rpx; | |||||
align-items: center; | |||||
justify-content: center; | |||||
position: relative; | |||||
} | |||||
.top image{ | |||||
position: absolute; | |||||
width: 94%; | |||||
} | |||||
.top-title{ | |||||
flex: 1; | |||||
text-align: center; | |||||
} | |||||
.top-tit{ | |||||
color: #fff; | |||||
} | |||||
.rules:before{ | |||||
content:'*'; | |||||
color:red; | |||||
position: absolute; | |||||
right: -10px; | |||||
} | |||||
.rules.no::before{ | |||||
content:' '; | |||||
padding-left: 14rpx; | |||||
color:'#fff'; | |||||
} | |||||
.main-title{ | |||||
background-image: linear-gradient(to right, #2C8E68 , #B3DB62); | |||||
color: #ffffff; | |||||
font-size: 18rpx; | |||||
padding: 10rpx 0; | |||||
text-align: center; | |||||
} | |||||
.main-box{ | |||||
background: #ffffff; | |||||
padding: 20px; | |||||
width: 94%; | |||||
margin: 0 auto; | |||||
border-radius: 10px; | |||||
box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | |||||
} | |||||
.main-box block{ | |||||
float: right; | |||||
} | |||||
.main-box .color-gray{ | |||||
color: #888; | |||||
} | |||||
.title{ | |||||
padding: 10px calc(3% + 20px); | |||||
display: block; | |||||
} | |||||
.van-cell{ | |||||
padding-left: 0!important; | |||||
padding-right: 0!important; | |||||
padding-top: 0!important; | |||||
margin-bottom: 15px; | |||||
} | |||||
.table-box .flex-block{ | |||||
margin-bottom: 5px; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
padding: 0 20px; | |||||
} | |||||
.table-box .flex-block text{ | |||||
} | |||||
.table-box .payerBox .flex-block{ | |||||
padding: 0 ; | |||||
} | |||||
.table-box .flex-block:last-child{ | |||||
margin-bottom: 0px; | |||||
} | |||||
.table-box .rules{ | |||||
position: relative; | |||||
} | |||||
.table-box .picker_wrap{ | |||||
/* display: flex; | |||||
justify-content: flex-end; | |||||
align-items: center; */ | |||||
} | |||||
.table-box .picker{text-align: right;} | |||||
.table-box .wrap{ | |||||
flex:1; | |||||
text-align: right; | |||||
border-bottom: 1px solid #DCDCDC; | |||||
margin-left: 15px; | |||||
height: 40px; | |||||
line-height: 40px; | |||||
} | |||||
.fjLable{ | |||||
display: flex; | |||||
width:24px; | |||||
margin:25rpx 5rpx; | |||||
color:#fff; | |||||
background:#07c160; | |||||
text-align: center; | |||||
border-radius: 10rpx; | |||||
justify-content: center; /* 相对父元素水平居中 */ | |||||
align-items: center; | |||||
padding:25rpx 0; | |||||
} | |||||
.content { | |||||
width: 100%; | |||||
background-color: #fff; | |||||
} | |||||
.img-list { | |||||
display: flex; | |||||
display: -webkit-flex; | |||||
flex-direction: row; | |||||
justify-content: flex-start; | |||||
align-items: center; | |||||
flex-wrap: wrap; | |||||
} | |||||
.img-item { | |||||
width: 30%; | |||||
text-align: left; | |||||
margin-right: 3%; | |||||
margin-bottom: 10rpx; | |||||
position: relative; | |||||
} | |||||
.img-item .close-ico{ | |||||
position: absolute; | |||||
right: -10rpx; | |||||
top: -10rpx; | |||||
} | |||||
.img-item .imagea { | |||||
width: 160rpx; | |||||
height: 160rpx; | |||||
} | |||||
.submit-btn { | |||||
width: 100%; | |||||
background-color: #fff; | |||||
height: 80rpx; | |||||
text-align: center; | |||||
line-height: 80rpx; | |||||
font-size: 30rpx; | |||||
position: fixed; | |||||
bottom: 100rpx; | |||||
} | |||||
.chooseimg { | |||||
height: 160rpx; | |||||
background-color: #fff; | |||||
display: flex; | |||||
justify-content: center; /* 相对父元素水平居中 */ | |||||
align-items: center; | |||||
} | |||||
.weui-uploader__input-box { | |||||
float: left; | |||||
position: relative; | |||||
/* margin-right: 9rpx; | |||||
margin-bottom: 9rpx; */ | |||||
width: 120rpx; | |||||
height: 120rpx; | |||||
border: 1px solid #d9d9d9; | |||||
} | |||||
.weui-uploader__input-box:before { | |||||
width: 2px; | |||||
height: 39.5px; | |||||
} | |||||
.weui-uploader__input-box:after, .weui-uploader__input-box:before { | |||||
content: " "; | |||||
position: absolute; | |||||
top: 50%; | |||||
left: 50%; | |||||
-webkit-transform: translate(-50%, -50%); | |||||
transform: translate(-50%, -50%); | |||||
background-color: #d9d9d9; | |||||
} | |||||
.weui-uploader__input-box:after { | |||||
width: 39.5px; | |||||
height: 2px; | |||||
} | |||||
.weui-uploader__input-box:after, .weui-uploader__input-box:before { | |||||
content: " "; | |||||
position: absolute; | |||||
top: 50%; | |||||
left: 50%; | |||||
-webkit-transform: translate(-50%, -50%); | |||||
transform: translate(-50%, -50%); | |||||
background-color: #d9d9d9; | |||||
} | |||||
.tips { | |||||
color: #666; | |||||
font-size: 24rpx; | |||||
padding-bottom: 20rpx; | |||||
} | |||||
.img-box { | |||||
width: 92%; | |||||
margin: auto; | |||||
padding-top: 20rpx; | |||||
} | |||||
.btn button{ | |||||
line-height: 1.7; | |||||
padding-left:80rpx; | |||||
padding-right:80rpx; | |||||
border-radius: 30rpx; | |||||
} | |||||
.fj-box text{ | |||||
background-color: #5CAE77; | |||||
color: #ffffff; | |||||
text-align: center; | |||||
border-radius: 5px; | |||||
white-space:pre-wrap; | |||||
padding: 22px 8px; | |||||
display: block; | |||||
} | |||||
.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; | |||||
} | |||||
.img_box{ | |||||
position: relative; | |||||
width: 100%; | |||||
display: flex; | |||||
flex-wrap: wrap; | |||||
} | |||||
.img_box .img_list{ | |||||
width: 25%; | |||||
margin-left: 5%; | |||||
position: relative; | |||||
} | |||||
.img_box .img_list .van-icon{ | |||||
font-size: 20px; | |||||
position: absolute; | |||||
top: 0; | |||||
right: 0; | |||||
transform: translate(50%,-50%); | |||||
} | |||||
.img_box .img_list:nth-child(n+4){ | |||||
margin-top: 15px; | |||||
} | |||||
.bottom{ | |||||
width: 84%; | |||||
margin: 0 auto; | |||||
text-align: center; | |||||
margin-top: 50px; | |||||
margin-bottom: 50px; | |||||
display: flex; | |||||
justify-content: center; | |||||
} | |||||
.bottom view { | |||||
width: 47%; | |||||
margin: 0 auto; | |||||
border-radius: 30px; | |||||
display: inline-block; | |||||
} | |||||
.bottom .btn1{ | |||||
border: 1px solid #2C8E68; | |||||
padding: 8px 0px; | |||||
color: #2C8E68; | |||||
} | |||||
.bottom .btn2{ | |||||
border: 1px solid transparent; | |||||
padding: 8px 0px; | |||||
background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||||
color: #fff; | |||||
} | |||||
.bottom .btn3{ | |||||
border: 1px solid transparent; | |||||
padding: 8px 0px; | |||||
background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||||
color: #fff; | |||||
width: 100%; | |||||
} | |||||
.headTit{ | |||||
text-align: center; | |||||
margin-bottom: 15px; | |||||
} | |||||
.headTit text{ | |||||
width: 60%; | |||||
display: block; | |||||
margin: 0 auto; | |||||
border-bottom: 1px solid #333333; | |||||
font-size: 18px; | |||||
line-height: 38px; | |||||
} |
@@ -2,10 +2,7 @@ | |||||
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'); | 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({ | ||||
@@ -37,7 +34,10 @@ Page({ | |||||
value2: '', | value2: '', | ||||
value3: '', | value3: '', | ||||
showPopup:false, | showPopup:false, | ||||
result:[], | |||||
result1:'', | |||||
result2:'', | |||||
result3:'', | |||||
uploadOptions:[], | |||||
showReceiptDialog:false, | showReceiptDialog:false, | ||||
beforeClose(action) { | beforeClose(action) { | ||||
return new Promise((resolve) => { | return new Promise((resolve) => { | ||||
@@ -51,13 +51,82 @@ Page({ | |||||
}, 0); | }, 0); | ||||
}); | }); | ||||
}, | }, | ||||
billList:[], | |||||
billDate:'', | |||||
showPopup2:false | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
}, | |||||
getDict(){ | |||||
var that = this; | |||||
//获取附件字典 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'common_attach', {method:'GET'}, { | |||||
success: (res) => { | |||||
if(res.data.length>0){ | |||||
this.setData({ | |||||
uploadOptions:res.data, | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
// 收支类型字典查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'income_expenses_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
let option1 = [{ | |||||
text: '收支类型', value: '' | |||||
}]; | |||||
res.data.map(rr=>{ | |||||
option1.push({ | |||||
text: rr.dictLabel, value: rr.dictValue | |||||
}) | |||||
}) | |||||
that.setData({ | |||||
option1:option1, | |||||
expensesTypeOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
// 结算方式字典查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'settle_style', {method:'GET'}, { | |||||
success: (res) => { | |||||
let option2 = [{ | |||||
text: '结算方式', value: '' | |||||
}]; | |||||
res.data.map(rr=>{ | |||||
option2.push({ | |||||
text: rr.dictLabel, value: rr.dictValue | |||||
}) | |||||
}) | |||||
that.setData({ | |||||
option2:option2, | |||||
settleTypeOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
// 票据状态字典查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bill_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
let option3 = [{ | |||||
text: '票据状态', value: '' | |||||
}]; | |||||
res.data.map(rr=>{ | |||||
if (rr.dictValue == 4 ||rr.dictValue == 5 ||rr.dictValue == 6 ||rr.dictValue == 7) { | |||||
option3.push({ | |||||
text: rr.dictLabel, value: rr.dictValue | |||||
}) | |||||
} | |||||
}) | |||||
that.setData({ | |||||
option3:option3, | |||||
billTypeOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
@@ -85,20 +154,547 @@ Page({ | |||||
showReceiptDialog:true | showReceiptDialog:true | ||||
}) | }) | ||||
}, | }, | ||||
onChangeSZ(event) { | |||||
console.log(event.detail); | |||||
this.setData({ | |||||
result1: event.detail, | |||||
}); | |||||
}, | |||||
onChangeJS(event) { | |||||
console.log(event.detail); | |||||
this.setData({ | |||||
result2: event.detail, | |||||
}); | |||||
}, | |||||
onChangePJ(event) { | |||||
console.log(event.detail); | |||||
this.setData({ | |||||
result3: event.detail, | |||||
}); | |||||
}, | |||||
bindDateBeginChange: function(e) { | |||||
this.setData({ | |||||
billDate: e.detail.value | |||||
}) | |||||
}, | |||||
goSubmit(){ | |||||
var that = this ; | |||||
let form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
billNum:'',//票据编号 | |||||
billType:that.data.result3,//票据状态 | |||||
billDate:that.data.billDate,//开盘日期 | |||||
accountSummary:that.data.result2,//结算事项 | |||||
incomeExpensesType:that.data.result1,//收支类型 | |||||
orderByColumn:'billDate', | |||||
isAsc:'desc', | |||||
settleStyle:'1', | |||||
method:'GET', | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTDETAIL , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
rrr.incomeExpensesTypeText = UTIL.getTransform(rrr.incomeExpensesType,that.data.expensesTypeOptions); | |||||
rrr.daiAmount = rrr.daiAmount == null ? '0.00':parseFloat(rrr.daiAmount).toFixed(2) | |||||
rrr.jieAmount = rrr.jieAmount == null ? '0.00':parseFloat(rrr.jieAmount).toFixed(2) | |||||
}) | |||||
that.setData({ | |||||
value1:that.data.result1, | |||||
value2:that.data.result2, | |||||
value3:that.data.result3, | |||||
billList:res.rows, | |||||
showPopup:false | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
reset(){ | |||||
this.setData({ | |||||
value1:'', | |||||
value2:'', | |||||
value3:'', | |||||
result1:'', | |||||
result2:'', | |||||
result3:'', | |||||
}) | |||||
this.onShow(); | |||||
}, | |||||
changeTab1(event){ | |||||
this.setData({ | |||||
result1: event.detail, | |||||
value1: event.detail | |||||
}); | |||||
var that = this ; | |||||
let form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
billNum:'',//票据编号 | |||||
billType:that.data.result3,//票据状态 | |||||
billDate:that.data.billDate,//开盘日期 | |||||
accountSummary:that.data.result2,//结算事项 | |||||
incomeExpensesType:that.data.result1,//收支类型 | |||||
orderByColumn:'billDate', | |||||
isAsc:'desc', | |||||
settleStyle:'1', | |||||
method:'GET', | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTDETAIL , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
rrr.incomeExpensesTypeText = UTIL.getTransform(rrr.incomeExpensesType,that.data.expensesTypeOptions); | |||||
rrr.daiAmount = rrr.daiAmount == null ? '0.00':parseFloat(rrr.daiAmount).toFixed(2) | |||||
rrr.jieAmount = rrr.jieAmount == null ? '0.00':parseFloat(rrr.jieAmount).toFixed(2) | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows, | |||||
showPopup:false | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
changeTab2(event){ | |||||
this.setData({ | |||||
result2: event.detail, | |||||
value2: event.detail | |||||
}); | |||||
var that = this ; | |||||
let form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
billNum:'',//票据编号 | |||||
billType:that.data.result3,//票据状态 | |||||
billDate:that.data.billDate,//开盘日期 | |||||
accountSummary:that.data.result2,//结算事项 | |||||
incomeExpensesType:that.data.result1,//收支类型 | |||||
orderByColumn:'billDate', | |||||
isAsc:'desc', | |||||
settleStyle:'1', | |||||
method:'GET', | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTDETAIL , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
rrr.incomeExpensesTypeText = UTIL.getTransform(rrr.incomeExpensesType,that.data.expensesTypeOptions); | |||||
rrr.daiAmount = rrr.daiAmount == null ? '0.00':parseFloat(rrr.daiAmount).toFixed(2) | |||||
rrr.jieAmount = rrr.jieAmount == null ? '0.00':parseFloat(rrr.jieAmount).toFixed(2) | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows, | |||||
showPopup:false | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
changeTab3(event){ | |||||
this.setData({ | |||||
result3: event.detail, | |||||
value3: event.detail | |||||
}); | |||||
var that = this ; | |||||
let form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
billNum:'',//票据编号 | |||||
billType:that.data.result3,//票据状态 | |||||
billDate:that.data.billDate,//开盘日期 | |||||
accountSummary:that.data.result2,//结算事项 | |||||
incomeExpensesType:that.data.result1,//收支类型 | |||||
orderByColumn:'billDate', | |||||
isAsc:'desc', | |||||
settleStyle:'1', | |||||
method:'GET', | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTDETAIL , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
rrr.incomeExpensesTypeText = UTIL.getTransform(rrr.incomeExpensesType,that.data.expensesTypeOptions); | |||||
rrr.daiAmount = rrr.daiAmount == null ? '0.00':parseFloat(rrr.daiAmount).toFixed(2) | |||||
rrr.jieAmount = rrr.jieAmount == null ? '0.00':parseFloat(rrr.jieAmount).toFixed(2) | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows, | |||||
showPopup:false | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
goHX(e){ | |||||
var that = this ; | |||||
var id = e.currentTarget.dataset.id; | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: '确定核销?', | |||||
success (res) { | |||||
if (res.confirm) { | |||||
UTIL.httpRequest(API.URL_GET_GETDETAILOFF+id , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '核销成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onShow(); | |||||
} | |||||
} | |||||
}) | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消') | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goZF(e){ | |||||
var that = this ; | |||||
var id = e.currentTarget.dataset.id; | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: '确定作废?', | |||||
success (res) { | |||||
if (res.confirm) { | |||||
UTIL.httpRequest(API.URL_GET_GETDETAILCANCEL+id , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '作废成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onShow(); | |||||
} | |||||
} | |||||
}) | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消') | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goYS(e){ | |||||
var that = this ; | |||||
var id = e.currentTarget.dataset.id; | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: '确定遗失?', | |||||
success (res) { | |||||
if (res.confirm) { | |||||
UTIL.httpRequest(API.URL_GET_GETDETAILLOSE+id , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '操作成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onShow(); | |||||
} | |||||
} | |||||
}) | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消') | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goSC(e){ | |||||
var that = this ; | |||||
var id = e.currentTarget.dataset.id; | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: '确定删除?', | |||||
success (res) { | |||||
if (res.confirm) { | |||||
UTIL.httpRequest(API.URL_GET_GETDETAILREMOVE+id , {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '删除成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onShow(); | |||||
} | |||||
} | |||||
}) | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消') | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goSCLS(e){ | |||||
var that = this ; | |||||
var id = e.currentTarget.dataset.id; | |||||
var options = JSON.stringify(e.currentTarget.dataset.options); | |||||
wx.navigateTo({ | |||||
url: 'flowAdd/flowAdd?options='+options, | |||||
}) | |||||
return; | |||||
var form = { | |||||
accountDate:'',//日期 | |||||
accountId:'',//账户id | |||||
accountName:'',//账户名称 | |||||
accountSummary:'',//摘要 | |||||
accountType:'',//账户类型101=现金,102=银行存款 | |||||
billNum:'',//单据编号 | |||||
checkedStatus:'',//审核状态:1未提交、2待审核、3已审核、4已挂起 | |||||
contractionId:'',//关联合同选择发包收入的时候必填 | |||||
incomeType:'',//收入类型 1经营收入、2发包收入(这个关联合同)、3补助收入、4其他收入、5投资收益 | |||||
incomeDate:'',//收入时间 | |||||
incomeExpensesType:'',//收支类别1收入2支出 | |||||
isBill:'',//是否来源票据0:否 1:是 | |||||
jieAmount:'',//收入金额 | |||||
subjectId:'',//对方科目编码 | |||||
subjectNameAll:'',//对方科目名称 | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWADD, {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '核销成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
that.onLoad(); | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
goAdd(){ | |||||
wx.navigateTo({ | |||||
url: 'add/add', | |||||
}) | |||||
}, | |||||
goEdit(e){ | |||||
var options = JSON.stringify(e.currentTarget.dataset.options); | |||||
wx.navigateTo({ | |||||
url: 'edit/edit?detail='+options, | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
onReady() { | onReady() { | ||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow() { | onShow() { | ||||
var that = this; | |||||
that.getDict(); | |||||
var form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
billNum:'',//票据编号 | |||||
billType:'',//票据状态 | |||||
billDate:'',//开盘日期 | |||||
accountSummary:'',//结算事项 | |||||
incomeExpensesType:'',//收支类型 | |||||
orderByColumn:'billDate', | |||||
isAsc:'desc', | |||||
settleStyle:'1' | |||||
} | |||||
console.log(form); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTDETAIL , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
rrr.incomeExpensesTypeText = UTIL.getTransform(rrr.incomeExpensesType,that.data.expensesTypeOptions); | |||||
rrr.daiAmount = rrr.daiAmount == null ? '0.00':parseFloat(rrr.daiAmount).toFixed(2) | |||||
rrr.jieAmount = rrr.jieAmount == null ? '0.00':parseFloat(rrr.jieAmount).toFixed(2) | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows | |||||
}) | |||||
} | |||||
}) | |||||
// let query = wx.createSelectorQuery().in(this); | |||||
// query.selectAll('.cell_right').boundingClientRect(function(rect){ | |||||
// console.log(rect) | |||||
// }).exec(); | |||||
// console.log(query.selectAll('.cell_right')); | |||||
}, | }, | ||||
goSearch(e){ | |||||
console.log(e); | |||||
var that = this; | |||||
let form = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
billNum:e.detail,//票据编号 | |||||
billType:that.data.result3,//票据状态 | |||||
billDate:that.data.billDate,//开盘日期 | |||||
accountSummary:that.data.result2,//结算事项 | |||||
incomeExpensesType:that.data.result1,//收支类型 | |||||
orderByColumn:'billDate', | |||||
isAsc:'desc', | |||||
settleStyle:'1', | |||||
method:'GET', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETBILLLISTDETAIL , form, { | |||||
success: (res) => { | |||||
res.rows.map(rrr=>{ | |||||
rrr.billTypeText = UTIL.getTransform(rrr.billType,that.data.billTypeOptions); | |||||
rrr.incomeExpensesTypeText = UTIL.getTransform(rrr.incomeExpensesType,that.data.expensesTypeOptions); | |||||
rrr.daiAmount = rrr.daiAmount == null ? '0.00':parseFloat(rrr.daiAmount).toFixed(2) | |||||
rrr.jieAmount = rrr.jieAmount == null ? '0.00':parseFloat(rrr.jieAmount).toFixed(2) | |||||
}) | |||||
that.setData({ | |||||
billList:res.rows | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
upload(e){ | |||||
this.setData({itemId:e.currentTarget.dataset.id}); | |||||
this.asyncFun(e.currentTarget.dataset.id) | |||||
this.setData({"fileList":[]}) | |||||
}, | |||||
asyncFun(id){ | |||||
let uploadList = this.data.uploadOptions | |||||
let newList = [] | |||||
let _this = this | |||||
uploadList.map( res => { | |||||
let oData = { | |||||
tableId: id, | |||||
tableName: "t_contraction_info", //上传表 | |||||
bizPath: "contraction", | |||||
fileType: res.dictValue, //附件类型 1原始发票 2会议纪要 3会议照片 4 参会人员签字 | |||||
method:'GET' | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||||
success: (rr) => { | |||||
if(rr.code==200&&rr.rows.length>0){ | |||||
rr.rows.map((rrr,index) => { | |||||
rrr.url = wx.getStorageSync('dressCode') + 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}) | |||||
} | |||||
} | |||||
}) | |||||
}) | |||||
}, | |||||
afterRead(event) { | |||||
let _this = this | |||||
wx.showLoading({ | |||||
title: '上传中...' | |||||
}) | |||||
let fileForm={ | |||||
file: event.detail, | |||||
fileType:event.currentTarget.dataset.idx, | |||||
tableName: "t_contraction_info", //上传表 | |||||
bizPath: "contraction", //上传目录 | |||||
tableId:_this.data.itemId | |||||
} | |||||
this.uploadFile(fileForm,event) | |||||
}, | |||||
uploadFile(uploadFile,event) { | |||||
let _this = this | |||||
return new Promise((resolve, reject) => { | |||||
wx.uploadFile({ | |||||
url: wx.getStorageSync('dressCode')+API.URL_GET_UPLOAD, | |||||
filePath: uploadFile.file.file.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":wx.getStorageSync('dressCode')+res.data.fileUrl | |||||
}) | |||||
_this.setData({"fileList":files}) | |||||
wx.hideLoading() | |||||
} | |||||
}, | |||||
fail: (err) => { | |||||
//上传失败:修改pedding为reject | |||||
reject(err) | |||||
} | |||||
}); | |||||
}) | |||||
}, | |||||
deleteImg(event){ | |||||
this.setData({"fileEvent":event}) | |||||
this.setData({"showPopup2":true}); | |||||
}, | |||||
closeBox(){ | |||||
this.setData({"showUpload":false}) | |||||
this.setData({"showRelevance":false}) | |||||
}, | |||||
cancelTem:function(e){ | |||||
this.setData({"fileEvent":"{}"}); | |||||
this.setData({"showPopup":false}); | |||||
}, | |||||
confirmTem:function(e){ | |||||
let event = this.data.fileEvent | |||||
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({showPopup2:false}); | |||||
wx.showToast({ | |||||
title: '删除成功!', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
*/ | */ | ||||
@@ -9,7 +9,7 @@ | |||||
value="{{ value }}" | value="{{ value }}" | ||||
shape="round" | shape="round" | ||||
background="transparent" | background="transparent" | ||||
placeholder="请输入搜索关键词" | |||||
placeholder="请输入票据编号搜索" | |||||
clearable | clearable | ||||
bind:change="goSearch" | bind:change="goSearch" | ||||
/> | /> | ||||
@@ -17,9 +17,9 @@ | |||||
</view> | </view> | ||||
<view class="top_view"> | <view class="top_view"> | ||||
<van-dropdown-menu active-color="#5CAE77" bind:change="changeTab" id="top_view1" style="flex: 1;"> | <van-dropdown-menu active-color="#5CAE77" bind:change="changeTab" id="top_view1" style="flex: 1;"> | ||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab" /> | |||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab1" /> | |||||
<van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | ||||
<van-dropdown-item value="{{ value3 }}" options="{{ option3 }}" bind:change="changeTab2" /> | |||||
<van-dropdown-item value="{{ value3 }}" options="{{ option3 }}" bind:change="changeTab3" /> | |||||
</van-dropdown-menu> | </van-dropdown-menu> | ||||
<view class="sx_view" bindtap="showPopup"> | <view class="sx_view" bindtap="showPopup"> | ||||
<text>筛选</text> | <text>筛选</text> | ||||
@@ -28,29 +28,29 @@ | |||||
</view> | </view> | ||||
<scroll-view scroll-y refresher-threshold="0" style="height:100%" bindscrolltolower="paging" lower-threshold="100"> | <scroll-view scroll-y refresher-threshold="0" style="height:100%" bindscrolltolower="paging" lower-threshold="100"> | ||||
<!-- wx:for="{{list}}" wx:key="index" wx:for-item="item" right-width="{{ 50 }}" --> | <!-- wx:for="{{list}}" wx:key="index" wx:for-item="item" right-width="{{ 50 }}" --> | ||||
<van-swipe-cell right-width="{{ 330 }}" class="workflow" wx:for="{{5}}" > | |||||
<van-swipe-cell right-width="{{ item.billType != '5' ? 165 : 0 }}" class="workflow" wx:for="{{billList}}" wx:key="index"> | |||||
<view class="li" > | <view class="li" > | ||||
<view style="width:70%;flex:7;"> | <view style="width:70%;flex:7;"> | ||||
<view class="tit_box"> | <view class="tit_box"> | ||||
<image src="/image/apply/icon_text.png" style="width: 16px;height: 19px;margin-right: 2px;"></image> | <image src="/image/apply/icon_text.png" style="width: 16px;height: 19px;margin-right: 2px;"></image> | ||||
<text class="tit">结算事项名称名称名称</text> | |||||
<text class="tit_tab5">已开出</text> | |||||
<text class="tit">{{item.billNum}}</text> | |||||
<text class="tit_tab5">{{item.billTypeText}}</text> | |||||
</view> | </view> | ||||
<view class="money_box"> | <view class="money_box"> | ||||
<view style="width: 50%;"> | <view style="width: 50%;"> | ||||
<text>支出(元)</text> | <text>支出(元)</text> | ||||
<text style="color: #E90000;font-size: 22px;margin-top: 10px;">150.00</text> | |||||
<text style="color: #E90000;font-size: 22px;margin-top: 10px;">{{item.daiAmount ? item.daiAmount : '0.00'}}</text> | |||||
<view style="display: flex;align-items: center;margin-top: 10px;"> | <view style="display: flex;align-items: center;margin-top: 10px;"> | ||||
<image src="/image/icon/clock_icon.png" style="width: 15px;height: 15px;border-radius:5px;margin-right: 5px;"></image> | <image src="/image/icon/clock_icon.png" style="width: 15px;height: 15px;border-radius:5px;margin-right: 5px;"></image> | ||||
<text>2021.09.01</text> | |||||
<text>{{item.billDate}}</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view style="width: 50%;"> | <view style="width: 50%;"> | ||||
<text>收入(元)</text> | <text>收入(元)</text> | ||||
<text style="color: #5CAE77;font-size: 22px;margin-top: 10px;">150.00</text> | |||||
<text style="color: #5CAE77;font-size: 22px;margin-top: 10px;">{{item.jieAmount ? item.jieAmount : '0.00'}}</text> | |||||
<view style="display: flex;align-items: center;margin-top: 10px;justify-content: space-between;"> | <view style="display: flex;align-items: center;margin-top: 10px;justify-content: space-between;"> | ||||
<text style="border-bottom: 1px solid;">59</text> | |||||
<text style="color: #B3DB62;">现金</text> | |||||
<text style="border-bottom: 1px solid;">{{item.cashierFlowId ? item.cashierFlowId : ''}}</text> | |||||
<text style="color: #B3DB62;">{{item.incomeExpensesTypeText}}</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -58,50 +58,32 @@ | |||||
</view> | </view> | ||||
<view class="list_btn"> | <view class="list_btn"> | ||||
<view> | <view> | ||||
<view class="btn btn_xf">核销</view> | |||||
<view class="btn btn_qs">生成流水</view> | |||||
<!-- <view class="btn btn_zf">作废</view> --> | |||||
<view class="btn btn_xf" data-id="{{item.id}}" bindtap="goHX" wx:if="{{item.billType == '4'}}">核销</view> | |||||
<view class="btn btn_qs" data-options="{{item}}" bindtap="goSCLS" wx:if="{{item.cashierFlowId == null && item.billType == '4' && item.accountId != null}}">生成流水</view> | |||||
<view class="btn btn_zf" data-id="{{item.id}}" bindtap="goZF">作废</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view slot="right" class="cell_right"> | |||||
<view slot="right" class="cell_right" wx:if="{{item.billType != '5'}}"> | |||||
<!-- <view class="button_box"><view></view></view> --> | <!-- <view class="button_box"><view></view></view> --> | ||||
<view class="button_box" bindtap="showTransactionDialog"> | |||||
<view bindtap="showReceiptDialog"> | |||||
<view class="button_box" data-id="{{item.id}}" bindtap="goYS"> | |||||
<view> | |||||
<image src="/image/icon/icon_ys.png" style="width: 20.55px;height: 20.55px;"></image> | <image src="/image/icon/icon_ys.png" style="width: 20.55px;height: 20.55px;"></image> | ||||
<text>遗失</text> | <text>遗失</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="button_box" bindtap="goRegular"> | |||||
<view> | |||||
<image src="/image/icon/icon_glls.png" style="width: 20.55px;height: 20.55px;"></image> | |||||
<text>关联\n流水</text> | |||||
</view> | |||||
</view> | |||||
<view class="button_box" bindtap="goRegular"> | |||||
<view class="button_box" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | |||||
<view> | <view> | ||||
<image src="/image/icon/icon_scfj.png" style="width: 20.55px;height: 20.55px;"></image> | <image src="/image/icon/icon_scfj.png" style="width: 20.55px;height: 20.55px;"></image> | ||||
<text>附件</text> | <text>附件</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="button_box" bindtap="goRegular"> | |||||
<view> | |||||
<image src="/image/icon/icon_zf.png" style="width: 20.55px;height: 20.55px;"></image> | |||||
<text>作废</text> | |||||
</view> | |||||
</view> | |||||
<view class="button_box" bindtap="goRegular"> | |||||
<view class="button_box" data-options="{{item}}" bindtap="goEdit" wx:if="{{item.cashierFlowId == null && item.billType == '4'}}"> | |||||
<view> | <view> | ||||
<image src="/image/icon/icon_xg2.png" style="width: 20.55px;height: 20.55px;"></image> | <image src="/image/icon/icon_xg2.png" style="width: 20.55px;height: 20.55px;"></image> | ||||
<text>修改</text> | <text>修改</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="button_box" bindtap="goRegular"> | |||||
<view> | |||||
<image src="/image/icon/icon_sc.png" style="width: 20.55px;height: 20.55px;"></image> | |||||
<text>删除</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;flex-direction: column;justify-content: center;background-color: rgb(98,173,102,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | <view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(98,173,102,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | ||||
@@ -116,7 +98,7 @@ | |||||
</van-swipe-cell> | </van-swipe-cell> | ||||
</scroll-view> | </scroll-view> | ||||
<!-- <van-action-sheet show="{{showUpload}}" title="附件" bind:close="closeBox"> | |||||
<van-action-sheet show="{{showUpload}}" title="附件" bind:close="closeBox"> | |||||
<scroll-view scroll-y="true" style="height: 600rpx;" scroll-top="0"> | <scroll-view scroll-y="true" style="height: 600rpx;" scroll-top="0"> | ||||
<view class="fj-box"> | <view class="fj-box"> | ||||
<view class="fj-li" wx:for="{{fileList}}" wx:key="index" wx:for-item="item" > | <view class="fj-li" wx:for="{{fileList}}" wx:key="index" wx:for-item="item" > | ||||
@@ -125,15 +107,17 @@ | |||||
</view> | </view> | ||||
<view class="img_box"> | <view class="img_box"> | ||||
<view class="img_li"> | <view class="img_li"> | ||||
<van-upload file-list="{{ item.list }}" deletable="{{false}}" show-upload="{{false}}" bind:click-preview="lookDown"> | |||||
<van-upload file-list="{{ item.list }}" bind:after-read="afterRead" bind:delete="deleteImg" data-idx="{{index}}" bind:click-preview="lookDown"> | |||||
</van-upload> | </van-upload> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</scroll-view> | </scroll-view> | ||||
</van-action-sheet>custom-style="height: 20%;" --> | |||||
</van-action-sheet> | |||||
<modal hidden="{{!showPopup2}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | |||||
</modal> | |||||
<van-popup | <van-popup | ||||
show="{{ showPopup }}" | show="{{ showPopup }}" | ||||
round | round | ||||
@@ -142,142 +126,50 @@ | |||||
bind:close="onClose" | bind:close="onClose" | ||||
> | > | ||||
<view class="sx_box" style="margin-top:{{isIPX?'88px':'64px'}};"> | <view class="sx_box" style="margin-top:{{isIPX?'88px':'64px'}};"> | ||||
<text class="sx_tit">我方账户</text> | |||||
<text class="sx_tit">收支类型</text> | |||||
<van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
<van-checkbox use-icon-slot name="a"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'a') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
乳山市徐家镇农村财务 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="b"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'b') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
重庆农商行 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
村级虚拟账户 | |||||
<van-radio-group value="{{ result1 }}" bind:change="onChangeSZ"> | |||||
<van-radio use-icon-slot name="{{item.value}}" wx:for="{{option1}}" wx:key="index"> | |||||
<view slot="icon" class="{{result1 == item.value ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
{{item.text}} | |||||
</view> | </view> | ||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
张村基本账户 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
威海临港经济技术开发区草庙子镇毕家庄股份经济合作社 | |||||
</view> | |||||
</van-checkbox> | |||||
</van-checkbox-group> | |||||
</van-radio> | |||||
</van-radio-group> | |||||
<text class="sx_tit">业务类型</text> | |||||
<text class="sx_tit">结算方式</text> | |||||
<van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
<van-checkbox use-icon-slot name="a"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'a') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
国内汇票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="b"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'b') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
国外汇票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
人行大额 | |||||
<van-radio-group value="{{ result2 }}" bind:change="onChangeJS"> | |||||
<van-radio use-icon-slot name="{{item.value}}" wx:for="{{option2}}" wx:key="index"> | |||||
<view slot="icon" class="{{result2 == item.value ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
{{item.text}} | |||||
</view> | </view> | ||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
人行小额 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
现金存款 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
转账收入 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
汇票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
本票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
支票 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
冲账 | |||||
</view> | |||||
</van-checkbox> | |||||
</van-checkbox-group> | |||||
</van-radio> | |||||
</van-radio-group> | |||||
<text class="sx_tit">来往帐标识</text> | |||||
<text class="sx_tit">票据状态</text> | |||||
<van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
<van-checkbox use-icon-slot name="a"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'a') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
全部 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="b"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'b') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
来账/汇入 | |||||
<van-radio-group value="{{ result3 }}" bind:change="onChangePJ"> | |||||
<van-radio use-icon-slot name="{{item.value}}" wx:for="{{option3}}" wx:key="index"> | |||||
<view slot="icon" class="{{result3 == item.value ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
{{item.text}} | |||||
</view> | </view> | ||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
往账/汇出 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
外部交易 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
内部往来 | |||||
</view> | |||||
</van-checkbox> | |||||
<van-checkbox use-icon-slot name="c"> | |||||
<view slot="icon" class="{{iOf.indexOf(result,'c') > -1 ? 'ys_checkbox_icon':'checkbox_icon'}}"> | |||||
部分内部往来 | |||||
</view> | |||||
</van-checkbox> | |||||
</van-checkbox-group> | |||||
</van-radio> | |||||
</van-radio-group> | |||||
<text class="sx_tit">金额范围</text> | |||||
<view class="sx_input_box"> | |||||
<input placeholder="最低价" /><text> - </text><input placeholder="最高价" /> | |||||
</view> | |||||
<text class="sx_tit">交易日期</text> | |||||
<text class="sx_tit">开票日期</text> | |||||
<view class="sx_input_box"> | <view class="sx_input_box"> | ||||
<input placeholder="开始日期" /><text> - </text><input placeholder="结束日期" /> | |||||
<picker mode="date" value="{{billDate}}" bindchange="bindDateBeginChange"> | |||||
<view class="picker"> | |||||
<input disabled placeholder="开始日期" value="{{billDate}}" /> | |||||
</view> | |||||
</picker> | |||||
</view> | </view> | ||||
<view class="bottom"> | <view class="bottom"> | ||||
<!-- <view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> --> | <!-- <view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> --> | ||||
<view class="btn1" bindtap="back">重置</view> | |||||
<view class="btn1" bindtap="reset">重置</view> | |||||
<view class="btn2" data-type="0" bindtap="goSubmit" hover-class="btnView">确定</view> | <view class="btn2" data-type="0" bindtap="goSubmit" hover-class="btnView">确定</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -296,10 +188,4 @@ | |||||
<!-- <image src="/image/icon/icon_delete.png" style="width: 20px; height: 20px;position: absolute;top: 0;"></image> --> | <!-- <image src="/image/icon/icon_delete.png" style="width: 20px; height: 20px;position: absolute;top: 0;"></image> --> | ||||
<view style="text-align: center;padding: 20px;border-bottom: 1px dashed #e6e6e6;width: 92%;margin: 0 auto;color: #2C8E68;font-size: 18px;">查询回单明细参数</view> | <view style="text-align: center;padding: 20px;border-bottom: 1px dashed #e6e6e6;width: 92%;margin: 0 auto;color: #2C8E68;font-size: 18px;">查询回单明细参数</view> | ||||
<van-field value="{{ value }}" required label="下发单位" placeholder="请选择下发单位" input-align="right" is-link arrow-direction="down" bind:change="onChange" /> | <van-field value="{{ value }}" required label="下发单位" placeholder="请选择下发单位" input-align="right" is-link arrow-direction="down" bind:change="onChange" /> | ||||
</van-dialog> | |||||
<wxs module="iOf"> | |||||
var indexOf = function(name,value){ | |||||
return name.indexOf(value); | |||||
} | |||||
module.exports.indexOf = indexOf; | |||||
</wxs> | |||||
</van-dialog> |
@@ -213,16 +213,16 @@ text{display: block;} | |||||
font-size: 18px; | font-size: 18px; | ||||
color: #5CAE77; | color: #5CAE77; | ||||
} | } | ||||
.van-checkbox__label { | |||||
.van-radio__label { | |||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
.van-checkbox__icon-wrap { | |||||
.van-radio__icon-wrap { | |||||
border-radius: 5px; | border-radius: 5px; | ||||
} | } | ||||
.van-checkbox__icon { | |||||
.van-radio__icon { | |||||
border-radius: 5px; | border-radius: 5px; | ||||
border: 2px solid #2C8E68!important; | border: 2px solid #2C8E68!important; | ||||
background-color: rgba(44, 142, 104, 0.2); | background-color: rgba(44, 142, 104, 0.2); | ||||
@@ -365,10 +365,10 @@ text{display: block;} | |||||
background-color: #878787; | background-color: #878787; | ||||
} | } | ||||
.button_box:nth-child(5){ | .button_box:nth-child(5){ | ||||
background-color: #FC9A55; | |||||
background-color: #E90000; | |||||
} | } | ||||
.button_box:nth-child(6){ | .button_box:nth-child(6){ | ||||
background-color: #E90000; | |||||
background-color: #FC9A55; | |||||
} | } | ||||
.button_box view text{ | .button_box view text{ | ||||
display: block; | display: block; | ||||
@@ -394,6 +394,7 @@ text{display: block;} | |||||
border-radius: 1rem; | border-radius: 1rem; | ||||
border:1px solid #F6F6F6; | border:1px solid #F6F6F6; | ||||
margin-top: 10px; | margin-top: 10px; | ||||
font-size: 14px; | |||||
} | } | ||||
.ys_checkbox_icon{ | .ys_checkbox_icon{ | ||||
background-color: rgba(92, 174, 119, 0.3); | background-color: rgba(92, 174, 119, 0.3); | ||||
@@ -403,8 +404,9 @@ text{display: block;} | |||||
border:1px solid #5CAE77; | border:1px solid #5CAE77; | ||||
color: #5CAE77; | color: #5CAE77; | ||||
margin-top: 10px; | margin-top: 10px; | ||||
font-size: 14px; | |||||
} | } | ||||
.van-checkbox-group{ | |||||
.van-radio-group{ | |||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
} | } | ||||
@@ -474,6 +476,7 @@ text{display: block;} | |||||
color: #fff; | color: #fff; | ||||
border-radius: 5rem; | border-radius: 5rem; | ||||
margin-top: 20px; | margin-top: 20px; | ||||
min-width: 76px; | |||||
} | } | ||||
.btn:nth-child(1){ | .btn:nth-child(1){ | ||||
margin-top: 0; | margin-top: 0; | ||||
@@ -0,0 +1,281 @@ | |||||
// pages/billUse/flowAdd/flowAdd.js | |||||
import * as UTIL from '../../../utils/util.js'; | |||||
import * as API from '../../../utils/API.js'; | |||||
let EVN_CONFIG = require('../../../env/env'); | |||||
const app = getApp(); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
isIPX: app.globalData.isIPX, | |||||
formData:{ | |||||
listId: '', //票据ID | |||||
billNum: '', //票据编号 必填 | |||||
billType: '4', //票据状态 | |||||
bookId: '', //账套ID | |||||
deptId: '', //系统机构代码 | |||||
billDate: '', //开票日期 必填 | |||||
accountSummary: '',//摘要 必填 | |||||
incomeExpensesType: "1", //收支类型 | |||||
settleStyle: '', //结算方式 | |||||
jieAmount: '', //收入金额 | |||||
daiAmount: '', //支出金额 | |||||
preparedBy: '', //经办人 必填 | |||||
payee: '', //收款方 必填 | |||||
payer: '', //付款方 必填 | |||||
accountId: '', //出纳账户ID | |||||
accountName: '', //出纳账户 | |||||
accountType: '', //账户类型 字典account_type | |||||
cashierFlowId: '' //出纳流水ID | |||||
}, | |||||
//收入时间弹窗显隐 | |||||
srShow:false, | |||||
minDate:new Date().getTime() - 180* 24 * 60 * 60 * 1000, | |||||
maxDate:new Date().getTime() + 180* 24 * 60 * 60 * 1000, | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad(options) { | |||||
var that = this ; | |||||
console.log(options); | |||||
var detail = JSON.parse(options.detail); | |||||
console.log(detail); | |||||
// 结算方式字典查询 | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'settle_style', {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
jsfsOptions:res.data, | |||||
}) | |||||
detail.settleStyleText = UTIL.getTransform(detail.settleStyle,res.data); | |||||
this.setData({ | |||||
formData:detail | |||||
}) | |||||
} | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_GETLISTQUERY, {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
pjbhOptions:res.rows, | |||||
}) | |||||
} | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_SUBJECTLIST , {method:'GET'}, { | |||||
success: (res2) => { | |||||
that.setData({ | |||||
subjectOptions:res2.rows, | |||||
}) | |||||
} | |||||
}) | |||||
//出纳账户 | |||||
var sendData = { | |||||
pageNum:'1', | |||||
pageSize:'100', | |||||
accountName:'', | |||||
bankAccountNumber:'', | |||||
status:'N', | |||||
method:'GET', | |||||
accountType:102 | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ | |||||
success: (res) => { | |||||
console.log(res.rows) | |||||
that.setData({ | |||||
accountList:res.rows | |||||
}) | |||||
} | |||||
}) | |||||
this.setData({ | |||||
formData:detail | |||||
}) | |||||
}, | |||||
back:function(){ | |||||
wx.navigateBack({ | |||||
delta: 1 | |||||
}) | |||||
}, | |||||
onsrDate(){ | |||||
this.setData({srShow:true}) | |||||
}, | |||||
onClose(){ | |||||
this.setData({srShow:false}) | |||||
}, | |||||
onConfirm(e){ | |||||
console.log(e); | |||||
let data = this.getNewDate(new Date(e.detail)); | |||||
console.log(data); | |||||
this.setData({'formData.billDate':data}) | |||||
this.setData({srShow:false}) | |||||
}, | |||||
getNewDate(date){ | |||||
//date是传过来的时间戳,注意需为13位,10位需*1000 | |||||
//也可以不传,获取的就是当前时间 | |||||
var time = new Date(date); | |||||
var year= time.getFullYear() //年 | |||||
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月 | |||||
var day = ("0" + time.getDate()).slice(-2); //日 | |||||
var mydate = year + "-" + month + "-" + day; | |||||
return mydate | |||||
}, | |||||
onpjbhShow(){ | |||||
this.setData({pjbhShow:true}) | |||||
}, | |||||
onjsfsShow(){ | |||||
this.setData({jsfsShow:true}) | |||||
}, | |||||
oncnzhShow(){ | |||||
this.setData({cnzhShow:true}) | |||||
}, | |||||
onCancelcrzh(){ | |||||
this.setData({crzhShow:false}) | |||||
}, | |||||
onCancelcrlx(){ | |||||
this.setData({crlxShow:false,}) | |||||
}, | |||||
onCanceljsfs(){ | |||||
this.setData({jsfsShow:false,}) | |||||
}, | |||||
onCancelcrcnzh(){ | |||||
this.setData({cnzhShow:false,}) | |||||
}, | |||||
bindPickerChange (e) { | |||||
console.log(e); | |||||
let obj = e.detail.value; | |||||
this.setData({ | |||||
pjbhShow:false, | |||||
["formData.billNum"]:obj.billNum, | |||||
["formData.listId"]:obj.id, | |||||
}) | |||||
}, | |||||
bindPickerChangeJsfs (e) { | |||||
console.log(e); | |||||
let obj = e.detail.value; | |||||
this.setData({ | |||||
jsfsShow:false, | |||||
["formData.settleStyle"]:obj.dictValue, | |||||
["formData.settleStyleText"]:obj.dictLabel, | |||||
}) | |||||
}, | |||||
bindPickerChangeCnzh (e) { | |||||
console.log(e); | |||||
let obj = e.detail.value; | |||||
this.setData({ | |||||
cnzhShow:false, | |||||
["formData.accountName"]:obj.accountName, | |||||
["formData.accountId"]:obj.accountId, | |||||
}) | |||||
}, | |||||
swichAccounting:function(e){ | |||||
var that = this; | |||||
let data = this.data.formData; | |||||
if(data.billNum == ''){ | |||||
UTIL.showToastNoneIcon('请选择票据编号!'); | |||||
} | |||||
if(data.billDate == ''){ | |||||
UTIL.showToastNoneIcon('请选择开票日期!'); | |||||
} | |||||
if(data.payee == ''){ | |||||
UTIL.showToastNoneIcon('请填写收款方!'); | |||||
} | |||||
if(data.payer == ''){ | |||||
UTIL.showToastNoneIcon('请填写付款方!'); | |||||
} | |||||
if(data.accountSummary == ''){ | |||||
UTIL.showToastNoneIcon('请填写结算事项!'); | |||||
} | |||||
if(data.settleStyle == ''){ | |||||
UTIL.showToastNoneIcon('请选择结算方式!'); | |||||
} | |||||
if(data.accountName == ''){ | |||||
UTIL.showToastNoneIcon('请选择出纳账户!'); | |||||
} | |||||
data.method = "POST"; | |||||
console.log(data); | |||||
UTIL.httpRequest(API.URL_GET_GETBILLEDIT, data, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: '修改成功', | |||||
icon: 'success', | |||||
duration: 2000, | |||||
}) | |||||
setTimeout(function(){ | |||||
that.back(); | |||||
},2000) | |||||
}else{ | |||||
UTIL.showToastNoneIcon(res.msg); | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
inputChange(e){ | |||||
var that = this ; | |||||
var obj = e.detail; | |||||
var name = e.currentTarget.dataset.name; | |||||
that.setData({ | |||||
[name] : obj.value | |||||
}) | |||||
}, | |||||
onChange(e){ | |||||
this.setData({ | |||||
["formData.incomeExpensesType"] : e.detail, | |||||
["formData.jieAmount"]:'0.00', | |||||
["formData.daiAmount"]:'0.00', | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload() { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh() { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom() { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage() { | |||||
} | |||||
}) |