Commit 19d58748 authored by chuan.liu's avatar chuan.liu

产品选择 销售计划选择联调

parent 99e862db
{
"name" : "五粮液APP",
"appid" : "__UNI__343534B",
"description" : "订货系统",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"nvue" : {
"flex-direction" : "row"
},
"modules" : {},
/* 模块配置 */
"distribute" : {
/* 应用发布信息 */
"android" : {
/* android打包配置 */
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a" ]
},
"ios" : {},
/* ios打包配置 */
"sdkConfigs" : {},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* SDK配置 */
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
/* 小程序特有相关 */
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
}
{
"name": "五粮液APP",
"appid": "__UNI__343534B",
"description": "订货系统",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"app-plus": {
/* 5+App特有相关 */
"usingComponents": true,
"nvueCompiler": "uni-app",
"nvueStyleCompiler": "uni-app",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"nvue": {
"flex-direction": "row"
},
"modules": {},
/* 模块配置 */
"distribute": {
/* 应用发布信息 */
"android": {
/* android打包配置 */
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": ["armeabi-v7a"]
},
"ios": {},
/* ios打包配置 */
"sdkConfigs": {},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* SDK配置 */
"quickapp": {},
/* 快应用特有相关 */
"mp-weixin": {
/* 小程序特有相关 */
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"h5": {
"devServer": {
"https": false,
"port": "8080",
"disableHostCheck": true,
"proxy": {
"/sap": {
"target": "http://10.0.134.45:8000",
"changeOrigin": true
}
}
}
}
}
Copyright (c) 2014, Dan Kogai
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of {{{project}}} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[![build status](https://secure.travis-ci.org/dankogai/js-base64.png)](http://travis-ci.org/dankogai/js-base64)
# base64.js
Yet another Base64 transcoder
## Usage
### Install
```javascript
$ npm install --save js-base64
```
If you are using it on ES6 transpilers, you may also need:
```javascript
$ npm install --save babel-preset-env
```
Note `js-base64` itself is stand-alone so its `package.json` has no `dependencies`.  However, it is also tested on ES6 environment so `"babel-preset-env": "^1.7.0"` is on `devDependencies`.
### In Browser
* Locally
```html
<script src="base64.js"></script>
```
* Directly from CDN. In which case you don't even need to install.
```html
<!-- the latest -->
<script src="https://cdn.jsdelivr.net/npm/js-base64/base64.min.js">
```
```html
<!-- with version fixed -->
<script src="https://cdn.jsdelivr.net/npm/js-base64@2.6.4/base64.min.js">
```
### node.js
```javascript
var Base64 = require('js-base64').Base64;
```
## es6+
```javascript
import { Base64 } from 'js-base64';
```
## SYNOPSIS
```javascript
Base64.encode('dankogai'); // ZGFua29nYWk=
Base64.btoa( 'dankogai'); // ZGFua29nYWk=
Base64.fromUint8Array( // ZGFua29nYWk=
new Uint8Array([100,97,110,107,111,103,97,105])
);
Base64.fromUint8Array( // ZGFua29nYW which is URI safe
new Uint8Array([100,97,110,107,111,103,97,105]), true
);
Base64.encode( '小飼弾'); // 5bCP6aO85by+
Base64.encodeURI('小飼弾'); // 5bCP6aO85by- which equals to Base64.encode('小飼弾', true)
Base64.btoa( '小飼弾'); // raises exception
```
```javascript
Base64.decode('ZGFua29nYWk='); // dankogai
Base64.atob( 'ZGFua29nYWk='); // dankogai
Base64.toUint8Array( // new Uint8Array([100,97,110,107,111,103,97,105])
'ZGFua29nYWk='
);
Base64.decode('5bCP6aO85by+'); // 小飼弾
// note .decodeURI() is unnecessary since it accepts both flavors
Base64.decode('5bCP6aO85by-'); // 小飼弾
Base64.atob( '5bCP6aO85by+'); // '小飼弾' which is nonsense
```
### String Extension for ES5
```javascript
if (Base64.extendString) {
// you have to explicitly extend String.prototype
Base64.extendString();
// once extended, you can do the following
'dankogai'.toBase64(); // ZGFua29nYWk=
'小飼弾'.toBase64(); // 5bCP6aO85by+
'小飼弾'.toBase64(true); // 5bCP6aO85by-
'小飼弾'.toBase64URI(); // 5bCP6aO85by-
'ZGFua29nYWk='.fromBase64(); // dankogai
'5bCP6aO85by+'.fromBase64(); // 小飼弾
'5bCP6aO85by-'.fromBase64(); // 小飼弾
}
```
### TypeScript
TypeScript 2.0 type definition was added to the [DefinitelyTyped repository](https://github.com/DefinitelyTyped/DefinitelyTyped).
```bash
$ npm install --save @types/js-base64
```
## `.decode()` vs `.atob` (and `.encode()` vs `btoa()`)
Suppose you have:
```
var pngBase64 =
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
```
Which is a Base64-encoded 1x1 transparent PNG, **DO NOT USE** `Base64.decode(pngBase64)`.  Use `Base64.atob(pngBase64)` instead.  `Base64.decode()` decodes to UTF-8 string while `Base64.atob()` decodes to bytes, which is compatible to browser built-in `atob()` (Which is absent in node.js).  The same rule applies to the opposite direction.
## SEE ALSO
+ http://en.wikipedia.org/wiki/Base64
/*
* base64.js
*
* Licensed under the BSD 3-Clause License.
* http://opensource.org/licenses/BSD-3-Clause
*
* References:
* http://en.wikipedia.org/wiki/Base64
*/
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
? module.exports = factory(global)
: typeof define === 'function' && define.amd
? define(factory) : factory(global)
}((
typeof self !== 'undefined' ? self
: typeof window !== 'undefined' ? window
: typeof global !== 'undefined' ? global
: this
), function(global) {
'use strict';
// existing version for noConflict()
global = global || {};
var _Base64 = global.Base64;
var version = "2.6.4";
// constants
var b64chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var b64tab = function(bin) {
var t = {};
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
return t;
}(b64chars);
var fromCharCode = String.fromCharCode;
// encoder stuff
var cb_utob = function(c) {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
+ fromCharCode(0x80 | (cc & 0x3f)))
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
} else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
}
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = function(u) {
return u.replace(re_utob, cb_utob);
};
var cb_encode = function(ccc) {
var padlen = [0, 2, 1][ccc.length % 3],
ord = ccc.charCodeAt(0) << 16
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
chars = [
b64chars.charAt( ord >>> 18),
b64chars.charAt((ord >>> 12) & 63),
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
];
return chars.join('');
};
var btoa = global.btoa && typeof global.btoa == 'function'
? function(b){ return global.btoa(b) } : function(b) {
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
'The string contains invalid characters.'
);
return b.replace(/[\s\S]{1,3}/g, cb_encode);
};
var _encode = function(u) {
return btoa(utob(String(u)));
};
var mkUriSafe = function (b64) {
return b64.replace(/[+\/]/g, function(m0) {
return m0 == '+' ? '-' : '_';
}).replace(/=/g, '');
};
var encode = function(u, urisafe) {
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
};
var encodeURI = function(u) { return encode(u, true) };
var fromUint8Array;
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
// return btoa(fromCharCode.apply(null, a));
var b64 = '';
for (var i = 0, l = a.length; i < l; i += 3) {
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
var ord = a0 << 16 | a1 << 8 | a2;
b64 += b64chars.charAt( ord >>> 18)
+ b64chars.charAt((ord >>> 12) & 63)
+ ( typeof a1 != 'undefined'
? b64chars.charAt((ord >>> 6) & 63) : '=')
+ ( typeof a2 != 'undefined'
? b64chars.charAt( ord & 63) : '=');
}
return urisafe ? mkUriSafe(b64) : b64;
};
// decoder stuff
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
var cb_btou = function(cccc) {
switch(cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)),
offset = cp - 0x10000;
return (fromCharCode((offset >>> 10) + 0xD800)
+ fromCharCode((offset & 0x3FF) + 0xDC00));
case 3:
return fromCharCode(
((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2))
);
default:
return fromCharCode(
((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1))
);
}
};
var btou = function(b) {
return b.replace(re_btou, cb_btou);
};
var cb_decode = function(cccc) {
var len = cccc.length,
padlen = len % 4,
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
chars = [
fromCharCode( n >>> 16),
fromCharCode((n >>> 8) & 0xff),
fromCharCode( n & 0xff)
];
chars.length -= [0, 0, 2, 1][padlen];
return chars.join('');
};
var _atob = global.atob && typeof global.atob == 'function'
? function(a){ return global.atob(a) } : function(a){
return a.replace(/\S{1,4}/g, cb_decode);
};
var atob = function(a) {
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
};
var _decode = function(a) { return btou(_atob(a)) };
var _fromURI = function(a) {
return String(a).replace(/[-_]/g, function(m0) {
return m0 == '-' ? '+' : '/'
}).replace(/[^A-Za-z0-9\+\/]/g, '');
};
var decode = function(a){
return _decode(_fromURI(a));
};
var toUint8Array;
if (global.Uint8Array) toUint8Array = function(a) {
return Uint8Array.from(atob(_fromURI(a)), function(c) {
return c.charCodeAt(0);
});
};
var noConflict = function() {
var Base64 = global.Base64;
global.Base64 = _Base64;
return Base64;
};
// export Base64
global.Base64 = {
VERSION: version,
atob: atob,
btoa: btoa,
fromBase64: decode,
toBase64: encode,
utob: utob,
encode: encode,
encodeURI: encodeURI,
btou: btou,
decode: decode,
noConflict: noConflict,
fromUint8Array: fromUint8Array,
toUint8Array: toUint8Array
};
// if ES5 is available, make Base64.extendString() available
if (typeof Object.defineProperty === 'function') {
var noEnum = function(v){
return {value:v,enumerable:false,writable:true,configurable:true};
};
global.Base64.extendString = function () {
Object.defineProperty(
String.prototype, 'fromBase64', noEnum(function () {
return decode(this)
}));
Object.defineProperty(
String.prototype, 'toBase64', noEnum(function (urisafe) {
return encode(this, urisafe)
}));
Object.defineProperty(
String.prototype, 'toBase64URI', noEnum(function () {
return encode(this, true)
}));
};
}
//
// export Base64 to the namespace
//
if (global['Meteor']) { // Meteor.js
Base64 = global.Base64;
}
// module.exports and AMD are mutually exclusive.
// module.exports has precedence.
if (typeof module !== 'undefined' && module.exports) {
module.exports.Base64 = global.Base64;
}
else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], function(){ return global.Base64 });
}
// that's it!
return {Base64: global.Base64}
}));
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory(global):typeof define==="function"&&define.amd?define(factory):factory(global)})(typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64;var version="2.6.4";var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64tab=function(bin){var t={};for(var i=0,l=bin.length;i<l;i++)t[bin.charAt(i)]=i;return t}(b64chars);var fromCharCode=String.fromCharCode;var cb_utob=function(c){if(c.length<2){var cc=c.charCodeAt(0);return cc<128?c:cc<2048?fromCharCode(192|cc>>>6)+fromCharCode(128|cc&63):fromCharCode(224|cc>>>12&15)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|cc&63)}else{var cc=65536+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return fromCharCode(240|cc>>>18&7)+fromCharCode(128|cc>>>12&63)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|cc&63)}};var re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;var utob=function(u){return u.replace(re_utob,cb_utob)};var cb_encode=function(ccc){var padlen=[0,2,1][ccc.length%3],ord=ccc.charCodeAt(0)<<16|(ccc.length>1?ccc.charCodeAt(1):0)<<8|(ccc.length>2?ccc.charCodeAt(2):0),chars=[b64chars.charAt(ord>>>18),b64chars.charAt(ord>>>12&63),padlen>=2?"=":b64chars.charAt(ord>>>6&63),padlen>=1?"=":b64chars.charAt(ord&63)];return chars.join("")};var btoa=global.btoa&&typeof global.btoa=="function"?function(b){return global.btoa(b)}:function(b){if(b.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return b.replace(/[\s\S]{1,3}/g,cb_encode)};var _encode=function(u){return btoa(utob(String(u)))};var mkUriSafe=function(b64){return b64.replace(/[+\/]/g,function(m0){return m0=="+"?"-":"_"}).replace(/=/g,"")};var encode=function(u,urisafe){return urisafe?mkUriSafe(_encode(u)):_encode(u)};var encodeURI=function(u){return encode(u,true)};var fromUint8Array;if(global.Uint8Array)fromUint8Array=function(a,urisafe){var b64="";for(var i=0,l=a.length;i<l;i+=3){var a0=a[i],a1=a[i+1],a2=a[i+2];var ord=a0<<16|a1<<8|a2;b64+=b64chars.charAt(ord>>>18)+b64chars.charAt(ord>>>12&63)+(typeof a1!="undefined"?b64chars.charAt(ord>>>6&63):"=")+(typeof a2!="undefined"?b64chars.charAt(ord&63):"=")}return urisafe?mkUriSafe(b64):b64};var re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;var cb_btou=function(cccc){switch(cccc.length){case 4:var cp=(7&cccc.charCodeAt(0))<<18|(63&cccc.charCodeAt(1))<<12|(63&cccc.charCodeAt(2))<<6|63&cccc.charCodeAt(3),offset=cp-65536;return fromCharCode((offset>>>10)+55296)+fromCharCode((offset&1023)+56320);case 3:return fromCharCode((15&cccc.charCodeAt(0))<<12|(63&cccc.charCodeAt(1))<<6|63&cccc.charCodeAt(2));default:return fromCharCode((31&cccc.charCodeAt(0))<<6|63&cccc.charCodeAt(1))}};var btou=function(b){return b.replace(re_btou,cb_btou)};var cb_decode=function(cccc){var len=cccc.length,padlen=len%4,n=(len>0?b64tab[cccc.charAt(0)]<<18:0)|(len>1?b64tab[cccc.charAt(1)]<<12:0)|(len>2?b64tab[cccc.charAt(2)]<<6:0)|(len>3?b64tab[cccc.charAt(3)]:0),chars=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(n&255)];chars.length-=[0,0,2,1][padlen];return chars.join("")};var _atob=global.atob&&typeof global.atob=="function"?function(a){return global.atob(a)}:function(a){return a.replace(/\S{1,4}/g,cb_decode)};var atob=function(a){return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g,""))};var _decode=function(a){return btou(_atob(a))};var _fromURI=function(a){return String(a).replace(/[-_]/g,function(m0){return m0=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")};var decode=function(a){return _decode(_fromURI(a))};var toUint8Array;if(global.Uint8Array)toUint8Array=function(a){return Uint8Array.from(atob(_fromURI(a)),function(c){return c.charCodeAt(0)})};var noConflict=function(){var Base64=global.Base64;global.Base64=_Base64;return Base64};global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,fromUint8Array:fromUint8Array,toUint8Array:toUint8Array};if(typeof Object.defineProperty==="function"){var noEnum=function(v){return{value:v,enumerable:false,writable:true,configurable:true}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)}));Object.defineProperty(String.prototype,"toBase64",noEnum(function(urisafe){return encode(this,urisafe)}));Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,true)}))}}if(global["Meteor"]){Base64=global.Base64}if(typeof module!=="undefined"&&module.exports){module.exports.Base64=global.Base64}else if(typeof define==="function"&&define.amd){define([],function(){return global.Base64})}return{Base64:global.Base64}});
{
"_from": "js-base64@2.6.4",
"_id": "js-base64@2.6.4",
"_inBundle": false,
"_integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
"_location": "/js-base64",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "js-base64@2.6.4",
"name": "js-base64",
"escapedName": "js-base64",
"rawSpec": "2.6.4",
"saveSpec": null,
"fetchSpec": "2.6.4"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"_shasum": "f4e686c5de1ea1f867dbcad3d46d969428df98c4",
"_spec": "js-base64@2.6.4",
"_where": "/Users/apple/Documents/topsun/五粮液/五粮液APP",
"author": {
"name": "Dan Kogai"
},
"bugs": {
"url": "https://github.com/dankogai/js-base64/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Yet another Base64 transcoder in pure-JS",
"devDependencies": {
"@babel/core": "^7.10.5",
"@babel/preset-env": "^7.10.5",
"@babel/register": "^7.10.5",
"mocha": "^8.0.0",
"uglify-js": "^3.10.0"
},
"directories": {
"test": "test"
},
"files": [
"base64.js",
"base64.min.js"
],
"gitHead": "8bfa436f733bec60c95c720e1d720c28b43ae0b2",
"homepage": "https://github.com/dankogai/js-base64#readme",
"keywords": [
"base64"
],
"license": "BSD-3-Clause",
"main": "base64.js",
"name": "js-base64",
"repository": {
"type": "git",
"url": "git://github.com/dankogai/js-base64.git"
},
"scripts": {
"minify": "uglifyjs base64.js > base64.min.js",
"test": "mocha --require @babel/register"
},
"version": "2.6.4"
}
{
"name": "wly",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
}
}
}
{
"name": "wly",
"version": "1.0.0",
"description": "五粮液",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": ""
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": ""
},
"homepage": "",
"dependencies": {
"js-base64": "2.6.4"
}
}
......@@ -3,10 +3,10 @@
<!-- <view class="status_bar">
</view> -->
<view class="banner">
<view class="search-block">
<!-- <view class="search-block">
<image class="icon-search" src="../../static/image/search@3x.png" mode=""></image>
<text>搜索</text>
</view>
</view> -->
<uni-swiper-dot :info="info" :current="current" field="content" :dotsStyles="dotsStyles" :mode="mode">
<swiper class="swiper-box" @change="change" autoplay='true' interval='7000'>
<swiper-item v-for="(item ,index) in info" :key="index">
......@@ -33,12 +33,12 @@
</view>
</view>
</view> -->
<view class="notice-block block">
<!-- <view class="notice-block block">
<image class="icon-notic" src="../../static/image/notice@3x.png" mode=""></image>
<uni-notice-bar single="true" showGetMore="false" backgroundColor='#feebe6' color="#333"
:text="noticeContent">
</uni-notice-bar>
</view>
</view> -->
<view class="todo-box block">
<text class="title">待办</text>
<view class="cell-list">
......@@ -61,11 +61,11 @@
</view>
</view>
<view class="charts-box block">
<view class="title">
<text class="title-text">订单执行情况</text>
<view class="summary">
<text class="num">40</text>
</view>
<view class="title">
<text class="title-text">订单执行情况</text>
<view class="summary">
<text class="num">40</text>
</view>
</view>
<qiun-data-charts type="column" :chartData="chartData" :opts="uchartOpts" :ontouch="true"
background="none" />
......@@ -99,7 +99,7 @@
},
uchartOpts: {
padding: [0, 0, 0, 0],
color: ['#FDB95A', '#528FF4', '#FF7282','#C38AFF','#FFD600'],
color: ['#FDB95A', '#528FF4', '#FF7282', '#C38AFF', '#FFD600'],
enableScroll: true,
xAxis: {
itemCount: 4,
......@@ -159,38 +159,38 @@
16,
18
]
},
{
"name": "发货",
"data": [
28,
17,
11,
14,
16,
18
]
},
{
"name": "到货",
"data": [
28,
17,
11,
14,
16,
18
]
},
{
"name": "发货",
"data": [
28,
17,
11,
14,
16,
18
]
},
{
"name": "到货",
"data": [
28,
17,
11,
14,
16,
18
]
}
]
},
}
},
methods: {
goFundsConfirm(){
uni.navigateTo({
url: `/pages/funds-confirm/funds-confirm`
});
methods: {
goFundsConfirm() {
uni.navigateTo({
url: `/pages/funds-confirm/funds-confirm`
});
},
change(e) {
this.current = e.detail.current;
......@@ -288,8 +288,8 @@
box-sizing: border-box;
background: #ffffff;
border-radius: 32rpx 32rpx 0px 0px;
margin-top: -110rpx;
z-index:10;
margin-top: -110rpx;
z-index: 10;
}
.block {
......@@ -414,7 +414,7 @@
}
.icon-arrow {
width: 12rpx;
width: 12rpx;
height: 20rpx;
}
}
......@@ -424,16 +424,18 @@
padding-bottom: 40px;
.title {
margin-bottom: 32rpx;
display: flex;
justify-content: space-between;
.summary{
color: #B2B2B2;
font-size: 36rpx;
.num{
color: #333333;
margin-right: 8rpx;
}
margin-bottom: 32rpx;
display: flex;
justify-content: space-between;
.summary {
color: #B2B2B2;
font-size: 36rpx;
.num {
color: #333333;
margin-right: 8rpx;
}
}
}
}
......
......@@ -20,7 +20,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">{{selectedSalePlan.id}}</text>
<text class="middle-date-des">{{selectedSalePlan.PLAN_NUMBER}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -28,45 +28,51 @@
</view>
<view class="text-block">
<text class="middle-date">产品</text>
<view class="middle-date-des uni-list picker-year">
<text class="middle-date-des">{{selectedSalePlan.WLYBRAND}}</text>
<!-- <view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" v-model="selectedSalePlan.product"
placeholder="请填写" />
</view>
</view>
</view>
</view> -->
</view>
<view class="text-block">
<text class="middle-date">数量(件)</text>
<text class="middle-date-des">{{selectedSalePlan.quantity}}</text>
<input class="middle-date-des" type="number" :value="selectedSalePlan.quantity"
@input="calcInnerTotal($event,selectedSalePlan)" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date-des">{{selectedSalePlan.price}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">小计</text>
<text class="middle-date-des">{{selectedSalePlan.total}}</text>
</view>
</view>
<view class="planout-block">
<text class="planout-block-title">计划外</text>
<image class="planout-block-icon" src="@/static/image/shop_more@3x.png" @click="addPlanout"
mode="aspectFit"></image>
<!-- <image class="planout-block-icon" src="@/static/image/shop_more@3x.png" @click="addPlanout"
mode="aspectFit"></image> -->
</view>
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="item in planoutLists" :key='item'>
<uni-swipe-action-item v-for="(item,index) in planoutLists" :key='index'>
<view class="middle view planout-block-item">
<view class="text-block title-first">
<text class="middle-date title-first__text">1</text>
<text class="middle-date title-first__text">{{index+1}}</text>
</view>
<view class="text-block" @click="selectProduct">
<view class="text-block" @click="selectProduct(index)">
<text class="middle-date">产品</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">{{selectedProduct.product}}</text>
<text class="middle-date-des">{{item.selectedProduct.SHORT_TEXT}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -74,16 +80,16 @@
</view>
<view class="text-block">
<text class="middle-date">数量(件)</text>
<input class="middle-date-des" type="text" v-model="selectedProduct.quantity"
placeholder="请填写" />
<input class="middle-date-des" type="text" :value="item.selectedProduct.quantity"
@input="calcOuterTotal($event,item.selectedProduct,index)" placeholder="请填写" />
</view>
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date-des">{{selectedProduct.price}}</text>
<text class="middle-date-des">{{item.selectedProduct.price}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">小计</text>
<text class="middle-date-des">{{selectedProduct.quantity}}</text>
<text class="middle-date-des">{{item.selectedProduct.quantity}}</text>
</view>
</view>
<template v-slot:right>
......@@ -115,38 +121,62 @@
selectedSalePlan: {
id: '请选择',
checked: false,
product: '请填写',
quantity: 0,
price: 0
},
selectedProduct: {
id: '请选择',
checked: false,
product: '请填写',
product: '',
quantity: 0,
price: 0
price: 2,
total: 0
},
scrollTop: 0,
planoutLists: 2
planoutLists: [{
selectedProduct: {
id: '请选择',
checked: false,
product: '',
quantity: 0,
price: 0
}
}]
}
},
mounted() {
console.log('监听到事件来自 update');
let _this = this
uni.$once('selectedSalePlan', function(data) {
console.log('监听到事件来自 selectedSalePlan ,携带参数 msg 为:' + data.selectedSalePlan.id);
console.log('监听到事件来自 selectedSalePlan ,携带参数 msg 为:', data.selectedSalePlan);
_this.selectedSalePlan = {
...data.selectedSalePlan
}
})
uni.$once('selectedProduct', function(data) {
console.log('监听到事件来自 selectedProduct ,携带参数 msg 为:' + data.selectedProduct.id);
_this.selectedProduct = {
...data.selectedProduct
}
console.log('监听到事件来自 selectedProduct ,携带参数 msg 为:', data);
// _this.selectedProduct = {
// ...data.selectedProduct
// }
_this.planoutLists.forEach((item, index) => {
if (index == data.index) {
item.selectedProduct = data.selectedProduct
}
})
})
},
methods: {
calcInnerTotal(e, item) {
console.log('ddd', item, e)
let value = e.target.value
// value = `${value}`.replace(/[^0-9]/g, '') // 正则判断只能输入数字
e.target.value = value * 1
this.selectedSalePlan.quantity = value * 1
this.selectedSalePlan.total = value * item.price * 1
},
calcOuterTotal(e, item, index) {
console.log('ddd', item, e)
let value = e.target.value
// value = `${value}`.replace(/[^0-9]/g, '') // 正则判断只能输入数字
e.target.value = value * 1
// this.planoutLists.forEach(()=>{})
this.selectedSalePlan.quantity = value * 1
this.selectedSalePlan.total = value * item.price * 1
},
handleDel() {
console.log(1)
},
......@@ -155,9 +185,9 @@
url: `/pages/select-sale-plan/select-sale-plan`
});
},
selectProduct() {
selectProduct(index) {
uni.navigateTo({
url: `/pages/select-product/select-product`
url: `/pages/select-product/select-product?from='quotaOrder'&index=${index}`
});
},
addPlanout() {
......
......@@ -3,12 +3,12 @@
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<view class="main">
<view class="middle view planout-block-item">
<view class="middle view">
<view class="text-block">
<text class="middle-date">产品名称</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
<input class="middle-date-des" type="text" v-model="condition.product" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<!-- <view class="text-block text-block-last">
<text class="middle-date">计划类型</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
......@@ -18,7 +18,7 @@
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
</view> -->
</view>
<view class="planout-block">
......@@ -28,8 +28,8 @@
</view>
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.id' :auto-close="false" :disabled='true'
:show="isOpened" @click="handleClick">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.PRODUCT_ID' :auto-close="false"
:disabled='true' :show="isOpened" @click="handleClick">
<template v-slot:left>
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
class="swipe-right-block__text"
......@@ -39,19 +39,19 @@
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date middle-date-select">产品编码</text>
<text class="middle-date-des middle-date-des-select">400820638</text>
<text class="middle-date-des middle-date-des-select">{{item.PRODUCT_ID}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">描述</text>
<text class="middle-date-des middle-date-des-select">原度五粮液061 72%500ml*6</text>
<text class="middle-date-des middle-date-des-select">{{item.SHORT_TEXT}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">产品类型</text>
<text class="middle-date-des middle-date-des-select">五粮液新品</text>
<text class="middle-date-des middle-date-des-select">{{item.PRODUCT_ID}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date middle-date-select">价格</text>
<text class="middle-date-des middle-date-des-select">2,38000</text>
<text class="middle-date-des middle-date-des-select">{{item.NORMS}}</text>
</view>
</view>
......@@ -66,12 +66,19 @@
mapState
} from 'vuex'
import {
apiProductSelect
} from '@/servers/common.js'
export default {
data() {
return {
isOpened: 'none',
array: ['2021', '2020', '2019', '2018'],
index: 0,
condition: {
product: ''
},
lists: [{
id: 1,
checked: false,
......@@ -87,7 +94,11 @@
price: 200
}
],
selectedProduct: {}
selectedProduct: {},
toPageParams: {
page: '',
index: 0
}
}
},
computed: {
......@@ -100,9 +111,10 @@
},
onNavigationBarButtonTap(e) {
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedProduct);
if (this.isOpened === 'left' && this.selectedProduct && this.selectedProduct.id) {
if (this.isOpened === 'left' && this.selectedProduct && this.selectedProduct.PRODUCT_ID) {
uni.$emit('selectedProduct', {
selectedProduct: this.selectedProduct
selectedProduct: this.selectedProduct,
index: this.toPageParams.index
})
uni.navigateBack({})
return
......@@ -126,9 +138,41 @@
// })
// #endif
},
onLoad(option) {
console.log('select-product', option)
const {
from,
index
} = option
this.toPageParams.index = index
this.toPageParams.page = from
},
created() {
this.getProduct();
},
methods: {
search() {
},
async getProduct() {
const params = {
'page': 1,
'pagesize': '10',
"MODE": "QUOTA",
"INFO": {
"PROCESS_TYPE": "ZS01",
"CUSTOMER": "0050000215"
},
"input": {
"SHORT_TEXT": this.condition.product
},
}
const res = await apiProductSelect(params)
console.log('ddd2', res)
this.lists = res && res.DATA.map((item) => {
item.checked = false
return item
})
},
bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
......@@ -140,7 +184,7 @@
handleChecked(e, item, index) {
console.log('当前索引:', e, index);
this.lists.forEach((cur) => {
if (cur.id === item.id) {
if (cur.PRODUCT_ID === item.PRODUCT_ID) {
cur.checked = !cur.checked
} else {
cur.checked = false
......
......@@ -9,8 +9,9 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange" :value="index" :range="array">
<text class="uni-input">{{array[index]}}</text>
<picker class="picker-block" @change="bindPickerYearChange" mode="date"
:value="condition.year" fields='year'>
<text class="uni-input">{{condition.year}}</text>
</picker>
</view>
</view>
......@@ -22,8 +23,9 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange" :value="index" :range="months">
<text class="uni-input">{{months[index]}}</text>
<picker class="picker-block" @change="bindPickerMonthChange" mode="date"
:value="condition.month" fields="month">
<text class="uni-input">{{condition.month}}</text>
</picker>
</view>
</view>
......@@ -50,8 +52,8 @@
</view>
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.id' :threshold='100' :auto-close="false"
:disabled='true' :show="isOpened">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.index' :threshold='100'
:auto-close="false" :disabled='true' :show="isOpened">
<template v-slot:left>
<view class="swipe-right-block" @click.stop="handleChecked($event,item, index)"><text
class="swipe-right-block__text"
......@@ -61,19 +63,19 @@
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">计划编码</text>
<text class="middle-date-des">400820638</text>
<text class="middle-date-des">{{item.PLAN_NUMBER}}</text>
</view>
<view class="text-block">
<text class="middle-date">类型</text>
<text class="middle-date-des">电商配额酒年度计划(1-5月)</text>
<text class="middle-date-des">{{item.PLAN_TYPE}}</text>
</view>
<view class="text-block">
<text class="middle-date">产品</text>
<text class="middle-date-des">电商配额酒年度计划(1-5月)</text>
<text class="middle-date-des">{{item.WLYBRAND}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">可用件数</text>
<text class="middle-date-des">2</text>
<text class="middle-date-des">{{item.REMAIN_QTY}}</text>
</view>
</view>
......@@ -87,6 +89,10 @@
import {
mapState
} from 'vuex'
import {
apiSalesPlanSelect
} from '@/servers/common.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default {
data() {
......@@ -95,6 +101,11 @@
array: ['2022', '2021', '2020', '2019', '2018'],
months: ['十二月', '十一月', '十月', '九月', '八月'],
index: 0,
condition: {
year: '',
month: '',
planType: ''
},
lists: [{
id: 1,
checked: false,
......@@ -123,7 +134,7 @@
},
onNavigationBarButtonTap(e) {
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedSalePlan);
if (this.isOpened === 'left' && this.selectedSalePlan && this.selectedSalePlan.id) {
if (this.isOpened === 'left' && this.selectedSalePlan && this.selectedSalePlan.PLAN_NUMBER) {
uni.$emit('selectedSalePlan', {
selectedSalePlan: this.selectedSalePlan
})
......@@ -149,13 +160,115 @@
// })
// #endif
},
created() {
this.condition.year = timeFormat(new Date(), 'yyyy')
this.condition.month = timeFormat(new Date(), 'mm')
this.getSalesPlan();
},
methods: {
async getSalesPlan() {
const params = {
'page': 1,
'pagesize': '10',
"info": {
"GUID": "00000000000000000000000000000000",
"OBJECT_ID": "",
"PROCESS_TYPE": "ZS01",
"CUSTOMER": "0050000215",
"CUST_NAME": "崇州顺辰商贸有限公司",
"CUSTOMER_TYPE": "V003",
"ZZFLD000000": "",
"ZZFLD000028": "",
"ZZFLD00002D": "81000010",
"ZZFLD00002D_DSCR": "董平",
"POSTING_DATE": "20220321",
"STATUS": "E0001",
"ZZFLD000001": "0005000006",
"ZZFLD00003E": "",
"ZZFLD000002": "230",
"ZZFLD000003": "000000510100",
"ZZFLD000004": "",
"ZZFLD000004_DSCR": "",
"ZZFLD00002J": "",
"ZZFLD00002K": "",
"ZZFLD00002L": "",
"ZZFLD00002M": "",
"ZZFLD00002N": "",
"SALES_ORG": "0 50000025",
"CHANNEL": "",
"DIVISION": "",
"CUST_PRIC_PROC": "1",
"TAX_GROUP_BP_01": "FULL",
"ZZFLD00003C": "",
"ZZFLD00009O": "0.00",
"ZZFLD00009Q": "0.00",
"ZHKYE": "0.00"
},
"item": {
"GUID": "",
"HEADER": "",
"NUMBER_INT": "0000000010",
"ITM_TYPE": "",
"ZZFLD000029": "V001",
"ZZFLD000005": "",
"ZZFLD000005_Z1": "",
"ZZFLD000006": "20220322",
"ZZFLD00002Q": "",
"ZZFLD00002Q_Z1": "",
"ORDERED_PROD": "040001005280115668",
"DESCRIPTION": "五粮液.1618(131) 52%618mL×6",
"ZZFLD00002S": "52%618ML×6",
"UNIT": "KAR",
"ZZFLD00002T": "盒",
"QUANTITY": "",
"ZZFLD00002U": "",
"ZZFLD00002W": "",
"ZZFLD000009": "",
"INVENTORY": "",
"ZZFLD00002E": "13.00%",
"NET_PRICE": "",
"ZZFLD00002X": "",
"NET_VALUE": "",
"ZZFLD00002Z": "100%",
"ZZFLD00002A": "",
"ZZFLD00002F": "",
"ZZFLD00002G": "",
"ZZFLD00002I": "",
"ZZFLD000007": "",
"ZZFLD000032": "",
"ZZFLD00002O": "",
"ZZFLD000035": "",
"ZZFLD00002B": "",
"ZZFLD000008": "",
"ZZFLD00002P": "",
"CURRENCY": "",
"MODE": "",
"WAREHOUSE": "",
"PRDTYPE": "",
"YEAR": "",
"ZZFLD00002Q_D": ""
},
"input": {
},
}
const res = await apiSalesPlanSelect(params)
this.lists = res.DATA.map((item) => {
item.checked = false
return item
})
console.log('ddd2', res)
},
search() {
},
bindPickerChange(e) {
bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.year = e.detail.value
},
bindPickerMonthChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
this.condition.month = e.detail.value
},
handleClick(e, content, index) {
console.log('click当前索引:', e, content, index);
......@@ -164,7 +277,7 @@
console.log('当前索引:', e, index);
this.lists.forEach((cur) => {
if (cur.id === item.id) {
if (cur.PLAN_NUMBER === item.PLAN_NUMBER) {
cur.checked = !cur.checked
} else {
cur.checked = false
......
import {deepMerge} from "@/utils/index.js";
import {
deepMerge
} from "@/utils/index.js";
import validate from "@/utils/validate.js";
class Request {
// 设置全局默认配置
......@@ -103,7 +105,7 @@ class Request {
constructor() {
this.config = {
baseUrl: '', // 请求的根域名
baseUrl: 'http://10.0.134.45:8000', // 请求的根域名
// 默认的请求头
header: {},
method: 'POST',
......
import apiHelper from './api.helper.js'
/**
* 产品查询
* @param name 账户名
* @param password 账户密码
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiProductSelect(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/product_ovs', params)
return res
}
/**
* 销售计划查询
* @param name 账户名
* @param password 账户密码
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiSalesPlanSelect(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/sales_plan_ovs', params)
return res
}
export default {
apiProductSelect,
apiSalesPlanSelect
}
import http from './api.helper.js'
import http from './api.helper.js'
import {
Base64
} from 'js-base64'
// 这里的vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token
// 同时,我们也可以在此使用getApp().globalData,如果你把token放在getApp().globalData的话,也是可以使用的
const install = (Vue, vm) => {
http.setConfig({
baseUrl: 'https://api.youzixy.com',
baseUrl: '',
// 如果将此值设置为true,拦截回调中将会返回服务端返回的所有数据response,而不是response.data
// 设置为true后,就需要在this.$u.http.interceptor.response进行多一次的判断,请打印查看具体值
// originalData: true,
......@@ -14,34 +17,35 @@ const install = (Vue, vm) => {
});
// 请求拦截,配置Token等参数
http.interceptor.request = (config) => {
config.header.Token = 'xxxxxx';
config.header['Authorization'] = `Basic ${Base64.encode('wangpc:LZY888@@')}`;
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
// config.header.token = vm.token;
// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
// config.header.token = vm.$store.state.token;
// 方式三,如果token放在了globalData,通过getApp().globalData获取
// config.header.token = getApp().globalData.username;
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
// const token = uni.getStorageSync('token');
// config.header.token = token;
return config;
return config;
}
// 响应拦截,判断状态码是否通过
http.interceptor.response = (res) => {
http.interceptor.response = (res) => {
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
if(res.code == 200) {
console.log('response-----', res)
if (res.MSGTYPE == 'S') {
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
return res.data;
return res;
} else return false;
}
}
export default {
install
}
\ No newline at end of file
}
import {
LOGIN
} from './base.api.js'
import apiHelper from './api.helper.js'
/**
* 登录服务
* @param name 账户名
* @param password 账户密码
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export async function login(params) {
const {
status,
data
} = await apiHelper.get(LOGIN, params, false)
return data
}
export default {
login
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment