fromdao251117
This commit is contained in:
parent
5d6bdcb1e3
commit
5d23fe6469
|
|
@ -66,7 +66,7 @@
|
|||
app.globalData.storselect = '/';
|
||||
app.globalData.storlist = {
|
||||
'/': 'https://ciyon.ciy.cn/ud/',
|
||||
'A': 'https://cf5.xinquanyou.cn/ud/'
|
||||
'A': 'https://cf5.nyyzsoft.cn/ud/'
|
||||
};
|
||||
app.globalData.stortransfer = ['/'];
|
||||
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
setInterval(() => {
|
||||
if (app.globalData._restorage) {
|
||||
app.callajax({
|
||||
app.callfunc({
|
||||
func: 'login.restorage',
|
||||
data: {},
|
||||
loadhide: true,
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
}
|
||||
app.globalData._restorage = false;
|
||||
if (app.globalData.errdata.length > 0) {
|
||||
app.callajax({
|
||||
app.callfunc({
|
||||
func: 'login.uperr',
|
||||
data: {
|
||||
meid: app.getme().id,
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
//lopn 结合me,将数据上传到平台
|
||||
function getnewnotice() {
|
||||
return;
|
||||
app.callajax({
|
||||
app.callfunc({
|
||||
func: 'me.notice_new',
|
||||
showload: false,
|
||||
success: json => {
|
||||
|
|
@ -141,6 +141,8 @@
|
|||
|
||||
//#ifdef MP-WEIXIN
|
||||
const accountInfo = uni.getAccountInfoSync();
|
||||
app.globalData._wxappid = accountInfo.miniProgram.appId;
|
||||
app.globalData._wxenv = accountInfo.miniProgram.envVersion;
|
||||
app.globalData._version = accountInfo.miniProgram.version;
|
||||
if (!app.globalData._version)
|
||||
app.globalData._version = accountInfo.miniProgram.envVersion;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="_voice" @touchstart="start" @touchend="stop">
|
||||
<view class="_voice" @touchstart="start" @touchend="stop" v-if="benable">
|
||||
<ciy-ani class="_txt" ref="ani">{{txt}}</ciy-ani>
|
||||
<ciy-svgimg :src="svg" class="_img" :style="{filter:'hue-rotate('+deg+'deg)'}"></ciy-svgimg>
|
||||
</view>
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
benable: true,
|
||||
bst: false,
|
||||
txt: '',
|
||||
deg: 0, //150 红
|
||||
|
|
@ -26,36 +27,40 @@
|
|||
computed: {},
|
||||
mounted() {
|
||||
var app = getApp();
|
||||
app.globalData.plugin_wechatsi_manager.onStop = res => {
|
||||
this.$emit('change', {
|
||||
txt: res.result,
|
||||
data: res
|
||||
});
|
||||
this.getrefsSync('ani', this).Doani('op0|op1,200');
|
||||
this.txt = res.result;
|
||||
if (this._t)
|
||||
clearTimeout(this._t);
|
||||
this._t = setTimeout(() => {
|
||||
this.getrefsSync('ani', this).Doani('op1|op0,sa1.5,300|hide');
|
||||
}, 5000);
|
||||
if (app.globalData.plugin_wechatsi_manager) {
|
||||
app.globalData.plugin_wechatsi_manager.onStop = res => {
|
||||
this.$emit('change', {
|
||||
txt: res.result,
|
||||
data: res
|
||||
});
|
||||
this.getrefsSync('ani', this).Doani('op0|op1,200');
|
||||
this.txt = res.result;
|
||||
if (this._t)
|
||||
clearTimeout(this._t);
|
||||
this._t = setTimeout(() => {
|
||||
this.getrefsSync('ani', this).Doani('op1|op0,sa1.5,300|hide');
|
||||
}, 5000);
|
||||
}
|
||||
app.globalData.plugin_wechatsi_manager.onStart = res => {
|
||||
console.log("成功开始录音识别", res)
|
||||
}
|
||||
app.globalData.plugin_wechatsi_manager.onError = res => {
|
||||
clearInterval(this._an);
|
||||
this.deg = 150; //红
|
||||
console.error("error msg", res.msg)
|
||||
}
|
||||
this._an = setInterval(() => {
|
||||
this.deg += 10;
|
||||
}, 100);
|
||||
} else {
|
||||
this.benable = false;
|
||||
}
|
||||
app.globalData.plugin_wechatsi_manager.onStart = res => {
|
||||
console.log("成功开始录音识别", res)
|
||||
}
|
||||
app.globalData.plugin_wechatsi_manager.onError = res => {
|
||||
clearInterval(this._an);
|
||||
this.deg = 150; //红
|
||||
console.error("error msg", res.msg)
|
||||
}
|
||||
this._an = setInterval(() => {
|
||||
this.deg += 10;
|
||||
}, 100);
|
||||
},
|
||||
unmounted() {
|
||||
clearInterval(this._an);
|
||||
},
|
||||
methods: {
|
||||
test(){
|
||||
test() {
|
||||
this.getrefsSync('ani', this).Doani('op0|op1,200');
|
||||
this.txt = 'res.result';
|
||||
if (this._t)
|
||||
|
|
@ -63,7 +68,7 @@
|
|||
this._t = setTimeout(() => {
|
||||
this.getrefsSync('ani', this).Doani('op1|op0,sa1.5,300|hide');
|
||||
}, 5000);
|
||||
|
||||
|
||||
},
|
||||
start() {
|
||||
this.bst = true;
|
||||
|
|
@ -82,12 +87,6 @@
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
._voice {
|
||||
position: fixed;
|
||||
bottom: 3em;
|
||||
left: calc(50vw - 1.5em);
|
||||
}
|
||||
|
||||
._voice ._img {
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@
|
|||
scopes: 'auth_base',
|
||||
onlyAuthorize: true
|
||||
});
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.wx_autouser',
|
||||
loadhide: true,
|
||||
data: {
|
||||
|
|
@ -296,7 +296,7 @@
|
|||
var epass = md5.md5(post.pass + app.globalData.tokensalt);
|
||||
post.pass = md5.md5(epass + post.auth);
|
||||
//._from = app.globalData._sysinfo;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.login_mobile', // login.login
|
||||
data: post
|
||||
});
|
||||
|
|
@ -319,7 +319,7 @@
|
|||
post.pass = md5.md5(post.pass + app.globalData.tokensalt);
|
||||
post.pass2 = '';
|
||||
//._from = app.globalData._sysinfo;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.reg_mobile', // login.reg
|
||||
data: post
|
||||
});
|
||||
|
|
@ -341,7 +341,7 @@
|
|||
if (post.pass != post.pass2)
|
||||
return this.toast('两次密码输入不同');
|
||||
post.pass = md5.md5(post.pass + app.globalData.tokensalt);
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.forgetpass', // login.reg
|
||||
data: post
|
||||
});
|
||||
|
|
@ -391,8 +391,10 @@
|
|||
if (this.ver !== 0)
|
||||
return;
|
||||
var app = getApp();
|
||||
var retjson = await this.callajax({
|
||||
func: 'login.debug',
|
||||
if(app.globalData._wxenv == 'release')
|
||||
return;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.debug_list',
|
||||
data: {}
|
||||
});
|
||||
this.tusers = retjson.list;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
if(!this.account)
|
||||
return this.toast(this.lang('capcode.noinput'));
|
||||
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: this.func,
|
||||
data:{account:this.account,length:this.codelength}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@
|
|||
|
||||
._gp._left {
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
._gp._left ._item {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
._gp ._item {
|
||||
|
|
@ -48,6 +53,7 @@
|
|||
gap: 0.5em;
|
||||
padding: 0.5em;
|
||||
min-width: 7em;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
._gp._itemright ._item {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,122 @@
|
|||
<template>
|
||||
<view class="_dbg" @tap.stop="showdbglist" v-if="bshow && me.id>0">
|
||||
<view class="_dbgbg">
|
||||
</view>
|
||||
<view class="_dbgtxt">
|
||||
{{me.id}}<br />
|
||||
{{me.name}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
._dbg {
|
||||
top: 10em;
|
||||
left: 1em;
|
||||
position: fixed;
|
||||
width: 4em;
|
||||
height: 4em;
|
||||
z-index: 10000000;
|
||||
}
|
||||
|
||||
._dbgbg {
|
||||
position: relative;
|
||||
background: #9412cc;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
._dbgtxt {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
padding: 0 0.3em;
|
||||
line-height: 1.3em;
|
||||
text-shadow: 1px 1px #ffffff, -1px -1px #ffffff, -1px 1px #ffffff, 1px -1px #ffffff;
|
||||
top: 0.7em;
|
||||
left: 0;
|
||||
font-size: 0.8em;
|
||||
color: #000000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
//支持本地缓存,自动翻译
|
||||
export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
bshow: true
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.me = this.getme();
|
||||
},
|
||||
methods: {
|
||||
async chguser(item) {
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.debug_chguser',
|
||||
data: {
|
||||
code: item.data.id
|
||||
}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me = this.objdeepmerge(this.me, retjson.me);
|
||||
getApp().setuserstorage(retjson);
|
||||
var page = this.com_getpage();
|
||||
page.me = this.me;
|
||||
if (page.dbgcallback)
|
||||
page.dbgcallback();
|
||||
},
|
||||
async mehide(item) {
|
||||
this.bshow = false;
|
||||
if (item.data > 0) {
|
||||
setTimeout(() => {
|
||||
this.bshow = true;
|
||||
}, item.data);
|
||||
}
|
||||
},
|
||||
async showdbglist() {
|
||||
var retjson = await this.callfunc({
|
||||
func: 'login.debug_list',
|
||||
cache: 3600,
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
var items = [];
|
||||
for (var i = 0; i < retjson.list.length; i++) {
|
||||
items.push({
|
||||
func: 'chguser',
|
||||
name: retjson.list[i].name,
|
||||
data: retjson.list[i]
|
||||
});
|
||||
}
|
||||
items.push({
|
||||
br: true
|
||||
});
|
||||
items.push({
|
||||
func: 'mehide',
|
||||
name: '消失5秒',
|
||||
style: 'color:var(--warn6)',
|
||||
data: 5000
|
||||
});
|
||||
items.push({
|
||||
func: 'mehide',
|
||||
name: '永久隐藏',
|
||||
style: 'color:var(--dag6)',
|
||||
data: 0
|
||||
});
|
||||
this.popmenu({
|
||||
rowcount: 3,
|
||||
items
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="_bg" v-if="bshow">
|
||||
<view class="_dialog" :style="{top:top}">
|
||||
<view class="_title">{{title}}</view>
|
||||
<view class="_close" @click="Close(true)"></view>
|
||||
<view class="_close" @tap="Close(true)"></view>
|
||||
<view class="_content" :style="{maxHeight:maxheight,height:height}">
|
||||
<slot></slot>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -134,11 +134,11 @@
|
|||
|
||||
._btn {
|
||||
background: linear-gradient(100deg, var(--bg4), var(--bg6));
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: 1.5rem;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
font-size: 1rem;
|
||||
text-align: center;
|
||||
line-height: 2rem;
|
||||
line-height: 1.5rem;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<view v-else-if="item.type == 'audio'" style="padding:1em;">
|
||||
<ciy-audio :src="file_stor(item.content)"></ciy-audio>
|
||||
</view>
|
||||
<view v-else v-html="item.content" style="width:100%;position: relative;padding:0 1em;"></view>
|
||||
<view v-else v-html="item.content" style="width:100%;position: relative;padding:0 0.5em;"></view>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -201,6 +201,11 @@
|
|||
|
||||
._gp._left {
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
._gp._left ._item {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
._gp ._item {
|
||||
|
|
@ -210,6 +215,7 @@
|
|||
gap: 0.5em;
|
||||
min-width: 7em;
|
||||
padding: 0.5em;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
._gp._itemright ._item {
|
||||
|
|
|
|||
|
|
@ -1,194 +0,0 @@
|
|||
<template>
|
||||
<view style="width:100%;">
|
||||
<input type="hidden" :name="name" :value="tkv.id" style="display:none;" />
|
||||
<template v-if="hasmore">
|
||||
<input type="hidden" :name="name+'_name'" :value="tkv.name" style="display:none;" />
|
||||
</template>
|
||||
<radio-group class="_gp" :class="{'_line':line,'_left':left,'_itemright':itemright}">
|
||||
<view @tap="chkitem(item)" class="_item" v-for="(item,index) in range" :key="index">
|
||||
<ciy-checkitem style="pointer-events: none;" :disabled="disabled" :tag="item.id+''" :value="tkv.id == item.id"></ciy-checkitem>
|
||||
<view :style="{color:disabled?'var(--txt1)':''}">{{item.name}}</view>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
behaviors: ['uni://form-field-group'],
|
||||
emits: ['change', 'update:modelValue'],
|
||||
props: {
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
initevent: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hasmore: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
range: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
left: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
itemright: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
line: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
byname: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
v: '',
|
||||
valuearr: {
|
||||
id: 0,
|
||||
name: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
tkv: {
|
||||
handler(newD, oldD) {
|
||||
if (this.from && newD.id == oldD.id)
|
||||
return;
|
||||
if (!this.from)
|
||||
this.from = 'init';
|
||||
else if (this.from == 'init') {
|
||||
this.from = 'check';
|
||||
}
|
||||
if (this.from != 'init') {
|
||||
if (this.byname)
|
||||
this.$emit('update:modelValue', newD.name);
|
||||
else
|
||||
this.$emit('update:modelValue', newD.id);
|
||||
}
|
||||
if (this.from != 'init' || this.initevent) {
|
||||
this.$emit('change', {
|
||||
name: this.name,
|
||||
from: this.from,
|
||||
value: {
|
||||
id: newD.id,
|
||||
name: newD.name
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
value: {
|
||||
handler(newD, oldD) {
|
||||
if (newD || oldD)
|
||||
this.v = 'value';
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
modelValue: {
|
||||
handler(newD, oldD) {
|
||||
if (newD || oldD)
|
||||
this.v = 'modelValue';
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tkv() {
|
||||
var val = '';
|
||||
if (this.v == 'modelValue') {
|
||||
if (typeof(this.modelValue) == 'number')
|
||||
val = this.modelValue;
|
||||
else if (this.modelValue)
|
||||
val = this.modelValue;
|
||||
} else if (this.v == 'value') {
|
||||
if (typeof(this.value) == 'number')
|
||||
val = this.value;
|
||||
else if (this.value)
|
||||
val = this.value;
|
||||
} else {
|
||||
val = this.v;
|
||||
}
|
||||
if (this.byname) {
|
||||
for (var i in this.range) {
|
||||
if (this.range[i].name == val)
|
||||
return {
|
||||
...this.range[i]
|
||||
};
|
||||
}
|
||||
} else {
|
||||
for (var i in this.range) {
|
||||
if (this.range[i].id == val)
|
||||
return {
|
||||
...this.range[i]
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
id: 0,
|
||||
name: ''
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
chkitem(itm) {
|
||||
if (this.disabled)
|
||||
return;
|
||||
this.v = itm.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
._gp {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
._gp._left {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
._gp ._item {
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
gap: 0.5em;
|
||||
min-width: 7em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
._gp._itemright ._item {
|
||||
justify-content: flex-start;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
._gp._line ._item {
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -14,19 +14,19 @@
|
|||
<view class="_btn" :class="{_disabled:disabled}" @tap="map_select">
|
||||
<view class="_icon _mapicon"></view>
|
||||
</view>
|
||||
<slot name="show" :data="{value:tvalue, loc:loc}">
|
||||
<slot name="show" :data="{value:tvalue, loc:loc, bet:innerbet}">
|
||||
<view style="line-height:1.5em;font-size:0.9em;flex: 1; margin-left:0.5em;text-align:left;">
|
||||
<view v-if="loc.name || loc.addr">{{loc.name}}<br />{{loc.addr}}</view>
|
||||
<view v-else-if="isfloat0(tvalue.lat)" style="padding-top:0.3em;display:inline-block;">{{lang('selmap.select')}}</view>
|
||||
<view v-else-if="tvalue.lat == 0" style="padding-top:0.3em;display:inline-block;">{{lang('selmap.select')}}</view>
|
||||
<view v-else style="padding-top:0.3em;display:inline-block;">{{lang('selmap.loced')}}</view>
|
||||
</view>
|
||||
</slot>
|
||||
</template>
|
||||
<template v-else>
|
||||
<slot name="show" :data="{value:tvalue, loc:loc}">
|
||||
<slot name="show" :data="{value:tvalue, loc:loc, bet:innerbet}">
|
||||
<view style="line-height:1.5em;font-size:0.9em;flex: 1; margin-right:0.5em;">
|
||||
<view v-if="loc.name || loc.addr">{{loc.name}}<br />{{loc.addr}}</view>
|
||||
<view v-else-if="isfloat0(tvalue.lat)" style="padding-top:0.3em;display:inline-block;">{{lang('selmap.select')}}</view>
|
||||
<view v-else-if="tvalue.lat == 0" style="padding-top:0.3em;display:inline-block;">{{lang('selmap.select')}}</view>
|
||||
<view v-else style="padding-top:0.3em;display:inline-block;">{{lang('selmap.loced')}}</view>
|
||||
</view>
|
||||
</slot>
|
||||
|
|
@ -64,6 +64,10 @@
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bet: {
|
||||
type: [String, Number],
|
||||
default: 10000000
|
||||
},
|
||||
lat: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
|
|
@ -110,6 +114,12 @@
|
|||
ret.lng = this.tofloat(this.lng);
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
innerbet() {
|
||||
var bet = this.bet;
|
||||
if (bet <= 1)
|
||||
return 1;
|
||||
return this.toint(bet);
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
|
|
@ -118,20 +128,23 @@
|
|||
if (this.disabled)
|
||||
return;
|
||||
var result;
|
||||
if (this.isfloat0(this.lat)) {
|
||||
if (this.toint(this.lat) == 0) {
|
||||
result = this.getstorage('_map');
|
||||
if (!result || result.length != 2) {
|
||||
result = [116.4, 39.8];
|
||||
result = [1164000000, 398000000];
|
||||
} else {
|
||||
result[0] += 0.005 * Math.random();
|
||||
result[1] += 0.005 * Math.random();
|
||||
result[0] += 50000 * Math.random();
|
||||
result[1] += 50000 * Math.random();
|
||||
}
|
||||
} else
|
||||
result = gcoord.transform([this.lng, this.lat], gcoord.WGS84, gcoord.GCJ02);
|
||||
} else {
|
||||
result = gcoord.transform([this.lng / this.innerbet, this.lat / this.innerbet], gcoord.WGS84, gcoord.GCJ02);
|
||||
result[0] = this.caldectoint(result[0]);
|
||||
result[1] = this.caldectoint(result[1]);
|
||||
}
|
||||
try {
|
||||
var retchoose = await uni.chooseLocation({
|
||||
longitude: result[0],
|
||||
latitude: result[1]
|
||||
longitude: result[0] / this.innerbet,
|
||||
latitude: result[1] / this.innerbet
|
||||
});
|
||||
} catch (res) {
|
||||
if (res.errMsg.indexOf('cancel') > -1)
|
||||
|
|
@ -142,6 +155,8 @@
|
|||
if (!retchoose.longitude)
|
||||
return this.alert(this.lang('selmap.noselect'));
|
||||
var result = gcoord.transform([retchoose.longitude, retchoose.latitude], gcoord.GCJ02, gcoord.WGS84);
|
||||
result[0] = this.caldectoint(result[0]);
|
||||
result[1] = this.caldectoint(result[1]);
|
||||
this.setstorage('_map', result);
|
||||
this.loc.name = retchoose.name;
|
||||
this.loc.addr = retchoose.address;
|
||||
|
|
@ -175,6 +190,11 @@
|
|||
// gcoord.EPSG4326 [lng,lat] WGS-84坐标系别名,同WGS-84
|
||||
// gcoord.EPSG3857 [x,y] Web Mercator投影,同WebMercator,单位:米
|
||||
// gcoord.EPSG900913 [x,y] Web Mercator投影,同WebMercator,单位:米
|
||||
},
|
||||
caldectoint(dec) {
|
||||
if (this.innerbet <= 1)
|
||||
return dec;
|
||||
return this.toint(dec * this.innerbet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@
|
|||
morevalue: {
|
||||
handler(newD, oldD) {
|
||||
this.v = this.modelValue || this.value;
|
||||
this.innermore = {...newD};
|
||||
this.innermore = {
|
||||
...newD
|
||||
};
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
|
|
@ -100,7 +102,9 @@
|
|||
computed: {
|
||||
tvalue() {
|
||||
var val = '';
|
||||
var valmore = {...this.innermore};
|
||||
var valmore = {
|
||||
...this.innermore
|
||||
};
|
||||
if (this.v == 'modelValue') {
|
||||
if (typeof(this.modelValue) == 'number')
|
||||
val = this.modelValue;
|
||||
|
|
@ -143,8 +147,12 @@
|
|||
url: this.page + '?sel=true&id=' + this.tvalue.id,
|
||||
events: {
|
||||
writedata: data => {
|
||||
this.v = data;
|
||||
this.innertext = data.name;
|
||||
this.v = {
|
||||
...data
|
||||
};
|
||||
this.innermore = {
|
||||
...data
|
||||
};
|
||||
this.$emit('update:modelValue', data.id);
|
||||
this.$emit('change', {
|
||||
name: this.name,
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
<view style="display:flex;">
|
||||
<view v-if="picarr.length > 0 && label" style="width: 1em;margin-right: 0.5em;line-height: 1.2em;color: #999999;">{{label}}</view>
|
||||
<view v-if="type == 'thumb'" style="flex:1;">
|
||||
<video :id="'video' + index" v-for="(item,index) in videoarr" :key="index" :src="file_stor(item)" controls @click="fullvideo('video' + index)" :show-fullscreen-btn="false" :style="{width:width,height:height,margin:'0 0.5em 0 0'}"></video>
|
||||
<video :id="'video' + index" v-for="(item,index) in videoarr" :key="index" :src="file_stor(item)" controls @tap="fullvideo('video' + index)" :show-fullscreen-btn="false" :style="{width:width,height:height,margin:'0 0.5em 0 0'}"></video>
|
||||
<image lazy-load :lazy-load-margin="0" @tap.stop="preview(index)" :src="item" v-for="(item,index) in picarr" :key="index" :mode="mode" :style="{width:width,height:height,margin:'0 0.5em 0 0'}" style="border-radius:0.3em;" />
|
||||
<view @tap.stop="openfile(index)" v-for="(item,index) in pdfarr" :key="index" :style="{width:width,height:height,lineHeight: height}" style="margin:0 0.5em 0 0;border-radius:0.3em;display:inline-block;vertical-align: top;border: 1px solid #cccccc;text-align: center;color:#000000;background: #ffffff;">{{lang('showimgs.att')}}{{index+1}}</view>
|
||||
</view>
|
||||
<view v-else style="flex:1;">
|
||||
<video :id="'video' + index" v-for="(item,index) in videoarr" :key="index" :src="file_stor(item)" controls @click="fullvideo('video' + index)" :show-fullscreen-btn="false" :style="{width:width,margin:'0 0 -2px 0;'}"></video>
|
||||
<video :id="'video' + index" v-for="(item,index) in videoarr" :key="index" :src="file_stor(item)" controls @tap="fullvideo('video' + index)" :show-fullscreen-btn="false" :style="{width:width,margin:'0 0 -2px 0;'}"></video>
|
||||
<image lazy-load :lazy-load-margin="0" @tap.stop="preview(index)" :src="item" v-for="(item,index) in picarr" :key="index" :mode="mode" :style="{width:width}" style="margin:0 0 -2px 0;" />
|
||||
<view @tap.stop="openfile(index)" v-for="(item,index) in pdfarr" :key="index" :style="{width:width,height:height,lineHeight: height,margin:index==0?'0':'0 0.5em 0 0'}" style="border-radius:0.3em;display:inline-block;vertical-align: top;border: 1px solid #cccccc;text-align: center;color:#000000;background: #ffffff;">{{lang('showimgs.att')}}{{index+1}}</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
},
|
||||
zipjpg: {
|
||||
type: [String, Number],
|
||||
default: 0.7
|
||||
default: 70
|
||||
},
|
||||
waterfont: {
|
||||
type: String,
|
||||
|
|
@ -564,7 +564,7 @@
|
|||
opn.maxkb = this.toint(this.maxkb);
|
||||
opn.imgwidth = this.toint(this.imgwidth);
|
||||
opn.imgheight = this.toint(this.imgheight);
|
||||
opn.zipjpg = this.tofloat(this.zipjpg);
|
||||
opn.zipjpg = this.toint(this.zipjpg);
|
||||
opn.watertext = this.watertext;
|
||||
opn.watertype = this.watertype;
|
||||
opn.waterpadding = this.toint(this.waterpadding);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<ciy-header title="组件生命周期事件"></ciy-header>
|
||||
<ciy-test></ciy-test>
|
||||
<view class="txt-lggg txt-center py4">
|
||||
<view @tap="gourl" data-url="/pages/main/paper?id=1">跳转测试</view>
|
||||
<view @tap="gourl" data-url="/pages/pub/paper?id=1">跳转测试</view>
|
||||
</view>
|
||||
<view class="ciy-card">
|
||||
<view class="title">H5页面</view>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<view>
|
||||
<ciy-selmap v-model:lat="lat" v-model:lng="lng" name="ciy4" @change="chglog('change', $event)">
|
||||
<template v-slot:show="{data}">
|
||||
{{data.value.lat}},{{data.value.lng}}
|
||||
{{data.value.lat/data.bet}},{{data.value.lng/data.bet}}
|
||||
</template>
|
||||
</ciy-selmap>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@
|
|||
<view class="ciy-form">
|
||||
<label>v-model绑定</label>
|
||||
<view>
|
||||
<ciy-selpage name="ciy1" page="/pages/main/me_shipaddr" :morevalue="formmore" v-model="formvalue" @change="chglog('change', $event)"></ciy-selpage>
|
||||
<ciy-selpage name="ciy1" page="/pages/me/user_shipaddr" :morevalue="formmore" v-model="formvalue" @change="chglog('change', $event)"></ciy-selpage>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>value绑定</label>
|
||||
<view>
|
||||
<ciy-selpage left hasmore initevent page="/pages/main/me_shipaddr" :morevalue="formmore" :value="formvalue" name="ciy2" @change="chglog('change', $event)"></ciy-selpage>
|
||||
<ciy-selpage left hasmore initevent page="/pages/me/user_shipaddr" :morevalue="formmore" :value="formvalue" name="ciy2" @change="chglog('change', $event)"></ciy-selpage>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
|
|
@ -32,13 +32,13 @@
|
|||
<view class="ciy-form">
|
||||
<label>显示样式</label>
|
||||
<view>
|
||||
<ciy-selpage :ciystyle="{color:'#cc0000'}" page="/pages/main/me_shipaddr" :morevalue="formmore" :value="formvalue" name="ciy4" @change="chglog('change', $event)"></ciy-selpage>
|
||||
<ciy-selpage :ciystyle="{color:'#cc0000'}" page="/pages/me/user_shipaddr" :morevalue="formmore" :value="formvalue" name="ciy4" @change="chglog('change', $event)"></ciy-selpage>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>自定义</label>
|
||||
<view>
|
||||
<ciy-selpage page="/pages/main/me_shipaddr" :morevalue="formmore" :value="formvalue" name="ciy5" @change="chglog('change', $event)">
|
||||
<ciy-selpage page="/pages/me/user_shipaddr" :morevalue="formmore" :value="formvalue" name="ciy5" @change="chglog('change', $event)">
|
||||
<template v-slot:default="{data}">
|
||||
{{data.name}}<br/>
|
||||
{{data.addr}}<br/>
|
||||
|
|
|
|||
|
|
@ -48,31 +48,31 @@
|
|||
<view class="ciy-form">
|
||||
<label>图像压缩</label>
|
||||
<view>
|
||||
<ciy-upload name="ciy7" path="demo" zipjpg="0.6" @change="chglog('change', $event)"></ciy-upload>
|
||||
<ciy-upload name="ciy7" path="demo" zipjpg="60" @change="chglog('change', $event)"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>右下文字</label>
|
||||
<view>
|
||||
<ciy-upload name="ciy8" path="demo" zipjpg="0.6" watertext="水电费|第二行" waterfont="36px Arial" @change="chglog('change', $event)"></ciy-upload>
|
||||
<ciy-upload name="ciy8" path="demo" zipjpg="60" watertext="水电费|第二行" waterfont="36px Arial" @change="chglog('change', $event)"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>满屏水印</label>
|
||||
<view>
|
||||
<ciy-upload name="ciy9" path="demo" zipjpg="0.6" watertext="众产(杭州)科技有限公司" waterfont="36px Arial" watertype="full" waterpadding="10" waterangle="20" wateralpha="0.8" watercolors="#ff0000,#00ff00" @change="chglog('change', $event)"></ciy-upload>
|
||||
<ciy-upload name="ciy9" path="demo" zipjpg="60" watertext="众产(杭州)科技有限公司" waterfont="36px Arial" watertype="full" waterpadding="10" waterangle="20" wateralpha="0.8" watercolors="#ff0000,#00ff00" @change="chglog('change', $event)"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>上传到云</label>
|
||||
<view>
|
||||
<ciy-upload name="ciy10" path="demo" stor="A" zipjpg="0.6" imgwidth="1000" @change="chglog('change', $event)"></ciy-upload>
|
||||
<ciy-upload name="ciy10" path="demo" stor="A" zipjpg="60" imgwidth="1000" @change="chglog('change', $event)"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>SaaS上传</label>
|
||||
<view>
|
||||
<ciy-upload left name="ciy11" saas="s10224" path="demo" stor="/" zipjpg="0.6" imgwidth="1000" @change="chglog('change', $event)"></ciy-upload>
|
||||
<ciy-upload left name="ciy11" saas="s10224" path="demo" stor="/" zipjpg="60" imgwidth="1000" @change="chglog('change', $event)"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
|
|
|
|||
|
|
@ -39,10 +39,15 @@
|
|||
自动微信登录注册,未登录则打开界面
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="fun">this.getauth(bmust)</view>
|
||||
<view class="fun">this.getauth(type)</view>
|
||||
<view class="tip">
|
||||
调取登录状态<br />
|
||||
bmust: true 强制打开登录界面(换号登录)
|
||||
type: 空 静默登录(默认)
|
||||
type: relogin 强制打开登录界面(换号登录)
|
||||
type: info 需填写个人信息
|
||||
type: real 需实名认证。前提info
|
||||
type: bank 需填写银行。前提real
|
||||
type: cciy 需有全球众识码。前提real
|
||||
</view>
|
||||
<button class="btn sm" @tap="demo">调用</button>
|
||||
<button class="btn sm def" @tap="logout">登出</button>
|
||||
|
|
|
|||
|
|
@ -10,131 +10,130 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-form-group">
|
||||
<input type="hidden" name="id" :value="pagedata.demo.id" style="display:none;" />
|
||||
<view class="ciy-form">
|
||||
<label class="imp">默认标题</label>
|
||||
<view>
|
||||
<ciy-input name="name" v-model="pagedata.demo.name"></ciy-input>
|
||||
<ciy-input name="name" v-model="editdata.name"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>所属菜单</label>
|
||||
<view>
|
||||
<ciy-select :range="g.zc_menu" name="menuid" v-model="pagedata.demo.menuid"></ciy-select>
|
||||
<ciy-select :range="g.zc_menu" name="menuid" v-model="editdata.menuid"></ciy-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>文件大小</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="1024" unit="KB" name="filesize" v-model="pagedata.demo.filesize"></ciy-inputbet>
|
||||
<ciy-inputbet bet="1024" unit="KB" name="filesize" v-model="editdata.filesize"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>长度</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="1000" unit="米" :ciystyle="{width:'8em'}" name="metre" v-model="pagedata.demo.metre"></ciy-inputbet>
|
||||
<ciy-inputbet bet="1000" unit="米" :ciystyle="{width:'8em'}" name="metre" v-model="editdata.metre"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>贷款金额</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="1000000" unit="万元" name="bankmoney" v-model="pagedata.demo.bankmoney"></ciy-inputbet>
|
||||
<ciy-inputbet bet="1000000" unit="万元" name="bankmoney" v-model="editdata.bankmoney"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>设置日期</label>
|
||||
<view>
|
||||
<ciy-inputdatetime name="setdate" v-model="pagedata.demo.setdate"></ciy-inputdatetime>
|
||||
<ciy-inputdatetime name="setdate" v-model="editdata.setdate"></ciy-inputdatetime>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>设置时间</label>
|
||||
<view>
|
||||
<ciy-inputdatetime btime name="settimes" v-model="pagedata.demo.settimes"></ciy-inputdatetime>
|
||||
<ciy-inputdatetime btime name="settimes" v-model="editdata.settimes"></ciy-inputdatetime>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>营业时间</label>
|
||||
<view>
|
||||
<ciy-inputtimepoint bsec name="dayclock" v-model="pagedata.demo.dayclock"></ciy-inputtimepoint>
|
||||
<ciy-inputtimepoint bsec name="dayclock" v-model="editdata.dayclock"></ciy-inputtimepoint>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>文档</label>
|
||||
<view>
|
||||
<ciy-upload num="5" filetype="all" imgwidth="1000" sourcetype="album,message" path="demo" name="downurl" v-model="pagedata.demo.downurl"></ciy-upload>
|
||||
<ciy-upload num="5" filetype="all" imgwidth="1000" sourcetype="album,message" path="demo" name="downurl" v-model="editdata.downurl"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>头像</label>
|
||||
<view>
|
||||
<ciy-upload imgwidth="600" imgheight="600" path="demo" name="avar" v-model="pagedata.demo.avar"></ciy-upload>
|
||||
<ciy-upload imgwidth="600" imgheight="600" path="demo" name="avar" v-model="editdata.avar"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>是否使用</label>
|
||||
<view>
|
||||
<ciy-selbool name="isuse" v-model="pagedata.demo.isuse"></ciy-selbool>
|
||||
<ciy-selbool name="isuse" v-model="editdata.isuse"></ciy-selbool>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>是否开启</label>
|
||||
<view>
|
||||
<ciy-selbool y="开启" n="关闭" name="isopen" v-model="pagedata.demo.isopen"></ciy-selbool>
|
||||
<ciy-selbool y="开启" n="关闭" name="isopen" v-model="editdata.isopen"></ciy-selbool>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>库存单位</label>
|
||||
<view>
|
||||
<ciy-inputunitedit name="unit" v-model="pagedata.demo.unit"></ciy-inputunitedit>
|
||||
<ciy-inputunitedit name="unit" v-model="editdata.unit"></ciy-inputunitedit>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>单选状态</label>
|
||||
<view>
|
||||
<ciy-radio left :range="g.auditstatus" name="sigstatus" v-model="pagedata.demo.sigstatus"></ciy-radio>
|
||||
<ciy-radio left :range="g.auditstatus" name="sigstatus" v-model="editdata.sigstatus"></ciy-radio>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>多选状态</label>
|
||||
<view>
|
||||
<ciy-checkbox itemright line :range="g.auditstatus" name="mauditstatus" v-model="pagedata.demo.mauditstatus"></ciy-checkbox>
|
||||
<ciy-checkbox itemright line :range="g.auditstatus" name="mauditstatus" v-model="editdata.mauditstatus"></ciy-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>组织结构</label>
|
||||
<view>
|
||||
<ciy-selcas :range="g.zc_depart" name="prodcata" v-model="pagedata.demo.prodcata"></ciy-selcas>
|
||||
<ciy-selcas :range="g.zc_depart" name="prodcata" v-model="editdata.prodcata"></ciy-selcas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>所在地区</label>
|
||||
<view>
|
||||
<ciy-selcas :range="g.ciy_arearpc" name="areacode" v-model="pagedata.demo.areacode"></ciy-selcas>
|
||||
<ciy-selcas :range="g.ciy_arearpc" name="areacode" v-model="editdata.areacode"></ciy-selcas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>认证情况</label>
|
||||
<view>
|
||||
<ciy-checkbox bin left line :range="g.renzheng" name="renzheng" v-model="pagedata.demo.renzheng"></ciy-checkbox>
|
||||
<ciy-checkbox bin left line :range="g.renzheng" name="renzheng" v-model="editdata.renzheng"></ciy-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>临时字典</label>
|
||||
<view>
|
||||
<ciy-select :range="g.ppint" name="ppint" v-model="pagedata.demo.ppint"></ciy-select>
|
||||
<ciy-select :range="g.ppint" name="ppint" v-model="editdata.ppint"></ciy-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>执行周期</label>
|
||||
<view>
|
||||
<ciy-inputcyc name="npcyc" v-model="pagedata.demo.npcyc"></ciy-inputcyc>
|
||||
<ciy-inputcyc name="npcyc" v-model="editdata.npcyc"></ciy-inputcyc>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>执行用时</label>
|
||||
<view>
|
||||
<ciy-input name="runsec" v-model="pagedata.demo.runsec"></ciy-input>
|
||||
<ciy-input name="runsec" v-model="editdata.runsec"></ciy-input>
|
||||
</view>
|
||||
<view style="flex:none;">秒</view>
|
||||
</view>
|
||||
|
|
@ -142,80 +141,74 @@
|
|||
<label>活动期数</label>
|
||||
<view class="flex flex-center" style="justify-content: flex-end;">
|
||||
第
|
||||
<ciy-input :ciystyle="{width:'3em',margin:'0 0.5em',textAlign:'center',display:'inline-block'}" name="acttm" v-model="pagedata.demo.acttm"></ciy-input>
|
||||
<ciy-input :ciystyle="{width:'3em',margin:'0 0.5em',textAlign:'center',display:'inline-block'}" name="acttm" v-model="editdata.acttm"></ciy-input>
|
||||
期
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>活动花絮</label>
|
||||
<view>
|
||||
<ciy-upload num="9" imgwidth="1920" zipjpg="0.8" path="demo" name="imgs" v-model="pagedata.demo.imgs"></ciy-upload>
|
||||
<ciy-upload num="9" imgwidth="1920" zipjpg="80" path="demo" name="imgs" v-model="editdata.imgs"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>吨位</label>
|
||||
<view>
|
||||
<ciy-inputbet bb bet="1000000" unit="吨" :ciystyle="{width:'8em'}" name="ton" v-model="pagedata.demo.ton"></ciy-inputbet>
|
||||
<ciy-inputbet bb bet="1000000" unit="吨" :ciystyle="{width:'8em'}" name="ton" v-model="editdata.ton"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>单价</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="100" unit="元" name="price" v-model="pagedata.demo.price"></ciy-inputbet>
|
||||
<ciy-inputbet bet="100" unit="元" name="price" v-model="editdata.price"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>位置</label>
|
||||
<view>
|
||||
<ciy-selmap name="loc" v-model:lng="pagedata.demo.lng" v-model:lat="pagedata.demo.lat"></ciy-selmap>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>监管数量</label>
|
||||
<view>
|
||||
<ciy-input name="nums" v-model="pagedata.demo.nums"></ciy-input>
|
||||
<ciy-selmap name="loc" v-model:lng="editdata.lng" v-model:lat="editdata.lat"></ciy-selmap>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>百分比</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="100" unit="%" name="pct" v-model="pagedata.demo.pct"></ciy-inputbet>
|
||||
<ciy-inputbet bet="100" unit="%" name="pct" v-model="editdata.pct"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>链接</label>
|
||||
<view>
|
||||
<ciy-input name="url" v-model="pagedata.demo.url"></ciy-input>
|
||||
<ciy-input name="url" v-model="editdata.url"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>体重</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="1000" unit="公斤" name="weightg" v-model="pagedata.demo.weightg"></ciy-inputbet>
|
||||
<ciy-inputbet bet="1000" unit="公斤" name="weightg" v-model="editdata.weightg"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>耳温</label>
|
||||
<view>
|
||||
<ciy-inputbet bet="1000" unit="℃" name="eartmpr" v-model="pagedata.demo.eartmpr"></ciy-inputbet>
|
||||
<ciy-inputbet bet="1000" unit="℃" name="eartmpr" v-model="editdata.eartmpr"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>身份证号</label>
|
||||
<view>
|
||||
<ciy-input name="idcard" v-model="pagedata.demo.idcard"></ciy-input>
|
||||
<ciy-input name="idcard" v-model="editdata.idcard"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>介绍</label>
|
||||
<view>
|
||||
<ciy-textarea name="content" v-model="pagedata.demo.content"></ciy-textarea>
|
||||
<ciy-textarea name="content" v-model="editdata.content"></ciy-textarea>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="ciy-form v">
|
||||
<label>富文本</label>
|
||||
<view>
|
||||
<ciy-mdedit name="md" v-model="pagedata.demo.md"></ciy-mdedit>
|
||||
<ciy-mdedit name="md" v-model="editdata.md"></ciy-mdedit>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
|
@ -238,6 +231,7 @@
|
|||
onLoad() {
|
||||
if (!this.pagedata.demo)
|
||||
return this.alert('不能直接访问,请重新进入'); //独立进入写后端函数获取数据
|
||||
this.editdata = {...this.pagedata.demo};
|
||||
this.getdata();
|
||||
},
|
||||
watch: {},
|
||||
|
|
@ -251,7 +245,7 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'demo/demo.getdata',
|
||||
data: {
|
||||
...this.opn,
|
||||
|
|
@ -272,10 +266,10 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'demo/demo.update',
|
||||
data: {
|
||||
...this.pagedata.demo
|
||||
...this.editdata
|
||||
}
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="sti" :style="{top:(header_statusbar_height+header_title_height)+'px'}">
|
||||
<ciy-segment :lis="init.once.lis" all="全部" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
<ciy-query ref="query" :gdict="g" :qry="init.once.input" @confirm="query_confirm">
|
||||
<ciy-segment :lis="init.lis" all="全部" @change="segment_change"></ciy-segment>
|
||||
<ciy-query ref="query" :gdict="g" :qry="init.searchinput" @confirm="query_confirm">
|
||||
<template v-slot="{itm}">
|
||||
<ciy-input :name="itm.item.form" v-model="itm.data[itm.item.form]"></ciy-input>
|
||||
</template>
|
||||
|
|
@ -137,10 +137,6 @@
|
|||
<view><text style="text-decoration: underline;" @tap.stop="goloc(item.lat, item.lng)">查看位置</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="l2">
|
||||
<label>监管数量</label>
|
||||
<view>{{tofix(item.nums)}}</view>
|
||||
</view>
|
||||
<view class="l2">
|
||||
<label>百分比</label>
|
||||
<view>{{tofix(item.pct/100, 2)}}%</view>
|
||||
|
|
@ -177,10 +173,7 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.load_ciydict(this.file_stor('/dict/ciy_arearpc.js')).then(json => {
|
||||
|
|
@ -206,18 +199,14 @@
|
|||
computed: {},
|
||||
methods: {
|
||||
async getlist() {
|
||||
//await this.getauth();
|
||||
if(this.me.id == 0)
|
||||
return uni.navigateBack();
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
this.pagepost.once = !this.init.once;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.once = !this.init.once;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'demo/demo.list',
|
||||
data: this.pagepost
|
||||
});
|
||||
|
|
@ -229,9 +218,9 @@
|
|||
this.init.list = [];
|
||||
this.init = this.objdeepmerge(this.init, retjson);
|
||||
if (retjson.once) {
|
||||
this.init.once.lis = [...this.g.auditstatus];
|
||||
this.g.zc_depart = retjson.once.zc_depart;
|
||||
this.g.ppint = retjson.once.ppint;
|
||||
this.init.lis = [...this.g.auditstatus];
|
||||
this.g.zc_depart = retjson.zc_depart;
|
||||
this.g.ppint = retjson.ppint;
|
||||
}
|
||||
this.getrefs('query').then(ref => {
|
||||
ref.setdata(retjson.where);
|
||||
|
|
@ -239,7 +228,8 @@
|
|||
if (retjson.list.length < retjson.pagecount)
|
||||
this.pageno = -1;
|
||||
},
|
||||
segment_change() {
|
||||
segment_change(e) {
|
||||
this.pagepost.liid = e.value.id;
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
|
|
@ -269,7 +259,7 @@
|
|||
async del(item) {
|
||||
if (await this.askmsg('是否删除?', '删除') != 'ok')
|
||||
return;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'demo/demo.del',
|
||||
data: {
|
||||
id: item.data.id
|
||||
|
|
@ -300,7 +290,7 @@
|
|||
}]);
|
||||
if (msg.btn == 'cancel')
|
||||
return;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'demo/demo.audit',
|
||||
data: {
|
||||
id: item.data.id,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<view class="maincard" style="margin-top: -2.5em;">
|
||||
<view class="flex flex-center">
|
||||
<view class="nick" @tap="gourl" data-url="$/pages/main/me_info">{{me.name?me.name:'登录/注册'}}</view>
|
||||
<view class="nick" @tap="gourl" data-url="$/pages/me/user_info">{{me.name?me.name:'登录/注册'}}</view>
|
||||
<view class="icon zy" style="margin-left:1em;" v-if="showbalance" @tap="getbalance(2)"></view>
|
||||
<view class="icon by" style="margin-left:1em;" v-else @tap="getbalance(1)"></view>
|
||||
</view>
|
||||
|
|
@ -168,11 +168,15 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
version: '',
|
||||
showbalance: false,
|
||||
ciysvg: '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M987.136 384.512C919.552 131.584 668.16-22.528 415.232 27.136c219.648-41.984 434.176 79.36 488.96 283.136 57.344 214.016-82.944 437.76-313.344 499.2-49.664 13.312-78.848 64-65.536 113.152 13.312 49.664 64 78.848 113.152 65.536 263.168-70.144 418.816-340.48 348.672-603.648zM116.224 713.216C58.88 499.2 199.68 275.456 430.08 214.016c49.664-13.312 78.848-64 65.536-113.152C482.816 51.2 432.128 21.504 382.464 34.816c-263.68 70.656-419.84 340.992-349.184 604.16 67.584 252.928 319.488 407.04 571.392 356.864-219.648 42.496-433.664-78.848-488.448-282.624z m93.184-203.776L291.84 449.536c44.544-32.256 90.112-32.256 133.12-0.512l83.456 60.928-149.504-230.4-149.504 229.888z m516.096-60.416L808.96 509.952l-149.504-229.888-149.504 229.376 82.432-59.904c44.544-32.256 90.112-32.256 133.12-0.512z m-366.08 291.84L441.856 680.96c44.544-32.256 90.112-32.256 133.12-0.512l83.456 60.928-149.504-230.4-149.504 229.888z" fill="#56a4ef"></path></svg>',
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() {
|
||||
var app = getApp();
|
||||
this.version = app.globalData._version;
|
||||
},
|
||||
onShow() {
|
||||
this.getinit();
|
||||
},
|
||||
|
|
@ -184,7 +188,7 @@
|
|||
return;
|
||||
}
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.balance_get',
|
||||
data: {}
|
||||
});
|
||||
|
|
@ -202,7 +206,7 @@
|
|||
});
|
||||
},
|
||||
relogin() {
|
||||
this.getauth(true);
|
||||
this.getauth('relogin');
|
||||
},
|
||||
logout() {
|
||||
this.removestorage('me');
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@
|
|||
未登录返回{me:0}。<br />
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="fun">async callajax({srv, func, cache, cachekey, loadhide, loadtxt, data})</view>
|
||||
<view class="fun">async callfunc({srv, func, cache, cachekey, loadhide, loadtxt, data})</view>
|
||||
<view class="tip">
|
||||
服务端Ajax API请求,header带上token。<br />
|
||||
自动保存新token,无感续期。<br />
|
||||
|
|
@ -288,6 +288,7 @@
|
|||
<view class="fun">isfloat0(num)</view>
|
||||
<view class="tip">
|
||||
判断是否为0,防止浮点数问题。<br />
|
||||
尽量不要使用浮点数。<br />
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="fun">isarray(val)</view>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</view>
|
||||
<view class="ciy-card">
|
||||
<view class="title">系统参数</view>
|
||||
<view class="right">this.sysinfo</view>
|
||||
<view class="right">app.globalData._sysinfo</view>
|
||||
<view class="content">
|
||||
<view v-for="(item,index) in _sysinfo" :key="index">
|
||||
<view v-if="index == 'safeArea' || index == 'safeAreaInsets'">
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
this.glbdata[i] = app.json_string(app.globalData[i]);
|
||||
}
|
||||
this._sysinfo = {};
|
||||
for (var i in this.sysinfo) {
|
||||
for (var i in app.globalData._sysinfo) {
|
||||
this._sysinfo[i] = app.json_string(this.sysinfo[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
},
|
||||
methods: {
|
||||
async chktest(dt) {
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'app.test',
|
||||
data: {}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'index.init'
|
||||
func: 'main.index_init'
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
|
|
|
|||
|
|
@ -1,137 +0,0 @@
|
|||
<template>
|
||||
<ciy-header title="提现"></ciy-header>
|
||||
<view v-if="init.code != 1">
|
||||
<view class="px4 py4">
|
||||
<view style="height:2em;width:60%;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:40%;margin-left:1em;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:50%;" class="ciy-skeleton"></view>
|
||||
<view style="height:6em;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<form @submit="submit" class="char3">
|
||||
<view class="ciy-card">
|
||||
<view class="content">
|
||||
<view class="ciy-form">
|
||||
<label>余额</label>
|
||||
<view style="text-align: left;">
|
||||
{{init.user.mycashmoney/100}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>可提现</label>
|
||||
<view style="text-align: left;">
|
||||
{{init.user.cash}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>提现流向</label>
|
||||
<view style="text-align: left;">
|
||||
<ciy-selbool name="cashtype" v-model="me.cashtype" y="银行" n="微信"></ciy-selbool>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">申请提现</button>
|
||||
</view>
|
||||
<view class="ciy-tip">
|
||||
每天可提交1次,以元为单位申请。
|
||||
</view>
|
||||
<view class="ciy-tip">
|
||||
由于微信支付限制,申请提现平台审核通过后,还需手动点击收款操作。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.cash" :key="item.id">
|
||||
<view class="l2">
|
||||
<text class="kbd" :class="ccode(g.cashstatus, item.cashstatus,'clas')">{{ccode(g.cashstatus, item.cashstatus)}}</text>
|
||||
</view>
|
||||
<view class="lb">{{todatetime(item.addtimes)}}</view>
|
||||
<view class="rb">
|
||||
<text class="txt-lgg txt-wb px2">{{item.cashmoney/10000}}</text>
|
||||
<text class="txt-smm">元</text>
|
||||
</view>
|
||||
<view class="txt-right" v-if="item.cashtype==2">
|
||||
<button class="btn" @tap="wxrecvpay(index)">立即收款</button>
|
||||
</view>
|
||||
<view class="txt-right" v-if="item.cashtype==1">
|
||||
<button class="btn">上传发票</button>
|
||||
</view>
|
||||
</view>
|
||||
<ciy-swipelist title="设置提现账户" @tap="gourl" data-url="$/pages/main/me_cash_bank" more></ciy-swipelist>
|
||||
<ciy-swipelist title="提现历史记录" @tap="gourl" data-url="$/pages/main/me_cash_out" more></ciy-swipelist>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getinit();
|
||||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.cash_get',
|
||||
data: {}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init = retjson;
|
||||
this.init.user.cash = Math.floor(this.init.user.mycashmoney / 100);
|
||||
if (this.init.user.cash < 0)
|
||||
this.init.user.cash = 0;
|
||||
},
|
||||
async submit(e) {
|
||||
if (this.init.user.cash <= 0)
|
||||
return this.toast('不可提现');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.cash',
|
||||
data: {
|
||||
cash: this.init.user.cash
|
||||
}
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.user.mycashmoney -= this.init.user.cash * 100;
|
||||
this.init.user.cash = 0;
|
||||
this.toast('申请成功');
|
||||
},
|
||||
async wxrecvpay(idx) {
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.wxrecvpay',
|
||||
data: {
|
||||
id: this.init.cash[idx].id
|
||||
}
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.cash.splice(idx, 1);
|
||||
wx.requestMerchant({
|
||||
mchId: retjson.transfer.mchid,
|
||||
appId: retjson.transfer.appid,
|
||||
package: retjson.transfer.package_info,
|
||||
success: (res) => {
|
||||
console.log('success Transfer:', res);
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('fail Transfer:', res);
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<template>
|
||||
<ciy-header title="设置提现账号"></ciy-header>
|
||||
<form @submit="submit" class="char3">
|
||||
<view class="ciy-card">
|
||||
<view class="content char4">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">提现方案</label>
|
||||
<view style="text-align: left;">
|
||||
<ciy-selbool name="cashtype" v-model="me.cashtype" y="独立纳税" n="个人微信"></ciy-selbool>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form" v-if="me.cashtype == 1">
|
||||
<label class="imp">银行卡号</label>
|
||||
<view>
|
||||
<ciy-input name="bankno" v-model="me.bankno" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form" v-if="me.cashtype == 1">
|
||||
<label class="imp">开户银行</label>
|
||||
<view>
|
||||
<ciy-input name="bankname" v-model="me.bankname" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form" v-if="me.cashtype == 1">
|
||||
<label class="imp">账户名称</label>
|
||||
<view>
|
||||
<ciy-input name="bankaccount" v-model="me.bankaccount" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">设置</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
<view class="ciy-tip">
|
||||
个人微信提现<br />
|
||||
每次最低提现金额为1元。<br />
|
||||
统一代扣缴20%个税,每月汇总申报个税。<br />
|
||||
以实名认证姓名、身份证号及手机号为准。<br />
|
||||
<br />
|
||||
独立纳税提现<br />
|
||||
每次最低提现金额为1000元。<br />
|
||||
申请提现后,平台收到电子发票后打款。<br />
|
||||
注意: 电子发票抬头与账户名称一致。<br />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
async submit(e) {
|
||||
if (e.detail.value.cashtype == 1) {
|
||||
e.detail.value.bankno = e.detail.value.bankno.trim();
|
||||
if (e.detail.value.bankno.length < 6)
|
||||
return this.toast('请输入银行卡号');
|
||||
if (e.detail.value.bankname.length == 0)
|
||||
return this.toast('请输入开户行');
|
||||
if (e.detail.value.bankaccount.length == 0)
|
||||
return this.toast('请输入账户名称');
|
||||
}
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.userbank_change',
|
||||
data: e.detail.value
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me.cashtype = e.detail.value.cashtype;
|
||||
this.me.bankno = e.detail.value.bankno;
|
||||
this.me.bankname = e.detail.value.bankname;
|
||||
this.me.bankaccount = e.detail.value.bankaccount;
|
||||
this.setstorage('me', this.me);
|
||||
await this.toast('修改成功');
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
<template>
|
||||
<ciy-header title="本人信息"></ciy-header>
|
||||
<form @submit="submit" class="char3">
|
||||
<view class="ciy-card">
|
||||
<view class="content char4">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">姓名称呼</label>
|
||||
<view>
|
||||
<ciy-input name="name" v-model="me.name" type="nickname" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>头像</label>
|
||||
<view>
|
||||
<ciy-upload left v-model="me.icon" path="icon" name="icon" imgwidth="400" imgheight="400" camheight="100" sourcetype="rehcam,album,message"></ciy-upload>
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view>
|
||||
<button class="btn sm" open-type="chooseAvatar" @chooseavatar="wxavar">从微信获取</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">手机号</label>
|
||||
<view>
|
||||
<ciy-input name="mobile" v-model="me.mobile" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>微信</label>
|
||||
<view>
|
||||
<ciy-input name="wxno" v-model="me.wxno" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>电子信箱</label>
|
||||
<view>
|
||||
<ciy-input name="email" v-model="me.email" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">更新个人信息</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
setTimeout(() => {
|
||||
if (this.me.neednick)
|
||||
this.me.name = '';
|
||||
}, 100);
|
||||
},
|
||||
methods: {
|
||||
async wxavar(e) {
|
||||
var app = getApp();
|
||||
var opn = {};
|
||||
opn.post = {
|
||||
from: 'avar'
|
||||
};
|
||||
opn.path = 'icon';
|
||||
opn.stor = app.globalData.storselect;
|
||||
opn.maxkb = 0;
|
||||
opn.imgwidth = 400;
|
||||
opn.imgheight = 400;
|
||||
opn.zipjpg = 0.7;
|
||||
this.me.icon = await this.file_upload1(e.detail.avatarUrl, opn);
|
||||
},
|
||||
async submit(e) {
|
||||
if (!e.detail.value.name)
|
||||
return this.toast('请输入姓名称呼');
|
||||
if (!e.detail.value.mobile)
|
||||
return this.toast('请输入手机号');
|
||||
if (e.detail.value.name[0] == ':')
|
||||
return this.toast('姓名称呼不能以:开头');
|
||||
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.userinfo_change',
|
||||
data: e.detail.value
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me.name = e.detail.value.name;
|
||||
this.me.neednick = false;
|
||||
this.me.icon = e.detail.value.icon;
|
||||
this.me.mobile = e.detail.value.mobile;
|
||||
this.me.wxno = e.detail.value.wxno;
|
||||
this.me.email = e.detail.value.email;
|
||||
this.setstorage('me', this.me);
|
||||
await this.toast('修改成功');
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
<template>
|
||||
<ciy-header title="我要开票"></ciy-header>
|
||||
<view v-if="init.code != 1">
|
||||
<view class="px4 py4">
|
||||
<view style="height:2em;width:60%;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:40%;margin-left:1em;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:50%;" class="ciy-skeleton"></view>
|
||||
<view style="height:6em;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<form @submit="submit" class="char3">
|
||||
<view class="ciy-card">
|
||||
<view class="content">
|
||||
<view class="ciy-form">
|
||||
<label>可开票金额</label>
|
||||
<view style="text-align: left;">
|
||||
{{toint(init.user.myinvmoney/100)}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>开票金额</label>
|
||||
<view>
|
||||
<ciy-inputbet name="money" :value="toint(init.user.myinvmoney/100)*100" bb unit="元" bet="100"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>发票抬头</label>
|
||||
<view>
|
||||
<ciy-selpage name="invtit" page="me_invoicetitle">
|
||||
<template v-slot:default="{data}">
|
||||
<view>{{data.name}}</view>
|
||||
<view class="txt1">{{data.taxnumber}}</view>
|
||||
</template>
|
||||
</ciy-selpage>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">申请开票</button>
|
||||
</view>
|
||||
<view class="ciy-tip">
|
||||
开具增值税普通电子发票。<br />
|
||||
开票科目: 技术服务费。<br />
|
||||
联系客服签订技术服务合同。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<ciy-swipelist title="开票历史" @tap="gourl" data-url="$/pages/main/me_invoice_history" more></ciy-swipelist>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getinit();
|
||||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.balance_get',
|
||||
data: {}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init = retjson;
|
||||
},
|
||||
async submit(e) {
|
||||
if (e.detail.value.money < 100)
|
||||
return;
|
||||
if (this.init.user.myinvmoney < e.detail.value.money)
|
||||
return this.toast('开票金额不足');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.invoicing',
|
||||
data: e.detail.value
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.user.myinvmoney -= retjson.money;
|
||||
this.toast('申请成功');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<template>
|
||||
<ciy-header title="修改密码"></ciy-header>
|
||||
<view>
|
||||
<form @submit="submit" class="char4">
|
||||
<view class="ciy-card">
|
||||
<view class="content">
|
||||
<view class="ciy-form" v-if="!me.needpass">
|
||||
<label class="imp">旧密码</label>
|
||||
<view>
|
||||
<ciy-input name="oldpass" type="password" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">新密码</label>
|
||||
<view>
|
||||
<ciy-input name="newpass" type="password" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">再次输入</label>
|
||||
<view>
|
||||
<ciy-input name="repass" type="password" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">修改密码</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
}
|
||||
, onLoad() {
|
||||
}
|
||||
, methods: {
|
||||
async submit(e) {
|
||||
if (e.detail.value.newpass.length < 1)
|
||||
return this.toast('请输入新密码');
|
||||
if (e.detail.value.newpass != e.detail.value.repass)
|
||||
return this.toast('两次输入的新密码不同');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.pass_change',
|
||||
data: e.detail.value
|
||||
});
|
||||
this._loading = false;
|
||||
if(retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me.needpass = false;
|
||||
this.setstorage('me', this.me);
|
||||
await this.toast('修改成功');
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
<view class="ciy-card">
|
||||
<view class="content char4">
|
||||
<view class="flex flex-wrap" style="gap:1em;">
|
||||
<view class="fpay" v-for="(item,index) in init.charges" :key="item" @tap="currbuy=index;money=item" :class="{select:currbuy==index}">
|
||||
<view class="fpay" v-for="(item,index) in init.charges" :key="item" @tap="currbuy=index;money=item.chargemoney" :class="{select:currbuy==index}">
|
||||
<view class="money">
|
||||
<text>{{item/100}}</text>元
|
||||
<text>{{item.chargemoney/100}}</text>元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="ciy-hr"></view>
|
||||
<ciy-swipelist title="充值记录" @tap="gourl" data-url="$/pages/main/me_cash_in" more></ciy-swipelist>
|
||||
<ciy-swipelist title="充值记录" @tap="gourl" data-url="cashin_lst" more></ciy-swipelist>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -72,12 +72,22 @@
|
|||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_cash_charge.vue
|
||||
this.init.charges = [];
|
||||
this.init.charges.push(10000);
|
||||
this.init.charges.push(50000);
|
||||
this.init.charges.push(100000);
|
||||
this.init.charges.push(500000);
|
||||
this.init.code = 1;
|
||||
=======
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cash_charge_init',
|
||||
data: this.pagepost
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init = retjson;
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/cash_charge.vue
|
||||
this.money = this.toint(this.opn.pay);
|
||||
if(this.money > 0)
|
||||
this.paynow();
|
||||
|
|
@ -88,8 +98,8 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.charge_paynow',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cash_charge_pay',
|
||||
data: {
|
||||
money: this.money
|
||||
}
|
||||
|
|
@ -102,8 +112,8 @@
|
|||
try {
|
||||
var retpay = await uni.requestPayment(retjson);
|
||||
await this.sleep(1000);
|
||||
var retjson2 = await this.callajax({
|
||||
func: 'me.charge_paychk',
|
||||
var retjson2 = await this.callfunc({
|
||||
func: 'me.cash_charge_chk',
|
||||
data: {
|
||||
orderid: retjson.orderid
|
||||
}
|
||||
|
|
@ -9,7 +9,11 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="sti" :style="{top:(header_statusbar_height+header_title_height)+'px'}">
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_cash_ie.vue
|
||||
<ciy-segment lis="1:收入,2:支出" all="全部" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
=======
|
||||
<ciy-segment lis="1:收入,2:支出" all="全部" @change="segment_change"></ciy-segment>
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/cashie_lst.vue
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="l2" style="margin-right: 4em;">{{item.name}}</view>
|
||||
|
|
@ -27,12 +31,9 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.liid = this.opn.liid;
|
||||
this.getlist();
|
||||
},
|
||||
onReachBottom(b) {
|
||||
|
|
@ -51,13 +52,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.cashie_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashie_lst_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -70,16 +70,8 @@
|
|||
if (retjson.list.length < retjson.pagecount)
|
||||
this.pageno = -1;
|
||||
},
|
||||
segment_change() {
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 800
|
||||
});
|
||||
},
|
||||
search_change(e) {
|
||||
this.pagepost.query.key = e.value;
|
||||
segment_change(e) {
|
||||
this.pagepost.liid = e.value.id;
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
|
|
@ -9,7 +9,9 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="l2"><ciy-showmoney :value="item.inmoney" ciystyle="text-align:left;font-size:1.5em;"></ciy-showmoney></view>
|
||||
<view class="l2">支付流水</view>
|
||||
<view class="l3">{{item.name}}</view>
|
||||
<view class="rt"><ciy-showmoney :value="item.inmoney" ciystyle="font-size:1.5em;"></ciy-showmoney>元</view>
|
||||
<view class="rb">{{todatetime(item.addtimes)}}</view>
|
||||
</view>
|
||||
<ciy-listend :page="pageno" :listlen="init.list.length" :nodataimg="file_stor('/img/mbnone.png')"></ciy-listend>
|
||||
|
|
@ -22,12 +24,9 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.liid = this.opn.liid;
|
||||
this.getlist();
|
||||
},
|
||||
onReachBottom(b) {
|
||||
|
|
@ -46,13 +45,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.cashin_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashin_lst_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
<template>
|
||||
<ciy-header title="提现"></ciy-header>
|
||||
<view v-if="init.code != 1">
|
||||
<view class="px4 py4">
|
||||
<view style="height:2em;width:60%;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:40%;margin-left:1em;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:50%;" class="ciy-skeleton"></view>
|
||||
<view style="height:6em;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-list" v-for="(item,index) in init.cashs" :key="item.id">
|
||||
<view class="l2">
|
||||
<text class="kbd">{{cashtype==1?'银行':'微信'}}</text>
|
||||
{{item.taxmoney==-1?'企业开具发票':'代缴个税 ' + (item.taxmoney/100)+' 元'}}
|
||||
</view>
|
||||
<ciy-showimgs label="发票" :src="item.invfile"></ciy-showimgs>
|
||||
<view class="l2" v-if="item.invcode">发票号码 {{item.invcode}}</view>
|
||||
<view class="l2" v-if="item.cashtimes>0">操作时间 {{todatetime(item.cashtimes)}}</view>
|
||||
<view class="l2" v-if="item.cashno">支付编号 {{item.cashno}}</view>
|
||||
<view class="l2" v-if="item.auditmsg">拒绝原因 {{item.auditmsg}}</view>
|
||||
<view class="l2" v-if="item.bankaccount">账户名称 {{item.bankaccount}}</view>
|
||||
<view class="l2" v-if="item.bankno">银行卡号 {{item.bankno}}</view>
|
||||
<view class="l2" v-if="item.bankname">开户银行 {{item.bankname}}</view>
|
||||
<view class="l2" v-if="item.bankcode">联行号 {{item.bankcode}}</view>
|
||||
|
||||
<view v-if="item.cashstatus==20 && item.cashtype==2">
|
||||
<button class="btn" @tap="wxrecvpay(index)">立即收款</button>
|
||||
</view>
|
||||
<view v-if="item.cashstatus==20 && item.cashtype==1">
|
||||
<button class="btn" @tap="showinv(index)">上传发票</button>
|
||||
</view>
|
||||
<view class="rt"><text class="kbd" :class="ccode(g.cashstatus, item.cashstatus,'clas')">{{ccode(g.cashstatus, item.cashstatus)}}</text></view>
|
||||
<view class="lb">{{todatetime(item.addtimes)}}</view>
|
||||
<view class="rb txt-lgg txt-wb">{{item.cashmoney/100}}</view>
|
||||
|
||||
</view>
|
||||
<view class="ciy-card char3" v-if="init.cashs.length==0">
|
||||
<view class="content">
|
||||
<view class="ciy-form">
|
||||
<label>余额</label>
|
||||
<view class="txt-left">
|
||||
{{init.user.mycashmoney/100}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>可提现</label>
|
||||
<view class="txt-left">
|
||||
<ciy-inputbet left bb v-model="editdata.cash" unit="元" bet="100"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>提现流向</label>
|
||||
<view class="txt-left">
|
||||
<ciy-selbool v-model="editdata.cashtype" y="银行" n="微信"></ciy-selbool>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>税务方案</label>
|
||||
<view class="txt-left">
|
||||
{{editdata.cashtype==2?'代扣缴个税':(me.truename == me.bankaccount?'代扣缴个税':'对公开具发票')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form" v-if="editdata.cashtype==1">
|
||||
<label>银行账户</label>
|
||||
<view class="txt-left">
|
||||
{{me.bankaccount}}<br />
|
||||
{{me.bankname}}<br />
|
||||
{{me.bankno}}<br />
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="cashsubmit">申请提现</button>
|
||||
</view>
|
||||
<view class="ciy-tip"><ciy-markdown :md="init.tip"></ciy-markdown></view>
|
||||
</view>
|
||||
</view>
|
||||
<ciy-swipelist v-else title="可提现余额" :right="init.user.mycashmoney/100+'元'"></ciy-swipelist>
|
||||
</view>
|
||||
<ciy-swipelist title="提现历史记录" @tap="gourl" data-url="$/pages/me/cashout_lst" more></ciy-swipelist>
|
||||
|
||||
<ciy-anipop v-model="popinv" :zindex="991" maskbg="#00000077" title="上传发票">
|
||||
<view class="bg1 pop">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">发票编号</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="invedit.invcode" type="text"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">上传发票</label>
|
||||
<view style="height:10em;">
|
||||
<ciy-upload left num="1" path="cashinv" v-model="invedit.invfile" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="px4 py4 txt-center">
|
||||
<button class="btn lg" @tap="invsubmit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</ciy-anipop>
|
||||
<view :style="{height:header_statusbar_height+'px'}"></view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
popinv: false,
|
||||
invedit: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getinit();
|
||||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashout_cash_init',
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init = retjson;
|
||||
this.editdata.cashtype = 2;
|
||||
this.editdata.cash = Math.floor(this.init.user.mycashmoney / 100) * 100;
|
||||
if (this.editdata.cash < 0)
|
||||
this.editdata.cash = 0;
|
||||
},
|
||||
async cashsubmit() {
|
||||
await this.getauth('bank');
|
||||
if (this.editdata.cash <= 0)
|
||||
return this.toast('不可提现');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashout_cash_submit',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.user.mycashmoney -= this.editdata.cash;
|
||||
this.editdata.cash = 0;
|
||||
this.toast('申请成功');
|
||||
},
|
||||
async wxrecvpay(idx) {
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashout_cash_wxrecvpay',
|
||||
data: {
|
||||
id: this.init.cashs[idx].id
|
||||
}
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.cashs.splice(idx, 1);
|
||||
wx.requestMerchant({
|
||||
mchId: retjson.transfer.mchid,
|
||||
appId: retjson.transfer.appid,
|
||||
package: retjson.transfer.package_info,
|
||||
success: (res) => {
|
||||
console.log('success Transfer:', res);
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('fail Transfer:', res);
|
||||
},
|
||||
});
|
||||
},
|
||||
showinv(idx) {
|
||||
this.invedit.id = this.init.cashs[idx].id;
|
||||
this.popinv = true;
|
||||
},
|
||||
async invsubmit(e) {
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashout_cash_inv',
|
||||
data: this.invedit
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.objtolist(this.init.cashs, retjson.data);
|
||||
this.toast('上传发票成功');
|
||||
this.popinv = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -9,13 +9,28 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="sti" :style="{top:(header_statusbar_height+header_title_height)+'px'}">
|
||||
<ciy-segment all="全部" :lis="init.lis" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
<ciy-segment lis="90:已拒绝,100:已完成" all="全部" @change="segment_change"></ciy-segment>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="l2" style="margin-right: 4em;">{{item.cashtype==1?'银行收款 (开具发票独立纳税)':'微信打款 (代扣缴个税)'}}</view>
|
||||
<view class="l2">
|
||||
<text class="kbd">{{cashtype==1?'银行':'微信'}}</text>
|
||||
{{item.taxmoney==-1?'企业开具发票':'代缴个税 ' + (item.taxmoney/100)+' 元'}}
|
||||
</view>
|
||||
<ciy-showimgs label="发票" :src="item.invfile"></ciy-showimgs>
|
||||
<view class="l2" v-if="item.invcode">发票号码 {{item.invcode}}</view>
|
||||
<view class="l2" v-if="item.cashtimes>0">操作时间 {{todatetime(item.cashtimes)}}</view>
|
||||
<view class="l2" v-if="item.cashno">支付编号 {{item.cashno}}</view>
|
||||
<view class="l2" v-if="item.auditmsg">拒绝原因 {{item.auditmsg}}</view>
|
||||
<view class="l2" v-if="item.bankaccount">账户名称 {{item.bankaccount}}</view>
|
||||
<view class="l2" v-if="item.bankno">银行卡号 {{item.bankno}}</view>
|
||||
<view class="l2" v-if="item.bankname">开户银行 {{item.bankname}}</view>
|
||||
<view class="l2" v-if="item.bankcode">联行号 {{item.bankcode}}</view>
|
||||
|
||||
<view class="rt"><text class="kbd" :class="ccode(g.cashstatus, item.cashstatus,'clas')">{{ccode(g.cashstatus, item.cashstatus)}}</text></view>
|
||||
<view class="lb">{{todatetime(item.addtimes)}}</view>
|
||||
<view class="rb txt-lgg txt-wb">{{item.cashmoney/100}}</view>
|
||||
|
||||
|
||||
</view>
|
||||
<ciy-listend :page="pageno" :listlen="init.list.length" :nodataimg="file_stor('/img/mbnone.png')"></ciy-listend>
|
||||
</view>
|
||||
|
|
@ -27,16 +42,9 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.liid = this.opn.liid;
|
||||
this.init.lis = [...this.g.cashstatus];
|
||||
var ind = this.arrayfind(this.init.lis, 21, 'id');
|
||||
this.init.lis.splice(ind, 1);
|
||||
this.getlist();
|
||||
},
|
||||
onReachBottom(b) {
|
||||
|
|
@ -55,13 +63,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.cashout_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.cashout_lst_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -74,7 +81,8 @@
|
|||
if (retjson.list.length < retjson.pagecount)
|
||||
this.pageno = -1;
|
||||
},
|
||||
segment_change() {
|
||||
segment_change(e) {
|
||||
this.pagepost.liid = e.value.id;
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
|
|
@ -7,13 +7,13 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="sti" :style="{top:(header_statusbar_height+header_title_height)+'px'}">
|
||||
<ciy-segment :lis="init.lis" all="全部" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
<ciy-segment lis="20:待开票,100:已开票,90:已拒开" all="全部" @change="segment_change"></ciy-segment>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="rt">
|
||||
<text class="code" v-if="item.invtimes>0">已开票</text>
|
||||
<text class="code" v-else style="color:var(--txt1);">未开票</text>
|
||||
<text class="kbd" :class="ccode(g.auditstatus, item.auditstatus,'clas')">{{ccode(g.auditstatus,item.auditstatus)}}</text>
|
||||
</view>
|
||||
<view class="l2 txt-wb">{{ccode(init.ap_invoicedetail,item.invoicedetailid)}}</view>
|
||||
<view class="l2">{{item.name}}</view>
|
||||
<view class="l3" v-if="item.taxnumber">税号 {{item.taxnumber}}</view>
|
||||
<view class="l3" v-if="item.addr">地址 {{item.addr}}</view>
|
||||
|
|
@ -21,6 +21,13 @@
|
|||
<view class="l3" v-if="item.bankname">银行 {{item.bankname}}</view>
|
||||
<view class="l3" v-if="bankaccount">账号 {{item.bankaccount}}</view>
|
||||
<view class="lb">{{todatetime(item.addtimes)}}</view>
|
||||
<template v-if="item.audittimes>20">
|
||||
<view class="ciy-hr"></view>
|
||||
<view class="l2" v-if="item.invcode">发票号码 <text class="txt-lgg px2" @tap="copyboard(item.invcode)">{{item.invcode}}</text></view>
|
||||
<ciy-showimgs label="发票附件" :src="item.invfile"></ciy-showimgs>
|
||||
<view class="l2">操作时间 {{todatetime(item.audittimes)}}</view>
|
||||
<view class="l2" v-if="item.auditmsg">拒开原因 {{item.auditmsg}}</view>
|
||||
</template>
|
||||
<view class="rb">
|
||||
<text class="txt-lgg txt-wb px2">{{item.invoicemoney/100}}</text>
|
||||
<text class="txt-smm">元</text>
|
||||
|
|
@ -36,22 +43,9 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.liid = this.opn.liid;
|
||||
this.init.lis = [];
|
||||
this.init.lis.push({
|
||||
id: 2,
|
||||
name: '待开票'
|
||||
});
|
||||
this.init.lis.push({
|
||||
id: 3,
|
||||
name: '已开票'
|
||||
});
|
||||
this.getlist();
|
||||
},
|
||||
onReachBottom(b) {
|
||||
|
|
@ -70,13 +64,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.invoicing_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.invoice_lst_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -89,7 +82,8 @@
|
|||
if (retjson.list.length < retjson.pagecount)
|
||||
this.pageno = -1;
|
||||
},
|
||||
segment_change() {
|
||||
segment_change(e) {
|
||||
this.pagepost.liid = e.value.id;
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
|
|
@ -6,70 +6,68 @@
|
|||
<view style="height:8em;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-list" :class="{selected:opn.sel&&item.id==opn.id,del:item._clas=='del'}" v-for="(item,index) in init.list" :key="item.id" @click="select(item.id)">
|
||||
<view class="ciy-list" :class="{selected:opn.sel&&item.id==opn.id,del:item._del}" v-for="(item,index) in init.list" :key="item.id" @tap="select(item.id)">
|
||||
<view class="l2">名称 {{item.name}}</view>
|
||||
<view class="l2" v-if="item.taxnumber">税号 {{item.taxnumber}}</view>
|
||||
<view class="l2" v-if="item.addr">单位地址 {{item.addr}}</view>
|
||||
<view class="l2" v-if="item.phone">电话号码 {{item.phone}}</view>
|
||||
<view class="l2" v-if="item.bankname">银行名称 {{item.bankname}}</view>
|
||||
<view class="l2" v-if="item.bankaccount">银行账号 {{item.bankaccount}}</view>
|
||||
<view class="dot" @click="showmenu(index)"></view>
|
||||
<view class="dot" @tap.stop="showmenu(index)"></view>
|
||||
</view>
|
||||
<view style="height:5em;"></view>
|
||||
<view class="ciy-add" style="z-index:41;" @tap="editshow(null)"></view>
|
||||
<view class="ciy-add" style="z-index:41;bottom:6em;" @tap="editshow(null)"></view>
|
||||
<view v-if="opn.sel">
|
||||
<view class="bg1 txt-center py4 ciy-bottom">
|
||||
<button class="btn lg" @click="selectok">选定</button>
|
||||
<button class="btn lg" @tap="selectok">选定</button>
|
||||
</view>
|
||||
</view>
|
||||
<ciy-anipop v-model="popedit" :zindex="998" maskbg="#00000077" :title="edit.id>0?'更新抬头':'新建抬头'">
|
||||
<view class="bg1 pop">
|
||||
<form @submit="submit_edit" class="char5">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">抬头名称</label>
|
||||
<view>
|
||||
<ciy-input name="name" v-model="edit.name" bb></ciy-input>
|
||||
</view>
|
||||
<ciy-anipop v-model="popedit" :zindex="998" maskbg="#00000077" :title="editdata.id>0?'更新抬头':'新建抬头'">
|
||||
<view class="bg1 pop char5">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">抬头名称</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.name"></ciy-input>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">税号</label>
|
||||
<view>
|
||||
<ciy-input name="taxnumber" v-model="edit.taxnumber" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>税号</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.taxnumber"></ciy-input>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>单位地址</label>
|
||||
<view>
|
||||
<ciy-input name="addr" v-model="edit.addr" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>单位地址</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.addr"></ciy-input>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>电话号码</label>
|
||||
<view>
|
||||
<ciy-input name="phone" v-model="edit.phone" bb ciystyle="width:9em;"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>电话号码</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.phone" ciystyle="width:9em;"></ciy-input>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>银行名称</label>
|
||||
<view>
|
||||
<ciy-input name="bankname" v-model="edit.bankname" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>银行名称</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.bankname"></ciy-input>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>银行账号</label>
|
||||
<view>
|
||||
<ciy-input name="bankaccount" v-model="edit.bankaccount" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>银行账号</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.bankaccount"></ciy-input>
|
||||
</view>
|
||||
<view class="rel px4 py4 txt-center">
|
||||
<button class="btn lg" form-type="submit">提交</button>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="abs t1 r1">
|
||||
<button class="btn sm" @tap="chooseinvoice">从微信同步</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="rel px4 py4 txt-center">
|
||||
<button class="btn lg" @tap="submit_edit">提交</button>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="abs t1 r1">
|
||||
<button class="btn sm" @tap="chooseinvoice">从微信同步</button>
|
||||
</view>
|
||||
</form>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</ciy-anipop>
|
||||
</view>
|
||||
|
|
@ -95,9 +93,6 @@
|
|||
data() {
|
||||
return {
|
||||
popedit: false,
|
||||
edit: {
|
||||
id: -1
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -110,8 +105,8 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.invoicetitle_get'
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.invoicetitle_list'
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -146,41 +141,35 @@
|
|||
editshow(item) {
|
||||
item = item || {
|
||||
data: {
|
||||
_idx: -1
|
||||
id: 0
|
||||
}
|
||||
};
|
||||
this.edit = {
|
||||
this.editdata = {
|
||||
...item.data
|
||||
};
|
||||
this.popedit = true;
|
||||
},
|
||||
async submit_edit(e) {
|
||||
if (!e.detail.value.name)
|
||||
async submit_edit() {
|
||||
if (!this.editdata.name)
|
||||
return this.alert('请输入抬头名称');
|
||||
if (!e.detail.value.taxnumber)
|
||||
return this.alert('请输入税号');
|
||||
e.detail.value.id = this.edit.id;
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.invoicetitle_edit',
|
||||
data: e.detail.value
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
if (this.edit._idx == -1)
|
||||
this.init.list.unshift(retjson.data);
|
||||
else
|
||||
this.init.list[this.edit._idx] = this.objdeepmerge(this.init.list[this.edit._idx], retjson.data);
|
||||
this.objtolist(this.init.list, retjson.data);
|
||||
this.popedit = false;
|
||||
this.toast('更新成功');
|
||||
},
|
||||
async del(item) {
|
||||
if (await this.askmsg('是否删除?') != 'ok')
|
||||
return;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.invoicetitle_del',
|
||||
data: {
|
||||
id: item.data.id
|
||||
|
|
@ -188,7 +177,7 @@
|
|||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.list[item.data._idx]._clas = 'del';
|
||||
this.init.list[item.data._idx]._del = true;
|
||||
setTimeout(() => {
|
||||
this.init.list.splice(item.data._idx, 1);
|
||||
}, 500);
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<ciy-header title="我要开票"></ciy-header>
|
||||
<view v-if="init.code != 1">
|
||||
<view class="px4 py4">
|
||||
<view style="height:2em;width:60%;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:40%;margin-left:1em;" class="ciy-skeleton"></view>
|
||||
<view style="height:1em;width:50%;" class="ciy-skeleton"></view>
|
||||
<view style="height:6em;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-card char3">
|
||||
<view class="content">
|
||||
<view class="ciy-form">
|
||||
<label>可开票金额</label>
|
||||
<view style="text-align: left;">
|
||||
{{init.user.myinvmoney/100}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>开票金额</label>
|
||||
<view>
|
||||
<ciy-inputbet bb v-model="editdata.money" unit="元" bet="100"></ciy-inputbet>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form" v-if="init.details.length>0">
|
||||
<label>开票明细</label>
|
||||
<view>
|
||||
<ciy-select v-model="editdata.invoicedetailid" :range="init.details"></ciy-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>发票抬头</label>
|
||||
<view>
|
||||
<ciy-selpage v-model="editdata.invoicetitleid" page="invoicetitle">
|
||||
<template v-slot:default="{data}">
|
||||
<view>{{data.name}}</view>
|
||||
<view class="txt1">{{data.taxnumber}}</view>
|
||||
</template>
|
||||
</ciy-selpage>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">申请开票</button>
|
||||
</view>
|
||||
<view class="ciy-tip"><ciy-markdown :md="init.tip"></ciy-markdown></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ciy-swipelist title="开票历史" @tap="gourl" data-url="invoice_lst" more></ciy-swipelist>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getinit();
|
||||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.invoicing_init',
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init = retjson;
|
||||
this.editdata.money = retjson.user.myinvmoney;
|
||||
},
|
||||
async submit() {
|
||||
if (this.editdata.money < 1000)
|
||||
return this.toast('开票金额10元');
|
||||
if (this.init.user.myinvmoney < this.editdata.money)
|
||||
return this.toast('开票金额不足');
|
||||
if (!this.editdata.invoicetitleid)
|
||||
return this.toast('请选择发票抬头');
|
||||
if (this.init.details.length > 0) {
|
||||
if (!this.editdata.invoicedetailid)
|
||||
return this.toast('请选择发票明细');
|
||||
}
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.invoicing_submit',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.user.myinvmoney -= this.editdata.money;
|
||||
this.me.myinvmoney = this.init.user.myinvmoney;
|
||||
this.setstorage('me', this.me);
|
||||
this.toast('申请成功');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -6,9 +6,6 @@
|
|||
<view style="height:6em;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="sti" :style="{top:(header_statusbar_height+header_title_height)+'px'}">
|
||||
<ciy-segment :lis="init.lis" all="全部" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="rt">
|
||||
<text class="code" v-if="item.paytimes>0">已支付</text>
|
||||
|
|
@ -18,6 +15,8 @@
|
|||
<text class="txt-lgg txt-wb px2">{{item.pnt}}</text>
|
||||
<text class="txt-smm">金币</text>
|
||||
</view>
|
||||
<view class="l2">支付流水</view>
|
||||
<view class="l3">{{item.name}}</view>
|
||||
<view class="lb">{{todatetime(item.addtimes)}}</view>
|
||||
<view class="rb">
|
||||
<text class="txt-lgg txt-wb px2">{{item.buypntmoney/100}}</text>
|
||||
|
|
@ -34,22 +33,9 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.liid = this.opn.liid;
|
||||
this.init.lis = [];
|
||||
this.init.lis.push({
|
||||
id: 2,
|
||||
name: '未支付'
|
||||
});
|
||||
this.init.lis.push({
|
||||
id: 3,
|
||||
name: '已支付'
|
||||
});
|
||||
this.getlist();
|
||||
},
|
||||
onReachBottom(b) {
|
||||
|
|
@ -68,13 +54,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.pntbuy_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.pnt_buylst_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -87,14 +72,6 @@
|
|||
if (retjson.list.length < retjson.pagecount)
|
||||
this.pageno = -1;
|
||||
},
|
||||
segment_change() {
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 800
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -7,11 +7,11 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-grid">
|
||||
<view class="grid" style="width:50%" @tap="gourl" data-url="$/pages/main/me_pnt_buy">
|
||||
<view class="grid" style="width:50%" @tap="gourl" data-url="pnt_buylst">
|
||||
<view class="icon" :style="{backgroundImage:svg2bg(svg.buy)}"></view>
|
||||
<view class="name">购买记录</view>
|
||||
</view>
|
||||
<view class="grid" style="width:50%" @tap="gourl" data-url="/pages/main/me_pnt_record">
|
||||
<view class="grid" style="width:50%" @tap="gourl" data-url="pnt_lst">
|
||||
<view class="icon" :style="{backgroundImage:svg2bg(svg.record)}"></view>
|
||||
<view class="name">金币流水</view>
|
||||
</view>
|
||||
|
|
@ -92,8 +92,8 @@
|
|||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.buy_init',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.pnt_buynow_init',
|
||||
data: this.pagepost
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -104,8 +104,8 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.buy_paynow',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.pnt_buynow_pay',
|
||||
data: {
|
||||
id: this.init.buys[this.currbuy].id
|
||||
}
|
||||
|
|
@ -118,8 +118,8 @@
|
|||
try {
|
||||
var retpay = await uni.requestPayment(retjson);
|
||||
await this.sleep(1000);
|
||||
var retjson2 = await this.callajax({
|
||||
func: 'me.buy_paychk',
|
||||
var retjson2 = await this.callfunc({
|
||||
func: 'me.pnt_buynow_chk',
|
||||
data: {
|
||||
orderid: retjson.orderid
|
||||
}
|
||||
|
|
@ -24,9 +24,7 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getlist();
|
||||
|
|
@ -47,12 +45,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.pntrecord_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.pnt_lst_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -9,12 +9,9 @@
|
|||
<view v-else class="flex flexcol" :style="'height:calc(100vh - ' + (header_statusbar_height+header_title_height) + 'px);'">
|
||||
<scroll-view @scrolltoupper="chgupper" :scroll-top="top" id="id_chats" class="flex1" style="overflow: auto;" scroll-y>
|
||||
<view class="ciy-list">
|
||||
<view class="l2" v-html="tobr(init.once.data.content)"></view>
|
||||
<ciy-showimgs :src="init.once.data.imgs" label="图片截图"></ciy-showimgs>
|
||||
<view class="rt">
|
||||
<button class="btn smm" @tap="closechat">关闭工单</button>
|
||||
</view>
|
||||
<view class="rb">{{todatetime(init.once.data.addtimes)}} 提交</view>
|
||||
<view class="l2" v-html="tobr(init.problem.content)"></view>
|
||||
<ciy-showimgs :src="init.problem.imgs" label="图片截图"></ciy-showimgs>
|
||||
<view class="rb">{{todatetime(init.problem.addtimes)}} 提交</view>
|
||||
</view>
|
||||
<view :class="item._od" class="vchat" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="nick" v-if="item.nick">{{item.nick}}</view>
|
||||
|
|
@ -22,11 +19,11 @@
|
|||
<view class="time">{{todatetime(item.addtimes,'st')}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<form @submit="submitsend" v-if="init.once.data.closetimes==0">
|
||||
<form v-if="init.problem.closetimes==0">
|
||||
<view class="bg2 vchatsend">
|
||||
<!-- <view><button class="btn def" @tap="sendimg">图片</button></view> -->
|
||||
<view style="flex:1;"><ciy-textarea name="content" v-model="content"></ciy-textarea></view>
|
||||
<view><button form-type="submit" class="btn">发送</button></view>
|
||||
<view style="flex:1;"><ciy-textarea v-model="editdata.content"></ciy-textarea></view>
|
||||
<view><button @tap="submitsend" class="btn">发送</button></view>
|
||||
</view>
|
||||
</form>
|
||||
<view class="bg2 txt-center px4 py4" v-else>
|
||||
|
|
@ -67,6 +64,7 @@
|
|||
|
||||
.vchat.me .chat {
|
||||
background: var(--succ4);
|
||||
color: var(--txt9);
|
||||
display: inline-block;
|
||||
clear: both;
|
||||
padding: 0.5em;
|
||||
|
|
@ -89,8 +87,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
top: 0,
|
||||
content: ''
|
||||
top: 999999999,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -114,8 +111,8 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.problechat_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.problem_chat_get',
|
||||
data: {
|
||||
mid: this.minid,
|
||||
op: 'min',
|
||||
|
|
@ -130,8 +127,8 @@
|
|||
this.minid = 0;
|
||||
},
|
||||
async getnew(blong) {
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.problechat_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.problem_chat_get',
|
||||
data: {
|
||||
mid: this.maxid,
|
||||
op: 'max',
|
||||
|
|
@ -168,19 +165,20 @@
|
|||
chgupper(e) {
|
||||
this.getlist();
|
||||
},
|
||||
async submitsend(e) {
|
||||
if (!e.detail.value.content)
|
||||
async submitsend() {
|
||||
if (!this.editdata.content)
|
||||
return this.toast('请输入内容');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
e.detail.value.id = this.opn.id;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.problechat_send',
|
||||
data: e.detail.value
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.problem_chat_send',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
this.content = '';
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.editdata.content = '';
|
||||
retjson.list = [retjson.data];
|
||||
this.callist(retjson.list);
|
||||
this.init = this.objdeepmerge(this.init, retjson);
|
||||
|
|
@ -188,21 +186,6 @@
|
|||
this.top = 999999999 + this.maxid;
|
||||
}, 300);
|
||||
},
|
||||
async closechat(e) {
|
||||
if (await this.askmsg('是否关闭工单?', '关闭') != 'ok')
|
||||
return;
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.problechat_close',
|
||||
data: {
|
||||
id: this.opn.id
|
||||
}
|
||||
});
|
||||
this._loading = false;
|
||||
uni.navigateBack();
|
||||
},
|
||||
sendimg() {}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,10 +7,10 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<view class="sti" :style="{top:(header_statusbar_height+header_title_height)+'px'}">
|
||||
<ciy-segment :lis="init.lis" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
<ciy-segment lis=":等待中,3:有回复,9:已关闭" v-model="liid" @change="segment_change"></ciy-segment>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="l2" v-html="tobr(item.content)" @tap="gourl" :data-url="'me_problechat?id=' + item.id"></view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id" @tap="showmenu(index)">
|
||||
<view class="l2" v-html="tobr(item.content)"></view>
|
||||
<ciy-showimgs :src="item.imgs" label="图片截图"></ciy-showimgs>
|
||||
<view class="rt" v-if="item.closetimes>0">已关闭</view>
|
||||
<view class="rt" style="color:var(--succ5)" v-else-if="item.replytimes>0">有回复</view>
|
||||
|
|
@ -21,29 +21,27 @@
|
|||
<ciy-listend :page="pageno" :listlen="init.list.length" :nodataimg="file_stor('/img/mbnone.png')"></ciy-listend>
|
||||
<view class="ciy-add" @tap="openadd()"></view>
|
||||
<ciy-dialog ref="dialog">
|
||||
<form @submit="editsubmit">
|
||||
<view class="ciy-form v">
|
||||
<label class="imp">问题描述</label>
|
||||
<view>
|
||||
<ciy-textarea name="content" type="text" bb ciystyle="min-height:4em"></ciy-textarea>
|
||||
</view>
|
||||
<view class="ciy-form v">
|
||||
<label class="imp">问题描述</label>
|
||||
<view>
|
||||
<ciy-textarea bb v-model="editdata.content" ciystyle="min-height:4em"></ciy-textarea>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>图片截图</label>
|
||||
<view>
|
||||
<ciy-upload left num="8" path="problem" name="imgs" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>图片截图</label>
|
||||
<view>
|
||||
<ciy-upload left num="8" path="problem" v-model="editdata.imgs" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>联系方式</label>
|
||||
<view>
|
||||
<ciy-input :value="me.mobile" name="contract" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>联系方式</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.contract"></ciy-input>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">建立工单</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="edited">建立工单</button>
|
||||
</view>
|
||||
</ciy-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -54,25 +52,9 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
liid: 0,
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.init.lis = [];
|
||||
this.init.lis.push({
|
||||
id: '',
|
||||
name: '等待中'
|
||||
});
|
||||
this.init.lis.push({
|
||||
id: 3,
|
||||
name: '有回复'
|
||||
});
|
||||
this.init.lis.push({
|
||||
id: 9,
|
||||
name: '已关闭'
|
||||
});
|
||||
this.getlist();
|
||||
},
|
||||
onReachBottom(b) {
|
||||
|
|
@ -91,13 +73,12 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.query.liid = this.liid;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.problem_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.problem_pub_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -111,32 +92,70 @@
|
|||
this.pageno = -1;
|
||||
},
|
||||
openadd() {
|
||||
this.editdata.contract = this.me.mobile;
|
||||
this.getrefsSync('dialog').Open({
|
||||
title: '新建工单'
|
||||
});
|
||||
},
|
||||
async editsubmit(e) {
|
||||
if (!e.detail.value.content)
|
||||
async edited() {
|
||||
if (!this.editdata.content)
|
||||
return this.toast('请输入问题描述');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.problem_add',
|
||||
data: e.detail.value
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.problem_pub_add',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.getrefsSync('dialog').Close();
|
||||
this.init.list.unshift(retjson.data);
|
||||
},
|
||||
segment_change() {
|
||||
segment_change(e) {
|
||||
this.pagepost.liid = e.value.id;
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 800
|
||||
});
|
||||
}
|
||||
},
|
||||
async close(item) {
|
||||
if (await this.askmsg('是否关闭工单?', '关闭工单') != 'ok')
|
||||
return;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.problem_pub_close',
|
||||
data: {
|
||||
id: item.data.id
|
||||
}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.list[item.data._idx].closetimes = this.tostamp();
|
||||
},
|
||||
showmenu(idx) {
|
||||
var dat = this.init.list[idx];
|
||||
dat._idx = idx;
|
||||
var items = [];
|
||||
items.push({
|
||||
url: 'problem_chat?id=' + dat.id,
|
||||
name: '详情',
|
||||
});
|
||||
if (dat.closetimes == 0) {
|
||||
items.push({
|
||||
func: 'close',
|
||||
name: '关闭工单',
|
||||
data: dat,
|
||||
style: 'color:var(--warn6)',
|
||||
});
|
||||
}
|
||||
this.popmenu({
|
||||
one: true,
|
||||
items
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<template>
|
||||
<ciy-header title="申请众识码"></ciy-header>
|
||||
<view v-if="init.code != 1" class="px4 py4">
|
||||
<view style="height:60vw;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
<view v-else-if="me.cciy" class="txt-center py4">
|
||||
您已申请成功
|
||||
<view @tap="copyboard(me.cciy)" class="txt-lgg py4">{{me.cciy}}</view>
|
||||
</view>
|
||||
<view v-else-if="init.data && init.data.auditstatus != 90">
|
||||
<view class="ciy-tip" v-if="init.data.auditstatus == 20">您已提交申请,等待审核...</view>
|
||||
<view class="ciy-tip" v-if="init.data.auditstatus == 50">您的申请正在审核中...</view>
|
||||
<view class="ciy-tip" v-if="init.data.auditstatus == 100">您已申请通过</view>
|
||||
<view class="ciy-list">
|
||||
<view class="l1">{{init.data.name}}</view>
|
||||
<view class="l1">{{init.data.country}}</view>
|
||||
<view class="rb">{{todatetime(init.data.addtimes)}} 申请</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-tip" v-if="init.data?.auditmsg">
|
||||
{{init.data.auditmsg}}
|
||||
</view>
|
||||
<view class="ciy-card char4">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">主体国籍</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.country" type="idcard"></ciy-input>
|
||||
</view>
|
||||
<view class="flexnone px4" @tap="editdata.country='中国'">
|
||||
中国
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">多国身份</label>
|
||||
<view class="txt-left">
|
||||
<ciy-selbool v-model="editdata.dualcitizen" y="存在" n="没有"></ciy-selbool>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">申请众识码</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-tip"><ciy-markdown :md="init.tip"></ciy-markdown></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getinit();
|
||||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
await this.getauth('real');
|
||||
this.editdata.dualcitizen = 2;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.safe_ccub_init'
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
if (retjson.data && retjson.data.auditstatus == 100 && !this.me.cciy) {
|
||||
this.me.cciy = retjson.data.cciy;
|
||||
this.setstorage('me', this.me);
|
||||
var app = getApp();
|
||||
var page = app.getpage(1);
|
||||
page.me = this.me;
|
||||
}
|
||||
this.init = retjson;
|
||||
},
|
||||
async submit(e) {
|
||||
if (this.editdata.country.length < 1)
|
||||
return this.toast('请输入主体国籍');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.safe_ccub_submit',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
await this.toast('申请提交成功');
|
||||
uni.navigateBack();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<template>
|
||||
<ciy-header title="修改密码"></ciy-header>
|
||||
<view>
|
||||
<view class="ciy-card char4">
|
||||
<view class="content">
|
||||
<view class="ciy-form" v-if="!me.needpass">
|
||||
<label class="imp">旧密码</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.oldpass" type="password" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">新密码</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.newpass" type="password" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">再次输入</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.repass" type="password" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">修改密码</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
async submit() {
|
||||
if (this.editdata.newpass.length < 1)
|
||||
return this.toast('请输入新密码');
|
||||
if (this.editdata.newpass != this.editdata.repass)
|
||||
return this.toast('两次输入的新密码不同');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.safe_password_change',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me.needpass = false;
|
||||
this.setstorage('me', this.me);
|
||||
await this.toast('修改成功');
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -3,36 +3,73 @@
|
|||
<view v-if="init.code != 1" class="px4 py4">
|
||||
<view style="height:60vw;width:100%;" class="ciy-skeleton"></view>
|
||||
</view>
|
||||
<view v-else-if="me.truename" class="txt-center py4">
|
||||
{{me.truename}},已通过实名认证<br/>
|
||||
{{tomsk(me.idid, '*#**')}}
|
||||
</view>
|
||||
<view v-else-if="init.data && init.data.auditstatus != 90">
|
||||
<view class="ciy-tip" v-if="init.data.auditstatus == 20">您已提交申请,等待审核...</view>
|
||||
<view class="ciy-tip" v-if="init.data.auditstatus == 50">您的申请正在审核中...</view>
|
||||
<view class="ciy-tip" v-if="init.data.auditstatus == 100">您已申请通过</view>
|
||||
<view class="ciy-list">
|
||||
<view class="l1">{{init.data.name}}</view>
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_real.vue
|
||||
<view class="l1">{{init.data.idid}}</view>
|
||||
=======
|
||||
<view class="l1">{{tomsk(init.data.idid, '**###***')}}</view>
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/safe_real.vue
|
||||
<view class="rb">{{todatetime(init.data.addtimes)}} 申请</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-tip" v-if="init.data && init.data.auditmsg">
|
||||
<view class="ciy-tip" v-if="init.data?.auditmsg">
|
||||
{{init.data.auditmsg}}
|
||||
</view>
|
||||
<!-- <view class="ciy-card">
|
||||
<view class="ciy-card char4">
|
||||
<view class="ciy-form" v-if="inputtype==2">
|
||||
<label class="imp">人像面</label>
|
||||
<view>
|
||||
<ciy-upload left num="1" path="idid" v-model="editdata.idcard1" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form" v-if="inputtype==2">
|
||||
<label class="imp">国徽面</label>
|
||||
<view>
|
||||
<ciy-upload left num="1" path="idid" v-model="editdata.idcard2" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">实名姓名</label>
|
||||
<view>
|
||||
<ciy-input bb :disabled="inputtype!=2" v-model="editdata.name" ciystyle="width:6em;" type="text"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">身份证号</label>
|
||||
<view>
|
||||
<ciy-input bb :disabled="inputtype!=2" v-model="editdata.idid" type="idcard"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">申请实名认证</button>
|
||||
</view>
|
||||
<view class="content" v-if="inputtype==1">
|
||||
<label>摄像头拍摄身份证正面(人像面),自动识别</label>
|
||||
<view>
|
||||
<ciy-aicameraocr ref="cameraocr" checkidcard="front" mode="idcard" @change="chgcameraocr"></ciy-aicameraocr>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="inputtype==2" style="position: fixed;bottom: 3em;left: calc(50vw - 1.5em);">
|
||||
<ciy-aivoice @change="chgvoice"></ciy-aivoice>
|
||||
</view>
|
||||
<view class="ciy-card" v-if="inputtype==3">
|
||||
<view class="content">
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="readnfc">{{nfcwork==0?'手机贴近身份证识别':'停止NFC扫描'}}</button>
|
||||
</view>
|
||||
<view>
|
||||
无需审核,立即完成实名认证。
|
||||
</view>
|
||||
<view v-if="nfcdata.name">
|
||||
<view v-if="nfcdata.name">姓名 {{nfcdata.name}}</view>
|
||||
<view v-if="nfcdata.idno">证号 {{nfcdata.idno}}</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="autoreal">立即实名完成</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_real.vue
|
||||
</view> -->
|
||||
<form @submit="submit" class="char4">
|
||||
<view class="ciy-card">
|
||||
|
|
@ -60,6 +97,9 @@
|
|||
</view>
|
||||
</form>
|
||||
<!-- <ciy-aivoice @change="chgvoice"></ciy-aivoice> -->
|
||||
=======
|
||||
</view>
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/safe_real.vue
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -70,10 +110,9 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
idno: '',
|
||||
inputtype: 0, //1拍照识别,2语音识别手动录入扫描件,3nfc刷卡识别
|
||||
nfcdata: {},
|
||||
nfcwork: 0
|
||||
nfcwork: 0,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -81,58 +120,87 @@
|
|||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.userreal_apply_get'
|
||||
await this.getauth('info');
|
||||
var app = getApp();
|
||||
this.inputtype = 2;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.safe_real_init'
|
||||
});
|
||||
this.init = retjson;
|
||||
if (retjson.code != 1)
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_real.vue
|
||||
return;
|
||||
=======
|
||||
return this.alert(retjson.errmsg);
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/safe_real.vue
|
||||
if (retjson.data && retjson.data.auditstatus == 100 && !this.me.truename) {
|
||||
this.me.truename = retjson.data.name;
|
||||
this.me.idid = retjson.data.idid;
|
||||
this.setstorage('me', this.me);
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_real.vue
|
||||
var app = getApp();
|
||||
var page = app.getpage(1);
|
||||
page.me = this.me;
|
||||
=======
|
||||
var page = app.getpage(1);
|
||||
page.me = this.me;
|
||||
}
|
||||
this.editdata.name = this.me.truename;
|
||||
this.editdata.idid = this.me.idid;
|
||||
if (this.inputtype == 1) {
|
||||
setTimeout(() => {
|
||||
this.getrefsSync('cameraocr').Step(1);
|
||||
}, 500);
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/safe_real.vue
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.getrefsSync('cameraocr').Step(1);
|
||||
}, 500);
|
||||
},
|
||||
async submit(e) {
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_real.vue
|
||||
// e.detail.value.name = '张东';
|
||||
// e.detail.value.idno = '152304200111157127';
|
||||
if (e.detail.value.name.length < 1)
|
||||
=======
|
||||
// this.editdata.name = '张东';
|
||||
// this.editdata.idid = '152304200111157127';
|
||||
if (this.editdata.name.length < 1)
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/safe_real.vue
|
||||
return this.toast('请输入姓名');
|
||||
if (e.detail.value.idno.length < 10)
|
||||
if (this.editdata.idid.length < 10)
|
||||
return this.toast('请输入身份证号');
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
if (this.idimg) {
|
||||
if (this.inputtype == 1 && this.idimg) {
|
||||
var opn = {};
|
||||
opn.basepath = 'idcard';
|
||||
opn.stor = '/';
|
||||
e.detail.value.idcard1 = await this.file_upload1(this.idimg, opn);
|
||||
this.editdata.idcard1 = await this.file_upload1(this.idimg, opn);
|
||||
}
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.userreal_apply_submit',
|
||||
data: e.detail.value
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.safe_real_submit',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
await this.toast('申请已提交');
|
||||
await this.toast('申请提交成功');
|
||||
uni.navigateBack();
|
||||
},
|
||||
<<<<<<< HEAD:fapp/ciyon_ap/pages/main/me_real.vue
|
||||
async chgidcard(e) {
|
||||
=======
|
||||
async chgcameraocr(e) {
|
||||
>>>>>>> publish:fapp/ciyon_ap/pages/me/safe_real.vue
|
||||
console.log(e);
|
||||
this.idimg = e.tempimg;
|
||||
if (this._loading)
|
||||
return this.toast('请稍后再试');
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'ai.aidecision',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'ciyai.aidecision',
|
||||
data: {
|
||||
id: 3,
|
||||
idcardocr: e.txts.join('\n')
|
||||
|
|
@ -141,8 +209,25 @@
|
|||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.name = retjson.ai.name;
|
||||
this.idno = retjson.ai.idno;
|
||||
this.editdata.name = retjson.ai.name;
|
||||
this.editdata.idno = retjson.ai.idno;
|
||||
},
|
||||
async chgvoice(e) {
|
||||
//按住说话,调用@change,界面上调用大模型给出合理结果,自动填写姓名和身份证号
|
||||
//简单的文字,用字符串匹配先试试。
|
||||
var retjson = await this.callfunc({
|
||||
func: 'ciyai.aidecision',
|
||||
data: {
|
||||
id: 4,
|
||||
voicetxt: e.txt
|
||||
}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
if (retjson.ai.name)
|
||||
this.editdata.name = retjson.ai.name;
|
||||
if (retjson.ai.idno)
|
||||
this.editdata.idid = retjson.ai.idno;
|
||||
},
|
||||
async readnfc() {
|
||||
var ciynfc = res => {
|
||||
|
|
@ -162,8 +247,10 @@
|
|||
console.log('connect', res);
|
||||
nfc.transceive({
|
||||
data: buffer,
|
||||
success(res) {
|
||||
success: (res) => {
|
||||
console.log('transecive', res);
|
||||
this.editdata.name = res.nfcdata.name;
|
||||
this.editdata.idid = res.nfcdata.idno;
|
||||
},
|
||||
fail(res) {
|
||||
console.log('transecive fail', res);
|
||||
|
|
@ -202,23 +289,6 @@
|
|||
//res.id = ArrayBuffer(8) {byteLength: 8, maxByteLength: 8, resizable: false, detached: false}
|
||||
//res.techs = ['NFC-B']
|
||||
},
|
||||
async chgvoice(e) {
|
||||
//按住说话,调用@change,界面上调用大模型给出合理结果,自动填写姓名和身份证号
|
||||
//简单的文字,用字符串匹配先试试。
|
||||
var retjson = await this.callajax({
|
||||
func: 'ai.aidecision',
|
||||
data: {
|
||||
id: 4,
|
||||
voicetxt: e.txt
|
||||
}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
if (retjson.ai.name)
|
||||
this.name = retjson.ai.name;
|
||||
if (retjson.ai.idno)
|
||||
this.idno = retjson.ai.idno;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -24,8 +24,8 @@
|
|||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.getqrcode',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.share_qrcode_get',
|
||||
data: {}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -6,33 +6,31 @@
|
|||
<view class="ciy-skeleton" style="height:6em;width:100%;"></view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<form @submit="submit">
|
||||
<view class="ciy-card">
|
||||
<view class="content char4">
|
||||
<view class="ciy-form v">
|
||||
<label class="imp">意见建议</label>
|
||||
<view>
|
||||
<ciy-textarea name="content" type="text" bb ciystyle="min-height:5em"></ciy-textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>图片截图</label>
|
||||
<view>
|
||||
<ciy-upload left num="8" path="suggest" name="imgs" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>联系方式</label>
|
||||
<view>
|
||||
<ciy-input name="contract" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" form-type="submit">提交</button>
|
||||
<view class="ciy-card">
|
||||
<view class="content char4">
|
||||
<view class="ciy-form v">
|
||||
<label class="imp">意见建议</label>
|
||||
<view>
|
||||
<ciy-textarea v-model="editdata.content" type="text" bb ciystyle="min-height:5em"></ciy-textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>图片截图</label>
|
||||
<view>
|
||||
<ciy-upload left num="5" path="suggest" v-model="editdata.imgs" imgwidth="1600" sourcetype="camera,album,message"></ciy-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>联系方式</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.contract" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<view class="l2" v-html="tobr(item.content)"></view>
|
||||
<ciy-showimgs :src="item.imgs" label="图片截图"></ciy-showimgs>
|
||||
|
|
@ -40,7 +38,7 @@
|
|||
<template v-if="item.replytimes > 0">
|
||||
<view class="ciy-hr my4"></view>
|
||||
<view class="l2 ciy-tip" v-html="tobr(item.replymsg)"></view>
|
||||
<view class="rt" style="color:var(--succ5)">已答复</view>
|
||||
<view class="rt" style="color:var(--succ5)">已答复</view>
|
||||
</template>
|
||||
<view class="rt" v-else>未答复</view>
|
||||
<view class="rb">{{todatetime(item.addtimes)}}</view>
|
||||
|
|
@ -54,15 +52,15 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.editdata.contract = this.me.mobile;
|
||||
this.getinit();
|
||||
},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.suggest_get',
|
||||
data: {}
|
||||
});
|
||||
|
|
@ -71,19 +69,20 @@
|
|||
this.init = retjson;
|
||||
},
|
||||
async submit(e) {
|
||||
if (e.detail.value.content.length < 5)
|
||||
if (this.editdata.content.length < 5)
|
||||
return this.toast('内容至少输入5个字');
|
||||
|
||||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.suggest_submit',
|
||||
data: e.detail.value
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
await this.toast('已提交');
|
||||
uni.navigateBack();
|
||||
this.init.list.unshift(retjson.data);
|
||||
await this.toast('提交成功');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<ciy-header title="收款银行"></ciy-header>
|
||||
<view class="ciy-card char3">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">账户名称</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.bankaccount" type="text" bb></ciy-input>
|
||||
</view>
|
||||
<view class="flexnone" style="padding-left:1em" @tap="editdata.bankaccount=me.truename">
|
||||
{{me.truename}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">银行账号</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.bankno" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">开户银行</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.bankname" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>联行号</label>
|
||||
<view>
|
||||
<ciy-input v-model="editdata.bankcode" type="text" bb></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="ciy-tip">实名认证人【{{me.truename}}】
|
||||
<br />账户名称与实名不一致,需为对公账户。
|
||||
<br />对公账户收款(含提现),需开具发票。
|
||||
<br />个人银行账户收款,平台代缴个税。
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">设置收款信息</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getauth('real');
|
||||
this.editdata.bankaccount = this.me.bankaccount;
|
||||
this.editdata.bankno = this.me.bankno;
|
||||
this.editdata.bankname = this.me.bankname;
|
||||
this.editdata.bankcode = this.me.bankcode;
|
||||
},
|
||||
methods: {
|
||||
async submit(e) {
|
||||
if (!this.editdata.bankaccount)
|
||||
return this.toast('请输入账户名称');
|
||||
if (!this.editdata.bankno)
|
||||
return this.toast('请输入银行账号');
|
||||
if (!this.editdata.bankname)
|
||||
return this.toast('请输入开户银行');
|
||||
//对公账户,再次确认。
|
||||
if (this.me.truename != this.editdata.bankaccount) {
|
||||
if (await this.askmsg(this.editdata.bankaccount + '\n请确认该账户为对公账户?\n对公账户提现需开具发票', '是对公户') != 'ok')
|
||||
return;
|
||||
}
|
||||
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.user_bank_change',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me.bankno = this.editdata.bankno;
|
||||
this.me.bankname = this.editdata.bankname;
|
||||
this.me.bankaccount = this.editdata.bankaccount;
|
||||
this.me.bankcode = this.editdata.bankcode;
|
||||
this.setstorage('me', this.me);
|
||||
await this.toast('设置成功');
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<ciy-header title="本人信息"></ciy-header>
|
||||
<view class="ciy-card char3">
|
||||
<view class="content char4">
|
||||
<view class="ciy-form">
|
||||
<label class="imp">姓名称呼</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.name" type="nickname"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>头像</label>
|
||||
<view>
|
||||
<ciy-upload left v-model="editdata.icon" path="icon" imgwidth="400" imgheight="400" camheight="100" sourcetype="rehcam,album,message"></ciy-upload>
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view>
|
||||
<button class="btn sm" open-type="chooseAvatar" @chooseavatar="wxavar">从微信获取</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label class="imp">手机号</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.mobile" type="text"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>微信</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.wxno" type="text"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form">
|
||||
<label>电子信箱</label>
|
||||
<view>
|
||||
<ciy-input bb v-model="editdata.email" type="text"></ciy-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ciy-form-bottom">
|
||||
<button class="btn lg cc" @tap="submit">更新个人信息</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.editdata = {
|
||||
...this.me
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async wxavar(e) {
|
||||
var app = getApp();
|
||||
var opn = {};
|
||||
opn.post = {
|
||||
from: 'avar'
|
||||
};
|
||||
opn.path = 'icon';
|
||||
opn.stor = app.globalData.storselect;
|
||||
opn.maxkb = 0;
|
||||
opn.imgwidth = 400;
|
||||
opn.imgheight = 400;
|
||||
opn.zipjpg = 70;
|
||||
this.me.icon = await this.file_upload1(e.detail.avatarUrl, opn);
|
||||
},
|
||||
async submit() {
|
||||
if (!this.editdata.name)
|
||||
return this.toast('请输入姓名称呼');
|
||||
if (!this.editdata.mobile)
|
||||
return this.toast('请输入手机号');
|
||||
if (this.editdata.name[0] == ':')
|
||||
return this.toast('姓名称呼不能以:开头');
|
||||
|
||||
this._loading = true;
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.user_info_change',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.me.name = this.editdata.name;
|
||||
this.me.icon = this.editdata.icon;
|
||||
this.me.mobile = this.editdata.mobile;
|
||||
this.me.wxno = this.editdata.wxno;
|
||||
this.me.email = this.editdata.email;
|
||||
this.setstorage('me', this.me);
|
||||
await this.toast('修改成功');
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -7,18 +7,18 @@
|
|||
<view class="ciy-skeleton" style="height:6em;width:100%;"></view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="ciy-list" :class="{selected:opn.sel&&item.id==opn.id,del:item._clas=='del'}" v-for="(item,index) in init.list" :key="item.id" @click="select(item.id)">
|
||||
<view class="ciy-list" :class="{selected:opn.sel&&item.id==opn.id,del:item._del}" v-for="(item,index) in init.list" :key="item.id" @tap="select(item.id)">
|
||||
<view class="l2">收件人 {{item.name}}</view>
|
||||
<view class="l2">联系电话 {{item.phone}}</view>
|
||||
<view class="l2">{{mcode(g.ciy_arearpc,item.areacode,'name').join(' . ')}}</view>
|
||||
<view class="l2">{{item.addr}}</view>
|
||||
<view class="dot" @click="showmenu(index)"></view>
|
||||
<view class="dot" @tap.stop="showmenu(index)"></view>
|
||||
</view>
|
||||
<view style="height:5em;"></view>
|
||||
<view class="ciy-add" style="z-index:41;" @tap="editshow()"></view>
|
||||
<view v-if="opn.sel">
|
||||
<view class="bg1 txt-center py4 ciy-bottom">
|
||||
<button class="btn lg" @click="selectok">选定</button>
|
||||
<button class="btn lg" @tap="selectok">选定</button>
|
||||
</view>
|
||||
</view>
|
||||
<ciy-anipop v-model="popedit" :zindex="998" maskbg="#00000077" :title="edit.id>0?'更新地址':'新建地址'">
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<view>
|
||||
<ciy-input name="addr" v-model="edit.addr" bb ciystyle="margin-right:0.5em;"></ciy-input>
|
||||
</view>
|
||||
<view style="flex:none;display: block;line-height: 1em;font-size: 0.7em;text-align: center;margin-right: 1em;" @click="getloc">
|
||||
<view style="flex:none;display: block;line-height: 1em;font-size: 0.7em;text-align: center;margin-right: 1em;" @tap="getloc">
|
||||
<i class="iconloc"></i><br />
|
||||
定位
|
||||
</view>
|
||||
|
|
@ -113,8 +113,8 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.shipaddr_get'
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.user_shipaddr_list'
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -171,8 +171,8 @@
|
|||
if (this._loading)
|
||||
return;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.shipaddr_edit',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.user_shipaddr_edit',
|
||||
data: e.detail.value
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -188,15 +188,15 @@
|
|||
async del(item) {
|
||||
if (await this.askmsg('是否删除?') != 'ok')
|
||||
return;
|
||||
var retjson = await this.callajax({
|
||||
func: 'me.shipaddr_del',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'me.user_shipaddr_del',
|
||||
data: {
|
||||
id: item.data.id
|
||||
}
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
return this.alert(retjson.errmsg);
|
||||
this.init.list[item.data._idx]._clas = 'del';
|
||||
this.init.list[item.data._idx]._del = true;
|
||||
setTimeout(() => {
|
||||
this.init.list.splice(item.data._idx, 1);
|
||||
}, 500);
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
onUnload() {
|
||||
var postparam = {};
|
||||
postparam.id = this.opn.id;
|
||||
var retjson = this.callajax({
|
||||
var retjson = this.callfunc({
|
||||
func: 'pub.imgend',
|
||||
data: postparam
|
||||
});
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
postparam.id = this.opn.id;
|
||||
postparam.txts = e.txts.join('\n');
|
||||
postparam.img = await this.file_upload1(e.tempimg, opn);
|
||||
var retjson = await this.callajax({
|
||||
var retjson = await this.callfunc({
|
||||
func: 'pub.imgadd',
|
||||
data: postparam
|
||||
});
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
computed: {},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'index.paper',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'main.paper_get',
|
||||
data: this.opn
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -17,13 +17,11 @@
|
|||
<ciy-markdown :md="init.data.content"></ciy-markdown>
|
||||
</scroll-view>
|
||||
<view class="bg2" style="border-top:1px solid var(--bg5)">
|
||||
<form @submit="submitsend">
|
||||
<view class="flex flex-center">
|
||||
<!-- <view><button class="btn def" @tap="sendimg">图片</button></view> -->
|
||||
<view class="flex1"><ciy-textarea name="content" v-model="content" ciystyle="min-height:1em;padding:0.5em"></ciy-textarea></view>
|
||||
<view><button form-type="submit" :disabled="init.vent" class="btn">吐槽</button></view>
|
||||
</view>
|
||||
</form>
|
||||
<view class="flex flex-center">
|
||||
<!-- <view><button class="btn def" @tap="sendimg">图片</button></view> -->
|
||||
<view class="flex1"><ciy-textarea v-model="editdata.content" ciystyle="min-height:1em;padding:0.5em"></ciy-textarea></view>
|
||||
<view><button @tap="submitsend" :disabled="init.vent" class="btn">吐槽</button></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg2" :style="{height:footer_safe_height+'px'}"></view>
|
||||
</view>
|
||||
|
|
@ -35,8 +33,7 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getinit();
|
||||
|
|
@ -53,8 +50,8 @@
|
|||
computed: {},
|
||||
methods: {
|
||||
async getinit() {
|
||||
var retjson = await this.callajax({
|
||||
func: 'index.art_read',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'main.part_init',
|
||||
data: this.pagepost
|
||||
});
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -66,22 +63,21 @@
|
|||
return;
|
||||
this._hot = true;
|
||||
this.pagepost.sec = this.tostamp() - this.readtimes;
|
||||
this.callajax({
|
||||
func: 'index.art_hot',
|
||||
this.callfunc({
|
||||
func: 'main.part_hot',
|
||||
data: this.pagepost
|
||||
});
|
||||
},
|
||||
async submitsend(e) {
|
||||
if (!e.detail.value.content)
|
||||
async submitsend() {
|
||||
if (!this.editdata.content)
|
||||
return this.toast('请输入内容');
|
||||
e.detail.value.sectionid = this.init.section.id;
|
||||
e.detail.value.id = this.opn.id;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.editdata.sectionid = this.init.section.id;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'index.art_vent',
|
||||
data: e.detail.value
|
||||
var retjson = await this.callfunc({
|
||||
func: 'main.part_vent',
|
||||
data: this.editdata
|
||||
});
|
||||
this._loading = false;
|
||||
if (retjson.code != 1)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<ciy-header :title="init.code==1?init.once.section.name:'加载中'" ref="header"></ciy-header>
|
||||
<ciy-header :title="init.code==1?init.section.name:'加载中'" ref="header"></ciy-header>
|
||||
<view v-if="init.code != 1" class="px4 py4">
|
||||
<view class="ciy-skeleton" style="height:2em;width:100%;"></view>
|
||||
<view class="ciy-skeleton" style="height:8em;width:100%;"></view>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<ciy-searchbar placeholder="请输入关键字" @confirm="search_change"></ciy-searchbar>
|
||||
</view>
|
||||
<view class="ciy-list" v-for="(item,index) in init.list" :key="item.id">
|
||||
<ciy-svgimg :src="item.img"></ciy-svgimg>
|
||||
<ciy-svgimg v-if="item.img" :src="item.img"></ciy-svgimg>
|
||||
<view class="l1 txt-wb" @tap="gourl" :data-url="'part?id=' + item.id">{{item.name}}</view>
|
||||
<view class="l3" v-html="tobr(item.descs)"></view>
|
||||
</view>
|
||||
|
|
@ -24,9 +24,7 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageno: 0,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
onLoad() {
|
||||
this.getlist();
|
||||
|
|
@ -47,13 +45,13 @@
|
|||
async getlist() {
|
||||
if (this.pageno < 0)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.once = !this.init.once;
|
||||
if (this._loading)
|
||||
return;
|
||||
this.pagepost.pageno = this.pageno + 1;
|
||||
this.pagepost.once = !this.init.once;
|
||||
this._loading = true;
|
||||
var retjson = await this.callajax({
|
||||
func: 'index.section_get',
|
||||
var retjson = await this.callfunc({
|
||||
func: 'main.psection_list',
|
||||
data: this.pagepost
|
||||
});
|
||||
this._loading = false;
|
||||
|
|
@ -67,7 +65,7 @@
|
|||
this.pageno = -1;
|
||||
},
|
||||
search_change(e) {
|
||||
this.pagepost.query.key = e.value;
|
||||
this.pagepost.key = e.value;
|
||||
this.pageno = 0;
|
||||
this.getlist();
|
||||
},
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
},
|
||||
onLoad() {
|
||||
this.web = decodeURIComponent(this.opn.web);
|
||||
var app = getApp();
|
||||
// #ifdef APP-PLUS
|
||||
setTimeout(() => {
|
||||
var currentWebview = this.$scope.$getAppWebview();
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
var top = this.header_statusbar_height + this.header_title_height;
|
||||
wv.setStyle({
|
||||
top: top,
|
||||
height: this.sysinfo.screenHeight - top
|
||||
height: app.globalData._sysinfo.screenHeight - top
|
||||
});
|
||||
this.name = wv.getTitle();
|
||||
}, 500);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ app函数库
|
|||
|
||||
app&page函数库
|
||||
* getme 获取本地me缓存
|
||||
* callajax (await)服务端ajax请求
|
||||
* callfunc (await)服务端ajax请求
|
||||
* lang 多语言
|
||||
* uperr 错误捕获处理
|
||||
* json_parse 字符串转json
|
||||
|
|
@ -122,7 +122,6 @@ page默认数据
|
|||
* jsnurl 指向动态服务器(多个)。默认t
|
||||
* header_* 页面边角尺寸
|
||||
* footer_* 页面边角尺寸
|
||||
* sysinfo systemInfo缓存
|
||||
|
||||
*/
|
||||
export default {
|
||||
|
|
@ -286,7 +285,7 @@ export default {
|
|||
}
|
||||
return '';
|
||||
};
|
||||
app.methods.callajax = async function(opt) {
|
||||
app.methods.callfunc = async function(opt) {
|
||||
//成功{code:1,...}
|
||||
//失败{errmsg:'错误信息'}
|
||||
//func
|
||||
|
|
@ -348,7 +347,9 @@ export default {
|
|||
var header = {};
|
||||
header['ciyauth'] = app.getstorage("_" + app.globalData.tokenfield);
|
||||
opt.data = opt.data || {};
|
||||
opt.data._pf = 'MB';
|
||||
opt.data._pf = 'MB' + new Date().getTime() + '_' + parseInt(80000000 + Math.random() * 10000000);
|
||||
if (app.globalData._wxappid)
|
||||
opt.data._appid = app.globalData._wxappid;
|
||||
if (opt.pagethis)
|
||||
opt.data = Object.assign({}, opt.pagethis.opn, opt.data);
|
||||
uni.request({
|
||||
|
|
@ -449,12 +450,6 @@ export default {
|
|||
};
|
||||
app.methods.setuserstorage = function(json) {
|
||||
var app = this;
|
||||
if (json.me.name) {
|
||||
if (json.me.name[0] == ':') {
|
||||
json.me.neednick = true;
|
||||
json.me.name = json.me.name.substring(1);
|
||||
}
|
||||
}
|
||||
app.setstorage("me", json.me);
|
||||
var pnttrack = app.getstorage('_pnttrack', {});
|
||||
if (!(pnttrack instanceof Object))
|
||||
|
|
@ -524,7 +519,7 @@ export default {
|
|||
var app = this;
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.getProperty(plus.runtime.appid, async widgetInfo => {
|
||||
app.callajax({
|
||||
app.callfunc({
|
||||
func: 'login.getappver',
|
||||
cache: 0,
|
||||
showload: false,
|
||||
|
|
@ -600,126 +595,6 @@ export default {
|
|||
// }
|
||||
btdev.bt_devopen(deviceid);
|
||||
};
|
||||
app.methods.CiyWebSocket = function(addr) {
|
||||
var app = getApp();
|
||||
var thos = this;
|
||||
this.buffer = new Array(); //发送数据缓冲区
|
||||
this.reOpenData = [2, 5, 3, 5, 5, 3, 5, 8, 10, 20, 30, 30]; //断线重连,每次间隔时间/秒
|
||||
this.reOpen = 0; //断线重连次数
|
||||
this.keepAliveTimer = setInterval(function() {
|
||||
console.log('keep');
|
||||
try {
|
||||
if (thos.wsock && thos.wsock.readyState !== 1) {
|
||||
thos.reOpenSec--;
|
||||
if (thos.reOpenSec <= 0) {
|
||||
thos.reOpen++;
|
||||
thos.reOpenSec = 10;
|
||||
thos.open();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (thos.buffer.length > 0) {
|
||||
var data = thos.buffer.pop();
|
||||
thos.send(data);
|
||||
} else {
|
||||
if (new Date().getTime() - thos.last_health_time >= 15000 && thos.wsock
|
||||
.readyState === 1) {
|
||||
thos.wsock.send({
|
||||
data: 'h'
|
||||
});
|
||||
thos.last_health_time = new Date().getTime();
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
app.uperr("app.ws.error", err);
|
||||
}
|
||||
}, 1000);
|
||||
this.setOpenSec = function() {
|
||||
(thos.reOpen < thos.reOpenData.length) ? thos.reOpenSec = thos.reOpenData[thos.reOpen]: thos
|
||||
.reOpenSec = 90; //断线重试太多后的间隔时间
|
||||
}
|
||||
this.open = function() {
|
||||
try {
|
||||
if (thos.wsock && thos.wsock.trueClose)
|
||||
return;
|
||||
thos.setOpenSec();
|
||||
if (thos.wsock) {
|
||||
if (thos.wsock.readyState == 1)
|
||||
return;
|
||||
thos.wsock.close();
|
||||
}
|
||||
thos.wsock = uni.connectSocket({
|
||||
url: addr,
|
||||
complete: () => {}
|
||||
});
|
||||
thos.wsock.onOpen(function(event) {
|
||||
try {
|
||||
thos.reOpen = 0;
|
||||
thos.last_health_time = new Date().getTime();
|
||||
if (typeof(thos.onopen) == "function")
|
||||
thos.onopen(event);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onopen', err);
|
||||
}
|
||||
});
|
||||
thos.wsock.onMessage(function(e) {
|
||||
try {
|
||||
if (typeof(thos.onmessage) == "function")
|
||||
thos.onmessage(e);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onmessage', err);
|
||||
}
|
||||
});
|
||||
thos.wsock.onClose(function(e) {
|
||||
try {
|
||||
if (thos.wsock.trueClose) {
|
||||
clearInterval(thos.keepAliveTimer);
|
||||
return;
|
||||
}
|
||||
thos.setOpenSec();
|
||||
if (typeof(thos.onclose) == "function")
|
||||
thos.onclose(e);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onclose', err);
|
||||
}
|
||||
});
|
||||
thos.wsock.onError(function(e) {
|
||||
try {
|
||||
thos.setOpenSec();
|
||||
if (typeof(thos.onerror) == "function")
|
||||
thos.onerror(e);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onerror', err);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(app, err);
|
||||
app.uperr('app.ws.open', err);
|
||||
}
|
||||
}
|
||||
this.send = function(msg) {
|
||||
try {
|
||||
if (this.wsock === undefined || this.wsock.trueClose)
|
||||
return false;
|
||||
if (this.wsock.readyState !== 1 || this.wsock.bufferedAmount > 0)
|
||||
this.buffer.push(msg);
|
||||
else {
|
||||
this.wsock.send({
|
||||
data: msg
|
||||
});
|
||||
this.last_health_time = new Date().getTime();
|
||||
}
|
||||
return true;
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.send', err);
|
||||
}
|
||||
}
|
||||
this.close = function(send) {
|
||||
this.wsock.trueClose = true;
|
||||
this.wsock.close();
|
||||
}
|
||||
this.open();
|
||||
};
|
||||
app.methods.getstorage = function(key, def) {
|
||||
def = def || '';
|
||||
var x = uni.getStorageSync(key);
|
||||
|
|
@ -759,9 +634,8 @@ export default {
|
|||
header_title_margin: 0, //顶部标题栏左右留白(正好躲过胶囊,且可使文字居中)
|
||||
footer_safe_height: 0, //底部安全高度(躲过刘海屏、底部横线等)
|
||||
pageclass: 'dark',
|
||||
editdata: {},
|
||||
pagedata: {}, //外部g.page_init
|
||||
sysinfo: {},
|
||||
version: '',
|
||||
isPage: false,
|
||||
jsnurl: {},
|
||||
pageno: 0,
|
||||
|
|
@ -807,8 +681,6 @@ export default {
|
|||
this.header_title_margin = app.globalData._header_title_margin;
|
||||
this.footer_safe_height = app.globalData._footer_safe_height;
|
||||
this.pagedata = app.globalData.ciy_page_data;
|
||||
this.version = app.globalData._version;
|
||||
this.sysinfo = app.globalData._sysinfo;
|
||||
this.jsnurl = app.globalData.jsnurl;
|
||||
//this.constant = {maxtimes: 9999999999999};
|
||||
this.me = this.getme();
|
||||
|
|
@ -841,9 +713,9 @@ export default {
|
|||
console.log('showe', e);
|
||||
return '';
|
||||
},
|
||||
callajax(opt) {
|
||||
callfunc(opt) {
|
||||
opt.pagethis = this;
|
||||
return getApp().callajax(opt);
|
||||
return getApp().callfunc(opt);
|
||||
},
|
||||
calltxt(opt) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
@ -919,7 +791,7 @@ export default {
|
|||
if (typeof(b) != 'string') {
|
||||
url = b.currentTarget.dataset.url;
|
||||
if (!initdata) {
|
||||
initdata = b.currentTarget.dataset.init;
|
||||
initdata = b.currentTarget.dataset.data;
|
||||
}
|
||||
if (!initkey) {
|
||||
initkey = b.currentTarget.dataset.key;
|
||||
|
|
@ -1000,10 +872,11 @@ export default {
|
|||
animationDuration: 1000
|
||||
});
|
||||
},
|
||||
goloc(lat, lng) {
|
||||
goloc(lat, lng, bet) {
|
||||
bet = bet || 10000000;
|
||||
uni.openLocation({
|
||||
latitude: this.tofloat(lat),
|
||||
longitude: this.tofloat(lng)
|
||||
latitude: this.tofloat(lat) / bet,
|
||||
longitude: this.tofloat(lng) / bet
|
||||
});
|
||||
},
|
||||
gophone(phone) {
|
||||
|
|
@ -1393,14 +1266,9 @@ export default {
|
|||
return '.' + m2;
|
||||
},
|
||||
tocciy(cciy) {
|
||||
if (!cciy)
|
||||
if (!cciy) //cciy必须为字符串,否则js无法处理
|
||||
return '';
|
||||
var hex = cciy.toString(16).toUpperCase();
|
||||
hex = hex.substring(hex.length - 12);
|
||||
hex = hex.replace(/^0+/, '');
|
||||
if (hex.length < 7)
|
||||
hex = '0'.repeat(7 - hex.length) + hex;
|
||||
return 'cx...' + hex.substring(0, hex.length - 1);
|
||||
return 'cx' + cciy.substring(0, 1) + '...' + cciy.substring(cciy.length - 6);
|
||||
},
|
||||
tostr(obj) {
|
||||
if (!obj)
|
||||
|
|
@ -1515,7 +1383,7 @@ export default {
|
|||
var inde = num.split('.');
|
||||
if (inde[1] && /^0+$/.test(inde[1]))
|
||||
return inde[0];
|
||||
return num;
|
||||
return num.replace(/\.?0+$/, '');
|
||||
}
|
||||
num = num.toFixed(length);
|
||||
return num;
|
||||
|
|
@ -1651,7 +1519,8 @@ export default {
|
|||
} else {
|
||||
theme = this.getstorage('_theme');
|
||||
if (!theme) {
|
||||
if (this.sysinfo.theme == 'dark')
|
||||
var app = getApp();
|
||||
if (app.globalData._sysinfo.theme == 'dark')
|
||||
theme = 'dark';
|
||||
}
|
||||
}
|
||||
|
|
@ -1678,11 +1547,12 @@ export default {
|
|||
},
|
||||
setfont(font) {
|
||||
// 空,lg xl xxl xxl
|
||||
var app = getApp();
|
||||
if (!font) {
|
||||
font = this.getstorage('_font');
|
||||
if (!font) {
|
||||
font = 'def';
|
||||
var fsize = this.sysinfo.fontSizeSetting * this.sysinfo.fontSizeScaleFactor;
|
||||
var fsize = app.globalData._sysinfo.fontSizeSetting * app.globalData._sysinfo.fontSizeScaleFactor;
|
||||
if (fsize >= 20 && fsize < 30)
|
||||
font = 'lg';
|
||||
if (fsize >= 30 && fsize < 40)
|
||||
|
|
@ -1707,7 +1577,7 @@ export default {
|
|||
fontsize = this.toint(font);
|
||||
if (fontsize < 20)
|
||||
fontsize = 30;
|
||||
var fz = (fontsize / 750 * this.sysinfo.windowWidth) + 'px';
|
||||
var fz = (fontsize / 750 * app.globalData._sysinfo.windowWidth) + 'px';
|
||||
this.meta.styles['font-size'] = fz;
|
||||
this.meta.style = Object.keys(this.meta.styles).map(key => key + ':' + this.meta.styles[key]).join(';') + ';';
|
||||
this.meta.fontsize = fz;
|
||||
|
|
@ -1733,8 +1603,8 @@ export default {
|
|||
post = {};
|
||||
post.id = pntid;
|
||||
this.setstorage('_pnttrack', pnttrack);
|
||||
this.callajax({
|
||||
func: 'me.pnt_up',
|
||||
this.callfunc({
|
||||
func: 'main.pnt_up',
|
||||
loadhide: true,
|
||||
data: post
|
||||
}).then(res => {
|
||||
|
|
@ -1765,7 +1635,7 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
async getauth(must) {
|
||||
async getauth(type) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$nextTick(() => {
|
||||
this.getrefs('auth').then(ref => {
|
||||
|
|
@ -1774,8 +1644,32 @@ export default {
|
|||
return resolve(auth);
|
||||
this.me = auth.me;
|
||||
this.g = this.objdeepmerge(this.g, this.getstorage('g', {}));
|
||||
if (type == 'info' && !this.me.name) {
|
||||
this.alert('请先填写个人信息').then(() => {
|
||||
uni.redirectTo({
|
||||
url: 'user_info'
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (type == 'real' && !this.me.truename) {
|
||||
this.alert('请进行实名认证').then(() => {
|
||||
uni.redirectTo({
|
||||
url: 'safe_real'
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (type == 'bank' && !this.me.bankname) {
|
||||
this.alert('请填写银行信息').then(() => {
|
||||
uni.redirectTo({
|
||||
url: 'user_bank'
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
resolve(auth);
|
||||
}, must);
|
||||
}, type == 'relogin');
|
||||
});
|
||||
});
|
||||
}).catch(e => {
|
||||
|
|
@ -2357,8 +2251,8 @@ export default {
|
|||
if (err)
|
||||
return fn.fail('h5Image Load Error', gf, err);
|
||||
var [width, height] = setimgrect(img);
|
||||
var zipjpg = this.tofloat(opn.zipjpg);
|
||||
if (width == 0 && this.isfloat0(zipjpg) && !opn.watertext)
|
||||
var zipjpg = this.toint(opn.zipjpg);
|
||||
if (width == 0 && zipjpg == 0 && !opn.watertext)
|
||||
return uploadpfile(gf);
|
||||
if (width == 0) {
|
||||
width = img.width;
|
||||
|
|
@ -2375,9 +2269,9 @@ export default {
|
|||
canvas.setAttributeNode(attrh);
|
||||
ctx.drawImage(img, 0, 0, width, height);
|
||||
waterctx(ctx, width, height);
|
||||
if (zipjpg < 0.0001)
|
||||
zipjpg = 0.7;
|
||||
var dataurl = canvas.toDataURL("image/jpeg", zipjpg);
|
||||
if (zipjpg == 0)
|
||||
zipjpg = 70;
|
||||
var dataurl = canvas.toDataURL("image/jpeg", zipjpg / 100);
|
||||
var b64s = dataurl.split(",");
|
||||
var b64type = b64s[0].match(/:(.*?);/)[1];
|
||||
var ab = atob(b64s[1]);
|
||||
|
|
@ -2399,8 +2293,8 @@ export default {
|
|||
return fn.fail('getImageInfo Error:' + fpath,
|
||||
gf, err);
|
||||
var [width, height] = setimgrect(img);
|
||||
var zipjpg = this.tofloat(opn.zipjpg);
|
||||
if (width == 0 && this.isfloat0(zipjpg) && !opn.watertext)
|
||||
var zipjpg = this.toint(opn.zipjpg);
|
||||
if (width == 0 && zipjpg == 0 && !opn.watertext)
|
||||
return uploadpfile(gf);
|
||||
if (width == 0) {
|
||||
width = img.width;
|
||||
|
|
@ -2424,11 +2318,11 @@ export default {
|
|||
ctx.drawImage(image, 0, 0, width, height);
|
||||
waterctx(ctx, width, height);
|
||||
if (zipjpg <= 0)
|
||||
zipjpg = 0.7;
|
||||
zipjpg = 70;
|
||||
var res = await uni.canvasToTempFilePath({
|
||||
canvas: canvas,
|
||||
fileType: 'jpg',
|
||||
quality: zipjpg
|
||||
quality: zipjpg / 100
|
||||
});
|
||||
gf.tempFilePath = res.tempFilePath;
|
||||
fs.getFileInfo({
|
||||
|
|
@ -2573,7 +2467,7 @@ export default {
|
|||
if (typeof(fn.success) == 'function')
|
||||
fn.success(jsonup.url, gf);
|
||||
} else {
|
||||
var [err, s3json] = await this.go(this.callajax({
|
||||
var [err, s3json] = await this.go(this.callfunc({
|
||||
func: opn.action + "s3&pathfile=" + pathfile +
|
||||
"&storselect=" + opn.stor
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ card bg3
|
|||
|
||||
|
||||
/* 主色 */
|
||||
--man2: #e1f6ff;
|
||||
--man3: #a6d2fa;
|
||||
--man4: #80c1f3;
|
||||
--man5: #1E9FFF;
|
||||
|
|
@ -879,7 +880,6 @@ text {
|
|||
.md-h1 {
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
margin-left: 0.3em;
|
||||
line-height: 1.5em;
|
||||
text-align: left;
|
||||
padding: 0.5em 0 0.5em 0.5em;
|
||||
|
|
@ -888,7 +888,6 @@ text {
|
|||
.md-h2 {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
margin-left: 0.4em;
|
||||
line-height: 1.8em;
|
||||
padding: 0.5em 0 0.5em 0.5em;
|
||||
}
|
||||
|
|
@ -898,7 +897,6 @@ text {
|
|||
.md-h5 {
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
margin-left: 0.5em;
|
||||
line-height: 1.5em;
|
||||
padding: 0.5em 0 0.5em 0.5em;
|
||||
}
|
||||
|
|
@ -963,6 +961,10 @@ text {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.txt-del.txt-del.txt-del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.txt-left.txt-left.txt-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,122 @@
|
|||
var websocket = function(addr) {
|
||||
var app = getApp();
|
||||
var thos = this;
|
||||
this.buffer = new Array(); //发送数据缓冲区
|
||||
this.reOpenData = [2, 5, 3, 5, 5, 3, 5, 8, 10, 20, 30, 30]; //断线重连,每次间隔时间/秒
|
||||
this.reOpen = 0; //断线重连次数
|
||||
this.keepAliveTimer = setInterval(function() {
|
||||
console.log('keep');
|
||||
try {
|
||||
if (thos.wsock && thos.wsock.readyState !== 1) {
|
||||
thos.reOpenSec--;
|
||||
if (thos.reOpenSec <= 0) {
|
||||
thos.reOpen++;
|
||||
thos.reOpenSec = 10;
|
||||
thos.open();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (thos.buffer.length > 0) {
|
||||
var data = thos.buffer.pop();
|
||||
thos.send(data);
|
||||
} else {
|
||||
if (new Date().getTime() - thos.last_health_time >= 15000 && thos.wsock
|
||||
.readyState === 1) {
|
||||
thos.wsock.send({
|
||||
data: 'h'
|
||||
});
|
||||
thos.last_health_time = new Date().getTime();
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
app.uperr("app.ws.error", err);
|
||||
}
|
||||
}, 1000);
|
||||
this.setOpenSec = function() {
|
||||
(thos.reOpen < thos.reOpenData.length) ? thos.reOpenSec = thos.reOpenData[thos.reOpen]: thos
|
||||
.reOpenSec = 90; //断线重试太多后的间隔时间
|
||||
}
|
||||
this.open = function() {
|
||||
try {
|
||||
if (thos.wsock && thos.wsock.trueClose)
|
||||
return;
|
||||
thos.setOpenSec();
|
||||
if (thos.wsock) {
|
||||
if (thos.wsock.readyState == 1)
|
||||
return;
|
||||
thos.wsock.close();
|
||||
}
|
||||
thos.wsock = uni.connectSocket({
|
||||
url: addr,
|
||||
complete: () => {}
|
||||
});
|
||||
thos.wsock.onOpen(function(event) {
|
||||
try {
|
||||
thos.reOpen = 0;
|
||||
thos.last_health_time = new Date().getTime();
|
||||
if (typeof(thos.onopen) == "function")
|
||||
thos.onopen(event);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onopen', err);
|
||||
}
|
||||
});
|
||||
thos.wsock.onMessage(function(e) {
|
||||
try {
|
||||
if (typeof(thos.onmessage) == "function")
|
||||
thos.onmessage(e);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onmessage', err);
|
||||
}
|
||||
});
|
||||
thos.wsock.onClose(function(e) {
|
||||
try {
|
||||
if (thos.wsock.trueClose) {
|
||||
clearInterval(thos.keepAliveTimer);
|
||||
return;
|
||||
}
|
||||
thos.setOpenSec();
|
||||
if (typeof(thos.onclose) == "function")
|
||||
thos.onclose(e);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onclose', err);
|
||||
}
|
||||
});
|
||||
thos.wsock.onError(function(e) {
|
||||
try {
|
||||
thos.setOpenSec();
|
||||
if (typeof(thos.onerror) == "function")
|
||||
thos.onerror(e);
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.onerror', err);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(app, err);
|
||||
app.uperr('app.ws.open', err);
|
||||
}
|
||||
}
|
||||
this.send = function(msg) {
|
||||
try {
|
||||
if (this.wsock === undefined || this.wsock.trueClose)
|
||||
return false;
|
||||
if (this.wsock.readyState !== 1 || this.wsock.bufferedAmount > 0)
|
||||
this.buffer.push(msg);
|
||||
else {
|
||||
this.wsock.send({
|
||||
data: msg
|
||||
});
|
||||
this.last_health_time = new Date().getTime();
|
||||
}
|
||||
return true;
|
||||
} catch (err) {
|
||||
app.uperr('app.ws.send', err);
|
||||
}
|
||||
}
|
||||
this.close = function(send) {
|
||||
this.wsock.trueClose = true;
|
||||
this.wsock.close();
|
||||
}
|
||||
this.open();
|
||||
};
|
||||
|
||||
export default websocket
|
||||
|
|
@ -14,6 +14,7 @@ const htmlPlugin_ciy = () => {
|
|||
pft += '<ciy-auth ref="auth"></ciy-auth>'; //暂时只做微信生态
|
||||
pft += '<ciy-alert ref="alert"></ciy-alert>';
|
||||
pft += '<ciy-toast ref="toast"></ciy-toast>';
|
||||
//pft += '<ciy-dbg ref="dbg"></ciy-dbg>';
|
||||
pft += '<ciy-popmenu ref="popmenu"></ciy-popmenu>';
|
||||
|
||||
let pfb = '</view>';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class api {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_api');
|
||||
|
|
@ -38,9 +38,9 @@ class api {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
</div>
|
||||
<div class="ciy-form col-24 col-sm-24 top">
|
||||
<div>
|
||||
<ciy-markdown com="content" imgwidth="1200" zipjpg="0.6" />
|
||||
<ciy-markdown com="content" imgwidth="1200" zipjpg="60" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class art_post {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_art_post');
|
||||
|
|
@ -47,7 +47,7 @@ class art_post {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '文章标题', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'source', 'name' => '来源', 'prop' => ' style="width:8em;"');
|
||||
|
|
@ -56,7 +56,7 @@ class art_post {
|
|||
$input[] = array('type' => 'select', 'form' => 'inputuser', 'name' => '撰写人', 'all' => '全部', 'select' => 'adminuser');
|
||||
$input[] = array('type' => 'select', 'form' => 'audituser', 'name' => '审核人', 'all' => '全部', 'select' => 'adminuser');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'pubtimes', 'name' => '发布时间');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class art_section {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_art_section');
|
||||
|
|
@ -41,13 +41,13 @@ class art_section {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'ngroup', 'name' => '分组名', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '版块名称', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'artcnt', 'name' => '文章数', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'adminuser', 'name' => '责任人', 'all' => '全部', 'select' => 'adminuser');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
function menubtn(dom, btn) {
|
||||
var id = $5(dom).parent('tr').attr('data-id');
|
||||
if (btn == 'read') {
|
||||
ciyfn.callfastfunc(dom, '是否已读?', 'read', { ids: id }, function (json) { table.updateline(json) });
|
||||
ciyfn.callfastfunc(dom, '', 'read', { ids: id }, function (json) { table.updateline(json) });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class art_vent {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_art_vent');
|
||||
|
|
@ -70,14 +70,14 @@ class art_vent {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'artid', 'name' => '文章', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'content', 'name' => '内容', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'pubtimes', 'name' => '反馈时间');
|
||||
$input[] = array('type' => 'select', 'form' => 'audituser', 'name' => '审核人', 'all' => '全部', 'select' => 'adminuser');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_art_section'] = getrelation($db, $rows, 'ap_art_section', 'sectionid');
|
||||
$ret['ap_art_post'] = getrelation($db, $rows, 'ap_art_post', 'artid');
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class banner {
|
|||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_banner');
|
||||
|
|
@ -35,11 +35,11 @@ class banner {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'groupcode', 'name' => '组别代码', 'prop' => ' style="width:6em;"' );
|
||||
$input[] = array('type' => 'input', 'form' => 'url', 'name' => '链接', 'prop' => ' style="width:8em;"' );
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class cash_ie {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_cash_ie');
|
||||
|
|
@ -54,13 +54,13 @@ class cash_ie {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'iemoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '发生时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '摘要', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class cash_in {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_cash_in');
|
||||
|
|
@ -56,13 +56,13 @@ class cash_in {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'cashmoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '发生时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '摘要', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@
|
|||
ciyfn.fillsearch({
|
||||
searchdom: '.search'
|
||||
, data: json
|
||||
, liall: '全部'
|
||||
, lidata: 'cashstatus'
|
||||
, lidata: ':申请中,20:已通过,90:已拒绝,100:已完成'
|
||||
, liclick: function (dom) {
|
||||
table.search(dom, 'li');
|
||||
}
|
||||
|
|
@ -75,9 +74,13 @@
|
|||
return json;
|
||||
}
|
||||
, fn_tdcontent: function (key, datashow, field, data) {
|
||||
if (key == 'taxmoney') {
|
||||
if(data[key] == -1)
|
||||
return '对公';
|
||||
}
|
||||
if (key == '_btn') {
|
||||
var html = '';
|
||||
if(data['cashstatus'] < 100)
|
||||
if(data['cashstatus'] == 10)
|
||||
html += `<a class="lang btn dag" onclick="menubtn(this, 'reject')">拒绝</a>`;
|
||||
return html;
|
||||
}
|
||||
|
|
@ -95,12 +98,6 @@
|
|||
if (btn == 'reject') {
|
||||
reject(id);
|
||||
}
|
||||
if (btn == 'sub') {
|
||||
ciyfn.sendsignal(window.top, 'manage_ifropen', {
|
||||
url: 'xxx.html?_xxxid=' + id
|
||||
, name: '提现记录<code>' + table.data[id].name + '</code>'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getdata(id, act, cb) {
|
||||
|
|
@ -2,13 +2,15 @@
|
|||
|
||||
namespace web\admin\ap;
|
||||
|
||||
class cash_out_1 {
|
||||
class cash_out_apply {
|
||||
static function setwhere($db, $post) {
|
||||
$query = $post->get('query');
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$liid = objint($query, 'liid');
|
||||
if ($liid > 0)
|
||||
$csql->where('cashstatus', $liid);
|
||||
else
|
||||
$csql->where('cashstatus=10');
|
||||
$val = objstr($query, 'vuser');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('ap_user');
|
||||
|
|
@ -43,7 +45,7 @@ class cash_out_1 {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_cash_out');
|
||||
|
|
@ -56,14 +58,14 @@ class cash_out_1 {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'cashtype', 'name' => '提现方式', 'all' => '全部', 'select' => '独立纳税.个人微信');
|
||||
$input[] = array('type' => 'num', 'form' => 'cashmoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '申请时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'cashno', 'name' => '支付编号', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
@ -86,16 +88,27 @@ class cash_out_1 {
|
|||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$updata = array();
|
||||
$ids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
foreach ($rows as $row) {
|
||||
if ($row['cashstatus'] != 10 && $row['cashstatus'] != 90 && $row['cashstatus'] != 20)
|
||||
if ($row['cashstatus'] != 10)
|
||||
continue;
|
||||
if ($act == 2) { //退余额
|
||||
$updata = array();
|
||||
$updata['mycashmoney'] = array('mycashmoney+' . $row['cashmoney']);
|
||||
$csql = new \ciy\sql('ap_user');
|
||||
$csql->where('id', $row['vuser']);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新账户失败:' . $db->error);
|
||||
}
|
||||
$id = $row['id'];
|
||||
$updata = array();
|
||||
if ($act == 1) {
|
||||
$updata['cashstatus'] = 20;
|
||||
if ($row['cashtype'] == 1)
|
||||
$updata['cashstatus'] = 50;
|
||||
else
|
||||
$updata['cashstatus'] = 20;
|
||||
} else {
|
||||
$updata['cashstatus'] = 90;
|
||||
$updata['auditmsg'] = $auditmsg;
|
||||
|
|
@ -105,7 +118,6 @@ class cash_out_1 {
|
|||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
$updata['id'] = $id;
|
||||
savelogdb($db, $rsuser['id'], 'ap_cash_out', $row, $updata);
|
||||
$ids[] = $id;
|
||||
}
|
||||
$db->commit();
|
||||
|
|
@ -135,11 +147,11 @@ class cash_out_1 {
|
|||
try {
|
||||
$db->begin();
|
||||
foreach ($rows as $row) {
|
||||
if ($row['cashstatus'] != 10 && $row['cashstatus'] != 90)
|
||||
if ($row['cashstatus'] < 90)
|
||||
continue;
|
||||
if ($row['addtimes'] > time() - 86400 * 30)
|
||||
continue;
|
||||
$delid = $row['id'];
|
||||
//delcheck($db, $delid, 'tablexx', 'xxid', '管理员');
|
||||
//delall($db, $delid, 'tablexx', 'xxid', '运动员'); //deltimeall
|
||||
delme($db, $delid, 'ap_cash_out');
|
||||
savelogdb($db, $rsuser['id'], 'ap_cash_out', $row, null);
|
||||
$vids[] = $delid;
|
||||
|
|
@ -30,54 +30,19 @@
|
|||
<a class="lang btn def" onclick="ciyfn.select_diff(table)">反选</a>
|
||||
|
|
||||
<a class="lang btn dag" onclick="ciyfn.select_callfunc(table, this, 'del','已选{n}条,是否批量删除?', {},function(json){table.delline(json)})">批量删除</a>
|
||||
<a class="lang btn" onclick="ciyfn.select_callfunc(table, this, 'audit','已选{n}条,是否批量通过?', {act:1},function(json){table.updateline(json)})">批量通过</a>
|
||||
</div>
|
||||
<div class="page"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="alert_edit" style="display:none;">
|
||||
<div id="alert_reject" style="display:none;">
|
||||
<div class="char4 row">
|
||||
<div class="ciy-form col-24 col-sm-12">
|
||||
<label class="lang">名称</label>
|
||||
<div>
|
||||
<div wit="name"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-12">
|
||||
<label class="lang">税号</label>
|
||||
<div>
|
||||
<div wit="taxnumber"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-12">
|
||||
<label class="lang">单位地址</label>
|
||||
<div>
|
||||
<div wit="addr"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-12">
|
||||
<label class="lang">电话号码</label>
|
||||
<div>
|
||||
<div wit="phone"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-12">
|
||||
<label class="lang">银行名称</label>
|
||||
<div>
|
||||
<div wit="bankname"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-12">
|
||||
<label class="lang">银行账号</label>
|
||||
<div>
|
||||
<div wit="bankaccount"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-24">
|
||||
<label class="lang imp">发票</label>
|
||||
<label class="lang">拒绝原因</label>
|
||||
<div>
|
||||
<ciy-upload com="invfile" num="3" type="jpg,png,webp,pdf,zip,rar,docx,xlsx,pptx" />
|
||||
<input type="text" name="auditmsg" style="width:100%;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -101,7 +66,7 @@
|
|||
ciyfn.fillsearch({
|
||||
searchdom: '.search'
|
||||
, data: json
|
||||
, lidata: [{ id: '', name: '全部' }, { id: '1', name: '待开票' }, { id: '2', name: '已开票' }]
|
||||
, lidata: ':发票审核,50:发票合规,90:已拒绝'
|
||||
, liclick: function (dom) {
|
||||
table.search(dom, 'li');
|
||||
}
|
||||
|
|
@ -109,10 +74,14 @@
|
|||
return json;
|
||||
}
|
||||
, fn_tdcontent: function (key, datashow, field, data) {
|
||||
if (key == 'taxmoney') {
|
||||
if(data[key] == -1)
|
||||
return '对公';
|
||||
}
|
||||
if (key == '_btn') {
|
||||
var html = '';
|
||||
if(data.invtimes == 0)
|
||||
html += `<a class="lang btn" onclick="menubtn(this, 'edit')">开票</a>`;
|
||||
if(data['cashstatus'] == 30)
|
||||
html += `<a class="lang btn dag" onclick="menubtn(this, 'reject')">拒收</a>`;
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
|
@ -126,14 +95,8 @@
|
|||
});
|
||||
function menubtn(dom, btn) {
|
||||
var id = $5(dom).parent('tr').attr('data-id');
|
||||
if (btn == 'edit') {
|
||||
edit(id);
|
||||
}
|
||||
if (btn == 'sub') {
|
||||
ciyfn.sendsignal(window.top, 'manage_ifropen', {
|
||||
url: 'xxx.html?_xxxid=' + id
|
||||
, name: '发票开票<code>' + table.data[id].name + '</code>'
|
||||
});
|
||||
if (btn == 'reject') {
|
||||
reject(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -141,36 +104,28 @@
|
|||
cb({ data: id == 0 ? {} : table.data[id] });
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
getdata(id, 'edit', function (jsndat) {
|
||||
function reject(id) {
|
||||
getdata(id, 'reject', function (jsndat) {
|
||||
ciyfn.alert({
|
||||
title: '修改'
|
||||
title: '拒收'
|
||||
, width: 'pc'
|
||||
, content: document.getElementById("alert_edit").innerHTML
|
||||
, content: document.getElementById("alert_reject").innerHTML
|
||||
//, noparent:true
|
||||
, fn_showed: function (doc, dom) {
|
||||
var dat = jsndat.data;
|
||||
var path = ciyfn.makeuploadpath('usr_invoicing', ciyfn.getstorage(ciy_vars.tokenfield));
|
||||
$5('[wit=name]', dom).html(ciyfn.tdshow(dat.name, table.field.name.ext, dat, table.once, table.json, true));
|
||||
$5('[wit=taxnumber]', dom).html(ciyfn.tdshow(dat.taxnumber, table.field.taxnumber.ext, dat, table.once, table.json, true));
|
||||
$5('[wit=addr]', dom).html(ciyfn.tdshow(dat.addr, table.field.addr.ext, dat, table.once, table.json, true));
|
||||
$5('[wit=phone]', dom).html(ciyfn.tdshow(dat.phone, table.field.phone.ext, dat, table.once, table.json, true));
|
||||
$5('[wit=bankname]', dom).html(ciyfn.tdshow(dat.bankname, table.field.bankname.ext, dat, table.once, table.json, true));
|
||||
$5('[wit=bankaccount]', dom).html(ciyfn.tdshow(dat.bankaccount, table.field.bankaccount.ext, dat, table.once, table.json, true));
|
||||
ciycmp({ dom: $5('[com=invfile]', dom), value: dat.invfile, path: path });
|
||||
}
|
||||
, cb: function (opn) {
|
||||
if (opn.btn == "关闭")
|
||||
return opn.close();
|
||||
opn.inputs.id = id;
|
||||
opn.inputs.ids = id;
|
||||
opn.inputs.act = 2;
|
||||
if (ciyfn.throttle(opn.dombtn)) return;
|
||||
ciyfn.callfunc('update', opn.inputs, function (json) {
|
||||
ciyfn.callfunc('audit', opn.inputs, function (json) {
|
||||
table.updateline(json);
|
||||
opn.close();
|
||||
ciyfn.toast('提交成功');
|
||||
});
|
||||
},
|
||||
btns: ["已开票", "*关闭"],
|
||||
btns: ["拒收", "*关闭"],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -182,6 +137,7 @@
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
@ -2,13 +2,15 @@
|
|||
|
||||
namespace web\admin\ap;
|
||||
|
||||
class cash_out_2 {
|
||||
class cash_out_inv {
|
||||
static function setwhere($db, $post) {
|
||||
$query = $post->get('query');
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$liid = objint($query, 'liid');
|
||||
if ($liid > 0)
|
||||
$csql->where('cashstatus', $liid);
|
||||
else
|
||||
$csql->where('cashstatus=30');
|
||||
$val = objstr($query, 'vuser');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('ap_user');
|
||||
|
|
@ -21,7 +23,7 @@ class cash_out_2 {
|
|||
$csql->where('vuser=0');
|
||||
}
|
||||
}
|
||||
$csql->where('cashtype', 1);
|
||||
$csql->where('cashtype', objstr($query, 'cashtype'));
|
||||
$csql->wherenumrange('cashmoney', objstr($query, 'cashmoney_1'), objstr($query, 'cashmoney_2'), 100);
|
||||
$csql->wheredaterange('addtimes', objstr($query, 'addtimes'));
|
||||
$csql->where('cashno like', objstr($query, 'cashno'));
|
||||
|
|
@ -43,7 +45,7 @@ class cash_out_2 {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_cash_out');
|
||||
|
|
@ -52,48 +54,74 @@ class cash_out_2 {
|
|||
$field[$fr]['c'] = ',' . $field[$fr]['c'];
|
||||
}
|
||||
$fshow = fieldadd($fshow, $field, 0, '_btn', '操作');
|
||||
$field['bankaccount']['c'] = '';
|
||||
$field['bankname']['c'] = '';
|
||||
$field['bankno']['c'] = '';
|
||||
$field['bankcode']['c'] = '';
|
||||
$field['cashno']['c'] = '';
|
||||
$ret['field'] = $field;
|
||||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'cashtype', 'name' => '提现方式', 'all' => '全部', 'select' => '独立纳税.个人微信');
|
||||
$input[] = array('type' => 'num', 'form' => 'cashmoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '申请时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'cashno', 'name' => '支付编号', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
}
|
||||
public static function json_update() {
|
||||
public static function json_audit() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p u'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$id = $post->getint('id');
|
||||
$cashno = $post->get('cashno');
|
||||
$act = $post->getint('act');
|
||||
$auditmsg = $post->get('auditmsg');
|
||||
$ids = $post->get('ids');
|
||||
if (empty($ids))
|
||||
return errjson('请选择至少一条');
|
||||
if ($act == 2) {
|
||||
if (empty($auditmsg))
|
||||
return errjson('请填写拒绝原因');
|
||||
}
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id', $id);
|
||||
$datarow = $db->getone($csql);
|
||||
if (!is_array($datarow))
|
||||
return errjson('数据不存在');
|
||||
if ($datarow['cashstatus'] != 20)
|
||||
return errjson('提现状态不正确');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$ids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
$updata = array();
|
||||
$updata['cashstatus'] = 100;
|
||||
$updata['cashtimes'] = tostamp();
|
||||
$updata['cashno'] = $cashno;
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id', $id);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
$updata['id'] = $id;
|
||||
savelogdb($db, $rsuser['id'], 'ap_cash_out', $datarow, $updata);
|
||||
foreach ($rows as $row) {
|
||||
if ($row['cashstatus'] != 30)
|
||||
continue;
|
||||
if ($act == 2) { //退余额
|
||||
$updata = array();
|
||||
$updata['mycashmoney'] = array('mycashmoney+' . $row['cashmoney']);
|
||||
$csql = new \ciy\sql('ap_user');
|
||||
$csql->where('id', $row['vuser']);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新账户失败:' . $db->error);
|
||||
}
|
||||
$id = $row['id'];
|
||||
$updata = array();
|
||||
if ($act == 1) {
|
||||
$updata['cashstatus'] = 50;
|
||||
} else {
|
||||
$updata['cashstatus'] = 90;
|
||||
$updata['auditmsg'] = $auditmsg;
|
||||
}
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id', $id);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
$updata['id'] = $id;
|
||||
$ids[] = $id;
|
||||
}
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
|
|
@ -101,9 +129,44 @@ class cash_out_2 {
|
|||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['data'] = $updata;
|
||||
$ret['ids'] = $ids;
|
||||
return succjson($ret);
|
||||
}
|
||||
|
||||
public static function json_del() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p d'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$ids = $post->get('ids');
|
||||
if (empty($ids))
|
||||
return errjson('请选择至少一条');
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$vids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
foreach ($rows as $row) {
|
||||
if ($row['cashstatus'] < 90)
|
||||
continue;
|
||||
if ($row['addtimes'] > time() - 86400 * 30)
|
||||
continue;
|
||||
$delid = $row['id'];
|
||||
delme($db, $delid, 'ap_cash_out');
|
||||
savelogdb($db, $rsuser['id'], 'ap_cash_out', $row, null);
|
||||
$vids[] = $delid;
|
||||
}
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['ids'] = $vids;
|
||||
return succjson($ret);
|
||||
}
|
||||
public static function json_exportxls() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||
<link href="/jscss/style.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" charset="utf-8" src="/jscss/theme.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<form class="search" onsubmit="table.search(this,'btn');return false;">
|
||||
<ul></ul>
|
||||
<div>
|
||||
<div class="sinps"></div>
|
||||
<div class="sbtns">
|
||||
<button class="lang btn" type="submit">查询</button>
|
||||
<a class="lang btn">导入支付</a>
|
||||
<a class="lang btn" onclick="exportxls()">导出</a>
|
||||
<a class="lang btn" onclick="exporttaxxls()">报税导出</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="table">
|
||||
<div class="loading col-24">Loading...</div>
|
||||
<div class="list"></div>
|
||||
<div>
|
||||
<div class="btmbtn">
|
||||
<a class="lang btn def" onclick="ciyfn.select_all(table)">全选</a>
|
||||
<a class="lang btn def" onclick="ciyfn.select_diff(table)">反选</a>
|
||||
|
|
||||
<a class="lang btn dag" onclick="ciyfn.select_callfunc(table, this, 'del','已选{n}条,是否批量删除?', {},function(json){table.delline(json)})">批量删除</a>
|
||||
</div>
|
||||
<div class="page"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/jscss/ciy.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciycmp.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciycmp2.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciytable.js"></script>
|
||||
<script type="text/javascript" src="../common.js"></script>
|
||||
<script type="text/javascript">
|
||||
'use strict';
|
||||
var table;
|
||||
var Glob = {};
|
||||
ciyfn.pageload(function () {
|
||||
//Glob.urlp = ciyfn.urlparam();
|
||||
table = new ciyclass.table({
|
||||
dom: '.table'
|
||||
, url: 'list'
|
||||
, pagecount: 10
|
||||
, fn_beforedata: function (json) {
|
||||
ciyfn.fillsearch({
|
||||
searchdom: '.search'
|
||||
, data: json
|
||||
, lidata: ':待支付,100:已支付,90:已拒绝'
|
||||
, liclick: function (dom) {
|
||||
table.search(dom, 'li');
|
||||
}
|
||||
});
|
||||
return json;
|
||||
}
|
||||
, fn_tdcontent: function (key, datashow, field, data) {
|
||||
if (key == 'cashmoney') {
|
||||
var money = data[key];
|
||||
if (data['taxmoney'] > 0)
|
||||
money -= data['taxmoney'];
|
||||
return ciyfn.tonumunit(money, 100, '2', '元|10000|万元');
|
||||
}
|
||||
if (key == '_btn') {
|
||||
var html = '';
|
||||
if (data['cashstatus'] == 50) {
|
||||
html += `<a class="lang btn" onclick="menubtn(this, 'review')">支付操作</a>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
}
|
||||
, fn_done: function (json) {
|
||||
// table.mergecol('auditstatus');
|
||||
// table.mergefix('总计', 'center', 6, 0, 8, 1);
|
||||
// table.footertotal();
|
||||
}
|
||||
});
|
||||
table.callpage(1);
|
||||
});
|
||||
function menubtn(dom, btn) {
|
||||
var id = $5(dom).parent('tr').attr('data-id');
|
||||
if (btn == 'review') {
|
||||
review(id);
|
||||
}
|
||||
}
|
||||
|
||||
function getdata(id, act, cb) {
|
||||
cb({ data: id == 0 ? {} : table.data[id] });
|
||||
}
|
||||
function review(id) {
|
||||
getdata(id, 'review', function (jsndat) {
|
||||
var dat = jsndat.data;
|
||||
var html = '<div class="char5 row gridline">';
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label class="lang">提现状态</label><div>';
|
||||
html += ciyfn.tdshow('cashstatus', dat.cashstatus, table.field.cashstatus.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label class="lang">所属用户</label><div>';
|
||||
html += ciyfn.tdshow('vuser', dat.vuser, table.field.vuser.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label class="lang">提现方式</label><div>';
|
||||
html += ciyfn.tdshow('cashtype', dat.cashtype, table.field.cashtype.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
var money = dat.cashmoney;
|
||||
if (dat.taxmoney > 0)
|
||||
money -= dat.taxmoney;
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label class="lang">打款金额</label><div>';
|
||||
html += ciyfn.tdshow('money', money, table.field.cashmoney.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label class="lang">账户名称</label><div>';
|
||||
html += ciyfn.tdshow('bankaccount', dat.bankaccount, table.field.bankaccount.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label class="lang">银行卡号</label><div>';
|
||||
html += ciyfn.tdshow('bankno', dat.bankno, table.field.bankno.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label class="lang">开户银行</label><div>';
|
||||
html += ciyfn.tdshow('bankname', dat.bankname, table.field.bankname.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label class="lang">联行号</label><div>';
|
||||
html += ciyfn.tdshow('bankcode', dat.bankcode, table.field.bankcode.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label class="lang">支付流水号</label><div>';
|
||||
html += '<input type="text" name="cashno"/> ';
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label>拒绝理由</label><div>';
|
||||
html += '<input type="text" name="auditmsg" style="width:100%;" />';
|
||||
html += '</div></div>';
|
||||
html += '</div>';
|
||||
ciyfn.alert({
|
||||
title: '支付'
|
||||
, width: 'pc'
|
||||
, autoheight: true
|
||||
, content: html
|
||||
, fn_showed: function (doc, dom) {
|
||||
}
|
||||
, cb: function (opn) {
|
||||
if (opn.btn == "关闭")
|
||||
return opn.close();
|
||||
opn.inputs.id = id;
|
||||
opn.inputs.auditstatus = opn.btn == "已打款" ? 100 : 90;
|
||||
if (ciyfn.throttle(opn.dombtn)) return;
|
||||
ciyfn.callfunc('audit', opn.inputs, function (json) {
|
||||
table.updateline(json);
|
||||
opn.close();
|
||||
ciyfn.toast('提交成功');
|
||||
});
|
||||
}
|
||||
, btns: ["已打款", "!无法支付", "*关闭"]
|
||||
});
|
||||
});
|
||||
}
|
||||
function exportxls() {
|
||||
ciyfn.table_exportxls('exportxls', table, function (json) {
|
||||
ciyfn.alert({
|
||||
content: '<div style="text-align:center;"><span class="lang">导出数据已生成</span><br/><br/><a class="lang btn lg" href="' + json.url + '" target="_blank">下载数据</a></div>'
|
||||
, btns: null
|
||||
});
|
||||
});
|
||||
}
|
||||
function exporttaxxls() {
|
||||
ciyfn.alert({
|
||||
content: '<div class="ciy-form char4"><label>所属月</label><div><ciy-datetime com="month" type="month" /></div></div>'
|
||||
, fn_showed: function (doc, dom) {
|
||||
ciycmp({ dom: $5('[com=month]', dom) });
|
||||
}
|
||||
, btns: ['导出', '*取消']
|
||||
, cb: function (opn) {
|
||||
if (opn.btn == '取消')
|
||||
return opn.close();
|
||||
if (opn.inputs.month == 0)
|
||||
return ciyfn.alert('请选择月份');
|
||||
table.post.month = opn.inputs.month;
|
||||
ciyfn.callfunc('exporttaxxls', table.post, function (json) {
|
||||
opn.close();
|
||||
ciyfn.alert({
|
||||
content: '<div style="text-align:center;"><span class="lang">导出数据已生成</span><br/><br/><a class="lang btn lg" href="' + json.url + '" target="_blank">下载数据</a></div>'
|
||||
, btns: null
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
<?php
|
||||
|
||||
namespace web\admin\ap;
|
||||
|
||||
class cash_out_transfer {
|
||||
static function setwhere($db, $post) {
|
||||
$query = $post->get('query');
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$liid = objint($query, 'liid');
|
||||
if ($liid > 0)
|
||||
$csql->where('cashstatus', $liid);
|
||||
else
|
||||
$csql->where('cashstatus=50');
|
||||
$val = objstr($query, 'vuser');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('ap_user');
|
||||
$csqlt->where('name like', $val);
|
||||
$trow = $db->getone($csqlt);
|
||||
if (is_array($trow)) {
|
||||
$csql->where('vuser', $trow['id']);
|
||||
$query['vuser'] = $trow['name'];
|
||||
} else {
|
||||
$csql->where('vuser=0');
|
||||
}
|
||||
}
|
||||
$csql->where('cashtype', objstr($query, 'cashtype'));
|
||||
$csql->wherenumrange('cashmoney', objstr($query, 'cashmoney_1'), objstr($query, 'cashmoney_2'), 100);
|
||||
$csql->wheredaterange('addtimes', objstr($query, 'addtimes'));
|
||||
$csql->where('cashno like', objstr($query, 'cashno'));
|
||||
$order = objstr($query, 'order', 'id desc');
|
||||
$csql->order($order);
|
||||
$query['order'] = $order;
|
||||
return [$query, $csql];
|
||||
}
|
||||
|
||||
public static function json_list() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
$post = new \ciy\post();
|
||||
list($where, $csql) = self::setwhere($db, $post);
|
||||
$pageno = $post->getint('pageno', 1);
|
||||
$pagecount = $post->getint('pagecount', 10);
|
||||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_cash_out');
|
||||
foreach ($field as $fr => $v) {
|
||||
if (get('_' . $fr))
|
||||
$field[$fr]['c'] = ',' . $field[$fr]['c'];
|
||||
}
|
||||
$fshow = fieldadd($fshow, $field, 0, '_btn', '操作');
|
||||
$field['invfile']['c'] = '';
|
||||
$field['invcode']['c'] = '';
|
||||
$field['cashmoney']['c'] = '打款金额|,CNY';
|
||||
$field['taxmoney']['c'] = '';
|
||||
$ret['field'] = $field;
|
||||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'cashtype', 'name' => '提现方式', 'all' => '全部', 'select' => '银行.微信');
|
||||
$input[] = array('type' => 'num', 'form' => 'cashmoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '申请时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'cashno', 'name' => '支付编号', 'prop' => ' style="width:8em;"');
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
}
|
||||
public static function json_audit() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p u'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$auditstatus = $post->getint('auditstatus');
|
||||
$auditmsg = $post->get('auditmsg');
|
||||
$cashno = $post->get('cashno');
|
||||
$id = $post->getint('id');
|
||||
if ($auditstatus == 90) {
|
||||
if (empty($auditmsg))
|
||||
return errjson('请填写拒绝原因');
|
||||
} else {
|
||||
if (empty($cashno))
|
||||
return errjson('请填写支付流水号');
|
||||
}
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id', $id);
|
||||
$row = $db->getone($csql);
|
||||
if (!is_array($row))
|
||||
return errjson('数据不存在');
|
||||
if ($row['cashstatus'] != 50)
|
||||
return errjson('数据状态不是待支付');
|
||||
$ids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
if ($auditstatus == 90) { //退余额
|
||||
$updata = array();
|
||||
$updata['mycashmoney'] = array('mycashmoney+' . $row['cashmoney']);
|
||||
$csql = new \ciy\sql('ap_user');
|
||||
$csql->where('id', $row['vuser']);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新账户失败:' . $db->error);
|
||||
}
|
||||
$id = $row['id'];
|
||||
$updata = array();
|
||||
if ($auditstatus == 90) {
|
||||
$updata['cashstatus'] = 90;
|
||||
$updata['auditmsg'] = $auditmsg;
|
||||
} else {
|
||||
$updata['cashstatus'] = 100;
|
||||
$updata['cashtimes'] = tostamp();
|
||||
$updata['cashno'] = $cashno;
|
||||
}
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id', $id);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
$updata['id'] = $id;
|
||||
$ids[] = $id;
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['data'] = $updata;
|
||||
$ret['ids'] = $ids;
|
||||
return succjson($ret);
|
||||
}
|
||||
|
||||
public static function json_del() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p d'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$ids = $post->get('ids');
|
||||
if (empty($ids))
|
||||
return errjson('请选择至少一条');
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$vids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
foreach ($rows as $row) {
|
||||
if ($row['cashstatus'] < 90)
|
||||
continue;
|
||||
if ($row['addtimes'] > time() - 86400 * 30)
|
||||
continue;
|
||||
$delid = $row['id'];
|
||||
delme($db, $delid, 'ap_cash_out');
|
||||
savelogdb($db, $rsuser['id'], 'ap_cash_out', $row, null);
|
||||
$vids[] = $delid;
|
||||
}
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['ids'] = $vids;
|
||||
return succjson($ret);
|
||||
}
|
||||
public static function json_exportxls() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p e'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
list($where, $csql) = self::setwhere($db, $post);
|
||||
$rows = $db->get($csql);
|
||||
if (count($rows) > 10000)
|
||||
return errjson('将导出' . count($rows) . '条,不建议超过1万条,请筛选缩小范围');
|
||||
$fields = array();
|
||||
$fields[] = array('style' => 'l', 'width' => 60, 'field' => 'id', 'name' => '行码');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'vuser', 'name' => '所属用户');
|
||||
$fields[] = array('style' => 'r', 'width' => 100, 'field' => 'cashmoney', 'name' => '打款金额');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankaccount', 'name' => '账户名称');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankno', 'name' => '银行卡号');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankname', 'name' => '开户银行');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankcode', 'name' => '联行号');
|
||||
$code_cashstatus = getcatas($db, 'cashstatus');
|
||||
$code_vuser = getrelation($db, $rows, 'ap_user', 'vuser', 'id,name');
|
||||
$code_cashtype = $db->getdbcodes('ap_cash_out', 'cashtype');
|
||||
$datas = array();
|
||||
foreach ($rows as $row) {
|
||||
$dat = array();
|
||||
foreach ($fields as $field) {
|
||||
$field = $field['field'];
|
||||
$val = isset($row[$field]) ? $row[$field] : '';
|
||||
if ($field == 'id')
|
||||
$val = enid($val);
|
||||
if ($field == 'cashstatus')
|
||||
$val = ccode($code_cashstatus, $val);
|
||||
if ($field == 'vuser')
|
||||
$val = ccode($code_vuser, $val);
|
||||
if ($field == 'cashtype')
|
||||
$val = ($val == 1 ? $code_cashtype[0]['name'] : @$code_cashtype[1]['name']);
|
||||
if ($field == 'cashmoney') {
|
||||
$val = $row[$field];
|
||||
if ($row['taxmoney'] > 0)
|
||||
$val -= $row['taxmoney'];
|
||||
$val = number_format($val / 100, 2);
|
||||
}
|
||||
if ($field == 'addtimes')
|
||||
$val = ($val == 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'cashtimes')
|
||||
$val = ($val == 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
$dat[] = $val;
|
||||
}
|
||||
$datas[] = $dat;
|
||||
}
|
||||
$param = array();
|
||||
$param['field'] = $fields;
|
||||
$param['data'] = $datas;
|
||||
$param['sheetname'] = '数据报表';
|
||||
$param['titleheight'] = '25'; //列头高度
|
||||
$param['landscape'] = true; //横向打印
|
||||
$param['fixtopage'] = true; //打印整个工作表
|
||||
$param['toptitle'] = 'Demo数据报表';
|
||||
$str = \ciy\excel::general_excel_xml($param);
|
||||
$filename = '';
|
||||
if (empty($filename))
|
||||
$filename = date('Y-m-d_H-i-s') . rand(1000, 9999);
|
||||
$filename .= '.xls';
|
||||
file_put_contents(PATH_WEB . 'ud/tmp/' . $filename, $str);
|
||||
return succjson(array('url' => '/ud/tmp/' . $filename));
|
||||
}
|
||||
public static function json_exporttaxxls() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p e'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$month = $post->getint('month');
|
||||
$monthend = strtotime("+1 month", $month);
|
||||
$csql = new \ciy\sql('ap_cash_out');
|
||||
$csql->where('cashstatus', 100);
|
||||
$csql->where('taxmoney>=0');
|
||||
$csql->where('cashtimes>=', $month);
|
||||
$csql->where('cashtimes<', $monthend);
|
||||
$csql->order('vuser,cashtimes');
|
||||
$rows = $db->get($csql);
|
||||
//姓名与账户名称不符,且未银行卡的,风控提示
|
||||
|
||||
$fields = array();
|
||||
$fields[] = array('style' => 'l', 'width' => 60, 'field' => 'id', 'name' => '行码');
|
||||
$fields[] = array('style' => 'c', 'width' => 100, 'field' => 'name', 'name' => '姓名');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'idid', 'name' => '身份证号');
|
||||
$fields[] = array('style' => 'r', 'width' => 100, 'field' => 'cashmoney', 'name' => '涉税金额');
|
||||
$fields[] = array('style' => 'r', 'width' => 100, 'field' => 'taxmoney', 'name' => '个税金额');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankno', 'name' => '银行卡号');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankname', 'name' => '开户银行');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'addtimes', 'name' => '申请时间');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'cashtimes', 'name' => '支付时间');
|
||||
$code_vuser = getrelation($db, $rows, 'ap_usr_ext', 'vuser', 'id,truename,idid');
|
||||
$datas = array();
|
||||
foreach ($rows as $row) {
|
||||
$dat = array();
|
||||
foreach ($fields as $field) {
|
||||
$field = $field['field'];
|
||||
$val = isset($row[$field]) ? $row[$field] : '';
|
||||
if ($field == 'id')
|
||||
$val = enid($val);
|
||||
if ($field == 'name')
|
||||
$val = ccode($code_vuser, $row['vuser'], 'id', 'truename');
|
||||
if ($field == 'idid')
|
||||
$val = ccode($code_vuser, $row['vuser'], 'id', 'idid');
|
||||
if ($field == 'cashmoney')
|
||||
$val = number_format($val / 100, 2);
|
||||
if ($field == 'taxmoney')
|
||||
$val = number_format($val / 100, 2);
|
||||
if ($field == 'addtimes')
|
||||
$val = ($val == 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'cashtimes')
|
||||
$val = ($val == 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
$dat[] = $val;
|
||||
}
|
||||
$datas[] = $dat;
|
||||
}
|
||||
$param = array();
|
||||
$param['field'] = $fields;
|
||||
$param['data'] = $datas;
|
||||
$param['sheetname'] = '数据报表';
|
||||
$param['titleheight'] = '25'; //列头高度
|
||||
$param['landscape'] = true; //横向打印
|
||||
$param['fixtopage'] = true; //打印整个工作表
|
||||
$param['toptitle'] = '个税数据报表';
|
||||
$str = \ciy\excel::general_excel_xml($param);
|
||||
$filename = '';
|
||||
if (empty($filename))
|
||||
$filename = date('Y-m-d_H-i-s') . rand(1000, 9999);
|
||||
$filename .= '.xls';
|
||||
file_put_contents(PATH_WEB . 'ud/tmp/' . $filename, $str);
|
||||
return succjson(array('url' => '/ud/tmp/' . $filename));
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
<div class="sinps"></div>
|
||||
<div class="sbtns">
|
||||
<button class="lang btn" type="submit">查询</button>
|
||||
<a class="lang btn" onclick="edit(0)">添加</a>
|
||||
<a class="lang btn" onclick="exportxls()">导出</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
<a class="lang btn def" onclick="ciyfn.select_all(table)">全选</a>
|
||||
<a class="lang btn def" onclick="ciyfn.select_diff(table)">反选</a>
|
||||
|
|
||||
<a class="lang btn dag" onclick="ciyfn.select_callfunc(table, this, 'del','已选{n}条,是否批量删除?', {},function(json){table.delline(json)})">批量删除</a>
|
||||
</div>
|
||||
<div class="page"></div>
|
||||
</div>
|
||||
|
|
@ -37,17 +39,28 @@
|
|||
|
||||
<div id="alert_edit" style="display:none;">
|
||||
<div class="char4 row">
|
||||
<div class="ciy-form col-24 col-sm-24">
|
||||
<label class="lang">支付编号</label>
|
||||
<div class="ciy-form col-24 col-sm-16">
|
||||
<label class="lang imp">名称</label>
|
||||
<div>
|
||||
<input type="text" name="cashno" style="width:100%;" />
|
||||
<input type="text" name="name" style="width:100%;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-8">
|
||||
<label class="lang">维护人</label>
|
||||
<div>
|
||||
<ciy-select com="adminuser" all="无" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ciy-form col-24 col-sm-24">
|
||||
<label class="lang">备注信息</label>
|
||||
<div>
|
||||
<input type="text" name="memo" style="width:100%;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/jscss/ciy.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciycmp.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciycmp2.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciytable.js"></script>
|
||||
<script type="text/javascript" src="../common.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
|
@ -60,23 +73,18 @@
|
|||
dom: '.table'
|
||||
, url: 'list'
|
||||
, pagecount: 10
|
||||
, chkbox: true
|
||||
, fn_beforedata: function (json) {
|
||||
ciyfn.fillsearch({
|
||||
searchdom: '.search'
|
||||
, data: json
|
||||
, liall: '全部'
|
||||
, lidata: [{ id: 20, name: '已通过' }, { id: 100, name: '已支付' }]
|
||||
, liclick: function (dom) {
|
||||
table.search(dom, 'li');
|
||||
}
|
||||
});
|
||||
return json;
|
||||
}
|
||||
, fn_tdcontent: function (key, datashow, field, data) {
|
||||
if (key == '_btn') {
|
||||
var html = '';
|
||||
if (data['cashstatus'] == 20)
|
||||
html += `<a class="lang btn" onclick="menubtn(this, 'edit')">支付</a>`;
|
||||
html += `<a class="lang btn" onclick="menubtn(this, 'edit')" onmousedown="event.stopPropagation()">修改</a>`;
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
|
@ -102,14 +110,15 @@
|
|||
function edit(id) {
|
||||
getdata(id, 'edit', function (jsndat) {
|
||||
ciyfn.alert({
|
||||
title: '修改'
|
||||
title: id == 0 ? '新建' : '修改'
|
||||
, width: 'pc'
|
||||
, content: document.getElementById("alert_edit").innerHTML
|
||||
//, noparent:true
|
||||
, fn_showed: function (doc, dom) {
|
||||
var dat = jsndat.data;
|
||||
var path = ciyfn.makeuploadpath('cash_out', ciyfn.getstorage(ciy_vars.tokenfield));
|
||||
$5('[name=cashno]', dom).val(dat.cashno);
|
||||
$5('[name=name]', dom).val(dat.name);
|
||||
ciycmp({ dom: $5('[com=adminuser]', dom), value: dat.adminuser, range: 'adminuser' });
|
||||
$5('[name=memo]', dom).val(dat.memo);
|
||||
}
|
||||
, cb: function (opn) {
|
||||
if (opn.btn == "关闭")
|
||||
|
|
@ -122,7 +131,7 @@
|
|||
ciyfn.toast('提交成功');
|
||||
});
|
||||
},
|
||||
btns: ["已支付", "*关闭"],
|
||||
btns: id == 0 ? ["新建", "*关闭"] : ["提交", "*关闭"],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -134,6 +143,7 @@
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<?php
|
||||
|
||||
namespace web\admin\ap;
|
||||
|
||||
class invoicedetail {
|
||||
static function setwhere($db, $post, $rsuser) {
|
||||
$query = $post->get('query', array());
|
||||
$csql = new \ciy\sql('ap_invoicedetail');
|
||||
$csql->where('name like', objstr($query, 'name'));
|
||||
$csql->wheredaterange('uptimes', objstr($query, 'uptimes'));
|
||||
$val = objstr($query, 'adminuser');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('zc_cata');
|
||||
$csqlt->where('cbid in (select id from zc_cata where cbid=0 and codeid=\'adminuser\')');
|
||||
$csqlt->where('name like', $val);
|
||||
$trow = $db->getone($csqlt);
|
||||
if (is_array($trow)) {
|
||||
$csql->where('adminuser', $trow['codeid']);
|
||||
$query['adminuser'] = $trow['name'];
|
||||
} else {
|
||||
$csql->where('adminuser=0');
|
||||
}
|
||||
}
|
||||
$csql->where('memo like', objstr($query, 'memo'));
|
||||
$order = objstr($query, 'order', 'id desc');
|
||||
$csql->order($order);
|
||||
$query['order'] = $order;
|
||||
return [$query, $csql];
|
||||
}
|
||||
|
||||
public static function json_list() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
$post = new \ciy\post();
|
||||
list($where, $csql) = self::setwhere($db, $post, $rsuser);
|
||||
$pageno = $post->getint('pageno', 1);
|
||||
$pagecount = $post->getint('pagecount', 10);
|
||||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_invoicedetail');
|
||||
foreach ($field as $fr => $v) {
|
||||
if (get('_' . $fr))
|
||||
$field[$fr]['c'] = ',' . $field[$fr]['c'];
|
||||
}
|
||||
$fshow = fieldadd($fshow, $field, 0, '_btn', '操作');
|
||||
$ret['field'] = $field;
|
||||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '名称', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'uptimes', 'name' => '更新时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'adminuser', 'name' => '维护人', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'memo', 'name' => '备注信息', 'prop' => ' style="width:8em;"');
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
public static function json_update() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p u'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$id = $post->getint('id');
|
||||
$name = $post->get('name');
|
||||
$adminuser = $post->getint('adminuser');
|
||||
$memo = $post->get('memo');
|
||||
if (empty($name))
|
||||
return errjson('请填写名称');
|
||||
$datarow = null;
|
||||
if ($id > 0) {
|
||||
$csql = new \ciy\sql('ap_invoicedetail');
|
||||
$csql->where('id', $id);
|
||||
$datarow = $db->getone($csql);
|
||||
if (!is_array($datarow))
|
||||
return errjson('数据不存在');
|
||||
}
|
||||
try {
|
||||
$db->begin();
|
||||
$updata = array();
|
||||
$updata['name'] = $name;
|
||||
$updata['uptimes'] = tostamp();
|
||||
$updata['adminuser'] = $adminuser;
|
||||
$updata['memo'] = $memo;
|
||||
$csql = new \ciy\sql('ap_invoicedetail'); //auto
|
||||
if ($id > 0) {
|
||||
$csql->where('id', $id);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
} else {
|
||||
if ($db->insert($csql, $updata) === false)
|
||||
throw new \Exception('新增失败:' . $db->error);
|
||||
$id = $db->insert_id();
|
||||
}
|
||||
$updata['id'] = $id;
|
||||
//savelogdb($db, $rsuser['id'], 'ap_invoicedetail', $datarow, $updata);
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['data'] = $updata;
|
||||
return succjson($ret);
|
||||
}
|
||||
|
||||
public static function json_del() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p d'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$ids = $post->get('ids');
|
||||
if (empty($ids))
|
||||
return errjson('请选择至少一条');
|
||||
$csql = new \ciy\sql('ap_invoicedetail');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$vids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
foreach ($rows as $row) {
|
||||
$delid = $row['id'];
|
||||
//delcheck($db, $delid, 'tablexx', 'xxid', '管理员');
|
||||
//delall($db, $delid, 'tablexx', 'xxid', '运动员'); //deltimeall
|
||||
delme($db, $delid, 'ap_invoicedetail');
|
||||
savelogdb($db, $rsuser['id'], 'ap_invoicedetail', $row, null);
|
||||
$vids[] = $delid;
|
||||
}
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['ids'] = $vids;
|
||||
return succjson($ret);
|
||||
}
|
||||
|
||||
public static function json_exportxls() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p e'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
list($where, $csql) = self::setwhere($db, $post, $rsuser);
|
||||
$rows = $db->get($csql);
|
||||
if (count($rows) > 10000)
|
||||
return errjson('将导出' . count($rows) . '条,不建议超过1万条,请筛选缩小范围');
|
||||
$fields = array();
|
||||
$fields[] = array('style' => 'l', 'width' => 60, 'field' => 'id', 'name' => '行码');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'name', 'name' => '名称');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'uptimes', 'name' => '更新时间');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'adminuser', 'name' => '维护人');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'memo', 'name' => '备注信息');
|
||||
$code_adminuser = getcatas($db, 'adminuser');
|
||||
$datas = array();
|
||||
foreach ($rows as $row) {
|
||||
$dat = array();
|
||||
foreach ($fields as $field) {
|
||||
$field = $field['field'];
|
||||
$val = isset($row[$field]) ? $row[$field] : '';
|
||||
if ($field == 'id')
|
||||
$val = enid($val);
|
||||
if ($field == 'uptimes')
|
||||
$val = ($val <= 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'adminuser')
|
||||
$val = ccode($code_adminuser, $val);
|
||||
$dat[] = $val;
|
||||
}
|
||||
$datas[] = $dat;
|
||||
}
|
||||
$param = array();
|
||||
$param['field'] = $fields;
|
||||
$param['data'] = $datas;
|
||||
$param['sheetname'] = '数据报表';
|
||||
$param['titleheight'] = '25'; //列头高度
|
||||
$param['landscape'] = true; //横向打印
|
||||
$param['fixtopage'] = true; //打印整个工作表
|
||||
$param['toptitle'] = '发票类型数据报表';
|
||||
$str = \ciy\excel::general_excel_xml($param);
|
||||
$filename = '';
|
||||
if (empty($filename))
|
||||
$filename = date('Y-m-d_H-i-s') . rand(1000, 9999);
|
||||
$filename .= '.xls';
|
||||
file_put_contents(PATH_WEB . 'ud/tmp/' . $filename, $str);
|
||||
return succjson(array('url' => '/ud/tmp/' . $filename));
|
||||
}
|
||||
}
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace web\admin\ap;
|
||||
|
||||
class usr_invoicetitle {
|
||||
class invoicetitle {
|
||||
static function setwhere($db, $post) {
|
||||
$query = $post->get('query');
|
||||
$csql = new \ciy\sql('ap_usr_invoicetitle');
|
||||
$csql = new \ciy\sql('ap_invoicetitle');
|
||||
$val = objstr($query, 'vuser');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('ap_user');
|
||||
|
|
@ -40,10 +40,10 @@ class usr_invoicetitle {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_usr_invoicetitle');
|
||||
$fshow = $db->getfield($field, 'ap_invoicetitle');
|
||||
foreach ($field as $fr => $v) {
|
||||
if (get('_' . $fr))
|
||||
$field[$fr]['c'] = ',' . $field[$fr]['c'];
|
||||
|
|
@ -53,14 +53,14 @@ class usr_invoicetitle {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '名称', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'taxnumber', 'name' => '税号', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'bankname', 'name' => '银行名称', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'uptimes', 'name' => '更新时间');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
@ -80,7 +80,7 @@ class usr_invoicetitle {
|
|||
$bankaccount = $post->get('bankaccount');
|
||||
if (empty($name))
|
||||
return errjson('请填写名称');
|
||||
$csql = new \ciy\sql('ap_usr_invoicetitle');
|
||||
$csql = new \ciy\sql('ap_invoicetitle');
|
||||
$csql->where('id', $id);
|
||||
$datarow = $db->getone($csql);
|
||||
if (!is_array($datarow))
|
||||
|
|
@ -95,12 +95,12 @@ class usr_invoicetitle {
|
|||
$updata['bankname'] = $bankname;
|
||||
$updata['bankaccount'] = $bankaccount;
|
||||
$updata['uptimes'] = tostamp();
|
||||
$csql = new \ciy\sql('ap_usr_invoicetitle');
|
||||
$csql = new \ciy\sql('ap_invoicetitle');
|
||||
$csql->where('id', $id);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
$updata['id'] = $id;
|
||||
savelogdb($db, $rsuser['id'], 'ap_usr_invoicetitle', $datarow, $updata);
|
||||
savelogdb($db, $rsuser['id'], 'ap_invoicetitle', $datarow, $updata);
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
|
|
@ -121,7 +121,7 @@ class usr_invoicetitle {
|
|||
$ids = $post->get('ids');
|
||||
if (empty($ids))
|
||||
return errjson('请选择至少一条');
|
||||
$csql = new \ciy\sql('ap_usr_invoicetitle');
|
||||
$csql = new \ciy\sql('ap_invoicetitle');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$vids = array();
|
||||
|
|
@ -131,8 +131,8 @@ class usr_invoicetitle {
|
|||
$delid = $row['id'];
|
||||
//delcheck($db, $delid, 'tablexx', 'xxid', '管理员');
|
||||
//delall($db, $delid, 'tablexx', 'xxid', '运动员'); //deltimeall
|
||||
delme($db, $delid, 'ap_usr_invoicetitle');
|
||||
savelogdb($db, $rsuser['id'], 'ap_usr_invoicetitle', $row, null);
|
||||
delme($db, $delid, 'ap_invoicetitle');
|
||||
savelogdb($db, $rsuser['id'], 'ap_invoicetitle', $row, null);
|
||||
$vids[] = $delid;
|
||||
}
|
||||
$db->commit();
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||
<link href="/jscss/style.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" charset="utf-8" src="/jscss/theme.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<form class="search" onsubmit="table.search(this,'btn');return false;">
|
||||
<ul></ul>
|
||||
<div>
|
||||
<div class="sinps"></div>
|
||||
<div class="sbtns">
|
||||
<button class="lang btn" type="submit">查询</button>
|
||||
<a class="lang btn" onclick="exportxls()">导出</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="table">
|
||||
<div class="loading col-24">Loading...</div>
|
||||
<div class="list"></div>
|
||||
<div>
|
||||
<div class="btmbtn">
|
||||
<a class="lang btn def" onclick="ciyfn.select_all(table)">全选</a>
|
||||
<a class="lang btn def" onclick="ciyfn.select_diff(table)">反选</a>
|
||||
|
|
||||
<a class="lang btn dag" onclick="ciyfn.select_callfunc(table, this, 'del','已选{n}条,是否批量删除?', {},function(json){table.delline(json)})">批量删除</a>
|
||||
</div>
|
||||
<div class="page"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/jscss/ciy.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciycmp.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciycmp2.js"></script>
|
||||
<script type="text/javascript" src="/jscss/ciytable.js"></script>
|
||||
<script type="text/javascript" src="../common.js"></script>
|
||||
<script type="text/javascript">
|
||||
'use strict';
|
||||
var table;
|
||||
var Glob = {};
|
||||
ciyfn.pageload(function () {
|
||||
//Glob.urlp = ciyfn.urlparam();
|
||||
table = new ciyclass.table({
|
||||
dom: '.table'
|
||||
, url: 'list'
|
||||
, pagecount: 10
|
||||
, chkbox: true
|
||||
, fn_beforedata: function (json) {
|
||||
ciyfn.fillsearch({
|
||||
searchdom: '.search'
|
||||
, data: json
|
||||
, liall: '全部'
|
||||
, lidata: '20:未审核,90:驳回,100:通过'
|
||||
, liclick: function (dom) {
|
||||
table.search(dom, 'li');
|
||||
}
|
||||
});
|
||||
return json;
|
||||
}
|
||||
, fn_tdcontent: function (key, datashow, field, data) {
|
||||
if (key == '_btn') {
|
||||
var html = '';
|
||||
if(data.auditstatus == 20){
|
||||
html += `<a class="lang btn" onclick="menubtn(this, 'review')" onmousedown="event.stopPropagation()">开票</a>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
}
|
||||
, fn_done: function (json) {
|
||||
// table.mergecol('auditstatus');
|
||||
// table.mergefix('总计', 'center', 6, 0, 8, 1);
|
||||
// table.footertotal();
|
||||
}
|
||||
});
|
||||
table.callpage(1);
|
||||
});
|
||||
function menubtn(dom, btn) {
|
||||
var id = $5(dom).parent('tr').attr('data-id');
|
||||
if (btn == 'review') {
|
||||
review(id);
|
||||
}
|
||||
}
|
||||
|
||||
function getdata(id, act, cb) {
|
||||
cb({ data: id == 0 ? {} : table.data[id] });
|
||||
}
|
||||
|
||||
function review(id) {
|
||||
getdata(id, 'review', function (jsndat) {
|
||||
var dat = jsndat.data;
|
||||
var html = '<div class="char4 row gridline">';
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>所属用户</label><div>';
|
||||
html += ciyfn.tdshow('vuser', dat.vuser, table.field.vuser.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>所属明细</label><div>';
|
||||
html += ciyfn.tdshow('invoicedetailid', dat.invoicedetailid, table.field.invoicedetailid.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>开票金额</label><div>';
|
||||
html += ciyfn.tdshow('invoicemoney', dat.invoicemoney, table.field.invoicemoney.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>申请时间</label><div>';
|
||||
html += ciyfn.tdshow('addtimes', dat.addtimes, table.field.addtimes.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>名称</label><div>';
|
||||
html += ciyfn.tdshow('name', dat.name, table.field.name.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>税号</label><div>';
|
||||
html += ciyfn.tdshow('taxnumber', dat.taxnumber, table.field.taxnumber.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label>单位地址</label><div>';
|
||||
html += ciyfn.tdshow('addr', dat.addr, table.field.addr.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label>电话号码</label><div>';
|
||||
html += ciyfn.tdshow('phone', dat.phone, table.field.phone.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label>银行名称</label><div>';
|
||||
html += ciyfn.tdshow('bankname', dat.bankname, table.field.bankname.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label>银行账号</label><div>';
|
||||
html += ciyfn.tdshow('bankaccount', dat.bankaccount, table.field.bankaccount.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label class="lang">上传发票</label><div>';
|
||||
html += '<ciy-upload com="invfile" num="1" type="jpg,png,webp,pdf,ofd,zip,rar" />';
|
||||
html += '</div></div>';
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label class="lang">发票编号</label><div>';
|
||||
html += '<input type="text" name="invcode"/> ';
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label>拒绝理由</label><div>';
|
||||
html += '<input type="text" name="auditmsg" style="width:100%;" />';
|
||||
html += '</div></div>';
|
||||
html += '</div>';
|
||||
ciyfn.alert({
|
||||
title: '开票/拒开'
|
||||
, width: 'pc'
|
||||
, autoheight: true
|
||||
, content: html
|
||||
, fn_showed: function (doc, dom) {
|
||||
var dat = jsndat.data;
|
||||
var path = ciyfn.makeuploadpath('invoice', ciyfn.getstorage(ciy_vars.tokenfield));
|
||||
ciycmp({ dom: $5('[com=invfile]', dom), path: path });
|
||||
}
|
||||
, cb: function (opn) {
|
||||
if (opn.btn == "关闭")
|
||||
return opn.close();
|
||||
opn.inputs.ids = id;
|
||||
opn.inputs.auditstatus = opn.btn == "开票" ? 100 : 90;
|
||||
if (ciyfn.throttle(opn.dombtn)) return;
|
||||
ciyfn.callfunc('audit', opn.inputs, function (json) {
|
||||
table.updateline(json);
|
||||
opn.close();
|
||||
ciyfn.toast('提交成功');
|
||||
});
|
||||
}
|
||||
, btns: ["开票", "!拒开", "*关闭"]
|
||||
});
|
||||
});
|
||||
}
|
||||
function exportxls() {
|
||||
ciyfn.table_exportxls('exportxls', table, function (json) {
|
||||
ciyfn.alert({
|
||||
content: '<div style="text-align:center;"><span class="lang">导出数据已生成</span><br/><br/><a class="lang btn lg" href="' + json.url + '" target="_blank">下载数据</a></div>'
|
||||
, btns: null
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
namespace web\admin\ap;
|
||||
|
||||
class usr_invoicing {
|
||||
static function setwhere($db, $post) {
|
||||
$query = $post->get('query');
|
||||
$csql = new \ciy\sql('ap_usr_invoicing');
|
||||
class invoicing {
|
||||
static function setwhere($db, $post, $rsuser) {
|
||||
$query = $post->get('query', array());
|
||||
$csql = new \ciy\sql('ap_invoicing');
|
||||
$liid = objint($query, 'liid');
|
||||
if ($liid == 1)
|
||||
$csql->where('invtimes=0');
|
||||
if ($liid == 2)
|
||||
$csql->where('invtimes>0');
|
||||
if ($liid > 0)
|
||||
$csql->where('auditstatus', $liid);
|
||||
$val = objstr($query, 'vuser');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('ap_user');
|
||||
|
|
@ -23,24 +21,24 @@ class usr_invoicing {
|
|||
$csql->where('vuser=0');
|
||||
}
|
||||
}
|
||||
$csql->wherenumrange('invoicemoney', objstr($query, 'invoicemoney_1'), objstr($query, 'invoicemoney_2'), 100);
|
||||
$csql->where('name like', objstr($query, 'name'));
|
||||
$csql->where('taxnumber like', objstr($query, 'taxnumber'));
|
||||
$csql->wheredaterange('addtimes', objstr($query, 'addtimes'));
|
||||
$csql->wheredaterange('invtimes', objstr($query, 'invtimes'));
|
||||
$val = objstr($query, 'invuser');
|
||||
$val = objstr($query, 'invoicedetailid');
|
||||
if (!empty($val)) {
|
||||
$csqlt = new \ciy\sql('zc_cata');
|
||||
$csqlt->where('cbid in (select id from zc_cata where cbid=0 and codeid=\'invuser\')');
|
||||
$csqlt = new \ciy\sql('ap_invoicedetail');
|
||||
$csqlt->where('name like', $val);
|
||||
$trow = $db->getone($csqlt);
|
||||
if (is_array($trow)) {
|
||||
$csql->where('invuser', $trow['codeid']);
|
||||
$query['invuser'] = $trow['name'];
|
||||
$csql->where('invoicedetailid', $trow['id']);
|
||||
$query['invoicedetailid'] = $trow['name'];
|
||||
} else {
|
||||
$csql->where('invuser=0');
|
||||
$csql->where('invoicedetailid=0');
|
||||
}
|
||||
}
|
||||
$csql->wherenumrange('invoicemoney', objstr($query, 'invoicemoney_1'), objstr($query, 'invoicemoney_2'), 100);
|
||||
$csql->where('invcode like', objstr($query, 'invcode'));
|
||||
$csql->wheredaterange('addtimes', objstr($query, 'addtimes'));
|
||||
$csql->where('name like', objstr($query, 'name'));
|
||||
$csql->where('taxnumber', objstr($query, 'taxnumber'));
|
||||
$csql->where('auditmsg like', objstr($query, 'auditmsg'));
|
||||
$order = objstr($query, 'order', 'id desc');
|
||||
$csql->order($order);
|
||||
$query['order'] = $order;
|
||||
|
|
@ -51,18 +49,18 @@ class usr_invoicing {
|
|||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
$post = new \ciy\post();
|
||||
list($where, $csql) = self::setwhere($db, $post);
|
||||
list($where, $csql) = self::setwhere($db, $post, $rsuser);
|
||||
$pageno = $post->getint('pageno', 1);
|
||||
$pagecount = $post->getint('pagecount', 10);
|
||||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_usr_invoicing');
|
||||
$fshow = $db->getfield($field, 'ap_invoicing');
|
||||
foreach ($field as $fr => $v) {
|
||||
if (get('_' . $fr))
|
||||
$field[$fr]['c'] = ',' . $field[$fr]['c'];
|
||||
|
|
@ -72,60 +70,25 @@ class usr_invoicing {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'invoicedetailid', 'name' => '所属明细', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'invoicemoney', 'name' => '开票金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'invcode', 'name' => '发票号码', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '申请时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '名称', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'taxnumber', 'name' => '税号', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '申请时间');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'invtimes', 'name' => '开票时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'invuser', 'name' => '开票人', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$input[] = array('type' => 'input', 'form' => 'auditmsg', 'name' => '拒开原因', 'prop' => ' style="width:8em;"');
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
$ret['ap_usr_invoicetitle'] = getrelation($db, $rows, 'ap_usr_invoicetitle', 'invoicetitleid');
|
||||
return succjson($ret);
|
||||
}
|
||||
public static function json_update() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p u'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$id = $post->getint('id');
|
||||
$invfile = $post->get('invfile');
|
||||
if (empty($invfile))
|
||||
return errjson('请填写发票');
|
||||
$csql = new \ciy\sql('ap_usr_invoicing');
|
||||
$csql->where('id', $id);
|
||||
$datarow = $db->getone($csql);
|
||||
if (!is_array($datarow))
|
||||
return errjson('数据不存在');
|
||||
try {
|
||||
$db->begin();
|
||||
$updata = array();
|
||||
$updata['invtimes'] = tostamp();
|
||||
$updata['invuser'] = $rsuser['id'];
|
||||
$updata['invfile'] = $invfile;
|
||||
$csql = new \ciy\sql('ap_usr_invoicing');
|
||||
$csql->where('id', $id);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('更新失败:' . $db->error);
|
||||
$updata['id'] = $id;
|
||||
savelogdb($db, $rsuser['id'], 'ap_usr_invoicing', $datarow, $updata);
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['data'] = $updata;
|
||||
$ret['ap_user'] = getrelation($db, [$updata], 'ap_user', 'vuser');
|
||||
$ret['ap_usr_invoicetitle'] = getrelation($db, [$updata], 'ap_usr_invoicetitle', 'invoicetitleid');
|
||||
$ret['ap_invoicedetail'] = getrelation($db, $rows, 'ap_invoicedetail', 'invoicedetailid');
|
||||
return succjson($ret);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function json_del() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
|
|
@ -135,18 +98,21 @@ class usr_invoicing {
|
|||
$ids = $post->get('ids');
|
||||
if (empty($ids))
|
||||
return errjson('请选择至少一条');
|
||||
$csql = new \ciy\sql('ap_usr_invoicing');
|
||||
$csql = new \ciy\sql('ap_invoicing');
|
||||
$csql->where('id in', $ids);
|
||||
$rows = $db->get($csql);
|
||||
$vids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
foreach ($rows as $row) {
|
||||
if ($row['auditstatus'] < 90)
|
||||
continue;
|
||||
if ($row['addtimes'] > tostamp() - 86400 * 14)
|
||||
continue;
|
||||
//已开票超过14天,或已拒开超过14天
|
||||
$delid = $row['id'];
|
||||
//delcheck($db, $delid, 'tablexx', 'xxid', '管理员');
|
||||
//delall($db, $delid, 'tablexx', 'xxid', '运动员'); //deltimeall
|
||||
delme($db, $delid, 'ap_usr_invoicing');
|
||||
savelogdb($db, $rsuser['id'], 'ap_usr_invoicing', $row, null);
|
||||
delme($db, $delid, 'ap_invoicing');
|
||||
savelogdb($db, $rsuser['id'], 'ap_invoicing', $row, null);
|
||||
$vids[] = $delid;
|
||||
}
|
||||
$db->commit();
|
||||
|
|
@ -159,34 +125,97 @@ class usr_invoicing {
|
|||
return succjson($ret);
|
||||
}
|
||||
|
||||
public static function json_audit() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p a'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
$ids = $post->getint('ids');
|
||||
$auditstatus = $post->getint('auditstatus');
|
||||
$auditmsg = $post->get('auditmsg');
|
||||
if ($auditstatus == 90 && empty($auditmsg))
|
||||
return errjson('请填写驳回原因');
|
||||
if ($auditstatus == 100) {
|
||||
$invcode = $post->get('invcode');
|
||||
$invfile = $post->get('invfile');
|
||||
if (empty($invfile))
|
||||
return errjson('请上传发票');
|
||||
}
|
||||
$csql = new \ciy\sql('ap_invoicing');
|
||||
$csql->where('id', $ids);
|
||||
$mrow = $db->getone($csql);
|
||||
if (!is_array($mrow))
|
||||
return errjson('数据不存在');
|
||||
$ids = array();
|
||||
try {
|
||||
$db->begin();
|
||||
$updata = array();
|
||||
if ($auditstatus == 100) {
|
||||
$updata['invcode'] = $invcode;
|
||||
$updata['invfile'] = $invfile;
|
||||
} else {
|
||||
//归还金额
|
||||
$updata2 = array();
|
||||
$updata2['myinvmoney'] = array('myinvmoney+' . $mrow['invoicemoney']);
|
||||
$csql = new \ciy\sql('ap_user');
|
||||
$csql->where('id', $mrow['vuser']);
|
||||
if ($db->update($csql, $updata2) === false)
|
||||
throw new \Exception('更新账户失败:' . $db->error);
|
||||
}
|
||||
$updata['auditstatus'] = $auditstatus;
|
||||
$updata['audittimes'] = tostamp();
|
||||
$updata['audituser'] = $rsuser['id'];
|
||||
$updata['auditmsg'] = $auditmsg;
|
||||
$csql = new \ciy\sql('ap_invoicing');
|
||||
$csql->where('id', $mrow['id']);
|
||||
if ($db->update($csql, $updata) === false)
|
||||
throw new \Exception('审核失败:' . $db->error);
|
||||
$updata['id'] = $mrow['id'];
|
||||
$db->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$db->rollback();
|
||||
savelogfile('err_db', $ex->getMessage());
|
||||
return errjson($ex->getMessage());
|
||||
}
|
||||
$ret['data'] = $updata;
|
||||
return succjson($ret);
|
||||
}
|
||||
|
||||
public static function json_exportxls() {
|
||||
global $db;
|
||||
$rsuser = verifyfast();
|
||||
//if (nopower($db, $rsuser['id'], 'p e'))
|
||||
// return errjson('您未被授权操作');
|
||||
$post = new \ciy\post();
|
||||
list($where, $csql) = self::setwhere($db, $post);
|
||||
list($where, $csql) = self::setwhere($db, $post, $rsuser);
|
||||
$rows = $db->get($csql);
|
||||
if (count($rows) > 10000)
|
||||
return errjson('将导出' . count($rows) . '条,不建议超过1万条,请筛选缩小范围');
|
||||
$fields = array();
|
||||
$fields[] = array('style' => 'l', 'width' => 60, 'field' => 'id', 'name' => '行码');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'auditstatus', 'name' => '审核状态');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'vuser', 'name' => '所属用户');
|
||||
$fields[] = array('style' => 'r', 'width' => 100, 'field' => 'invoicemoney', 'name' => '开票金额');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'invoicetitleid', 'name' => '所属抬头');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'invoicedetailid', 'name' => '所属明细');
|
||||
$fields[] = array('style' => 'r', 'width' => 100, 'field' => 'invoicemoney', 'name' => '开票金额');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'invfile', 'name' => '发票');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'invcode', 'name' => '发票号码');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'addtimes', 'name' => '申请时间');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'name', 'name' => '名称');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'taxnumber', 'name' => '税号');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'addr', 'name' => '单位地址');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'phone', 'name' => '电话号码');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankname', 'name' => '银行名称');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'bankaccount', 'name' => '银行账号');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'addtimes', 'name' => '申请时间');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'invtimes', 'name' => '开票时间');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'invuser', 'name' => '开票人');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'invfile', 'name' => '发票');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'audittimes', 'name' => '操作时间');
|
||||
$fields[] = array('style' => 'l', 'width' => 100, 'field' => 'audituser', 'name' => '操作人');
|
||||
$fields[] = array('style' => 'l', 'width' => 150, 'field' => 'auditmsg', 'name' => '拒开原因');
|
||||
$code_auditstatus = getcatas($db, 'auditstatus');
|
||||
$code_vuser = getrelation($db, $rows, 'ap_user', 'vuser', 'id,name');
|
||||
$code_invoicetitleid = getrelation($db, $rows, 'ap_usr_invoicetitle', 'invoicetitleid', 'id,name');
|
||||
$code_invuser = getcatas($db, 'adminuser');
|
||||
$code_invoicetitleid = getrelation($db, $rows, 'ap_invoicetitle', 'invoicetitleid', 'id,name');
|
||||
$code_invoicedetailid = getrelation($db, $rows, 'ap_invoicedetail', 'invoicedetailid', 'id,name');
|
||||
$code_audituser = getcatas($db, 'adminuser');
|
||||
$datas = array();
|
||||
foreach ($rows as $row) {
|
||||
$dat = array();
|
||||
|
|
@ -195,18 +224,22 @@ class usr_invoicing {
|
|||
$val = isset($row[$field]) ? $row[$field] : '';
|
||||
if ($field == 'id')
|
||||
$val = enid($val);
|
||||
if ($field == 'auditstatus')
|
||||
$val = ccode($code_auditstatus, $val);
|
||||
if ($field == 'vuser')
|
||||
$val = ccode($code_vuser, $val);
|
||||
if ($field == 'invoicemoney')
|
||||
$val = number_format($val / 100, 2);
|
||||
if ($field == 'invoicetitleid')
|
||||
$val = ccode($code_invoicetitleid, $val);
|
||||
if ($field == 'invoicedetailid')
|
||||
$val = ccode($code_invoicedetailid, $val);
|
||||
if ($field == 'invoicemoney')
|
||||
$val = number_format($val / 100, 2);
|
||||
if ($field == 'addtimes')
|
||||
$val = ($val == 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'invtimes')
|
||||
$val = ($val == 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'invuser')
|
||||
$val = ccode($code_invuser, $val);
|
||||
$val = ($val <= 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'audittimes')
|
||||
$val = ($val <= 0 ? '--' : date('Y-m-d H:i', $val));
|
||||
if ($field == 'audituser')
|
||||
$val = ccode($code_audituser, $val);
|
||||
$dat[] = $val;
|
||||
}
|
||||
$datas[] = $dat;
|
||||
|
|
@ -218,7 +251,7 @@ class usr_invoicing {
|
|||
$param['titleheight'] = '25'; //列头高度
|
||||
$param['landscape'] = true; //横向打印
|
||||
$param['fixtopage'] = true; //打印整个工作表
|
||||
$param['toptitle'] = 'Demo数据报表';
|
||||
$param['toptitle'] = '发票开票数据报表';
|
||||
$str = \ciy\excel::general_excel_xml($param);
|
||||
$filename = '';
|
||||
if (empty($filename))
|
||||
|
|
@ -42,7 +42,11 @@ class logdb {
|
|||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
<<<<<<< HEAD
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
=======
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
>>>>>>> publish
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_log');
|
||||
|
|
@ -51,7 +55,11 @@ class logdb {
|
|||
}
|
||||
|
||||
if ($post->getbool('once')) {
|
||||
<<<<<<< HEAD
|
||||
$ret['once'] = array();
|
||||
=======
|
||||
$ret['once'] = true;
|
||||
>>>>>>> publish
|
||||
$input = array();
|
||||
$input[] = array(
|
||||
'type' => 'input',
|
||||
|
|
@ -84,7 +92,11 @@ class logdb {
|
|||
'name' => '详情',
|
||||
'prop' => ' style="width:8em;"'
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
$ret['once']['input'] = $input;
|
||||
=======
|
||||
$ret['searchinput'] = $input;
|
||||
>>>>>>> publish
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'loguser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,11 @@ class luser {
|
|||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
<<<<<<< HEAD
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
=======
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
>>>>>>> publish
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_luser');
|
||||
|
|
@ -47,7 +51,11 @@ class luser {
|
|||
}
|
||||
|
||||
if ($post->getbool('once')) {
|
||||
<<<<<<< HEAD
|
||||
$ret['once'] = array();
|
||||
=======
|
||||
$ret['once'] = true;
|
||||
>>>>>>> publish
|
||||
$input = array();
|
||||
$input[] = array(
|
||||
'type' => 'input',
|
||||
|
|
@ -65,7 +73,11 @@ class luser {
|
|||
'form' => 'model',
|
||||
'name' => '设备指纹',
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
$ret['once']['input'] = $input;
|
||||
=======
|
||||
$ret['searchinput'] = $input;
|
||||
>>>>>>> publish
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'loguser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -106,16 +106,10 @@
|
|||
Glob.edit = id;
|
||||
if (id == 0 && !table.data[0])
|
||||
table.data[0] = {};
|
||||
var postparam = { id: id, data: true, once: {} };
|
||||
for (var to in table.once)
|
||||
postparam.once[to] = 1;
|
||||
var postparam = { id: id, data: true };
|
||||
ciyfn.callfunc('getdata', postparam, function (json) {
|
||||
if (json.data)
|
||||
table.data[id] = json.data;
|
||||
if (json.once) {
|
||||
for (var to in json.once)
|
||||
table.once[to] = json.once[to];
|
||||
}
|
||||
$5('[name=id]', dom).val(table.data[id].id);
|
||||
$5('[name=name]', dom).val(table.data[id].name);
|
||||
$5('[name=title]', dom).val(table.data[id].title);
|
||||
|
|
@ -144,31 +138,31 @@
|
|||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label class="lang">名称</label>';
|
||||
html += '<div>';
|
||||
html += ciyfn.tdshow(dat.name, table.field.name.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('name', dat.name, table.field.name.ext, dat, table.json, true);
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="ciy-form col-24 col-sm-12">';
|
||||
html += '<label class="lang">显示标题</label>';
|
||||
html += '<div>';
|
||||
html += ciyfn.tdshow(dat.title, table.field.title.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('title', dat.title, table.field.title.ext, dat, table.json, true);
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label class="lang">阅读数</label>';
|
||||
html += '<div>';
|
||||
html += ciyfn.tdshow(dat.readcnt, table.field.readcnt.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('readcnt', dat.readcnt, table.field.readcnt.ext, dat, table.json, true);
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label class="lang">撰写人</label>';
|
||||
html += '<div>';
|
||||
html += ciyfn.tdshow(dat.inputuser, table.field.inputuser.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('inputuser', dat.inputuser, table.field.inputuser.ext, dat, table.json, true);
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label class="lang">更新时间</label>';
|
||||
html += '<div>';
|
||||
html += ciyfn.tdshow(dat.uptimes, table.field.uptimes.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('uptimes', dat.uptimes, table.field.uptimes.ext, dat, table.json, true);
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class paper {
|
|||
$csql->column('!content', $db->getraw('show full fields from ap_paper'));
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_paper');
|
||||
|
|
@ -43,7 +43,7 @@ class paper {
|
|||
}
|
||||
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array(
|
||||
'type' => 'input',
|
||||
|
|
@ -69,7 +69,7 @@ class paper {
|
|||
'form' => 'uptimes',
|
||||
'name' => '更新时间'
|
||||
);
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class pnt_bundle {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_pnt_bundle');
|
||||
|
|
@ -39,11 +39,11 @@ class pnt_bundle {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'num', 'form' => 'buypnt', 'name' => '金币', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'buymoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class pnt_buy {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_pnt_buy');
|
||||
|
|
@ -56,13 +56,13 @@ class pnt_buy {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'pnt', 'name' => '金币', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'buypntmoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '提交时间');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class pnt_record {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_pnt_record');
|
||||
|
|
@ -56,13 +56,13 @@ class pnt_record {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '发生时间');
|
||||
$input[] = array('type' => 'num', 'form' => 'pnt', 'name' => '积分', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '摘要', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class pnt_track {
|
|||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_pnt_track');
|
||||
|
|
@ -38,12 +38,12 @@ class pnt_track {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '埋点名称', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'point', 'name' => '可获金币', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'limh24', 'name' => '24小时上限', 'prop' => ' style="width:4em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class transfer {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if ($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_transfer');
|
||||
|
|
@ -46,13 +46,13 @@ class transfer {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'id', 'name' => '流水号', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'amount', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '创建时间');
|
||||
$input[] = array('type' => 'input', 'form' => 'thirdno', 'name' => '三方单号', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -221,87 +221,77 @@
|
|||
var html = '<div class="char6 row gridline">';
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>头像</label><div>';
|
||||
html += ciyfn.tdshow(dat.icon, table.field.icon.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('icon', dat.icon, table.field.icon.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>用户昵称</label><div>';
|
||||
html += ciyfn.tdshow(dat.name, table.field.name.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('name', dat.name, table.field.name.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>手机号</label><div>';
|
||||
html += ciyfn.tdshow(dat.mobile, table.field.mobile.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('mobile', dat.mobile, table.field.mobile.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>账号状态</label><div>';
|
||||
html += ciyfn.tdshow(dat.stpstatus, table.field.stpstatus.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('stpstatus', dat.stpstatus, table.field.stpstatus.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>余额</label><div>';
|
||||
html += ciyfn.tdshow(dat.myinvmoney, table.field.myinvmoney.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('myinvmoney', dat.myinvmoney, table.field.myinvmoney.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>金币</label><div>';
|
||||
html += ciyfn.tdshow(dat.mypnt, table.field.mypnt.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('mypnt', dat.mypnt, table.field.mypnt.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>认证范围</label><div>';
|
||||
html += ciyfn.tdshow(dat.certs, table.field.certs.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('certs', dat.certs, table.field.certs.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>登录时间</label><div>';
|
||||
html += ciyfn.tdshow(dat.logintimes, table.field.logintimes.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('logintimes', dat.logintimes, table.field.logintimes.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>注册日期</label><div>';
|
||||
html += ciyfn.tdshow(dat.addtimes, table.field.addtimes.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('addtimes', dat.addtimes, table.field.addtimes.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>分享人</label><div>';
|
||||
html += ciyfn.tdshow(dat.upid, table.field.upid.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('upid', dat.upid, table.field.upid.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>密码重试次数</label><div>';
|
||||
html += ciyfn.tdshow(dat.trytime, table.field.trytime.ext, dat, table.once, table.json, true);
|
||||
html += '<label>UnionID</label><div>';
|
||||
html += ciyfn.tdshow('wxunionid', dat.wxunionid, table.field.wxunionid.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>备注</label><div>';
|
||||
html += ciyfn.tdshow(dat.memo, table.field.memo.ext, dat, table.once, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>微信UnionID</label><div>';
|
||||
html += ciyfn.tdshow(dat.wxunionid, table.field.wxunionid.ext, dat, table.once, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>小程序OpenID</label><div>';
|
||||
html += ciyfn.tdshow(dat.wxminaid, table.field.wxminaid.ext, dat, table.once, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>小程序Key</label><div>';
|
||||
html += ciyfn.tdshow(dat.wxminakey, table.field.wxminakey.ext, dat, table.once, table.json, true);
|
||||
html += '<label>OpenID</label><div>';
|
||||
html += ciyfn.tdshow('wxminaid', dat.wxminaid, table.field.wxminaid.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<label>到期时间</label><div>';
|
||||
html += ciyfn.tdshow(dat.exptimes, table.field.exptimes.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('exptimes', dat.exptimes, table.field.exptimes.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-8">';
|
||||
html += '<div class="ciy-form col-24 col-sm-16">';
|
||||
html += '<label>登录IP</label><div>';
|
||||
html += ciyfn.tdshow(dat.ip, table.field.ip.ext, dat, table.once, table.json, true);
|
||||
html += ciyfn.tdshow('ip', dat.ip, table.field.ip.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '<div class="ciy-form col-24 col-sm-24">';
|
||||
html += '<label>备注</label><div>';
|
||||
html += ciyfn.tdshow('memo', dat.memo, table.field.memo.ext, dat, table.json, true);
|
||||
html += '</div></div>';
|
||||
|
||||
html += '</div>';
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class user {
|
|||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_user');
|
||||
|
|
@ -54,7 +54,7 @@ class user {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'id', 'name' => '会员编号', 'prop' => ' style="width:6em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'certs', 'name' => '认证', 'select' => 'certs', 'all' => '全部');
|
||||
|
|
@ -65,7 +65,7 @@ class user {
|
|||
$input[] = array('type' => 'daterange', 'form' => 'logintimes', 'name' => '登录时间');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '注册日期');
|
||||
$input[] = array('type' => 'input', 'form' => 'memo', 'name' => '备注', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'upid');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class user_service {
|
|||
$csql->limit($pageno, $pagecount);
|
||||
$mainrowcount = $post->getint('count');
|
||||
$rows = $db->get($csql, $mainrowcount);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_user');
|
||||
|
|
@ -54,7 +54,7 @@ class user_service {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'id', 'name' => '会员编号', 'prop' => ' style="width:6em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'certs', 'name' => '认证', 'select' => 'certs', 'all' => '全部');
|
||||
|
|
@ -65,7 +65,7 @@ class user_service {
|
|||
$input[] = array('type' => 'daterange', 'form' => 'logintimes', 'name' => '登录时间');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '注册日期');
|
||||
$input[] = array('type' => 'input', 'form' => 'memo', 'name' => '备注', 'prop' => ' style="width:8em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'upid');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class usr_buy_bundle {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_usr_buy_bundle');
|
||||
|
|
@ -41,13 +41,13 @@ class usr_buy_bundle {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'name', 'name' => '套餐说明', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'select', 'form' => 'userlevel', 'name' => '对应等级', 'all' => '全部', 'select' => 'userlevel');
|
||||
$input[] = array('type' => 'num', 'form' => 'days', 'name' => '天数', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'usermoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
return succjson($ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class usr_buy_user {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_usr_buy_user');
|
||||
|
|
@ -69,7 +69,7 @@ class usr_buy_user {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'bundleid', 'name' => '所属套餐', 'prop' => ' style="width:8em;"');
|
||||
|
|
@ -77,7 +77,7 @@ class usr_buy_user {
|
|||
$input[] = array('type' => 'num', 'form' => 'days', 'name' => '会员天数', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'num', 'form' => 'buydaymoney', 'name' => '金额', 'prop' => ' style="width:4em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '提交时间');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
$ret['ap_usr_buy_bundle'] = getrelation($db, $rows, 'ap_usr_buy_bundle', 'bundleid');
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class usr_capcode {
|
|||
$rows = $db->get($csql, $mainrowcount);
|
||||
if($rows === false)
|
||||
return errjson($db->error);
|
||||
$ret = array('where' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
$ret = array('searchwhere' => $where, 'pageno' => $pageno, 'pagecount' => $pagecount, 'count' => $mainrowcount, 'list' => $rows);
|
||||
if ($post->getbool('field')) {
|
||||
$field = array();
|
||||
$fshow = $db->getfield($field, 'ap_usr_capcode');
|
||||
|
|
@ -50,12 +50,12 @@ class usr_capcode {
|
|||
$ret['fshow'] = $fshow;
|
||||
}
|
||||
if ($post->getbool('once')) {
|
||||
$ret['once'] = array();
|
||||
$ret['once'] = true;
|
||||
$input = array();
|
||||
$input[] = array('type' => 'input', 'form' => 'vuser', 'name' => '所属用户', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'input', 'form' => 'account', 'name' => '账号', 'prop' => ' style="width:8em;"');
|
||||
$input[] = array('type' => 'daterange', 'form' => 'addtimes', 'name' => '生成时间');
|
||||
$ret['once']['input'] = $input;
|
||||
$ret['searchinput'] = $input;
|
||||
}
|
||||
$ret['ap_user'] = getrelation($db, $rows, 'ap_user', 'vuser');
|
||||
return succjson($ret);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<div id="alert_edit" style="display:none;">
|
||||
<div class="char4 row">
|
||||
<div id="id_chats" style="height: 25.5em;overflow-y: auto;width: 100%;padding: 1em;"></div>
|
||||
<div class="form-group col-24 col-sm-24 px2" style="position: absolute;bottom: 0;left: 0;right:0;">
|
||||
<div class="px2" style="position: absolute;bottom: 0;left: 0;right:0;">
|
||||
<ciy-textarea com="content" style="display: block;"></ciy-textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -102,11 +102,11 @@
|
|||
var html = '';
|
||||
for (var i in json.chats) {
|
||||
if (json.chats[i].sendtype == 1) {
|
||||
html += '<div><div style="font-size:0.7em;line-height: 1.2em;margin-top: 1em;">用户 ' + ciyfn.todatetime(json.chats[i].addtimes, 'm-d H:i') + '</div><div style="display:inline-block;background: #f7f7f7;padding: 0.5em 1em;border-radius: 7px;min-width: 5em;">' + json.chats[i].content.replace('\n', '<br/>') + '</div></div>';
|
||||
html += '<div><div style="font-size:0.7em;line-height: 1.2em;margin-top: 1em;">用户 ' + ciyfn.todatetime(json.chats[i].addtimes, 'm-d H:i') + '</div><div style="display:inline-block;background: #f7f7f7;padding: 0.5em 1em;border-radius: 7px;min-width: 5em;">' + json.chats[i].content.replace(/\n/g, '<br/>') + '</div></div>';
|
||||
} else if (json.chats[i].sendtype == 2) {
|
||||
html += '<div style="text-align: right;"><div style="font-size:0.7em;line-height: 1.2em;margin-top: 1em;">' + ciyfn.todatetime(json.chats[i].addtimes, 'm-d H:i') + ' 平台</div><div style="display:inline-block;background: #88f7af;padding: 0.5em 1em;border-radius: 7px;min-width: 5em;text-align:left;">' + json.chats[i].content.replace('\n', '<br/>') + '</div></div>';
|
||||
html += '<div style="text-align: right;"><div style="font-size:0.7em;line-height: 1.2em;margin-top: 1em;">' + ciyfn.todatetime(json.chats[i].addtimes, 'm-d H:i') + ' 平台</div><div style="display:inline-block;background: #88f7af;padding: 0.5em 1em;border-radius: 7px;min-width: 5em;text-align:left;">' + json.chats[i].content.replace(/\n/g, '<br/>') + '</div></div>';
|
||||
} else {
|
||||
html += '<div style="text-align: center;"><div style="font-size:0.7em;line-height: 1.2em;margin-top: 1em;">AI助手 ' + ciyfn.todatetime(json.chats[i].addtimes, 'm-d H:i') + '</div><div style="display:inline-block;background: #a3d1f9;padding: 0.5em 1em;border-radius: 7px;min-width: 5em;text-align:left;">' + json.chats[i].content.replace('\n', '<br/>') + '</div></div>';
|
||||
html += '<div style="text-align: center;"><div style="font-size:0.7em;line-height: 1.2em;margin-top: 1em;">AI助手 ' + ciyfn.todatetime(json.chats[i].addtimes, 'm-d H:i') + '</div><div style="display:inline-block;background: #a3d1f9;padding: 0.5em 1em;border-radius: 7px;min-width: 5em;text-align:left;">' + json.chats[i].content.replace(/\n/g, '<br/>') + '</div></div>';
|
||||
}
|
||||
}
|
||||
if (html == '')
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user