Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d868cf7a1f | ||
|
|
20ece8ada5 | ||
|
|
4e5b31b2e6 | ||
|
|
7dcde9f91f | ||
|
|
fb7d0cc232 | ||
|
|
1dd22ddb54 | ||
|
|
8e9e460cb3 | ||
|
|
691b3f8268 | ||
|
|
b7ac15c9db | ||
|
|
705b8cb0a8 | ||
|
|
e6d878888c |
@@ -53,4 +53,49 @@ export default {
|
|||||||
szzpyissuedby(data) { //开票人列表
|
szzpyissuedby(data) { //开票人列表
|
||||||
return uni.api.post("szzpy/issuedby", data);
|
return uni.api.post("szzpy/issuedby", data);
|
||||||
},
|
},
|
||||||
|
userttwechat(data) { //开票人列表
|
||||||
|
return uni.api.post("user/ttwechat", data);
|
||||||
|
},
|
||||||
|
storepaidkeywordsearch(data) { //企业关键词搜索Paid
|
||||||
|
return uni.api.post("store/paidkeywordsearch", data);
|
||||||
|
},
|
||||||
|
szzpydeltaxation(data) { //删除开票人2
|
||||||
|
return uni.api.post("szzpy/deltaxation", data);
|
||||||
|
},
|
||||||
|
szzpynewissuedbylist(data) { //开票人列表2
|
||||||
|
return uni.api.post("szzpy/newissuedbylist", data);
|
||||||
|
},
|
||||||
|
enterprisestore(data) { //开票人列表2
|
||||||
|
return uni.api.post("store/enterprise", data, false);
|
||||||
|
},
|
||||||
|
storese(data) {
|
||||||
|
return uni.api.post("store/se", data);
|
||||||
|
},
|
||||||
|
storesubinvoicing(data) {
|
||||||
|
return uni.api.post("store/subinvoicing", data);
|
||||||
|
},
|
||||||
|
storeindustrylist(data) {
|
||||||
|
return uni.api.post("store/industrylist", data);
|
||||||
|
},
|
||||||
|
szzpyhurl(data) {
|
||||||
|
return uni.api.post("szzpy/h5url", data);
|
||||||
|
},
|
||||||
|
szzpygetprovinceno(data) {
|
||||||
|
return uni.api.post("szzpy/getprovinceno", data);
|
||||||
|
},
|
||||||
|
storebindinginvopush(data) {
|
||||||
|
return uni.api.post("store/bindinginvopush", data);
|
||||||
|
},
|
||||||
|
storeinvoicedetail(data) {
|
||||||
|
return uni.api.post("store/invoicedetail", data);
|
||||||
|
},
|
||||||
|
szzpydownloadurl(data) {
|
||||||
|
return uni.api.post("szzpy/downloadurl", data);
|
||||||
|
},
|
||||||
|
usergetwechatjssdk(data) {
|
||||||
|
return uni.api.post("user/getwechatjssdk", data);
|
||||||
|
},
|
||||||
|
h5encryption(data) {
|
||||||
|
return uni.api.post("store/h5encryption", data);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
const uploadUrl = 'https://upload-z2.qbox.me'
|
const uploadUrl = 'https://upload-z2.qbox.me'
|
||||||
// const debug = process.env.NODE_ENV === 'development'
|
// const debug = process.env.NODE_ENV === 'development'
|
||||||
const debug = process.env.NODE_ENV == 'development' ? true : false;
|
const debug = process.env.NODE_ENV == 'development' ? true : false;
|
||||||
|
const proxyApi = "/api/"
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// const baseUrl = debug ? proxyApi : "http://wxgzh.sxczgkj.cn"
|
// const baseUrl = debug ? proxyApi : "https://invoice.sxczgkj.cn/api/"
|
||||||
const baseUrl = 'https://invoice.sxczgkj.cn/api/' //正式
|
const baseUrl = 'https://invoice.sxczgkj.cn/api/' //正式
|
||||||
// const baseUrl = 'http://192.168.2.23:8888/api/'//正式
|
// const baseUrl = 'http://192.168.2.23:8888/api/'//正式
|
||||||
// const baseUrl = 'http://test.invoice.sxczgkj.cn/api/'//测试
|
// const baseUrl = 'http://test.invoice.sxczgkj.cn/api/'//测试
|
||||||
// #endif
|
// #endif
|
||||||
// import VConsole from "./vConsole.js"
|
import VConsole from "./vConsole.js"
|
||||||
// if (debug) {
|
if (debug) {
|
||||||
// // new VConsole()
|
// new VConsole()
|
||||||
// }
|
}
|
||||||
const version = '120'
|
const version = '120'
|
||||||
const autoRemoveCache = {
|
const autoRemoveCache = {
|
||||||
count: 100000,
|
count: 100000,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const preCacheKeyClearFetch = 'storage:clear:fetch:'
|
const preCacheKeyClearFetch = 'storage:clear:fetch:'
|
||||||
|
import Api from '@/common/js/api.js'
|
||||||
uni.pro.interceptor('request', {
|
uni.pro.interceptor('request', {
|
||||||
config(paramOptions) {
|
config(paramOptions) {
|
||||||
let options = Object.assign({}, paramOptions)
|
let options = Object.assign({}, paramOptions)
|
||||||
@@ -38,7 +38,10 @@ async function request(options) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
options.header = {
|
options.header = {
|
||||||
// userId: uni.getStorageSync('userId'),
|
userId: uni.getStorageSync('userId'),
|
||||||
|
minitype: uni.getStorageSync('Type'),
|
||||||
|
fatoken: uni.getStorageSync('token'),
|
||||||
|
isnew: 'isnew',
|
||||||
'content-type': 'application/json'
|
'content-type': 'application/json'
|
||||||
}
|
}
|
||||||
let res = await uni.pro.request(options)
|
let res = await uni.pro.request(options)
|
||||||
@@ -58,18 +61,13 @@ async function request(options) {
|
|||||||
}
|
}
|
||||||
if (res.code == 400) {
|
if (res.code == 400) {
|
||||||
return Promise.reject(res.message)
|
return Promise.reject(res.message)
|
||||||
} else if (res.code == 401) {
|
} else if (res.code == 405) {
|
||||||
uni.showToast({
|
let token = await Api.h5encryption({
|
||||||
title: res.message || res.msg,
|
store_id: uni.cache.get('userId')
|
||||||
icon: "none",
|
|
||||||
success: () => {
|
|
||||||
uni.cache.clear();
|
|
||||||
uni.removeStorageSync("token");
|
|
||||||
uni.removeStorageSync("userId");
|
|
||||||
uni.removeStorageSync('myLoginName')
|
|
||||||
uni.pro.redirectTo("login/login");
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
if (token.code == 1) {
|
||||||
|
uni.cache.set('token', token.data.token);
|
||||||
|
}
|
||||||
} else if (res.code == 482) {
|
} else if (res.code == 482) {
|
||||||
let nowTime = new Date() / 1000 | 0
|
let nowTime = new Date() / 1000 | 0
|
||||||
let offset = parseInt(res.message) - parseInt(nowTime);
|
let offset = parseInt(res.message) - parseInt(nowTime);
|
||||||
@@ -80,17 +78,17 @@ async function request(options) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!options.toast) {
|
if (!options.toast) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: res.message || res.msg,
|
// title: res.message || res.msg,
|
||||||
icon: "none",
|
// icon: "none",
|
||||||
success() {
|
// success() {
|
||||||
setTimeout(res => {
|
// setTimeout(res => {
|
||||||
// if (options.toast) {
|
// // if (options.toast) {
|
||||||
uni.hideLoading()
|
// uni.hideLoading()
|
||||||
// }
|
// // }
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|||||||
44
index.html
44
index.html
@@ -6,11 +6,6 @@
|
|||||||
<title>
|
<title>
|
||||||
<%= htmlWebpackPlugin.options.title %>
|
<%= htmlWebpackPlugin.options.title %>
|
||||||
</title>
|
</title>
|
||||||
<!-- Open Graph data -->
|
|
||||||
<!-- <meta property="og:title" content="Title Here" /> -->
|
|
||||||
<!-- <meta property="og:url" content="http://www.example.com/" /> -->
|
|
||||||
<!-- <meta property="og:image" content="http://example.com/image.jpg" /> -->
|
|
||||||
<!-- <meta property="og:description" content="Description Here" /> -->
|
|
||||||
<script>
|
<script>
|
||||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
|
||||||
.supports('top: constant(a)'))
|
.supports('top: constant(a)'))
|
||||||
@@ -19,7 +14,6 @@
|
|||||||
(coverSupport ? ', viewport-fit=cover' : '') +
|
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||||
'" />')
|
'" />')
|
||||||
</script>
|
</script>
|
||||||
<!-- <script src="https://qzs.gdtimg.com/union/res/union_sdk/page/h5_sdk/i.js"></script> -->
|
|
||||||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
|
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -27,43 +21,5 @@
|
|||||||
<strong>Please enable JavaScript to continue.</strong>
|
<strong>Please enable JavaScript to continue.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- <script type="text/javascript">
|
|
||||||
// H5 SDK 在线文档地址:http://developers.adnet.qq.com/doc/web/js_develop
|
|
||||||
// 全局命名空间申明TencentGDT对象
|
|
||||||
window.TencentGDT = window.TencentGDT || [];
|
|
||||||
|
|
||||||
// 广告初始化
|
|
||||||
window.TencentGDT.push({
|
|
||||||
app_id: '1206941502', // {String} - appid - 必填
|
|
||||||
placement_id: '9019288881405424', // {String} - 广告位id - 必填
|
|
||||||
type: 'interstitial', // {String} - 原生广告类型 - 必填
|
|
||||||
muid_type: '1', // {String} - 移动终端标识类型,1:imei,2:idfa,3:mac号 - 选填
|
|
||||||
muid: '******', // {String} - 加密终端标识,详细加密算法见API说明 - 选填
|
|
||||||
count: 1, // {Number} - 拉取广告的数量,默认是3,最高支持10 - 选填
|
|
||||||
onComplete: function(res) {
|
|
||||||
if (res && res.ret === 0) {
|
|
||||||
// 原生模板广告位调用 window.TencentGDT.NATIVE.renderAd(res[0], 'containerId') 进行模板广告的渲染
|
|
||||||
// res[0] 代表取广告数组第一个数据
|
|
||||||
TencentGDT.NATIVE.renderAd(res.data[0]);
|
|
||||||
} else {
|
|
||||||
// 加载广告API,如广告回调无广告,可使用loadAd再次拉取广告
|
|
||||||
// 注意:拉取广告频率每分钟不要超过20次,否则会被广告接口过滤,影响广告位填充率
|
|
||||||
setTimeout(function() {
|
|
||||||
window.TencentGDT.NATIVE.loadAd(placement_id)
|
|
||||||
}, 3000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// H5 SDK接入全局只需运行一次
|
|
||||||
(function() {
|
|
||||||
var doc = document,
|
|
||||||
h = doc.getElementsByTagName('head')[0],
|
|
||||||
s = doc.createElement('script');
|
|
||||||
s.async = true;
|
|
||||||
s.src = '//qzs.qq.com/qzone/biz/res/i.js';
|
|
||||||
h && h.insertBefore(s, h.firstChild);
|
|
||||||
})();
|
|
||||||
</script> -->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
19
main.js
19
main.js
@@ -10,22 +10,29 @@ Vue.config.productionTip = false
|
|||||||
import uView from '@/uni_modules/uview-ui'
|
import uView from '@/uni_modules/uview-ui'
|
||||||
Vue.prototype.$store = store
|
Vue.prototype.$store = store
|
||||||
Vue.prototype.api = Api;
|
Vue.prototype.api = Api;
|
||||||
|
// 让页面的 onLoad 在 onLaunch 之后执行
|
||||||
|
Vue.prototype.$onLaunched = new Promise(resolve => {
|
||||||
|
Vue.prototype.$isResolve = resolve
|
||||||
|
})
|
||||||
Vue.use(uView)
|
Vue.use(uView)
|
||||||
// 如此配置即可
|
// 如此配置即可
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
store,
|
store,
|
||||||
...App
|
...App
|
||||||
})
|
})
|
||||||
app.$mount()
|
app.$mount()
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
// #ifdef VUE3
|
// #ifdef VUE3
|
||||||
import { createSSRApp } from 'vue'
|
import {
|
||||||
|
createSSRApp
|
||||||
|
} from 'vue'
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
return {
|
return {
|
||||||
app
|
app
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "invoice_H5",
|
"name" : "invoice_H5",
|
||||||
"appid" : "__UNI__F13E93D",
|
"appid" : "__UNI__93601F2",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"disableHostCheck" : false,
|
"disableHostCheck" : false,
|
||||||
"proxy" : {
|
"proxy" : {
|
||||||
"/api" : {
|
"/api" : {
|
||||||
"target" : "https://ky.sxczgkj.cn/api/",
|
"target" : "http://192.168.1.13:8888/api/",
|
||||||
"ws" : false,
|
"ws" : false,
|
||||||
"changeOrigin" : true, //是否跨域
|
"changeOrigin" : true, //是否跨域
|
||||||
"secure" : false, // 设置支持https协议的代理
|
"secure" : false, // 设置支持https协议的代理
|
||||||
|
|||||||
205
npminstall-debug.log
Normal file
205
npminstall-debug.log
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
{
|
||||||
|
root: 'D:\\w\\CZG\\Hfive',
|
||||||
|
registry: 'https://registry.npmmirror.com',
|
||||||
|
pkgs: [
|
||||||
|
{
|
||||||
|
name: '@dcloudio/uni-pdf',
|
||||||
|
version: 'latest',
|
||||||
|
type: 'tag',
|
||||||
|
alias: undefined,
|
||||||
|
arg: [Result]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
production: false,
|
||||||
|
cacheStrict: false,
|
||||||
|
cacheDir: 'C:\\Users\\小啾\\.npminstall_tarball',
|
||||||
|
env: {
|
||||||
|
npm_config_registry: 'https://registry.npmmirror.com',
|
||||||
|
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\小啾\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","@dcloudio/uni-pdf"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\小啾\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","@dcloudio/uni-pdf"]}',
|
||||||
|
npm_config_user_agent: 'npminstall/7.12.0 npm/? node/v20.11.1 win32 x64',
|
||||||
|
npm_config_cache: 'C:\\Users\\小啾\\.npminstall_tarball',
|
||||||
|
NODE: 'F:\\xw-software\\安装包\\nodejs\\node.exe',
|
||||||
|
npm_node_execpath: 'F:\\xw-software\\安装包\\nodejs\\node.exe',
|
||||||
|
npm_execpath: 'C:\\Users\\小啾\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
|
||||||
|
npm_config_userconfig: 'C:\\Users\\小啾\\.cnpmrc',
|
||||||
|
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
npm_config_r: 'https://registry.npmmirror.com',
|
||||||
|
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
|
||||||
|
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
|
||||||
|
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
||||||
|
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
||||||
|
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
||||||
|
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
||||||
|
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
||||||
|
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
||||||
|
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
||||||
|
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
||||||
|
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
||||||
|
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
||||||
|
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
||||||
|
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
||||||
|
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
||||||
|
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
||||||
|
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
|
||||||
|
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
||||||
|
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
||||||
|
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
||||||
|
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
||||||
|
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
|
||||||
|
npm_rootpath: 'D:\\w\\CZG\\Hfive',
|
||||||
|
INIT_CWD: 'D:\\w\\CZG\\Hfive'
|
||||||
|
},
|
||||||
|
binaryMirrors: {
|
||||||
|
ENVS: {
|
||||||
|
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
|
||||||
|
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
|
||||||
|
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
||||||
|
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
||||||
|
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
||||||
|
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
||||||
|
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
||||||
|
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
||||||
|
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
||||||
|
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
||||||
|
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
||||||
|
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
||||||
|
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
||||||
|
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
||||||
|
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
||||||
|
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
||||||
|
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
|
||||||
|
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
||||||
|
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
||||||
|
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
||||||
|
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
||||||
|
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
|
||||||
|
},
|
||||||
|
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
|
||||||
|
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
|
||||||
|
'@tensorflow/tfjs-node': {
|
||||||
|
replaceHostFiles: [Array],
|
||||||
|
replaceHostRegExpMap: [Object],
|
||||||
|
replaceHostMap: [Object]
|
||||||
|
},
|
||||||
|
cypress: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/cypress',
|
||||||
|
newPlatforms: [Object]
|
||||||
|
},
|
||||||
|
'utf-8-validate': {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
|
||||||
|
},
|
||||||
|
xprofiler: {
|
||||||
|
remote_path: './xprofiler/v{version}/',
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries'
|
||||||
|
},
|
||||||
|
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
|
||||||
|
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
|
||||||
|
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
|
||||||
|
sqlite3: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
|
||||||
|
remote_path: 'v{version}'
|
||||||
|
},
|
||||||
|
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
|
||||||
|
grpc: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries',
|
||||||
|
remote_path: '{name}/v{version}'
|
||||||
|
},
|
||||||
|
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
|
||||||
|
wrtc: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries',
|
||||||
|
remote_path: '{name}/v{version}'
|
||||||
|
},
|
||||||
|
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
|
||||||
|
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
|
||||||
|
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
|
||||||
|
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
|
||||||
|
'flow-bin': {
|
||||||
|
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/flow/v'
|
||||||
|
},
|
||||||
|
'jpegtran-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
|
||||||
|
},
|
||||||
|
'cwebp-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
|
||||||
|
},
|
||||||
|
'zopflipng-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
|
||||||
|
},
|
||||||
|
'optipng-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
|
||||||
|
},
|
||||||
|
mozjpeg: {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
|
||||||
|
},
|
||||||
|
gifsicle: {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
|
||||||
|
},
|
||||||
|
'pngquant-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
|
||||||
|
replaceHostMap: [Object]
|
||||||
|
},
|
||||||
|
'pngcrush-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
|
||||||
|
},
|
||||||
|
'jpeg-recompress-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
|
||||||
|
},
|
||||||
|
'advpng-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
|
||||||
|
},
|
||||||
|
'pngout-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
|
||||||
|
},
|
||||||
|
'jpegoptim-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
|
||||||
|
},
|
||||||
|
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
|
||||||
|
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
|
||||||
|
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
|
||||||
|
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' },
|
||||||
|
'libpg-query': { host: 'https://cdn.npmmirror.com/binaries' }
|
||||||
|
},
|
||||||
|
forbiddenLicenses: null,
|
||||||
|
flatten: false,
|
||||||
|
proxy: undefined,
|
||||||
|
prune: false,
|
||||||
|
disableFallbackStore: false,
|
||||||
|
workspacesMap: Map(0) {},
|
||||||
|
enableWorkspace: false,
|
||||||
|
workspaceRoot: 'D:\\w\\CZG\\Hfive',
|
||||||
|
isWorkspaceRoot: true,
|
||||||
|
isWorkspacePackage: false,
|
||||||
|
offline: false,
|
||||||
|
strictSSL: false,
|
||||||
|
ignoreScripts: false,
|
||||||
|
foregroundScripts: false,
|
||||||
|
ignoreOptionalDependencies: false,
|
||||||
|
detail: false,
|
||||||
|
forceLinkLatest: false,
|
||||||
|
trace: false,
|
||||||
|
engineStrict: false,
|
||||||
|
registryOnly: false,
|
||||||
|
client: false,
|
||||||
|
autoFixVersion: [Function: autoFixVersion]
|
||||||
|
}
|
||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -7,7 +7,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"uview-ui": "^2.0.36"
|
"uview-ui": "^2.0.36",
|
||||||
|
"weixin-js-sdk": "^1.6.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/base64-arraybuffer": {
|
"node_modules/base64-arraybuffer": {
|
||||||
@@ -66,6 +67,11 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"HBuilderX": "^3.1.0"
|
"HBuilderX": "^3.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/weixin-js-sdk": {
|
||||||
|
"version": "1.6.5",
|
||||||
|
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
|
||||||
|
"integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
pages.json
11
pages.json
@@ -33,6 +33,12 @@
|
|||||||
"navigationBarTitleText": "新增开票员",
|
"navigationBarTitleText": "新增开票员",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/index/drawerlist",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "开票员列表",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/index/notification",
|
"path": "pages/index/notification",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -112,6 +118,11 @@
|
|||||||
"navigationBarTitleText": "提交成功",
|
"navigationBarTitleText": "提交成功",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/electric/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/webview/webview",
|
"path": "pages/webview/webview",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
230
pages/electric/index.vue
Normal file
230
pages/electric/index.vue
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="topswiper">
|
||||||
|
<u-swiper :list="swiperlist" height="336"></u-swiper>
|
||||||
|
</view>
|
||||||
|
<view class="contentgrid flex-between">
|
||||||
|
<view class="flex-colum" v-for="(item,index) in 8" :key="index" @click="clicknavigateTo(item,index)">
|
||||||
|
<image src="@/static/logo.png" mode=""></image>
|
||||||
|
<text>蓝票开具</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="contentlist" v-for="(item,index) in 3" :key="index">
|
||||||
|
<view class="contentlisttitle">
|
||||||
|
企业信息
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between" style="margin-top: 32rpx;">
|
||||||
|
<text class="contentlistitemone">企业名称</text>
|
||||||
|
<text class="contentlistitemtow">西安市高新区范家大院饭馆</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">纳税人税号</text>
|
||||||
|
<text class="contentlistitemtow">92610131MA6W52456</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">纳税人性质</text>
|
||||||
|
<text class="contentlistitemtow">——</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">当前默认开票账号</text>
|
||||||
|
<text class="contentlistitemtow">9261013115897462</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">授信类别</text>
|
||||||
|
<text class="contentlistitemtow">——</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">预警级别</text>
|
||||||
|
<text class="contentlistitemtow">——</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">数电业务到期时间</text>
|
||||||
|
<text class="contentlistitemtow">2025-05-31</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentlistitem flex-between">
|
||||||
|
<text class="contentlistitemone">报税截止日期</text>
|
||||||
|
<text class="contentlistitemtow">2025-05-31</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="contentbotton">
|
||||||
|
<view class="contentbottontitle flex-between">
|
||||||
|
<text class="contentbottontitleone">最近开票申请</text>
|
||||||
|
<text class="contentbottontitletow">更多申请</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
swiperlist: [{
|
||||||
|
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||||
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
||||||
|
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
|
||||||
|
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onLoad(e) {
|
||||||
|
// await this.$onLaunched;
|
||||||
|
// alert(location.href.split('#')[0])
|
||||||
|
if (e.userId) {
|
||||||
|
// this.onLoaduserId = e.userId
|
||||||
|
uni.cache.set('Type', e.type);
|
||||||
|
uni.cache.set('userId', e.userId);
|
||||||
|
}
|
||||||
|
let token = await this.api.h5encryption({
|
||||||
|
store_id: uni.cache.get('userId')
|
||||||
|
})
|
||||||
|
if (token.code == 1) {
|
||||||
|
uni.cache.set('token', token.data.token);
|
||||||
|
}
|
||||||
|
console.log(token)
|
||||||
|
let res = await this.api.storestorestatus({
|
||||||
|
store_id: uni.cache.get('userId')
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.improveinformationform = res.data.store
|
||||||
|
uni.cache.set('form', this.improveinformationform);
|
||||||
|
if (res.data.sz_status == 0) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/information'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.improveinformation = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clicknavigateTo(item, index) {
|
||||||
|
console.log(index)
|
||||||
|
switch (index) {
|
||||||
|
case '0':
|
||||||
|
uni.pro.navigateTo('webview/webview', {
|
||||||
|
url: c
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
uni.pro.navigateTo('bluetools/index');
|
||||||
|
// uni.pro.navigateTo(b, {
|
||||||
|
// url: c
|
||||||
|
// });
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
uni.pro.navigateTo('issuer/index');
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
uni.pro.navigateTo('toexamine/index');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background: #F9F9F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 0 28rpx;
|
||||||
|
|
||||||
|
.topswiper {
|
||||||
|
padding-top: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentgrid {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
padding: 0 32rpx 32rpx 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24px 24px 24px 24px;
|
||||||
|
|
||||||
|
.flex-colum {
|
||||||
|
width: 25%;
|
||||||
|
margin-top: 36rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentlist {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
padding: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
|
||||||
|
.contentlisttitle {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentlistitem {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
|
||||||
|
.contentlistitemone {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentlistitemtow {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentbotton {
|
||||||
|
margin-top: 44rpx;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 32rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
|
||||||
|
.contentbottontitle {
|
||||||
|
.contentbottontitleone {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentbottontitletow {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #5872C9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,40 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content" @click.stop="stopPropagation">
|
||||||
<view class="content_top">
|
<view class="content_top">
|
||||||
<view :class="form.user_type == 1 ? 'content_topview' : ''" @click="clickakex(1)">个人</view>
|
<view :class="form.user_type == 1 ? 'content_topview' : ''" @click="clickakex(1)">个人</view>
|
||||||
<view :class="form.user_type == 2 ? 'content_topview' : ''" @click="clickakex(2)">企业</view>
|
<view :class="form.user_type == 2 ? 'content_topview' : ''" @click="clickakex(2)">企业</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_item">
|
<view class="content_item">
|
||||||
<view class="Box_box flex-between" v-if="form.user_type == 1">
|
<view class="Box_box flex-between" v-if="form.user_type == 1">
|
||||||
<view>*姓名</view>
|
<view class="Box_boxone">*姓名</view>
|
||||||
<view><input type="text" v-model="form.user_name" placeholder="请填写名称" /></view>
|
<view class="Box_boxtow"><input type="text" v-model="form.user_name" placeholder="请填写名称" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between" v-if="form.user_type == 2">
|
<view class="Box_box flex-between" v-if="form.user_type == 2">
|
||||||
<view>*单位名称</view>
|
<view class="Box_boxone">*单位名称</view>
|
||||||
<view style="position: relative; width: 70%">
|
<view class="Box_boxtow" style="position: relative; width: 70%">
|
||||||
<input type="text" v-if="subCategoryList.length == 0" v-model="form.user_name" placeholder="请填写公司名称" @input="onInput" />
|
<input type="text" v-model="form.user_name" placeholder="请填写公司名称" @input="onInput" />
|
||||||
<view class="position" v-else>
|
<!-- <u-icon name="weixin-fill" color="#04be02" size="28"></u-icon> -->
|
||||||
<view class="positionitem" v-for="(item, index) in subCategoryList" :key="index" @click="categorySubClick(item)">
|
<view class="position" v-if="subCategoryList.length != 0">
|
||||||
|
<view class="positionitem" v-for="(item, index) in subCategoryList" :key="index"
|
||||||
|
@click="categorySubClick(item)">
|
||||||
{{ item.companyName }}
|
{{ item.companyName }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between" v-if="form.user_type == 2">
|
<view class="Box_box flex-between" v-if="form.user_type == 2">
|
||||||
<view>*税号</view>
|
<view class="Box_boxone">*税号</view>
|
||||||
<view><input type="text" v-model="form.user_duty" placeholder="请填写公司税号" /></view>
|
<view class="Box_boxtow"><input type="text" v-model="form.user_duty" placeholder="请填写公司税号" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>*邮箱</view>
|
<view class="Box_boxone">*邮箱</view>
|
||||||
<view><input type="text" v-model="form.email" placeholder="请填写邮箱" /></view>
|
<view class="Box_boxtow"><input type="text" v-model="form.email" placeholder="请填写邮箱" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>*手机号</view>
|
<view class="Box_boxone">*手机号</view>
|
||||||
<view><input type="text" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
<view class="Box_boxtow"><input type="number" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="form.user_type == 2">
|
<template v-if="form.user_type == 2">
|
||||||
<view class="Box_box flex-between" @click="showElse = !showElse">
|
<view class="Box_box flex-between" @click="showElse = !showElse">
|
||||||
<view>其他信息</view>
|
<view class="Box_boxone">其他信息</view>
|
||||||
<view class="arrow">
|
<view class="arrow">
|
||||||
<text class="t">地址、开户行</text>
|
<text class="t">地址、开户行</text>
|
||||||
<u-icon name="arrow-down" class="arrow-icon" :class="{ active: showElse }"></u-icon>
|
<u-icon name="arrow-down" class="arrow-icon" :class="{ active: showElse }"></u-icon>
|
||||||
@@ -42,20 +44,24 @@
|
|||||||
</view>
|
</view>
|
||||||
<template v-if="showElse">
|
<template v-if="showElse">
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>公司地址</view>
|
<view class="Box_boxone">公司地址</view>
|
||||||
<view><input type="text" v-model="form.c_address" placeholder="请填写公司地址" /></view>
|
<view class="Box_boxtow"><input type="text" v-model="form.c_address" placeholder="请填写公司地址" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>联系电话</view>
|
<view class="Box_boxone">联系电话</view>
|
||||||
<view><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" /></view>
|
<view class="Box_boxtow"><input type="number" v-model="form.c_phone" placeholder="请填写公司联系电话" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>开户行名称</view>
|
<view class="Box_boxone">开户行名称</view>
|
||||||
<view><input type="text" v-model="form.c_bank_name" placeholder="请填写公司开户行名称" /></view>
|
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_name"
|
||||||
|
placeholder="请填写公司开户行名称" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>开户行账号</view>
|
<view class="Box_boxone">开户行账号</view>
|
||||||
<view><input type="text" v-model="form.c_bank_account" placeholder="请填写公司开户行账号" /></view>
|
<view class="Box_boxtow"><input type="number" v-model="form.c_bank_account"
|
||||||
|
placeholder="请填写公司开户行账号" /></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -64,7 +70,7 @@
|
|||||||
<view><input type="text" v-model="form.notes" placeholder="请输入内容" /></view>
|
<view><input type="text" v-model="form.notes" placeholder="请输入内容" /></view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>备注:</view>
|
<view class="Box_boxone">备注:</view>
|
||||||
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="Box_boxbox" @click="upload">
|
<!-- <view class="Box_boxbox" @click="upload">
|
||||||
@@ -77,431 +83,482 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="preservation flex-colum">
|
<view class="preservation flex-colum">
|
||||||
<view v-if="form.status_note" style="width: 100%; color: #ff2b2b; padding: 28rpx 0; word-wrap: break-word">({{ form.status_note || '无' }})</view>
|
<view v-if="form.status_note"
|
||||||
|
style="width: 100%; color: #ff2b2b; padding: 28rpx 0; word-wrap: break-word">
|
||||||
|
({{ form.status_note || '无' }})</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="content_weixin flex-center" @click="doReady" v-if="showtitle">
|
||||||
|
<u-icon name="weixin-fill" color="#04be02" size="28"></u-icon>
|
||||||
|
微信抬头一键导入
|
||||||
|
</view>
|
||||||
<view class="content_bottom" @click="saveMerchantBaseInfo">确定</view>
|
<view class="content_bottom" @click="saveMerchantBaseInfo">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import jWeixin from 'jweixin-module's
|
// import jWeixin from 'jweixin-module'
|
||||||
import wx from 'weixin-js-sdk';
|
import wx from 'weixin-js-sdk';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showtext: 0,
|
showtext: 0,
|
||||||
subCategoryList: [],
|
subCategoryList: [],
|
||||||
form: {
|
form: {
|
||||||
user_type: 2,
|
user_type: 2,
|
||||||
img: '',
|
img: '',
|
||||||
user_name: '',
|
user_name: '',
|
||||||
user_duty: '',
|
user_duty: '',
|
||||||
email: '',
|
email: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
status_note: '',
|
status_note: '',
|
||||||
c_address: '',
|
c_address: '',
|
||||||
c_phone: '',
|
c_phone: '',
|
||||||
c_bank_name: '',
|
c_bank_name: '',
|
||||||
c_bank_account: ''
|
c_bank_account: ''
|
||||||
|
},
|
||||||
|
showElse: false,
|
||||||
|
showtitle: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async onLoad(e) {
|
||||||
|
this.getInvoiceList()
|
||||||
|
this.form.id = e.id;
|
||||||
|
this.form.open_id = e.open_id;
|
||||||
|
if (e.view_type == 'fail') {
|
||||||
|
this.form.view_type = e.view_type;
|
||||||
|
let res = await this.api.szzpyfailccho({
|
||||||
|
id: this.form.id,
|
||||||
|
view_type: this.form.view_type
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.form = res.data.data;
|
||||||
|
this.form.status_note = res.data.status_note;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
stopPropagation() {
|
||||||
|
this.subCategoryList = [];
|
||||||
},
|
},
|
||||||
showElse: false
|
removeUrlParameters(url) {
|
||||||
};
|
return url.split('?')[0];
|
||||||
},
|
},
|
||||||
async onLoad(e) {
|
//点击按钮获取微信参数配置
|
||||||
this.form.id = e.id;
|
async getInvoiceList() {
|
||||||
this.form.open_id = e.open_id;
|
let _this = this
|
||||||
if (e.view_type == 'fail') {
|
// 获取当前页面的 URL
|
||||||
this.form.view_type = e.view_type;
|
var currentUrl = this.removeUrlParameters(location.href.split('#')[0])
|
||||||
let res = await this.api.szzpyfailccho({
|
let res = await this.api.usergetwechatjssdk({
|
||||||
id: this.form.id,
|
url: location.href.split('#')[0]
|
||||||
view_type: this.form.view_type
|
})
|
||||||
});
|
wx.config(res.data);
|
||||||
try {
|
wx.ready(function() {
|
||||||
if (res.code == 1) {
|
// config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
|
||||||
this.form = res.data.data;
|
wx.checkJsApi({
|
||||||
this.form.status_note = res.data.status_note;
|
jsApiList: [
|
||||||
}
|
// 所有要调用的 API 都要加到这个列表中
|
||||||
} catch (e) {
|
'chooseInvoiceTitle'
|
||||||
//TODO handle the exception
|
], // 需要检测的JS接口列表,所有JS接口列表见附录2,
|
||||||
}
|
success: function(res) {
|
||||||
}
|
_this.showtitle = true
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
wxInit() {
|
|
||||||
wx.config({
|
|
||||||
debug: false, // true:调试时候弹窗
|
|
||||||
appId: res.appId, // 微信appid
|
|
||||||
timestamp: res.timestamp, // 时间戳
|
|
||||||
nonceStr: res.nonceStr, // 随机字符串
|
|
||||||
signature: res.signature, // 签名
|
|
||||||
jsApiList: [
|
|
||||||
// 所有要调用的 API 都要加到这个列表中
|
|
||||||
'onMenuShareTimeline', // 分享到朋友圈接口
|
|
||||||
'onMenuShareAppMessage', // 分享到朋友接口
|
|
||||||
'onMenuShareQQ', // 分享到QQ接口
|
|
||||||
'onMenuShareWeibo' // 分享到微博接口
|
|
||||||
]
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onInput(e) {
|
|
||||||
if (this.form.user_type == 2) {
|
|
||||||
if ([...e.detail.value].length >= 6) {
|
|
||||||
console.log(100000);
|
|
||||||
this.handleClick();
|
|
||||||
} else {
|
|
||||||
this.subCategoryList = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleClick: _.debounce(function () {
|
|
||||||
console.log(100000);
|
|
||||||
this.getOrder();
|
|
||||||
// 函数执行内容
|
|
||||||
}, 500),
|
|
||||||
categorySubClick(category) {
|
|
||||||
console.log(category, 86);
|
|
||||||
this.form.user_name = category.companyName;
|
|
||||||
this.form.user_duty = category.creditCode;
|
|
||||||
this.subCategoryList = [];
|
|
||||||
},
|
|
||||||
upload() {
|
|
||||||
uni.chooseImage({
|
|
||||||
success: (chooseImageRes) => {
|
|
||||||
uni.pro.showLoading({
|
|
||||||
title: '上传中',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
||||||
uni.uploadFile({
|
|
||||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
|
||||||
filePath: tempFilePaths[0],
|
|
||||||
name: 'file',
|
|
||||||
formData: {
|
|
||||||
open_id: this.form.open_id
|
|
||||||
},
|
|
||||||
success: (uploadFileRes) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '上传成功',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
let data = JSON.parse(uploadFileRes.data);
|
|
||||||
this.form.img = data.data[0];
|
|
||||||
console.log(this.form);
|
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
console.log(111);
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async saveMerchantBaseInfo() {
|
|
||||||
if (this.form.user_name == null || this.form.user_name == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入名称',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
});
|
||||||
return false;
|
wx.error(function(res) {
|
||||||
}
|
_this.showtitle = false
|
||||||
if (this.form.user_type == 2) {
|
console.log(res, '失败!')
|
||||||
if (this.form.user_duty == null || this.form.user_duty == '') {
|
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
doReady() {
|
||||||
|
let _this = this
|
||||||
|
wx.invoke('chooseInvoiceTitle', {
|
||||||
|
"scene": "1"
|
||||||
|
}, function(res) {
|
||||||
|
// 这里处理调用结果X``
|
||||||
|
var info = JSON.parse(JSON.stringify(res)).choose_invoice_title_info;
|
||||||
|
var infoJ = JSON.parse(JSON.parse(JSON.stringify(info)));
|
||||||
|
_this.form.user_name = infoJ.title ? infoJ.title : '' //发票抬头
|
||||||
|
_this.form.user_duty = infoJ.taxNumber ? infoJ.taxNumber : '' //税号
|
||||||
|
_this.form.c_address = infoJ.companyAddress ? infoJ.companyAddress : '' //公司地址
|
||||||
|
_this.form.c_phone = infoJ.telephone ? infoJ.telephone : '' //电话
|
||||||
|
_this.form.c_bank_account = infoJ.bankAccount ? infoJ.bankAccount : '' //开户银行
|
||||||
|
_this.form.c_bank_name = infoJ.bankName ? infoJ.bankName : '' // 银行账号
|
||||||
|
_this.form.user_type = infoJ.type == 0 ? 2 : 1 //发票抬头类型 微信返回0是企业 1是个人
|
||||||
|
if (infoJ.type == 0) {
|
||||||
|
_this.showElse = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onInput(e) {
|
||||||
|
if (this.form.user_type == 2) {
|
||||||
|
if ([...e.detail.value].length >= 6) {
|
||||||
|
console.log(100000);
|
||||||
|
this.handleClick();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClick: _.debounce(function() {
|
||||||
|
console.log(100000);
|
||||||
|
this.getOrder();
|
||||||
|
// 函数执行内容
|
||||||
|
}, 500),
|
||||||
|
async categorySubClick(category) {
|
||||||
|
console.log(category)
|
||||||
|
if (category.companyName == '以上都不是') {
|
||||||
|
let res = await this.api.storepaidkeywordsearch({
|
||||||
|
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'),
|
||||||
|
like: this.form.user_name,
|
||||||
|
open_id: this.form.open_id
|
||||||
|
})
|
||||||
|
this.subCategoryList = res.data
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$set(this.form, 'user_name', category.companyName);
|
||||||
|
this.$set(this.form, 'user_duty', category.creditCode);
|
||||||
|
// this.form.user_name = category.companyName;
|
||||||
|
// this.form.user_duty = category.creditCode;
|
||||||
|
this.subCategoryList = [];
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
upload() {
|
||||||
|
uni.chooseImage({
|
||||||
|
success: (chooseImageRes) => {
|
||||||
|
uni.pro.showLoading({
|
||||||
|
title: '上传中',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||||
|
uni.uploadFile({
|
||||||
|
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||||
|
filePath: tempFilePaths[0],
|
||||||
|
name: 'file',
|
||||||
|
formData: {
|
||||||
|
open_id: this.form.open_id
|
||||||
|
},
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
uni.pro.hideLoading();
|
||||||
|
let data = JSON.parse(uploadFileRes.data);
|
||||||
|
this.form.img = data.data[0];
|
||||||
|
console.log(this.form);
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.pro.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
console.log(111);
|
||||||
|
uni.pro.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async saveMerchantBaseInfo() {
|
||||||
|
if (this.form.user_name == null || this.form.user_name == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入税号',
|
title: '请输入名称',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
if (this.form.user_type == 2) {
|
||||||
if (this.form.email == null || this.form.email == '') {
|
if (this.form.user_duty == null || this.form.user_duty == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入邮箱',
|
title: '请输入税号',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.form.mobile == null || this.form.mobile == '') {
|
}
|
||||||
uni.showToast({
|
if (this.form.email == null || this.form.email == '') {
|
||||||
title: '请输入手机号',
|
uni.showToast({
|
||||||
icon: 'none'
|
title: '请输入邮箱',
|
||||||
});
|
icon: 'none'
|
||||||
return false;
|
});
|
||||||
}
|
return false;
|
||||||
let res = await this.api.usersubopeninvoice({
|
}
|
||||||
id: this.form.id,
|
if (this.form.mobile == null || this.form.mobile == '') {
|
||||||
open_id: this.form.open_id,
|
uni.showToast({
|
||||||
...this.form
|
title: '请输入手机号',
|
||||||
});
|
icon: 'none'
|
||||||
if (res.code == 1) {
|
});
|
||||||
uni.showToast({
|
return false;
|
||||||
title: res.msg,
|
}
|
||||||
icon: 'none'
|
let res = await this.api.usersubopeninvoice({
|
||||||
});
|
id: this.form.id,
|
||||||
console.log('t_type===', res.data.t_type);
|
open_id: this.form.open_id,
|
||||||
switch (res.data.t_type) {
|
...this.form
|
||||||
case '1':
|
});
|
||||||
console.log(1);
|
if (res.code == 1) {
|
||||||
// 内链
|
uni.showToast({
|
||||||
setTimeout(() => {
|
title: res.msg,
|
||||||
window.location.href = res.data.n_url;
|
icon: 'none'
|
||||||
}, 1000);
|
});
|
||||||
break;
|
console.log('t_type===', res.data.t_type);
|
||||||
case '2':
|
switch (res.data.t_type) {
|
||||||
console.log(2);
|
case '1':
|
||||||
// 外链
|
console.log(1);
|
||||||
setTimeout(() => {
|
// 内链
|
||||||
window.location.href = res.data.url;
|
setTimeout(() => {
|
||||||
}, 1000);
|
window.location.href = res.data.n_url;
|
||||||
break;
|
}, 1000);
|
||||||
// case '3':
|
break;
|
||||||
// console.log(3);
|
case '2':
|
||||||
// // 小程序
|
console.log(2);
|
||||||
// setTimeout(() => {
|
// 外链
|
||||||
// plus.share.getServices(function (plusRes) {
|
setTimeout(() => {
|
||||||
// var sweixin = null;
|
window.location.href = res.data.url;
|
||||||
// for (var i = 0; i < plusRes.length; i++) {
|
}, 1000);
|
||||||
// var t = plusRes[i];
|
break;
|
||||||
// if (t.id == 'weixin') {
|
// case '3':
|
||||||
// sweixin = t;
|
// console.log(3);
|
||||||
// }
|
// // 小程序
|
||||||
// }
|
// setTimeout(() => {
|
||||||
// if (sweixin) {
|
// plus.share.getServices(function (plusRes) {
|
||||||
// sweixin.launchMiniProgram({ ...res.data.mini });
|
// var sweixin = null;
|
||||||
// }
|
// for (var i = 0; i < plusRes.length; i++) {
|
||||||
// });
|
// var t = plusRes[i];
|
||||||
// }, 1000);
|
// if (t.id == 'weixin') {
|
||||||
// break;
|
// sweixin = t;
|
||||||
default:
|
// }
|
||||||
break;
|
// }
|
||||||
|
// if (sweixin) {
|
||||||
|
// sweixin.launchMiniProgram({ ...res.data.mini });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }, 1000);
|
||||||
|
// break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
||||||
}
|
}
|
||||||
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
|
||||||
}
|
|
||||||
// uni.request({
|
|
||||||
// url: 'https://invoice.sxczgkj.cn/api/' + 'user/subopeninvoice',
|
|
||||||
// data: {
|
|
||||||
// //参数
|
|
||||||
// id: this.form.id,
|
|
||||||
// open_id: this.form.open_id,
|
|
||||||
// user_name: this.form.user_name,
|
|
||||||
// user_type: this.form.user_type,
|
|
||||||
// user_duty: this.form.user_duty,
|
|
||||||
// email: this.form.email,
|
|
||||||
// img: this.form.img,
|
|
||||||
// mobile: this.form.mobile,
|
|
||||||
// notes: this.form.notes
|
|
||||||
// },
|
|
||||||
// method: 'POST', //请求方式,必须为大写
|
|
||||||
// success: res => {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: res.data.message || res.data.msg,
|
|
||||||
// icon: "none",
|
|
||||||
// })
|
|
||||||
// if (res.data.code == 1) {
|
|
||||||
// setTimeout(() => {
|
|
||||||
// if (res.data.data.url) {
|
|
||||||
// window.location.href = res.data.data.url
|
|
||||||
// }
|
|
||||||
// // let data = encodeURIComponent(res.data.data.url);
|
|
||||||
// // uni.navigateTo({
|
|
||||||
// // url: '/pages/index/web?src=' + data
|
|
||||||
// // })
|
|
||||||
// }, 1000);
|
|
||||||
// // window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
},
|
||||||
// });
|
clickakex(e) {
|
||||||
},
|
this.form.user_type = e;
|
||||||
clickakex(e) {
|
this.form.user_name = '';
|
||||||
this.form.user_type = e;
|
this.form.img = '';
|
||||||
this.form.user_name = '';
|
this.form.user_duty = '';
|
||||||
this.form.img = '';
|
this.form.email = '';
|
||||||
this.form.user_duty = '';
|
this.form.c_address = '';
|
||||||
this.form.email = '';
|
this.form.c_phone = '';
|
||||||
this.form.mobile = '';
|
this.form.c_bank_account = '';
|
||||||
},
|
this.form.c_bank_name = '';
|
||||||
async getOrder() {
|
},
|
||||||
//搜索值
|
async getOrder() { //搜索值
|
||||||
uni.request({
|
let res = await this.api.enterprisestore({
|
||||||
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
|
|
||||||
data: {
|
|
||||||
//参数
|
|
||||||
like: this.form.user_name,
|
like: this.form.user_name,
|
||||||
open_id: this.form.open_id
|
open_id: this.form.open_id,
|
||||||
},
|
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
|
||||||
method: 'POST', //请求方式,必须为大写
|
})
|
||||||
success: (res) => {
|
if (res.code == 1) {
|
||||||
console.log('接口返回------', res);
|
this.subCategoryList = res.data
|
||||||
setTimeout(() => {
|
// this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
|
||||||
if (this.page == 1) {
|
// this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
|
||||||
this.subCategoryList = res.data.data;
|
// if (this.page == 1) {
|
||||||
} else {
|
// this.subCategoryList = res.data;
|
||||||
this.subCategoryList.push(...res.data.data);
|
// } else {
|
||||||
}
|
// this.subCategoryList.push(...res.data);
|
||||||
}, 500);
|
// }
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
page {
|
page {
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
}
|
|
||||||
.arrow {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.t {
|
|
||||||
margin-right: 8upx;
|
|
||||||
color: #808080;
|
|
||||||
font-size: 32upx;
|
|
||||||
}
|
}
|
||||||
.arrow-icon {
|
|
||||||
transition: all 0.3s ease-in-out;
|
|
||||||
&.active {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
padding: 0 28rpx 28upx;
|
|
||||||
|
|
||||||
.content_top {
|
.arrow {
|
||||||
padding: 32rpx 110rpx;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
|
|
||||||
.content_topview {
|
.t {
|
||||||
background: #288efb;
|
margin-right: 8upx;
|
||||||
color: #fff;
|
color: #808080;
|
||||||
|
font-size: 32upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
.arrow-icon {
|
||||||
width: 142rpx;
|
transition: all 0.3s ease-in-out;
|
||||||
height: 56rpx;
|
|
||||||
background: #fff;
|
&.active {
|
||||||
color: #288efb;
|
transform: rotate(180deg);
|
||||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
}
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
line-height: 56rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_item {
|
.content {
|
||||||
width: 100%;
|
padding: 0 28rpx 28upx;
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
|
||||||
|
|
||||||
.Box_box {
|
.content_top {
|
||||||
|
padding: 32rpx 110rpx;
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
text-align: right;
|
|
||||||
padding: 24rpx;
|
|
||||||
border-bottom: 1px solid #e5e5e5;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
.position {
|
.content_topview {
|
||||||
position: absolute;
|
background: #288efb;
|
||||||
right: 0;
|
color: #fff;
|
||||||
top: 0;
|
}
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 142rpx;
|
||||||
|
height: 56rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
width: 100%;
|
color: #288efb;
|
||||||
max-height: 400rpx;
|
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||||
overflow: auto;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
z-index: 99;
|
font-weight: 400;
|
||||||
box-shadow: 1rpx 3rpx 6rpx #ccc;
|
font-size: 28rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.positionitem {
|
.content_item {
|
||||||
padding: 16rpx 10px;
|
width: 100%;
|
||||||
border-bottom: 1rpx solid #ccc;
|
background: #ffffff;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
|
||||||
|
.Box_box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
text-align: right;
|
||||||
|
padding: 24rpx;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
.Box_boxone {
|
||||||
|
width: 160rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Box_boxtow {
|
||||||
|
flex: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.position {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50rpx;
|
||||||
|
background: #fff;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 400rpx;
|
||||||
|
overflow: auto;
|
||||||
|
z-index: 99;
|
||||||
|
box-shadow: 1rpx 3rpx 6rpx #ccc;
|
||||||
|
|
||||||
|
.positionitem {
|
||||||
|
padding: 16rpx 10px;
|
||||||
|
border-bottom: 1rpx solid #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.preservation {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.preservation_box {
|
||||||
|
width: 100%;
|
||||||
|
height: 72rpx;
|
||||||
|
background: #288efb;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 72rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preservation_boxs {
|
||||||
|
width: 70%;
|
||||||
|
height: 72rpx;
|
||||||
|
background: #999999;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 72rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Box_boxbox {
|
||||||
|
width: 100%;
|
||||||
|
padding: 16rpx;
|
||||||
|
|
||||||
|
.Box_boxone {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Box_boxtowimge {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 254rpx;
|
||||||
|
height: 156rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1rpx dashed #707070;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.preservation {
|
.content_weixin {
|
||||||
|
margin-top: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
color: #04be02;
|
||||||
.preservation_box {
|
// font-weight: 400;
|
||||||
width: 100%;
|
|
||||||
height: 72rpx;
|
|
||||||
background: #288efb;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 72rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preservation_boxs {
|
|
||||||
width: 70%;
|
|
||||||
height: 72rpx;
|
|
||||||
background: #999999;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 72rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Box_boxbox {
|
.content_bottom {
|
||||||
width: 100%;
|
margin: 60rpx auto;
|
||||||
padding: 16rpx;
|
width: 80%;
|
||||||
|
height: 84rpx;
|
||||||
.Box_boxone {
|
background: #288efb;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||||
font-weight: 400;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-size: 28rpx;
|
font-weight: 400;
|
||||||
color: #333333;
|
font-size: 36rpx;
|
||||||
}
|
color: #ffffff;
|
||||||
|
line-height: 84rpx;
|
||||||
.Box_boxtow {
|
text-align: center;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 254rpx;
|
|
||||||
height: 156rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
border: 1rpx dashed #707070;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
.content_bottom {
|
|
||||||
margin: 100rpx auto;
|
|
||||||
width: 80%;
|
|
||||||
height: 84rpx;
|
|
||||||
background: #288efb;
|
|
||||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
line-height: 84rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>*手机号</view>
|
<view>*手机号</view>
|
||||||
<view><input type="text" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
<view><input type="number" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>*开票价格</view>
|
<view>*开票价格</view>
|
||||||
@@ -74,13 +74,14 @@
|
|||||||
return {
|
return {
|
||||||
showtext: 0,
|
showtext: 0,
|
||||||
subCategoryList: [],
|
subCategoryList: [],
|
||||||
|
open_id: '',
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
open_id: '',
|
|
||||||
user_type: 2,
|
user_type: 2,
|
||||||
img: '',
|
img: '',
|
||||||
user_name: "",
|
user_name: "",
|
||||||
user_duty: "",
|
user_duty: "",
|
||||||
|
open_id: '',
|
||||||
email: "",
|
email: "",
|
||||||
mobile: '',
|
mobile: '',
|
||||||
status_note: '', //原因备注
|
status_note: '', //原因备注
|
||||||
@@ -91,7 +92,9 @@
|
|||||||
},
|
},
|
||||||
async onLoad(e) {
|
async onLoad(e) {
|
||||||
if (e.id) {
|
if (e.id) {
|
||||||
|
console.log(e)
|
||||||
this.form.id = e.id
|
this.form.id = e.id
|
||||||
|
this.form.open_id = e.open_id
|
||||||
let res = await this.api.szzpyfailccho({
|
let res = await this.api.szzpyfailccho({
|
||||||
id: this.form.id,
|
id: this.form.id,
|
||||||
view_type: this.form.view_type
|
view_type: this.form.view_type
|
||||||
@@ -107,29 +110,11 @@
|
|||||||
this.form.body = e.body
|
this.form.body = e.body
|
||||||
this.form.open_id = e.open_id
|
this.form.open_id = e.open_id
|
||||||
}
|
}
|
||||||
// this.form.id = e.id
|
|
||||||
// this.form.open_id = e.open_id
|
|
||||||
// if (e.view_type == 'fail') {
|
|
||||||
// // http://localhost:8080/pages/hindex/indexs?id=7668&open_id=102132&view_type=fail
|
|
||||||
// this.form.view_type = e.view_type
|
|
||||||
// let res = await this.api.szzpyfailccho({
|
|
||||||
// id: this.form.id,
|
|
||||||
// view_type: this.form.view_type
|
|
||||||
// })
|
|
||||||
// try {
|
|
||||||
// if (res.code == 1) {
|
|
||||||
// this.form = res.data
|
|
||||||
// }
|
|
||||||
// } catch (e) {
|
|
||||||
// //TODO handle the exception
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInput(e) {
|
onInput(e) {
|
||||||
if (this.form.user_type == 2) {
|
if (this.form.user_type == 2) {
|
||||||
if ([...e.detail.value].length >= 6) {
|
if ([...e.detail.value].length >= 6) {
|
||||||
console.log(100000)
|
|
||||||
this.handleClick()
|
this.handleClick()
|
||||||
} else {
|
} else {
|
||||||
this.subCategoryList = []
|
this.subCategoryList = []
|
||||||
@@ -138,7 +123,6 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
handleClick: _.debounce(function() {
|
handleClick: _.debounce(function() {
|
||||||
console.log(100000)
|
|
||||||
this.getOrder()
|
this.getOrder()
|
||||||
// 函数执行内容
|
// 函数执行内容
|
||||||
|
|
||||||
@@ -244,26 +228,21 @@
|
|||||||
this.form.mobile = ''
|
this.form.mobile = ''
|
||||||
},
|
},
|
||||||
async getOrder() { //搜索值
|
async getOrder() { //搜索值
|
||||||
uni.request({
|
console.log(this.form.open_id)
|
||||||
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
|
let res = await this.api.enterprisestore({
|
||||||
data: {
|
like: this.form.user_name,
|
||||||
//参数
|
open_id: this.form.open_id,
|
||||||
like: this.form.user_name,
|
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
|
||||||
open_id: this.form.open_id
|
})
|
||||||
},
|
if (res.code == 1) {
|
||||||
method: 'POST', //请求方式,必须为大写
|
setTimeout(() => {
|
||||||
success: res => {
|
if (this.page == 1) {
|
||||||
console.log('接口返回------', res);
|
this.subCategoryList = res.data;
|
||||||
setTimeout(() => {
|
} else {
|
||||||
if (this.page == 1) {
|
this.subCategoryList.push(...res.data);
|
||||||
this.subCategoryList = res.data.data;
|
}
|
||||||
} else {
|
}, 500)
|
||||||
this.subCategoryList.push(...res.data.data);
|
}
|
||||||
}
|
|
||||||
}, 500)
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
||||||
data-key="mobile" /></view>
|
data-key="mobile" /></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="Box_box flex-between" @click="showpicker = true">
|
<view class="Box_box flex-between" @click="showpicker = true">
|
||||||
<view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view>
|
<view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view>
|
||||||
<view class="Box_box_bouttme_item_T">
|
<view class="Box_box_bouttme_item_T">
|
||||||
@@ -40,6 +41,25 @@
|
|||||||
<text type="text" v-model="form.dlzhid">{{ form.dlzhid || '请选择开票人' }}</text>
|
<text type="text" v-model="form.dlzhid">{{ form.dlzhid || '请选择开票人' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<template>
|
||||||
|
<view class="Box_box flex-between" @click="showElse = !showElse">
|
||||||
|
<view class="Box_boxone">其他信息</view>
|
||||||
|
<view class="arrow">
|
||||||
|
<text class="t">规格、单位</text>
|
||||||
|
<u-icon name="arrow-down" class="arrow-icon" :class="{ active: showElse }"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<template v-if="showElse">
|
||||||
|
<view class="Box_box flex-between">
|
||||||
|
<view>规格型号</view>
|
||||||
|
<view><input v-model="form.ggxh" placeholder="请填写规格型号" data-key="mobile" /></view>
|
||||||
|
</view>
|
||||||
|
<view class="Box_box flex-between">
|
||||||
|
<view>单位</view>
|
||||||
|
<view><input v-model="form.dw" placeholder="请填写单位" data-key="mobile" /></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>备注:</view>
|
<view>备注:</view>
|
||||||
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
||||||
@@ -78,20 +98,23 @@
|
|||||||
Uploadurlnumber: '',
|
Uploadurlnumber: '',
|
||||||
namelang: '',
|
namelang: '',
|
||||||
merchantAuditStatus: '',
|
merchantAuditStatus: '',
|
||||||
|
showElse: false,
|
||||||
form: {
|
form: {
|
||||||
store_id: uni.getStorageSync('userId'),
|
store_id: uni.getStorageSync('userId'),
|
||||||
article: uni.cache.get('keyword').name,
|
article: uni.cache.get('keyword').name,
|
||||||
type: '',
|
type: '',
|
||||||
price: '',
|
price: '',
|
||||||
se_amount: '',
|
se_amount: '',
|
||||||
number: '',
|
number: 1,
|
||||||
tax_amount: '',
|
tax_amount: '',
|
||||||
d_price: '',
|
d_price: '',
|
||||||
notes: '',
|
notes: '',
|
||||||
mcc: uni.cache.get('keyword').code,
|
mcc: uni.cache.get('keyword').code,
|
||||||
dlzh: '',
|
dlzh: '',
|
||||||
dlzhid: "",
|
dlzhid: "",
|
||||||
is_new: 1
|
is_new: 1,
|
||||||
|
ggxh: '',
|
||||||
|
dw: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -161,7 +184,8 @@
|
|||||||
this.subCategoryList = []
|
this.subCategoryList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showpickerconfirm(e) {
|
async showpickerconfirm(e) {
|
||||||
|
console.log(e, 1)
|
||||||
if (this.form.price == null || this.form.price == '') {
|
if (this.form.price == null || this.form.price == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入开票金额',
|
title: '请输入开票金额',
|
||||||
@@ -183,25 +207,31 @@
|
|||||||
} else {
|
} else {
|
||||||
this.form.se_amount = 3
|
this.form.se_amount = 3
|
||||||
}
|
}
|
||||||
|
switch (e.value[1]) {
|
||||||
|
case '1%':
|
||||||
|
this.form.se_amount = 1
|
||||||
|
break;
|
||||||
|
case '3%':
|
||||||
|
this.form.se_amount = 3
|
||||||
|
break;
|
||||||
|
case '6%':
|
||||||
|
this.form.se_amount = 6
|
||||||
|
break;
|
||||||
|
}
|
||||||
this.form.type = e.value.toString();
|
this.form.type = e.value.toString();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//TODO handle the exception
|
//TODO handle the exception
|
||||||
}
|
}
|
||||||
uni.request({
|
let res = await this.api.storese({
|
||||||
url: uni.conf.baseUrl + 'store/se',
|
amount: this.form.price,
|
||||||
data: {
|
se_amount: this.form.se_amount
|
||||||
//参数
|
})
|
||||||
amount: this.form.price,
|
if (res) {
|
||||||
se_amount: this.form.se_amount
|
this.form.tax_amount = res.data.tx
|
||||||
},
|
this.form.d_price = res.data.d_amount
|
||||||
method: 'POST', //请求方式,必须为大写
|
this.showpicker = false;
|
||||||
success: res => {
|
}
|
||||||
this.form.tax_amount = res.data.data.tx
|
|
||||||
this.form.d_price = res.data.data.d_amount
|
|
||||||
this.showpicker = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
Issuedbyconfirm(e) {
|
Issuedbyconfirm(e) {
|
||||||
this.Issuedbyshowpicker = false
|
this.Issuedbyshowpicker = false
|
||||||
@@ -266,36 +296,34 @@
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uni.request({
|
if([...this.form.dw].length > 22){
|
||||||
url: uni.conf.baseUrl + 'store/subinvoicing',
|
uni.showToast({
|
||||||
data: this.form,
|
title: '单位不能多余22个字体!',
|
||||||
method: 'POST', //请求方式,必须为大写
|
icon: 'none'
|
||||||
success: res => {
|
});
|
||||||
console.log(res)
|
return false;
|
||||||
this.form = {
|
}
|
||||||
store_id: uni.getStorageSync('userId'),
|
let res = await this.api.storesubinvoicing(this.form)
|
||||||
article: uni.cache.get('keyword').name,
|
if (res) {
|
||||||
type: '',
|
this.form = {
|
||||||
price: '',
|
store_id: uni.getStorageSync('userId'),
|
||||||
se_amount: '',
|
article: uni.cache.get('keyword').name,
|
||||||
number: '',
|
type: '',
|
||||||
tax_amount: '',
|
price: '',
|
||||||
d_price: '',
|
se_amount: '',
|
||||||
notes: '',
|
number: '',
|
||||||
mcc: uni.cache.get('keyword').code,
|
tax_amount: '',
|
||||||
dlzh: ''
|
d_price: '',
|
||||||
}
|
notes: '',
|
||||||
uni.showToast({
|
mcc: uni.cache.get('keyword').code,
|
||||||
title: res.data.message || res.data.msg,
|
dlzh: '',
|
||||||
icon: "none",
|
is_new: 1,
|
||||||
})
|
ggxh: '',
|
||||||
setTimeout(datalange => {
|
dw: ''
|
||||||
uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
|
|
||||||
}, 2000)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
|
||||||
|
}
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -305,7 +333,24 @@
|
|||||||
page {
|
page {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
.arrow {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.t {
|
||||||
|
margin-right: 8upx;
|
||||||
|
color: #808080;
|
||||||
|
font-size: 32upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-icon {
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.Box {
|
.Box {
|
||||||
.Box_box_O {
|
.Box_box_O {
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
|
|||||||
@@ -71,8 +71,28 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad(e) {},
|
async onLoad(e) {
|
||||||
|
try {
|
||||||
|
if (e.userId) {
|
||||||
|
uni.cache.set('userId', e.userId);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
}
|
||||||
|
let token = await this.api.h5encryption({
|
||||||
|
store_id: uni.cache.get('userId')
|
||||||
|
})
|
||||||
|
if (token.code == 1) {
|
||||||
|
uni.cache.set('token', token.data.token);
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.list = []
|
||||||
|
this.is_end = false
|
||||||
|
this.form.status = 'loadmore'
|
||||||
|
this.form.page = 0
|
||||||
this.storeinvoicingrecordsthatneed()
|
this.storeinvoicingrecordsthatneed()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<view class="popupshowone">请选择项目名称</view>
|
<view class="popupshowone">请选择项目名称</view>
|
||||||
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
|
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
|
||||||
<view class="popupshowone_itemone" @click="popupshowone_itemone">
|
<view class="popupshowone_itemone" @click="popupshowone_itemone">
|
||||||
{{keyword}}
|
{{keyword.name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
|
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
|
||||||
@@ -60,22 +60,15 @@
|
|||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap() {
|
||||||
uni.pro.navigateTo('index/order');
|
uni.pro.navigateTo('index/order');
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
async onLoad(e) {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
let webView = this.$mp.page.$getAppWebview();
|
let webView = this.$mp.page.$getAppWebview();
|
||||||
webView.setTitleNViewButtonStyle(0, {
|
webView.setTitleNViewButtonStyle(0, {
|
||||||
width: '70px'
|
width: '70px'
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
uni.request({
|
let res = await this.api.storedigitalinvoice()
|
||||||
url: uni.conf.baseUrl + 'store/digitalinvoice',
|
this.columns = res.data
|
||||||
|
|
||||||
method: 'POST', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
console.log(res.data.data)
|
|
||||||
this.columns = res.data.data
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -95,7 +88,7 @@
|
|||||||
},
|
},
|
||||||
popupshowone_itemone() {
|
popupshowone_itemone() {
|
||||||
this.showpopup = false
|
this.showpopup = false
|
||||||
this.form.article = this.keyword
|
this.form.article = this.keyword.name
|
||||||
},
|
},
|
||||||
handleInputChange() {
|
handleInputChange() {
|
||||||
if (this.form.type == null || this.form.type == '') {
|
if (this.form.type == null || this.form.type == '') {
|
||||||
@@ -149,30 +142,6 @@
|
|||||||
tope:0
|
tope:0
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
// uni.request({
|
|
||||||
// url: uni.conf.baseUrl + 'store/subinvoicing',
|
|
||||||
// data: this.form,
|
|
||||||
// method: 'POST', //请求方式,必须为大写
|
|
||||||
// success: res => {
|
|
||||||
// console.log(res)
|
|
||||||
// this.form = {
|
|
||||||
// store_id: uni.getStorageSync('userId'),
|
|
||||||
// article: '',
|
|
||||||
// type: '',
|
|
||||||
// notes: '',
|
|
||||||
// se_amount: ''
|
|
||||||
// }
|
|
||||||
// uni.showToast({
|
|
||||||
// title: res.data.message || res.data.msg,
|
|
||||||
// icon: "none",
|
|
||||||
// })
|
|
||||||
// setTimeout(datalange => {
|
|
||||||
// uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
|
|
||||||
// }, 2000)
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -94,32 +94,26 @@
|
|||||||
this.getOrder()
|
this.getOrder()
|
||||||
},
|
},
|
||||||
async getOrder() {
|
async getOrder() {
|
||||||
uni.request({
|
let res = await this.api.storeindustrylist({
|
||||||
url: uni.conf.baseUrl + 'store/industrylist',
|
name: this.keyword,
|
||||||
data: {
|
page: this.page
|
||||||
//参数
|
})
|
||||||
name: this.keyword,
|
if (res) {
|
||||||
page: this.page
|
setTimeout(() => {
|
||||||
},
|
if (this.page == 1) {
|
||||||
method: 'POST', //请求方式,必须为大写
|
this.subCategoryList = res.msg;
|
||||||
success: res => {
|
this.loadStatus = 'loadmore'
|
||||||
setTimeout(() => {
|
} else {
|
||||||
if (this.page == 1) {
|
this.subCategoryList.push(...res.msg);
|
||||||
this.subCategoryList = res.data.msg;
|
}
|
||||||
this.loadStatus = 'loadmore'
|
if (res.msg.length == 20) {
|
||||||
} else {
|
this.loadStatus = 'loadmore';
|
||||||
this.subCategoryList.push(...res.data.msg);
|
} else {
|
||||||
}
|
this.loadStatus = 'nomore';
|
||||||
if (res.data.msg.length == 20) {
|
}
|
||||||
this.loadStatus = 'loadmore';
|
console.log('接口返回------', res);
|
||||||
} else {
|
}, 500)
|
||||||
this.loadStatus = 'nomore';
|
}
|
||||||
}
|
|
||||||
console.log('接口返回------', res);
|
|
||||||
}, 500)
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between">
|
<view class="Box_box flex-between">
|
||||||
<view>开票员电话</view>
|
<view>开票员电话</view>
|
||||||
<view class="Box_box_input"><input type="text" v-model="form.taxphone" placeholder="请填写开票员电话"
|
<view class="Box_box_input"><input type="number" v-model="form.taxphone" placeholder="请填写开票员电话"
|
||||||
data-key="mobile" /></view>
|
data-key="mobile" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between" @click="showpicker = true">
|
<view class="Box_box flex-between" @click="showpicker = true">
|
||||||
|
|||||||
151
pages/index/drawerlist.vue
Normal file
151
pages/index/drawerlist.vue
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="contentitem" v-for="(item,index) in list" :key="index">
|
||||||
|
<view class="contentitemtop flex-start">
|
||||||
|
<view>{{item.name}}</view>
|
||||||
|
<text>开票员</text>
|
||||||
|
</view>
|
||||||
|
<view class="contentitembotton">
|
||||||
|
{{item.dlzh}}
|
||||||
|
</view>
|
||||||
|
<view class="contentitemabsolute flex-start" @click="szzpydeltaxation(item)">
|
||||||
|
<image src="@/static/drawerlistdelete.png" mode="aspectFill"></image>
|
||||||
|
<text>删除</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="contentitemadd flex-start" @click="clickadd">
|
||||||
|
<u-icon name="plus-circle-fill" color="#2979ff" size="16"></u-icon>
|
||||||
|
<text>添加开票员</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {},
|
||||||
|
onShow() {
|
||||||
|
this.szzpynewissuedbylist()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async szzpynewissuedbylist() {
|
||||||
|
let res = await this.api.szzpynewissuedbylist({
|
||||||
|
store_id: uni.cache.get('userId')
|
||||||
|
})
|
||||||
|
this.list = res.data
|
||||||
|
},
|
||||||
|
async szzpydeltaxation(item) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确认删除吗?',
|
||||||
|
success: async (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let time = dayjs().unix()
|
||||||
|
await this.api.szzpydeltaxation({
|
||||||
|
id: item.id,
|
||||||
|
del_sign: uni.utils.md5(time + '|||' +
|
||||||
|
'cab37132-fae4-4031-8549-e49aa89f7631'),
|
||||||
|
time_str: time,
|
||||||
|
store_id: uni.cache.get('userId')
|
||||||
|
})
|
||||||
|
this.szzpynewissuedbylist()
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
clickadd() {
|
||||||
|
uni.pro.navigateTo('index/drawer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background: #F9F9F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
|
|
||||||
|
.contentitem:nth-child(1) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentitem {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
padding: 32rpx 24rpx;
|
||||||
|
background: url(@/static/drawerlist.png) no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
|
||||||
|
.contentitemabsolute {
|
||||||
|
position: absolute;
|
||||||
|
right: 24rpx;
|
||||||
|
top: 32rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-left: 8rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentitemtop {
|
||||||
|
view {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-left: 16rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.71);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentitembotton {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentitemadd {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
padding: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 18rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="content flex-colum" @click="drawer" v-if="improveinformation">
|
<view class="content flex-colum" @click="drawer" v-if="improveinformation">
|
||||||
<image src="@/static/item5.png" mode="aspectFill"></image>
|
<image src="@/static/item5.png" mode="aspectFill"></image>
|
||||||
<text>新增开票员</text>
|
<text>开票员列表</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="content flex-colum" @click="billingcode" v-if="improveinformation">
|
<view class="content flex-colum" @click="billingcode" v-if="improveinformation">
|
||||||
<image src="@/static/item7.png" mode="aspectFill"></image>
|
<image src="@/static/item7.png" mode="aspectFill"></image>
|
||||||
@@ -29,41 +29,63 @@
|
|||||||
<image src="@/static/item8.png" mode="aspectFill"></image>
|
<image src="@/static/item8.png" mode="aspectFill"></image>
|
||||||
<text>审核开票</text>
|
<text>审核开票</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation">
|
<!-- <view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation">
|
||||||
<image src="@/static/item8.png" mode="aspectFill"></image>
|
<image src="@/static/item8.png" mode="aspectFill"></image>
|
||||||
<text>跳转小程序</text>
|
<text>跳转小程序</text>
|
||||||
</view>
|
</view>
|
||||||
|
<wx-open-launch-weapp class="content flex-colum" id="launch-btn" @launch="handleLaunch" @error="handleError"
|
||||||
|
username="gh_fa9286427a5b" path="pages/index/index.html">
|
||||||
|
<script type="text/wxtag-template">
|
||||||
|
<style>
|
||||||
|
.btn { padding: 12px;opacity:0 }
|
||||||
|
</style>
|
||||||
|
<button class="btn">打开小程序</button>
|
||||||
|
</script>
|
||||||
|
</wx-open-launch-weapp> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
|
<!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
|
||||||
网页版地址:https://h5-invoice.sxczgkj.cn
|
网页版地址:https://h5-invoice.sxczgkj.cn
|
||||||
</view>
|
</view> -->
|
||||||
|
<!-- <pdf style="width: 400px; height: 400px;"
|
||||||
|
src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182">
|
||||||
|
</pdf> -->
|
||||||
|
<!-- <iframe width="100%" height="100%" src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182" frameborder="0"></iframe> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import wx from 'weixin-js-sdk';
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
improveinformation: false,
|
improveinformation: false,
|
||||||
improveinformationlist: {},
|
improveinformationlist: {},
|
||||||
onLoaduserId: '',
|
onLoaduserId: '',
|
||||||
onLoadtype: '',
|
|
||||||
infos: uni.getSystemInfoSync()
|
infos: uni.getSystemInfoSync()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad(e) {
|
async onLoad(e) {
|
||||||
|
// await this.$onLaunched;
|
||||||
|
|
||||||
|
// alert(location.href.split('#')[0])
|
||||||
if (e.userId) {
|
if (e.userId) {
|
||||||
// this.onLoaduserId = e.userId
|
// this.onLoaduserId = e.userId
|
||||||
// this.onLoadtype = e.type//295
|
uni.cache.set('Type', e.type);
|
||||||
uni.cache.set('userId', e.userId);
|
uni.cache.set('userId', e.userId);
|
||||||
}
|
}
|
||||||
|
let token = await this.api.h5encryption({
|
||||||
|
store_id: uni.cache.get('userId')
|
||||||
|
})
|
||||||
|
if (token.code == 1) {
|
||||||
|
uni.cache.set('token', token.data.token);
|
||||||
|
}
|
||||||
|
console.log(token)
|
||||||
let res = await this.api.storestorestatus({
|
let res = await this.api.storestorestatus({
|
||||||
store_id: uni.cache.get('userId')
|
store_id: uni.cache.get('userId')
|
||||||
})
|
})
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
this.improveinformationform = res.data.store
|
this.improveinformationform = res.data.store
|
||||||
uni.cache.set('form', this.improveinformationform);
|
uni.cache.set('form', this.improveinformationform);
|
||||||
// uni.cache.set('userId', this.improveinformationform.id);
|
|
||||||
if (res.data.sz_status == 0) {
|
if (res.data.sz_status == 0) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/information'
|
url: '/pages/index/information'
|
||||||
@@ -72,47 +94,67 @@
|
|||||||
this.improveinformation = true
|
this.improveinformation = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.request({
|
},
|
||||||
url: uni.conf.baseUrl + 'store/storestatus',
|
// 监听跳转
|
||||||
data: {
|
handleLaunch() {
|
||||||
//参数
|
console.log('跳转');
|
||||||
store_id: uni.cache.get('userId')
|
},
|
||||||
// type: this.onLoadtype
|
// 监听错误
|
||||||
},
|
handleError() {
|
||||||
method: 'POST', //请求方式,必须为大写
|
console.log('失败');
|
||||||
success: res => {
|
|
||||||
this.improveinformationform = res.data.data.store
|
|
||||||
uni.cache.set('form', this.improveinformationform);
|
|
||||||
// uni.cache.set('userId', this.improveinformationform.id);
|
|
||||||
if (res.data.data.sz_status == 0) {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/information'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.improveinformation = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
jumpToMiniProgram() {
|
async jumpToMiniProgram() {
|
||||||
plus.share.getServices(function (res) {
|
let res = await this.api.userttwechat({
|
||||||
var sweixin = null;
|
url: location.href.split('#')[0]
|
||||||
for (var i = 0; i < res.length; i++) {
|
})
|
||||||
var t = res[i];
|
console.log(res)
|
||||||
if (t.id == 'weixin') {
|
// plus.share.getServices(function (res) {
|
||||||
sweixin = t;
|
// var sweixin = null;
|
||||||
}
|
// for (var i = 0; i < res.length; i++) {
|
||||||
}
|
// var t = res[i];
|
||||||
if (sweixin) {
|
// if (t.id == 'weixin') {
|
||||||
sweixin.launchMiniProgram({
|
// sweixin = t;
|
||||||
id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
// }
|
||||||
type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
// }
|
||||||
path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
// if (sweixin) {
|
||||||
|
// sweixin.launchMiniProgram({
|
||||||
|
// id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
||||||
|
// type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
||||||
|
// path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// wx.config({
|
||||||
|
// "debug": true,
|
||||||
|
// "beta": false,
|
||||||
|
// "jsApiList": ['wx-open-launch-weapp'],
|
||||||
|
// openTagList: ['wx-open-launch-weapp'], // 跳转小程序时必填
|
||||||
|
// "appId": res.data.wechat_mini.appId,
|
||||||
|
// "nonceStr": res.data.wechat_mini.nonceStr,
|
||||||
|
// "timestamp": res.data.wechat_mini.timestamp,
|
||||||
|
// "url": res.data.wechat_mini.url,
|
||||||
|
// "signature": res.data.wechat_mini.signature,
|
||||||
|
// });
|
||||||
|
wx.config(res.data.wechat_mini);
|
||||||
|
// res.data.wechat_mini
|
||||||
|
// 在wx.ready内调用
|
||||||
|
wx.ready(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
let btn = document.getElementById('launch-btn');
|
||||||
|
btn.addEventListener('launch', e => {
|
||||||
|
console.log('success');
|
||||||
});
|
});
|
||||||
}
|
btn.addEventListener('error', e => {
|
||||||
|
alert('小程序打开失败');
|
||||||
|
console.log('fail', e.detail);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
wx.error(function(res) {
|
||||||
|
console.log('err', res)
|
||||||
});
|
});
|
||||||
// // #ifdef H5
|
// // #ifdef H5
|
||||||
// // 在H5环境中,调用此函数来跳转到小程序
|
// // 在H5环境中,调用此函数来跳转到小程序
|
||||||
@@ -145,7 +187,7 @@
|
|||||||
uni.pro.navigateTo('index/billingcode');
|
uni.pro.navigateTo('index/billingcode');
|
||||||
},
|
},
|
||||||
drawer() {
|
drawer() {
|
||||||
uni.pro.navigateTo('index/drawer');
|
uni.pro.navigateTo('index/drawerlist');
|
||||||
},
|
},
|
||||||
merchant() {
|
merchant() {
|
||||||
uni.pro.navigateTo('index/merchant');
|
uni.pro.navigateTo('index/merchant');
|
||||||
@@ -159,32 +201,16 @@
|
|||||||
indexInvoicing() {
|
indexInvoicing() {
|
||||||
uni.pro.navigateTo('index/Invoicing');
|
uni.pro.navigateTo('index/Invoicing');
|
||||||
},
|
},
|
||||||
webview() {
|
async webview() {
|
||||||
uni.pro.showLoading({
|
let res = await this.api.szzpyhurl({
|
||||||
title: '加载中',
|
store_id: uni.getStorageSync('userId')
|
||||||
mask: true
|
|
||||||
})
|
})
|
||||||
try {
|
if (res) {
|
||||||
uni.request({
|
uni.pro.navigateTo('webview/webview', {
|
||||||
url: uni.conf.baseUrl + 'szzpy/h5url',
|
url: res.data.url,
|
||||||
data: {
|
tape: 1
|
||||||
//参数
|
|
||||||
store_id: uni.getStorageSync('userId')
|
|
||||||
},
|
|
||||||
method: 'POST', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
console.log(res.data.data.url)
|
|
||||||
uni.pro.navigateTo('webview/webview', {
|
|
||||||
url: res.data.data.url,
|
|
||||||
tape: 1
|
|
||||||
});
|
|
||||||
uni.pro.hideLoading()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
|
||||||
uni.pro.hideLoading()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
indexorder() {
|
indexorder() {
|
||||||
uni.pro.navigateTo('index/order');
|
uni.pro.navigateTo('index/order');
|
||||||
|
|||||||
@@ -1,579 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="Box">
|
|
||||||
<view class="Box_box_O">
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>请填写公司名字</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled="disabled" v-model="form.title"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>请填写法人姓名</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.legal_person_name"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>请填写法人手机号</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.phone"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>电子税局账号</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.dlzh"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>电子税局密码</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.dlmm"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between" @click="showpicker = true">
|
|
||||||
<view>省份</view>
|
|
||||||
<view class="flex-start">
|
|
||||||
{{form.provinceno_name || ''}}<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>邀请码</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.code"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>办税人姓名</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxname"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>办税人手机号码</view>
|
|
||||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxphone"
|
|
||||||
placeholder="请填写" data-key="mobile" /></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box flex-between">
|
|
||||||
<view>验证码</view>
|
|
||||||
<view class="Box_box_input" style="display: flex; justify-content: flex-start;align-items: center;">
|
|
||||||
<input class="Box_box_inpuinputt" type="text" v-model="form.verification" placeholder="请填写"
|
|
||||||
data-key="mobile" />
|
|
||||||
<view class="repeats">
|
|
||||||
<view v-if="showText == true"
|
|
||||||
style="padding: 8rpx 0;background: #288EFB; border-radius: 15rpx;"
|
|
||||||
@tap="$u.debounce(CodeRegister, 500)">
|
|
||||||
{{ Recapture }}
|
|
||||||
</view>
|
|
||||||
<view v-else
|
|
||||||
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 0; border-radius: 15rpx;">
|
|
||||||
{{ second }}s重新发送
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box_T">
|
|
||||||
<view class="Box_box_T_o">请上传法人身份证图片</view>
|
|
||||||
<view class="flex-colum" style="width: 100%;">
|
|
||||||
<view class="Box_box_d" v-if="form.id_card_straight" @click="Upload(0)">
|
|
||||||
<image :src="form.id_card_straight" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view v-else class="Box_box_Ts" @click="Upload(0)"></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box_T_o">请上传法人国徽身份证图片</view>
|
|
||||||
<view class="flex-colum" style="width: 100%;">
|
|
||||||
<view class="Box_box_d" v-if="form.id_card_reverse" @click="Upload(1)">
|
|
||||||
<image :src="form.id_card_reverse" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view v-else class="Box_box_Ts" @click="Upload(1)"></view>
|
|
||||||
</view>
|
|
||||||
<view class="Box_box_T_o">请拍摄并上传你的营业执照</view>
|
|
||||||
<view class="flex-colum" style="width: 100%;">
|
|
||||||
<view class="Box_box_d" v-if="form.business_license" @click="Upload(2)">
|
|
||||||
<image :src="form.business_license" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view v-else class="Box_box_Ts" @click="Upload(2)"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="preservation flex-colum">
|
|
||||||
<!-- <view v-if="form.status == '2'"
|
|
||||||
style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
|
|
||||||
拒接原因:({{form.no|| '无'}})</view> -->
|
|
||||||
<view v-if="disabled || !codefailed" class="preservation_boxs">提交</view>
|
|
||||||
<view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<u-picker :show="showpicker" :columns="columns" @confirm='confirm' keyName="name"
|
|
||||||
@cancel='showpicker = false'></u-picker>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import selectaddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue';
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
selectaddress
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
showpicker: false,
|
|
||||||
disabled: true,
|
|
||||||
Uploadurlnumber: '',
|
|
||||||
namelang: '',
|
|
||||||
merchantAuditStatus: '',
|
|
||||||
columns: [
|
|
||||||
|
|
||||||
],
|
|
||||||
codefailed: false, //验证码是否发送成功
|
|
||||||
store_id: '',
|
|
||||||
// 注册定时器 初始值
|
|
||||||
second: 60,
|
|
||||||
showText: true,
|
|
||||||
Recapture: '发送验证码',
|
|
||||||
form: {
|
|
||||||
store_id: uni.getStorageSync('userId'),
|
|
||||||
title: '',
|
|
||||||
id_card_straight: '',
|
|
||||||
id_card_reverse: '',
|
|
||||||
business_license: '',
|
|
||||||
phone: '',
|
|
||||||
legal_person_name: '',
|
|
||||||
no: '',
|
|
||||||
provinceno: '',
|
|
||||||
provinceno_name: '',
|
|
||||||
dlzh: '',
|
|
||||||
dlmm: '',
|
|
||||||
code: '',
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
console.log(e.store)
|
|
||||||
let data = uni.getStorageSync('form')
|
|
||||||
if (data.status == '0') {
|
|
||||||
this.disabled = true
|
|
||||||
} else {
|
|
||||||
this.disabled = false
|
|
||||||
}
|
|
||||||
if (data.phone) {
|
|
||||||
this.form.store_id = uni.getStorageSync('userId')
|
|
||||||
this.form.title = data.title
|
|
||||||
this.form.status = data.status
|
|
||||||
this.form.id_card_straight = data.id_card_straight
|
|
||||||
this.form.id_card_reverse = data.id_card_reverse
|
|
||||||
this.form.business_license = data.business_license
|
|
||||||
this.form.phone = data.phone
|
|
||||||
this.form.legal_person_name = data.legal_person_name
|
|
||||||
this.form.no = data.no
|
|
||||||
this.form.dlzh = data.dlzh
|
|
||||||
this.form.dlmm = data.dlmm
|
|
||||||
this.form.code = data.invitation
|
|
||||||
this.form.provinceno = data.provinceno
|
|
||||||
this.form.provinceno_name = data.provinceno_name
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.onShowdata()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async CodeRegister() {
|
|
||||||
if (this.form.title == null || this.form.title == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写公司名字',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.phone == null || this.form.phone == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写法人手机号',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写法人姓名',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请上传身份证人像面',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请上传身份证国徽面',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.business_license == null || this.form.business_license == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请上传营业执照',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.provinceno == null || this.form.provinceno == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请选择省份编码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.dlzh == null || this.form.dlzh == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写电子税局账号',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.dlmm == null || this.form.dlmm == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写电子税局账密码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.taxname == null || this.form.taxname == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写办税人姓名',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.taxphone == null || this.form.taxphone == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写办税人手机号码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
uni.pro.showLoading({
|
|
||||||
title: '加载中',
|
|
||||||
mask: true
|
|
||||||
})
|
|
||||||
|
|
||||||
uni.request({
|
|
||||||
url: uni.conf.baseUrl + 'szzpy/invoicerregistration',
|
|
||||||
data: this.form,
|
|
||||||
method: 'POST', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
if (res.data.code == 0) { //失败
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (res.data.code == 1) {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 定时器
|
|
||||||
this.showText = false;
|
|
||||||
this.Recapture = '重新获取';
|
|
||||||
var interval = setInterval(() => {
|
|
||||||
let times = --this.second;
|
|
||||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
|
||||||
}, 1000);
|
|
||||||
setTimeout(() => {
|
|
||||||
clearInterval(interval);
|
|
||||||
this.second = 60;
|
|
||||||
this.showText = true;
|
|
||||||
}, 60000);
|
|
||||||
this.store_id = res.data.data.store_id
|
|
||||||
this.codefailed = true
|
|
||||||
}
|
|
||||||
// setTimeout(() => {
|
|
||||||
// uni.pro.hideLoading();
|
|
||||||
// }, 2000)
|
|
||||||
},
|
|
||||||
fail: (res) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
onShowdata() {
|
|
||||||
uni.request({
|
|
||||||
url: uni.conf.baseUrl + 'szzpy/getprovinceno',
|
|
||||||
data: this.form,
|
|
||||||
method: 'POST', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
if (res.data.data) {
|
|
||||||
this.columns = [res.data.data]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail(res) {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm(e) {
|
|
||||||
console.log('confirm', e)
|
|
||||||
this.form.provinceno_name = e.value[0].name
|
|
||||||
this.form.provinceno = e.value[0].code
|
|
||||||
this.showpicker = false
|
|
||||||
},
|
|
||||||
Upload(i) {
|
|
||||||
if (this.disabled) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
this.Uploadurlnumber = i;
|
|
||||||
uni.chooseImage({
|
|
||||||
count: 1, //默认9
|
|
||||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
||||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
|
||||||
success: res => {
|
|
||||||
uni.pro.showLoading({
|
|
||||||
title: '上传中',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
|
||||||
var that = this;
|
|
||||||
uni.uploadFile({
|
|
||||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
|
||||||
filePath: thisimgUrlcaca,
|
|
||||||
name: 'file', // 后端接收的文件名
|
|
||||||
header: {
|
|
||||||
userId: uni.cache.get('userId'),
|
|
||||||
token: uni.cache.get('token'),
|
|
||||||
myLoginName: uni.cache.get('myLoginName')
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
console.log(res)
|
|
||||||
var thisdata_ = JSON.parse(res.data);
|
|
||||||
uni.showToast({
|
|
||||||
title: '上传成功',
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
console.log(thisdata_.data[0]);
|
|
||||||
if (this.Uploadurlnumber == 0) {
|
|
||||||
this.$set(this.form,
|
|
||||||
'id_card_straight', thisdata_
|
|
||||||
.data[0])
|
|
||||||
} else if (this.Uploadurlnumber == 1) {
|
|
||||||
this.$set(this.form, 'id_card_reverse',
|
|
||||||
thisdata_.data[0])
|
|
||||||
} else {
|
|
||||||
this.$set(this.form,
|
|
||||||
'business_license', thisdata_
|
|
||||||
.data[0])
|
|
||||||
}
|
|
||||||
console.log(this.form)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: err => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
uni.showToast({
|
|
||||||
title: thisdata_.message || thisdata_.msg,
|
|
||||||
icon: 'none',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
async saveMerchantBaseInfoV2() {
|
|
||||||
if (this.form.verification == null || this.form.verification == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写验证码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
uni.request({
|
|
||||||
url: uni.conf.baseUrl + 'szzpy/sendverification',
|
|
||||||
data: {
|
|
||||||
code: this.form.verification,
|
|
||||||
store_id: this.store_id
|
|
||||||
},
|
|
||||||
method: 'POST',
|
|
||||||
success: res => {
|
|
||||||
if (res.data.code == 0) { //失败
|
|
||||||
this.codefailed = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (res.data.code == 1) {
|
|
||||||
this.store_id = res.data.data.store_id
|
|
||||||
//请求数电授权
|
|
||||||
this.szzpyauthorization()
|
|
||||||
}
|
|
||||||
console.log('接口返回------', res);
|
|
||||||
},
|
|
||||||
fail(res) {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
szzpyauthorization() {
|
|
||||||
uni.request({
|
|
||||||
url: uni.conf.baseUrl + 'szzpy/authorization',
|
|
||||||
data: {
|
|
||||||
store_id: this.store_id
|
|
||||||
},
|
|
||||||
method: 'POST',
|
|
||||||
success: res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (res.data.code == 1) {
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.cache.set('form', '');
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
});
|
|
||||||
// uni.navigateBack();
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
console.log('接口返回------', res);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Box {
|
|
||||||
.Box_box_O {
|
|
||||||
padding: 0 28rpx;
|
|
||||||
|
|
||||||
.Box_box {
|
|
||||||
text-align: right;
|
|
||||||
padding: 24rpx;
|
|
||||||
border-bottom: 1px solid #e5e5e5;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
.Box_box_input {
|
|
||||||
position: relative;
|
|
||||||
width: 60%;
|
|
||||||
|
|
||||||
.Box_box_inpuinputt {
|
|
||||||
padding-right: 15rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repeats {
|
|
||||||
width: 280rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.Box_box_T {
|
|
||||||
padding: 0 28rpx;
|
|
||||||
border-top: 16rpx solid #e5e5e5;
|
|
||||||
|
|
||||||
.Box_box_T_o {
|
|
||||||
padding: 28rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-colum {
|
|
||||||
image {
|
|
||||||
width: 396rpx;
|
|
||||||
height: 240rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
padding-bottom: 16rpx;
|
|
||||||
border-bottom: 1px solid #e5e5e5;
|
|
||||||
|
|
||||||
.Box_box_Ts {
|
|
||||||
width: 396rpx;
|
|
||||||
height: 240rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
border: 2rpx dashed #707070;
|
|
||||||
background: url(@/static/my2.png) no-repeat;
|
|
||||||
background-position: 50% 50%;
|
|
||||||
background-size: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.preservation {
|
|
||||||
width: 100%;
|
|
||||||
padding: 50rpx;
|
|
||||||
|
|
||||||
.preservation_box {
|
|
||||||
width: 70%;
|
|
||||||
height: 72rpx;
|
|
||||||
background: #288efb;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 72rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preservation_boxs {
|
|
||||||
width: 70%;
|
|
||||||
height: 72rpx;
|
|
||||||
background: #999999;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 72rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
dlzh: '',
|
dlzh: '',
|
||||||
dlmm: '',
|
dlmm: '',
|
||||||
code: '',
|
code: '',
|
||||||
creditCode:''
|
creditCode: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -347,26 +347,11 @@
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShowdata() {
|
async onShowdata() {
|
||||||
uni.request({
|
let res = await this.api.szzpygetprovinceno(this.form)
|
||||||
url: uni.conf.baseUrl + 'szzpy/getprovinceno',
|
if (res) {
|
||||||
data: this.form,
|
this.columns = [res.data]
|
||||||
method: 'POST', //请求方式,必须为大写
|
}
|
||||||
success: res => {
|
|
||||||
if (res.data.data) {
|
|
||||||
this.columns = [res.data.data]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail(res) {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data.message || res.data.msg,
|
|
||||||
icon: 'none',
|
|
||||||
success: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log('confirm', e)
|
console.log('confirm', e)
|
||||||
|
|||||||
@@ -44,83 +44,32 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
storeinvoicelist() {
|
async storeinvoicelist() {
|
||||||
uni.request({
|
let res = await this.api.storebindinginvopush({
|
||||||
url: uni.conf.baseUrl + 'store/bindinginvopush',
|
store_id: uni.getStorageSync('userId')
|
||||||
data: {
|
})
|
||||||
//参数
|
if(res){
|
||||||
store_id: uni.getStorageSync('userId')
|
this.datalsit = res.data.qrcode;
|
||||||
},
|
console.log(this.datalsit)
|
||||||
method: 'POST', //请求方式,必须为大写
|
// 获取uQRCode实例
|
||||||
success: res => {
|
var qr = new uQRCode();
|
||||||
this.datalsit = res.data.data.qrcode;
|
// 设置二维码内容
|
||||||
console.log(this.datalsit)
|
qr.data = res.data.qrcode;
|
||||||
// 获取uQRCode实例
|
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||||
var qr = new uQRCode();
|
qr.size = this.size;
|
||||||
// 设置二维码内容
|
// 调用制作二维码方法
|
||||||
qr.data = res.data.data.qrcode;
|
qr.make();
|
||||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
// 获取canvas上下文
|
||||||
qr.size = this.size;
|
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||||
// 调用制作二维码方法
|
// 设置uQRCode实例的canvas上下文
|
||||||
qr.make();
|
qr.canvasContext = canvasContext;
|
||||||
// 获取canvas上下文
|
// 调用绘制方法将二维码图案绘制到canvas上
|
||||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
qr.drawCanvas();
|
||||||
// 设置uQRCode实例的canvas上下文
|
}
|
||||||
qr.canvasContext = canvasContext;
|
|
||||||
// 调用绘制方法将二维码图案绘制到canvas上
|
|
||||||
qr.drawCanvas();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
savealbum(e) {
|
savealbum(e) {
|
||||||
uni.pro.navigateBack();
|
uni.pro.navigateBack();
|
||||||
},
|
},
|
||||||
// savealbum(e) {
|
|
||||||
// // #ifdef APP
|
|
||||||
// uni.showLoading({
|
|
||||||
// //加载框
|
|
||||||
// title: '保存中...',
|
|
||||||
// mask: true
|
|
||||||
// });
|
|
||||||
// var pages = getCurrentPages();
|
|
||||||
// var page = pages[pages.length - 1];
|
|
||||||
// console.log('当前页' + pages.length - 1);
|
|
||||||
// var bitmap = null;
|
|
||||||
// var currentWebview = page.$getAppWebview();
|
|
||||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
|
||||||
// // 将webview内容绘制到Bitmap对象中
|
|
||||||
// currentWebview.draw(
|
|
||||||
// bitmap,
|
|
||||||
// function() {
|
|
||||||
// console.log('截屏绘制图片成功');
|
|
||||||
// bitmap.save(
|
|
||||||
// '_doc/a.jpg', {},
|
|
||||||
// function(i) {
|
|
||||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
|
||||||
// uni.saveImageToPhotosAlbum({
|
|
||||||
// filePath: i.target,
|
|
||||||
// success: function() {
|
|
||||||
// bitmap.clear(); //销毁Bitmap图片
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '保存图片成功',
|
|
||||||
// mask: false,
|
|
||||||
// duration: 1500
|
|
||||||
// });
|
|
||||||
// uni.hideLoading();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// function(e) {
|
|
||||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// function(e) {
|
|
||||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// // #endif
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -73,7 +73,6 @@
|
|||||||
methods: {
|
methods: {
|
||||||
print() {
|
print() {
|
||||||
let LODOP = getLodop();
|
let LODOP = getLodop();
|
||||||
console.log(LODOP)
|
|
||||||
if (LODOP == null) {
|
if (LODOP == null) {
|
||||||
alert('请先安装打印控件')
|
alert('请先安装打印控件')
|
||||||
return;
|
return;
|
||||||
@@ -82,50 +81,36 @@
|
|||||||
// 设置打印纸大小
|
// 设置打印纸大小
|
||||||
// LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', "");
|
// LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', "");
|
||||||
LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', "");
|
LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', "");
|
||||||
|
|
||||||
// // 二维码控制大小
|
// // 二维码控制大小
|
||||||
LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码
|
LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码
|
||||||
// LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Width "); //设置打印风格,这里是等宽打印
|
|
||||||
// LODOP.SET_PRINTER_INDEX("GP-58MB Series"); //设置默认打印机(这里用的是打印机名称)
|
|
||||||
|
|
||||||
// // 文字内容
|
|
||||||
// var strHTML = document.getElementById('viewtext')
|
|
||||||
// console.log(strHTML.innerHTML)
|
|
||||||
// LODOP.ADD_PRINT_HTM('150px', '5px', "100%", "100%",
|
|
||||||
// `<div style="width: 100%;font-size: 12px; ">销售方名称:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">开票金额:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">生成时间:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">生成时间:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">二维码有效期:30天</div><div style="width: 100%;font-size: 14px; margin-top: 15px;">您可以使用微信,扫码开票</div>`
|
|
||||||
// );
|
|
||||||
LODOP.SET_LICENSES("", "DCFF409304DFCEB3E2C644BF96CD0720", "", "");
|
|
||||||
// LODOP.PREVIEW(); //带预览的打印
|
// LODOP.PREVIEW(); //带预览的打印
|
||||||
LODOP.PRINT()
|
LODOP.PRINT()
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
storeinvoicelist() {
|
async storeinvoicelist() {
|
||||||
uni.request({
|
let res = await this.api.storebindinginvopush({
|
||||||
url: uni.conf.baseUrl + 'store/bindinginvopush',
|
store_id: uni.getStorageSync('userId')
|
||||||
data: {
|
})
|
||||||
//参数
|
if (res) {
|
||||||
store_id: uni.getStorageSync('userId')
|
this.datalsit = res.data.qrcode;
|
||||||
},
|
console.log(this.datalsit)
|
||||||
method: 'POST', //请求方式,必须为大写
|
// 获取uQRCode实例
|
||||||
success: res => {
|
var qr = new uQRCode();
|
||||||
this.datalsit = res.data.data.qrcode;
|
// 设置二维码内容
|
||||||
// 获取uQRCode实例
|
qr.data = res.data.qrcode;
|
||||||
var qr = new uQRCode();
|
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||||
// 设置二维码内容
|
qr.size = this.size;
|
||||||
qr.data = res.data.data.qrcode;
|
// 调用制作二维码方法
|
||||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
qr.make();
|
||||||
qr.size = this.size;
|
// 获取canvas上下文
|
||||||
// 调用制作二维码方法
|
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||||
qr.make();
|
// 设置uQRCode实例的canvas上下文
|
||||||
// 获取canvas上下文
|
qr.canvasContext = canvasContext;
|
||||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
// 调用绘制方法将二维码图案绘制到canvas上
|
||||||
// 设置uQRCode实例的canvas上下文
|
qr.drawCanvas();
|
||||||
qr.canvasContext = canvasContext;
|
}
|
||||||
// 调用绘制方法将二维码图案绘制到canvas上
|
|
||||||
qr.drawCanvas();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
savealbum(e) {
|
savealbum(e) {
|
||||||
uni.pro.navigateBack();
|
uni.pro.navigateBack();
|
||||||
|
|||||||
@@ -28,8 +28,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="empty-wrap">
|
<view class="empty-wrap">
|
||||||
<view class="empty" v-if="!list.length"><u-empty text="暂无数据"
|
<u-loadmore :status="form.status" />
|
||||||
:icon="require('@/static/icon_empty.png')"></u-empty></view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -38,14 +37,33 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: []
|
list: [],
|
||||||
|
count: '',
|
||||||
|
form: {
|
||||||
|
page: 1,
|
||||||
|
status: 'loadmore',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.storeinvoicelist()
|
this.initial()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.form.status != 'nomore') {
|
||||||
|
this.form.page = ++this.form.page;
|
||||||
|
this.storeinvoicelist()
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initial() {
|
||||||
|
this.form = {
|
||||||
|
page: 1,
|
||||||
|
status: 'loadmore',
|
||||||
|
},
|
||||||
|
this.storeinvoicelist()
|
||||||
|
},
|
||||||
clickoange(e) {
|
clickoange(e) {
|
||||||
if (e.status == 2 || e.status == 4 || e.status == 3) {
|
if (e.status == 2 || e.status == 4 || e.status == 3) {
|
||||||
uni.pro.navigateTo('index/orderinfo', {
|
uni.pro.navigateTo('index/orderinfo', {
|
||||||
@@ -61,10 +79,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async storeinvoicelist() {
|
async storeinvoicelist() {
|
||||||
|
this.form.status = 'loading';
|
||||||
let res = await this.api.storeinvoicelist({
|
let res = await this.api.storeinvoicelist({
|
||||||
store_id: uni.getStorageSync('userId')
|
store_id: uni.getStorageSync('userId'),
|
||||||
|
page: this.form.page
|
||||||
})
|
})
|
||||||
this.list = res.data
|
if (this.form.page == 1 && res.data.list.length == 0) {
|
||||||
|
this.form.status = 'nomore'
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.form.page == 1) {
|
||||||
|
this.list = res.data.list
|
||||||
|
} else {
|
||||||
|
this.list = [...this.list, ...res.data.list];
|
||||||
|
}
|
||||||
|
if (res.data.list.length < 10 || res.data.list.length > res.data.count) {
|
||||||
|
this.form.status = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.form.status = 'loadmore';
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
console.log(this.list)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,31 +62,27 @@ export default {
|
|||||||
this.storeinvoicelist();
|
this.storeinvoicelist();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
storeinvoicelist() {
|
async storeinvoicelist() {
|
||||||
uni.request({
|
let res = await this.api.storeinvoicedetail({
|
||||||
url: uni.conf.baseUrl + 'store/invoicedetail',
|
id: this.ID
|
||||||
data: {
|
})
|
||||||
id: this.ID
|
if(res){
|
||||||
},
|
this.datalsit = res.data;
|
||||||
method: 'POST', //请求方式,必须为大写
|
// 获取uQRCode实例
|
||||||
success: (res) => {
|
var qr = new uQRCode();
|
||||||
this.datalsit = res.data.data;
|
// 设置二维码内容
|
||||||
// 获取uQRCode实例
|
qr.data = res.data.url;
|
||||||
var qr = new uQRCode();
|
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||||
// 设置二维码内容
|
qr.size = this.size;
|
||||||
qr.data = res.data.data.url;
|
// 调用制作二维码方法
|
||||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
qr.make();
|
||||||
qr.size = this.size;
|
// 获取canvas上下文
|
||||||
// 调用制作二维码方法
|
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||||
qr.make();
|
// 设置uQRCode实例的canvas上下文
|
||||||
// 获取canvas上下文
|
qr.canvasContext = canvasContext;
|
||||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
// 调用绘制方法将二维码图案绘制到canvas上
|
||||||
// 设置uQRCode实例的canvas上下文
|
qr.drawCanvas();
|
||||||
qr.canvasContext = canvasContext;
|
}
|
||||||
// 调用绘制方法将二维码图案绘制到canvas上
|
|
||||||
qr.drawCanvas();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
savealbum(e) {
|
savealbum(e) {
|
||||||
uni.pro.navigateBack();
|
uni.pro.navigateBack();
|
||||||
|
|||||||
@@ -90,30 +90,6 @@
|
|||||||
if(res.code = 1){
|
if(res.code = 1){
|
||||||
this.datalsit = res.data;
|
this.datalsit = res.data;
|
||||||
}
|
}
|
||||||
// uni.request({
|
|
||||||
// url: uni.conf.baseUrl + 'store/invoicedetail',
|
|
||||||
// data: {
|
|
||||||
// id: this.ID,
|
|
||||||
// },
|
|
||||||
// method: 'POST', //请求方式,必须为大写
|
|
||||||
// success: res => {
|
|
||||||
// this.datalsit = res.data.data;
|
|
||||||
// // 获取uQRCode实例
|
|
||||||
// var qr = new uQRCode();
|
|
||||||
// // 设置二维码内容
|
|
||||||
// qr.data = res.data.data.url;
|
|
||||||
// // 设置二维码大小,必须与canvas设置的宽高一致
|
|
||||||
// qr.size = this.size;
|
|
||||||
// // 调用制作二维码方法
|
|
||||||
// qr.make();
|
|
||||||
// // 获取canvas上下文
|
|
||||||
// var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
|
||||||
// // 设置uQRCode实例的canvas上下文
|
|
||||||
// qr.canvasContext = canvasContext;
|
|
||||||
// // 调用绘制方法将二维码图案绘制到canvas上
|
|
||||||
// qr.drawCanvas();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
// 预览图片
|
// 预览图片
|
||||||
previewImage(e) {
|
previewImage(e) {
|
||||||
|
|||||||
@@ -88,32 +88,27 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
storeinvoicelist() {
|
async storeinvoicelist() {
|
||||||
uni.request({
|
let res = await this.api.storeinvoicedetail({
|
||||||
url: uni.conf.baseUrl + 'store/invoicedetail',
|
id: this.ID
|
||||||
// url:'http://192.168.1.117:8084/wap/merchant/authPay',
|
})
|
||||||
data: {
|
if(res){
|
||||||
id: this.ID,
|
this.datalsit = res.data;
|
||||||
},
|
// 获取uQRCode实例
|
||||||
method: 'POST', //请求方式,必须为大写
|
var qr = new uQRCode();
|
||||||
success: res => {
|
// 设置二维码内容
|
||||||
this.datalsit = res.data.data;
|
qr.data = res.data.url;
|
||||||
// 获取uQRCode实例
|
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||||
var qr = new uQRCode();
|
qr.size = this.size;
|
||||||
// 设置二维码内容
|
// 调用制作二维码方法
|
||||||
qr.data = res.data.data.url;
|
qr.make();
|
||||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
// 获取canvas上下文
|
||||||
qr.size = this.size;
|
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||||
// 调用制作二维码方法
|
// 设置uQRCode实例的canvas上下文
|
||||||
qr.make();
|
qr.canvasContext = canvasContext;
|
||||||
// 获取canvas上下文
|
// 调用绘制方法将二维码图案绘制到canvas上
|
||||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
qr.drawCanvas();
|
||||||
// 设置uQRCode实例的canvas上下文
|
}
|
||||||
qr.canvasContext = canvasContext;
|
|
||||||
// 调用绘制方法将二维码图案绘制到canvas上
|
|
||||||
qr.drawCanvas();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
savealbum(e) {
|
savealbum(e) {
|
||||||
uni.pro.navigateBack();
|
uni.pro.navigateBack();
|
||||||
|
|||||||
@@ -224,26 +224,6 @@
|
|||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
requestlang() {
|
|
||||||
uni.request({
|
|
||||||
url: uni.conf.baseUrl + 'wap/merchant/authPay',
|
|
||||||
// url:'http://192.168.1.117:8084/wap/merchant/authPay',
|
|
||||||
data: {
|
|
||||||
//参数
|
|
||||||
userAppId: 2,
|
|
||||||
channel: 1,
|
|
||||||
qrNo: 1,
|
|
||||||
view: 1
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
'user-agent': 'micromessenger' //自定义请求头信息
|
|
||||||
},
|
|
||||||
method: 'GET', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
console.log('接口返回------', res);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,28 +9,27 @@
|
|||||||
url: '', //PDF路径
|
url: '', //PDF路径
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
console.log(options)
|
console.log(options)
|
||||||
if (options.tape == 1) {
|
if (options.tape == 1) {
|
||||||
this.url = options.url;
|
this.url = options.url;
|
||||||
} else {
|
} else {
|
||||||
uni.request({
|
let res = await this.api.szzpydownloadurl({
|
||||||
url: uni.conf.baseUrl + 'szzpy/downloadurl',
|
id: options.id
|
||||||
data: {
|
})
|
||||||
//参数
|
if (res) {
|
||||||
id: options.id
|
let fileUrl = options.url
|
||||||
},
|
var user = navigator.userAgent;
|
||||||
method: 'POST', //请求方式,必须为大写
|
//android端
|
||||||
success: res => {
|
var isAndroid = user.indexOf("Android") > -1 || user.indexOf("Adr") > -1;
|
||||||
let fileUrl = options.url
|
//ios端
|
||||||
this.url = 'https://www.pfile.com.cn/api/profile/onlinePreview?url=' +
|
var isiOS = !!user.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||||
encodeURIComponent(res.data.data);
|
if (isAndroid) {
|
||||||
// this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data
|
window.open(res.data)
|
||||||
// console.log(this.url)
|
} else if (isiOS) {
|
||||||
// window.open('https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data)
|
window.location.href = res.data;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
static/drawerlist.png
Normal file
BIN
static/drawerlist.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
BIN
static/drawerlistdelete.png
Normal file
BIN
static/drawerlistdelete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 359 B |
2
unpackage/dist/build/web/index.html
vendored
2
unpackage/dist/build/web/index.html
vendored
@@ -3,4 +3,4 @@
|
|||||||
document.write(
|
document.write(
|
||||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
(coverSupport ? ', viewport-fit=cover' : '') +
|
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||||
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src="/chunk-vendors.js?v=1716373696937"></script><script src="/index.js?v=1716373696937"></script></body></html>
|
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.41073de1.js></script><script src=/static/js/index.caeea1e4.js></script></body></html>
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
if (process.env.UNI_PLATFORM === 'h5') {
|
|
||||||
// 由于这种方式的打包,会导致编译生成微信小程序(只验证了微信小程序)无法正常使用,所以必须分开
|
|
||||||
let filePath = ''
|
|
||||||
let Timestamp = new Date().getTime()
|
|
||||||
module.exports = {
|
|
||||||
// ... webpack 相关配置
|
|
||||||
filenameHashing: false,
|
|
||||||
configureWebpack: { // webpack 配置 解决js缓存的问题,目前只适配H5端打包
|
|
||||||
output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】
|
|
||||||
filename: `${filePath}[name].js?v=${Timestamp}`,
|
|
||||||
chunkFilename: `${filePath}[name].js?v=${Timestamp}`
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 其他打包需要的相关配置
|
|
||||||
//由于vue-cli打包vue文件的时候静态文件会默认会带有hash值,我们首先要去掉hash值。
|
|
||||||
module.exports = {
|
|
||||||
// ... webpack 相关配置
|
|
||||||
filenameHashing: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user