From 7fc7bffeadb3cc75f3fa600ca56a6872e569c16c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 23 八月 2022 08:18:47 +0800
Subject: [PATCH] #
---
/dev/null | 27 ---------------------------
pages.json | 12 ------------
2 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/pages.json b/pages.json
index aa839c6..98385bf 100644
--- a/pages.json
+++ b/pages.json
@@ -12,18 +12,6 @@
"style": {
"navigationBarTitleText": "PDA棣栭〉"
}
- },{
- "path": "pages/basics/demo02",
- "style": {
- "navigationBarTitleText": "demo02",
- "navigationBarBackgroundColor":"#409EFF",
- "navigationBarTextStyle":"white"
- }
- },{
- "path": "pages/basics/demo",
- "style": {
- "navigationBarTitleText": "妯℃澘"
- }
},
{
"path": "pages/demo/index",
diff --git a/pages/basics/appe.vue b/pages/basics/appe.vue
deleted file mode 100644
index 6670216..0000000
--- a/pages/basics/appe.vue
+++ /dev/null
@@ -1,691 +0,0 @@
-<template>
- <view class="content">
- <uni-card :is-shadow="false" is-full>
- <text class="uni-h6">鏁呴殰涓婃姤鍚庯紝鍞悗浜哄憳浼氱涓�鏃堕棿鏀跺埌閫氱煡骞惰В鍐虫晠闅溿�傝濉啓鐪熷疄鎻忚堪鍙婂叾浠栦俊鎭紝鏂逛究鐩稿叧鍚庣画鏂规銆� 鈥斺�斺�斺�� 涓壃绔嬪簱</text>
- </uni-card>
- <view class="uni-common-mt">
- <form>
- <view class="uni-list">
- <!-- 鎵�灞為」鐩� -->
- <view class="uni-list-cell">
- <view class="uni-list-cell-left">
- <view class="uni-label redDot">鎵�灞為」鐩�</view>
- </view>
- <view class="uni-list-cell-right">
- <picker :range="host" @change="hostChange" :value="hostIndex" mode="selector">
- <view class="uni-input">{{host[hostIndex]}}</view>
- </picker>
- </view>
- </view>
- <!-- 鏁呴殰绫诲瀷 -->
- <view class="uni-list-cell">
- <view class="uni-list-cell-left">
- <view class="uni-label redDot">鏁呴殰绫诲瀷</view>
- </view>
- <view class="uni-list-cell-right">
- <picker :range="issueType" @change="issueTypeChange" :value="issueTypeIndex" mode="selector">
- <view class="uni-input">{{issueType[issueTypeIndex]}}</view>
- </picker>
- </view>
- </view>
- <!-- 鑱旂郴浜� -->
- <view class="uni-list-cell">
- <view class="uni-list-cell-left">
- <view class="uni-label">鑱旂郴浜�</view>
- </view>
- <view class="uni-list-cell-right">
- <input class="uni-input" v-model="discoverer" placeholder="璇疯緭鍏�" />
- </view>
- </view>
- <!-- 鑱旂郴鏂瑰紡 -->
- <view class="uni-list-cell">
- <view class="uni-list-cell-left">
- <view class="uni-label redDot">鑱旂郴鏂瑰紡</view>
- </view>
- <view class="uni-list-cell-right">
- <input class="uni-input" v-model="tel" placeholder="璇疯緭鍏�" />
- </view>
- </view>
- <!-- 鍙戠敓鏃ユ湡 -->
- <view class="uni-list-cell">
- <view class="uni-list-cell-left">
- <view class="uni-label redDot">鍙戠敓鏃ユ湡</view>
- </view>
- <view class="uni-list-cell-right">
- <picker mode="date" :value="startTime" @change="bindDateChange">
- <view class="uni-input">{{startTime}}</view>
- </picker>
- </view>
- </view>
- </view>
- <view class="uni-list" style="margin-top: 15rpx;">
- <view class="uni-title uni-common-pl redDot" style="padding: 20rpx 30rpx 10rpx 30rpx;">闂姒傝堪</view>
- <view class="uni-textarea">
- <textarea placeholder="璇疯緭鍏ュ叿浣撴弿杩�..." v-model="title" style="text-indent:15rpx;"/>
- </view>
- </view>
- <view class="uni-list" style="margin-top: 15rpx;">
- <view class="uni-list-cell cell-pd">
- <view class="uni-uploader">
- <view class="uni-uploader-head">
- <view class="uni-uploader-title">鐩稿叧鍥剧墖涓婁紶</view>
- <view class="uni-uploader-info">{{imageList.length}}/9</view>
- </view>
- <view class="uni-uploader-body">
- <view class="uni-uploader__files">
- <block v-for="(image,index) in imageList" :key="index">
- <view class="uni-uploader__file">
- <image class="uni-uploader__img" :src="image" :data-src="image" @tap="previewImage"></image>
- </view>
- </block>
- <view class="uni-uploader__input-box">
- <view class="uni-uploader__input" @tap="chooseImage"></view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view style="margin-top: 15rpx;">
- <template v-if="!videoSrc">
- <view class="uni-hello-addfile" @tap="chooseVideo">+ 娣诲姞瑙嗛</view>
- </template>
- <template v-else>
- <video :src="videoSrc" class="video"></video>
- </template>
- </view>
-
- <view class="uni-padding-wrap uni-common-mt" style="margin-bottom: 30rpx;">
- <button type="primary" @click="save">纭鎻愪氦</button>
- </view>
- </form>
- </view>
- </view>
-</template>
-
-<script>
- import permision from "@/common/permission.js"
- import uniPopup from '@/components/uni-popup/uni-popup.vue'
- var util = require('../../common/util.js');
-
- var formatLocation = util.formatLocation;
- var sourceType = [
- ['camera'],
- ['album'],
- ['camera', 'album']
- ]
- var sizeType = [
- ['compressed'],
- ['original'],
- ['compressed', 'original']
- ]
- function getParam(path, name) {
-聽 聽 聽 聽 var reg = new RegExp("(^|\\?|&)" + name + "=([^&]*)(\\s|&|$)", "i");
-聽 聽 聽 聽 if (reg.test(path))
-聽 聽 聽 聽 return unescape(RegExp.$2.replace(/\+/g, " "));
-聽 聽 聽 聽 return "";
-聽 聽 }
- function getDate(type) {
- const date = new Date();
-
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
-
- if (type === 'start') {
- year = year - 10;
- } else if (type === 'end') {
- year = year + 10;
- }
- month = month > 9 ? month : '0' + month;;
- day = day > 9 ? day : '0' + day;
-
- return `${year}-${month}-${day}`;
- }
- function isEmpty(obj){
- return typeof obj == "undefined" || obj == null || obj === "";
- }
- export default {
- components: {
- uniPopup
- },
- data() {
- return {
- // 琛ㄥ崟鏁版嵁
- title: null,
- tel: null,
- discoverer: null,
- startTime: getDate({
- format: true
- }),
- desc: null,
- memo: null,
- imageList: [],
- imageFileList: [],
- hostIndex: 0,
- host: ["璇烽�夋嫨椤圭洰"],
- issueTypeIndex: 0,
- issueType: ["璇烽�夋嫨绫诲瀷"],
- sourceTypeIndex: 2,
- sourceType: ['鎷嶇収', '鐩稿唽', '鎷嶇収鎴栫浉鍐�'],
- countIndex: 8,
- count: [1, 2, 3, 4, 5, 6, 7, 8, 9],
- hasLocation: false,
- location: {},
- locationAddress: '',
- type: '',
- videoSrc: ''
- }
- },
- onLoad() {
- this.initHost();
- this.initIssueType();
- },
- methods: {
- // 鍒濆鍖栭」鐩垪琛�
- initHost: function() {
- uni.request({
- url: this.baseUrl + '/app/host/list/auth',
- data: {
- },
- header: {
- "token": uni.getStorageSync('token')
- },
- success: (result) => {
- let res = result.data;
- if (res.code == 200) {
- for (let item of res.data) {
- this.host.push(item.name);
- }
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 500);
- } else {
- uni.showToast({title: res.msg,icon: "none",position: 'top'})
- }
- }
- });
- },
- // 鍒濆鍖栨晠闅滅被鍨�
- initIssueType: function() {
- uni.request({
- url: this.baseUrl + '/app/issue/type/auth',
- data: {
- },
- header: {
- // "token": uni.getStorageSync('token')
- },
- success: (result) => {
- let res = result.data;
- if (res.code == 200) {
- for (let item of res.data) {
- this.issueType.push(item.name);
- }
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 500);
- } else {
- uni.showToast({title: res.msg,icon: "none",position: 'top'})
- }
- }
- });
- },
- // 淇濆瓨鎻愪氦
- save: function() {
- let that = this;
- if (that.hostIndex === 0) {
- uni.showToast({title: "璇烽�夋嫨鎵�灞為」鐩�",icon: "none",position: 'top'})
- return;
- }
- let hostName = that.host[that.hostIndex];
- if (that.issueTypeIndex === 0) {
- uni.showToast({title: "璇烽�夋嫨鏁呴殰绫诲瀷",icon: "none",position: 'top'})
- return;
- }
- let issueTypeName = that.issueType[that.issueTypeIndex];
- if (isEmpty(that.tel)) {
- uni.showToast({title: "璇疯緭鍏ヨ仈绯绘柟寮�",icon: "none",position: 'top'})
- return;
- }
- if (isEmpty(that.title)) {
- uni.showToast({title: "璇疯緭鍏ラ棶棰樻杩�",icon: "none",position: 'top'})
- return;
- }
- uni.showLoading();
- uni.request({
- url: that.baseUrl + '/app/issue/save/auth',
- data: {
- hostName: hostName,
- issueTypeName: issueTypeName,
- discoverer: that.discoverer,
- tel: that.tel,
- startTime: that.startTime,
- title: that.title,
- imgArr: that.imageList,
- memo: that.memo,
- videoSrc: [that.videoSrc]
- },
- header: {
- "token": uni.getStorageSync('token')
- },
- success: (result) => {
- uni.hideLoading();
- let res = result.data;
- if (res.code == 200) {
- uni.showToast({title: res.msg,position: 'top'})
- that.hostIndex = 0;
- that.issueTypeIndex = 0;
- that.discoverer = null;
- that.tel = null;
- that.title = null;
- that.memo = null;
- that.imageList = [];
- that.imageFileList = [];
- that.startTime = getDate({
- format: true
- });
- that.videoSrc = null;
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 500);
- } else {
- uni.showToast({title: res.msg,icon: "none",position: 'top'})
- }
- }
- });
- },
- chooseLocation: function () {
- uni.chooseLocation({
- success: (res) => {
- this.hasLocation = true,
- this.location = formatLocation(res.longitude, res.latitude),
- this.locationAddress = res.address
- }
- })
- },
- issueTypeChange: function(e) {
- this.issueTypeIndex = parseInt(e.detail.value);
- },
- hostChange: function(e) {
- this.hostIndex = parseInt(e.detail.value);
- },
- sumbit: function(e){
- uni.showToast({title: "ok",icon: "none",position: 'top'})
- },
- bindPickerChange: function(e) {
- this.index = e.detail.value
- },
- bindDateChange: function(e) {
- this.startTime = e.detail.value
- },
- chooseImage: async function() {
- // #ifdef APP-PLUS
- // TODO 閫夋嫨鐩告満鎴栫浉鍐屾椂 闇�瑕佸脊鍑篴ctionsheet锛岀洰鍓嶆棤娉曡幏寰楁槸鐩告満杩樻槸鐩稿唽锛屽湪澶辫触鍥炶皟涓鐞�
- if (this.sourceTypeIndex !== 2) {
- let status = await this.checkPermission();
- if (status !== 1) {
- return;
- }
- }
- // #endif
-
- if (this.imageList.length === 9) {
- let isContinue = await this.isFullImg();
- if (!isContinue) {
- return;
- }
- }
- uni.chooseImage({
- sourceType: sourceType[this.sourceTypeIndex],
- sizeType: sizeType[this.sizeTypeIndex],
- count: this.imageList.length + this.count[this.countIndex] > 9 ? 9 - this.imageList.length : this.count[this.countIndex],
- success: (res) => {
- let that = this;
- uni.showLoading();
- for (var filePath of res.tempFilePaths) {
- uni.uploadFile({
- url : that.baseUrl + '/upload.action',
- filePath: filePath,
- name: 'file',
- success: function (result) {
- var result0 = JSON.parse(result.data);
- if(result0.code === 200) {
- that.imageList = that.imageList.concat(result0.data.url);
- } else {
- uni.showToast({title: result0.msg,icon: "none",position: 'top'})
- }
- }
- });
- }
- uni.hideLoading();
- uni.showToast({title: "鐓х墖涓婁紶鎴愬姛锛岃鑰愬績绛夊緟...",icon: "none",position: 'top'})
- that.imageFileList = that.imageFileList.concat(res.tempFiles);
- // this.imageList = this.imageList.concat(res.tempFilePaths);
- },
- fail: (err) => {
- // #ifdef APP-PLUS
- if (err['code'] && err.code !== 0 && this.sourceTypeIndex === 2) {
- this.checkPermission(err.code);
- }
- // #endif
- // #ifdef MP
- if(err.errMsg.indexOf('cancel') !== '-1'){
- return;
- }
- uni.getSetting({
- success: (res) => {
- let authStatus = false;
- switch (this.sourceTypeIndex) {
- case 0:
- authStatus = res.authSetting['scope.camera'];
- break;
- case 1:
- authStatus = res.authSetting['scope.album'];
- break;
- case 2:
- authStatus = res.authSetting['scope.album'] && res.authSetting['scope.camera'];
- break;
- default:
- break;
- }
- if (!authStatus) {
- uni.showModal({
- title: '鎺堟潈澶辫触',
- content: 'Hello uni-app闇�瑕佷粠鎮ㄧ殑鐩告満鎴栫浉鍐岃幏鍙栧浘鐗囷紝璇峰湪璁剧疆鐣岄潰鎵撳紑鐩稿叧鏉冮檺',
- success: (res) => {
- if (res.confirm) {
- uni.openSetting()
- }
- }
- })
- }
- }
- })
- // #endif
- }
- })
- },
- isFullImg: function() {
- return new Promise((res) => {
- uni.showModal({
- content: "宸茬粡鏈�9寮犲浘鐗囦簡,鏄惁娓呯┖鐜版湁鍥剧墖锛�",
- success: (e) => {
- if (e.confirm) {
- this.imageList = [];
- this.imageFileList = [];
- res(true);
- } else {
- res(false)
- }
- },
- fail: () => {
- res(false)
- }
- })
- })
- },
- previewImage: function(e) {
- var current = e.target.dataset.src
- uni.previewImage({
- current: current,
- urls: this.imageList
- })
- },
- async checkPermission(code) {
- let type = code ? code - 1 : this.sourceTypeIndex;
- let status = permision.isIOS ? await permision.requestIOS(sourceType[type][0]) :
- await permision.requestAndroid(type === 0 ? 'android.permission.CAMERA' :
- 'android.permission.READ_EXTERNAL_STORAGE');
-
- if (status === null || status === 1) {
- status = 1;
- } else {
- uni.showModal({
- content: "娌℃湁寮�鍚潈闄�",
- confirmText: "璁剧疆",
- success: function(res) {
- if (res.confirm) {
- permision.gotoAppSetting();
- }
- }
- })
- }
-
- return status;
- }
- ,
- // 瀹氫綅
- togglePopup(type) {
- this.type = type;
- },
- showConfirm() {
- this.type = 'showpopup';
- },
- hideConfirm() {
- this.type = '';
- },
- async getLocation() {
- // #ifdef APP-PLUS
- let status = await this.checkPermission();
- if (status !== 1) {
- return;
- }
- // #endif
- // #ifdef MP-WEIXIN || MP-TOUTIAO || MP-QQ
- let status = await this.getSetting();
- if (status === 2) {
- this.showConfirm();
- return;
- }
- // #endif
-
- this.doGetLocation();
- },
- doGetLocation() {
- uni.getLocation({
- success: (res) => {
- this.hasLocation = true;
- this.location = formatLocation(res.longitude, res.latitude);
- },
- fail: (err) => {
- // #ifdef MP-BAIDU
- if (err.errCode === 202 || err.errCode === 10003) { // 202妯℃嫙鍣� 10003鐪熸満 user deny
- this.showConfirm();
- }
- // #endif
- // #ifndef MP-BAIDU
- if (err.errMsg.indexOf("auth deny") >= 0) {
- uni.showToast({
- title: "璁块棶浣嶇疆琚嫆缁�"
- })
- } else {
- uni.showToast({
- title: err.errMsg
- })
- }
- // #endif
- }
- })
- },
- getSetting: function() {
- return new Promise((resolve, reject) => {
- uni.getSetting({
- success: (res) => {
- if (res.authSetting['scope.userLocation'] === undefined) {
- resolve(0);
- return;
- }
- if (res.authSetting['scope.userLocation']) {
- resolve(1);
- } else {
- resolve(2);
- }
- }
- });
- });
- },
- openSetting: function() {
- this.hideConfirm();
- uni.openSetting({
- success: (res) => {
- if (res.authSetting && res.authSetting['scope.userLocation']) {
- this.doGetLocation();
- }
- },
- fail: (err) => {}
- })
- },
- async checkPermission() {
- let status = permision.isIOS ? await permision.requestIOS('location') :
- await permision.requestAndroid('android.permission.ACCESS_FINE_LOCATION');
-
- if (status === null || status === 1) {
- status = 1;
- } else if (status === 2) {
- uni.showModal({
- content: "绯荤粺瀹氫綅宸插叧闂�",
- confirmText: "纭畾",
- showCancel: false,
- success: function(res) {
- }
- })
- } else if (status.code) {
- uni.showModal({
- content: status.message
- })
- } else {
- uni.showModal({
- content: "闇�瑕佸畾浣嶆潈闄�",
- confirmText: "璁剧疆",
- success: function(res) {
- if (res.confirm) {
- permision.gotoAppSetting();
- }
- }
- })
- }
-
- return status;
- },
- clear: function() {
- this.hasLocation = false;
- },
- chooseVideo: function() {
- let that = this;
- uni.chooseVideo({
- camera: 'back',
- sourceType: ['camera', 'album'],
- success: (res) => {
- uni.showLoading();
- uni.uploadFile({
- url : that.baseUrl + '/upload.action',
- filePath: res.tempFilePath,
- name: 'file',
- success: function (result) {
- uni.hideLoading();
- var result0 = JSON.parse(result.data);
- if(result0.code === 200) {
- that.videoSrc = result0.data.url;
- } else {
- uni.showToast({title: result0.msg,icon: "none",position: 'top'})
- }
- }
- });
- uni.showToast({title: "瑙嗛涓婁紶鎴愬姛锛岃鑰愬績绛夊緟...",icon: "none",position: 'top'})
},
- fail: (err) => {
- uni.getSetting({
- success: (res) => {
- let authStatus = false;
- switch (this.sourceTypeIndex) {
- case 0:
- authStatus = res.authSetting['scope.camera'];
- break;
- case 1:
- authStatus = res.authSetting['scope.album'];
- break;
- case 2:
- authStatus = res.authSetting['scope.album'] && res.authSetting['scope.camera'];
- break;
- default:
- break;
- }
- if (!authStatus) {
- uni.showModal({
- title: '鎺堟潈澶辫触',
- content: '闇�瑕佷粠鎮ㄧ殑鐩告満鎴栫浉鍐岃幏鍙栬棰戯紝璇峰湪璁剧疆鐣岄潰鎵撳紑鐩稿叧鏉冮檺',
- success: (res) => {
- if (res.confirm) {
- uni.openSetting()
- }
- }
- })
- }
- }
- })
- }
- })
- }
- }
- }
-</script>
-
-<style>
- @import '../../common/uni.css';
-
- .uni-title {
- color: rgb(102, 102, 102);
- }
- .uni-label {
- color: rgb(102, 102, 102);
- }
- .uni-form-item .title {
- padding: 20rpx 0;
- }
- .cell-pd {
- padding: 22rpx 30rpx;
- }
-
- .list-pd {
- margin-top: 50rpx;
- }
- .redDot:after {
- content: ' *';
- color: red;
- }
- .popup-view {
- width: 500rpx;
- }
-
- .popup-title {
- display: block;
- font-size: 16px;
- line-height: 3;
- margin-bottom: 10px;
- text-align: center;
- }
-
- .popup-buttons button {
- margin-left: 4px;
- margin-right: 4px;
- }
-
- .video {
- width: 100%;
- }
-
- .camera-tips {
- padding: 10rpx 30rpx;
- }
-</style>
diff --git a/pages/basics/checkout2.vue b/pages/basics/checkout2.vue
deleted file mode 100644
index 9990525..0000000
--- a/pages/basics/checkout2.vue
+++ /dev/null
@@ -1,520 +0,0 @@
-<template>
- <view >
- <scroll-view scroll-y catch:touchmove="touchmove">
- <view class="square-2">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>鎵樼洏鏉$爜</text></view>
- </view>
- <view class="square-content">
- <view class="content-input">
- <input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"
- @input="findBarcode()" :focus="barcodeFocus" @focus="focuss" >
- <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
- </view>
- </view>
- </view>
- <view class="square-2">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>璐у搧鏉$爜</text></view>
- </view>
- <view class="square-content">
- <view class="content-input-combox" style="width: 94%;">
- <input style="width: 90%;" type="text" v-model="matnr" placeholder="鎵爜 / 杈撳叆" @input="findMat()":focus="focus"
- @focus="focuss">
- <!-- @focus="focuss" -->
- <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
- </view>
- </view>
- </view>
-
- <view class="square-1">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>鍟嗗搧鍒楄〃</text></view>
- </view>
- </view>
- <view class="square-none" v-show="matList.length === 0">
- <view class="v-show">鏆傛棤鏇村鏁版嵁...</view>
- </view>
- <checkbox-group @change="checkbox">
- <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
- <view class="data-list-left">
- <view class="matnr" :style="item.color">No:{{listLen-index}}</view>
- <view class="matnr" :style="item.color">{{item.matnr}}-{{item.batch}}</view>
- </view>
- <view class="data-list-right">
- <uni-icons type="trash" size="20" color="#a5a5a5" @click="remove(item,index)"></uni-icons>
- </view>
- </view>
- </checkbox-group>
- </scroll-view>
- <view class="footer flex justify-around">
- <view>
- <button class="cu-btn lg" @click="resst()">閲嶇疆</button>
- </view>
- <view>
- <button class="cu-btn lg pakin-btn bg-blue" @click="comb()">纭</button>
- </view>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- import permision from "@/common/permission.js"
- export default {
- data() {
- return {
- barcode: '',
- barcodeFocus:true,
- focus:false,
- type: 'center',
- searchBox: 'hide',
- pick:'hide',
- matnr:'',
- matList:[{matnr:'1101842-10000',batch:'22047515999',color:{color:'red'}}],
- // matList:[],
- result: '',
- siteList:[],
- desc:'',
- staNoList:[],
- satNo:'',
- listLen:0,
- msgType: 'success',
- messageText: '杩欐槸涓�鏉℃垚鍔熸彁绀�',
- fontColor:{color:'red'}
- }
- },
- onReady() {
- setInterval(function(){
- // console.log(this.matList)
- // this.getMatListLen()
- },1000)
- },
- mounted(){
- const UIP = uni.getStorageSync('UIP');
- this.baseIP = UIP;
- const UPORT = uni.getStorageSync('UPORT');
- this.basePORT = UPORT
- this.getOutBound();
-
- },
- methods: {
- messageToggle(type) {
- this.msgType = type
- this.messageText = `杩欐槸涓�鏉�${type}娑堟伅鎻愮ず`
- this.$refs.message.open()
- },
- choseStaNo() {
- for (var i = 0;i < this.staNoList.length; i++) {
- if (this.desc == this.staNoList[i].desc) {
- this.staNo = this.staNoList[i].siteId
- }
- }
- },
- getMatListLen() {
- // this.listLen = this.matList.length;
- },
- focuss() {
- // uni.hideKeyboard()
- },
- resst() {
- this.matList = []
- this.barcode = ''
- this.matnr = ''
- this.desc = ''
- uni.vibrateShort();
- },
- removeBarcode() {
- this.barcode = ''
- uni.vibrateShort();
- this.barcodeFocus = false;
- this.$nextTick(function() {
- this.barcodeFocus = true;
- });
- },
- removeMatnr() {
- this.matnr = ''
- uni.vibrateShort();
- this.focus = false;
- this.$nextTick(function() {
- this.focus = true;
- });
- },
- remove(item,index) {
- this.matList.splice(index,1);
- this.listLen = this.matList.length
- this.messageToggle('success')
- this.messageText = '鍒犻櫎鎴愬姛'
- uni.vibrateShort();
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- uni.showLoading();
- uni.request({
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/confirm/auth',
- data: that.matList,
- method: 'POST',
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- uni.showLoading();
- var res = result.data
- if (res.code === 200) {
- uni.showToast({
- title: res.msg,
- position: 'bottom',
- duration: 1000
- });
- that.matList = []
- that.barcode = ''
- that.matnr = ''
- that.desc = ''
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- }
- }
- });
- },
- selectMat() {
- let that = this
- uni.vibrateShort();
- uni.showLoading();
- uni.navigateTo({
- url: "matSelect",
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- res.eventChannel.emit('acceptDataFromOpenerPage', {baseIP:that.baseIP, basePORT:that.basePORT })
- }
- });
- that.matnr = ''
- },
- findMat() {
- let that = this
- uni.request({
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/query/auth/v2',
- data: {
- staNo:that.staNo,
- matnr:that.matnr
- },
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data;
- if(res.code === 200 ) {
- if(res.data) {
- for(let i = 0;i<that.matList.length;i++) {
- for (let j = 0;j < res.data.length; j++) {
- if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data[j])) {
- res.data.splice(j,1)
- }
- }
- }
- that.matList = res.data.concat(that.matList)
- that.listLen = that.matList.length;
- that.focus = false;
- that.$nextTick(function() {
- that.focus = true;
- });
- that.matnr = ''
- }
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- }
-
- }
- });
- },
- addMatList(mat) {
- console.log(mat)
- if (this.matList.length == 0){
-
- // this.matList.push(mat[0])
- // this.matList.prototype.push.apply(mat)
- } else {
-
- let toUnshift = true
- for (var i = 0; i < this.matList.length; i++) {
- let matnr = this.matList[i].matnr
- if (matnr == this.matList[i].matnr) {
- // this.messageToggle('warn')
- // this.messageText = matnr + '宸茬粡鎵弿锛岃鍕块噸澶嶆壂鎻�'
- toUnshift = false
- }
- }
- if (toUnshift) {
- this.matList.unshift(mat[0])
- }
-
- }
- console.log(this.matList)
- },
- findBarcode() {
- let that = this
- uni.request({
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/query/auth',
- data: {
- barcode:that.barcode
- },
- header: {
- 'token':uni.getStorageSync('token'),
-
- },
- success(result) {
- var res = result.data;
- if(res.data) {
- for(let i = 0;i<that.matList.length;i++) {
- for (let j = 0;j < res.data.length; j++) {
- if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data[j])) {
- res.data.splice(j,1)
- }
- }
- }
- that.matList = res.data.concat(that.matList)
- }
- that.listLen = that.matList.length;
- }
- });
-
- },
- getOutBound() { // 鑾峰彇鍑哄簱鍙�
- let that = this
- uni.request({
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/available/take/site',
- method: 'POST',
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- for (var i = 0; i < res.data.length; i++){
- that.siteList.push(res.data[i].desc)
- }
- that.staNoList = res.data
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- }
- },
- });
- }, // getOutBound
- getCheckDetl() { // 鑾峰彇鍑哄簱鍙h揣鐗╀俊鎭�
- let that = this
-
- }, // getCheckDetl
- change(e) {
- },
- toggle(type) {
- this.type = type
- // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦� uni-popup 缁勪欢涓婄粦瀹� type灞炴��
- this.$refs.goodsSearch.open(type)
- },
- checkbox: function (e) {
- var items = this.data,
- values = e.detail.value;
- for (var i = 0, lenI = items.length; i < lenI; ++i) {
- const item = items[i]
- item.id = item.id + ''
- if(values.indexOf(item.id) >= 0){
- this.$set(item,'checked',true)
- }else{
- this.$set(item,'checked',false)
- }
- }
- if (values.length == items.length) {
- this.check = true
- this.checkText = "鍙栨秷鍏ㄩ��"
- } else {
- this.check = false
- this.checkText = "鍏ㄩ��"
- }
- uni.vibrateShort();
- },
- }
- }
-</script>
-
-<style>
- /* @import "../../colorui/main.css";
- @import "../../colorui/icon.css"; */
-
- .pak-seach-box {
- background-color: #FFFFFF;
- margin: 15rpx 15rpx 0rpx 15rpx;
- width: 96%;
- height: 150rpx;
- border-radius: 20rpx;
- }
- .box-top{
- display: block;
- height: 60rpx;
- width: 720rpx;
- }
- .color-block-blue {
- background-color: #1E9FFF;
- display: inline-block;
- float: left;
- margin: 15rpx 15rpx 0 15rpx;
- width: 12rpx;
- height: 40rpx;
- border: 5rpx solid #1E9FFF;
- border-radius: 20rpx;
- }
- .title {
- display: inline-block;
- float: left;
- font-size: 34rpx;
- font-weight: 700;
- height: 50rpx;
- line-height: 50rpx;
- margin-top: 10rpx;
- }
- .box-buttom {
- display: inline-block;
- background-color: #f0f0f0;
- width: 65%;
- height: 60rpx;
- border-radius: 20rpx;
- margin: 15rpx 15rpx 0rpx 15rpx;
- }
- .box-buttom input {
- width: 75%;
- float: left;
- margin: 8rpx 10rpx 0rpx 25rpx;
- }
- .box-buttom .search-icon{
- width: 60rpx;
- height: 60rpx;
- float: right;
- margin-top: 5rpx;
- margin-right: 10rpx;
- }
-
- /* .pak-seach-box input {
- background-color: #ededed;
- border: 1rpx solid #d8d8d8;
- display: inline-block;
- border-radius: 20rpx;
- float: left;
- width: 70%;
- height: 60rpx;
- line-height: 60rpx;
- margin: 15rpx 15rpx 0rpx 15rpx;
- padding-left: 20rpx;
- } */
- .pak-seach-box button {
- background-color: #1E9FFF;
- color: #ffffff;
- display: inline-block;
- float: right;
- width: 180rpx;
- height: 60rpx;
- margin: 15rpx 15rpx 0rpx 15rpx;
- line-height: 60rpx;
- }
- .pakin-btn {
- background-color: #1E9FFF;
- }
- .pak-data-box {
- background-color: #F1F1F1;
- margin: 15rpx 15rpx 0rpx 15rpx;
- width: 96%;
- height: 70rpx;
- border-radius: 20rpx;
- }
- .pak-data-box .box-top {
- background-color: #FFFFFF;
- height: 70rpx;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- }
- .bg-false {
- background-color: #FFFFFF;
- }
- .bg-true {
- background-color: #ebebeb;
- }
- .data-list {
- border-bottom: 1px solid #d8d8d8;
- height: 130rpx;
- margin: 15rpx;
- border-radius: 20rpx;
- }
- .data-list:first-child {
- margin-top: 20rpx;
- }
- .data-list:last-child {
- margin-bottom: 200rpx;
- }
- /* .data-list-left {
- display: inline-block;
- float: left;
- text-align: center;
- width: 100rpx;
- height: 180rpx;
- line-height: 180rpx;
- } */
- .data-list-left {
- width: 550rpx;
- /* background-color: #007AFF; */
- display: inline-block;
- float: left;
- margin-left: 4%;
- height: 130rpx;
- color: #676767;
- }
- .matnr {
- display: inline-block;
- width: 100%;
- font-size: 14px;
- font-weight: 700;
- padding-top: 15rpx;
- /* height: 130rpx;
- line-height: 130rpx; */
- }
- .data-list-right {
- /* background-color: #6739B6; */
- display: inline-block;
- float: right;
- width: 100rpx;
- height: 130rpx;
- line-height: 130rpx;
- }
-</style>
\ No newline at end of file
diff --git a/pages/basics/demo.vue b/pages/basics/demo.vue
deleted file mode 100644
index bd0cdf2..0000000
--- a/pages/basics/demo.vue
+++ /dev/null
@@ -1,138 +0,0 @@
-<template>
- <view>
-
- <view class="square-2">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>娌℃湁鎸夐挳</text></view>
- </view>
- <view class="square-content">
- <view class="content-input">
- <input type="text" v-model="yyds" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
- <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
- </view>
- </view>
- </view>
- <checkbox-group >
- <view v-for="(item,index) in staNoList" :key="index" class="data-list " >
- <view class="data-list-left">
- <view class="matnr">{{item}}</view>
- </view>
- </view>
- </checkbox-group>
- <view class="square-2">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>鍙充晶鎸夐挳</text></view>
- </view>
- <view class="square-content">
- <view class="content-input-btn">
- <input type="text">
- <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
- </view>
- <view class="content-btn">
- <button class="cu-btn bg-blue pda-btn">鎻愬彇</button>
- </view>
- </view>
- </view>
-
- <view class="square-3">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>宸︿晶涓嬫媺</text></view>
- </view>
- <view class="square-content">
- <view class="content-combox">
-
- <uni-combox emptyTips="鏆傛棤鏁版嵁" :candidates="staNoList" v-model="staNo" placeholder="绔欏彴鍙�"></uni-combox>
- </view>
-
- </view>
- <view class="square-content">
- <view class="content-input-combox">
- <input type="text">
- <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
- </view>
- </view>
- </view>
-
- <view class="square-1">
- <view class="square-title">
- <view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>鍟嗗搧鍒楄〃</text></view>
- </view>
- </view>
-
- <view class="square-none">
- <view class="v-show">鏆傛棤鏇村鏁版嵁...</view>
- </view>
- <!-- 鍟嗗搧鍒楄〃 -->
- <view>
- <view></view>
- </view>
- <!-- 琛ㄥ崟 -->
- <view class="square-form">
- <view class="form-title">
- <text>缁撴潫鏃堕棿</text>
- </view>
- <view class="form-input">
- <input type="text" placeholder="璇疯緭鍏�...">
- </view>
- </view>
- <!-- 琛ㄥ崟蹇呭~ -->
- <view class="square-form">
- <view class="form-title">
- <text>缁撴潫鏃堕棿</text>
- </view>
- <view class="form-input">
- <input type="text" placeholder="璇疯緭鍏�...">
- </view>
- </view>
- <!-- 鎼滅储妗� -->
- <view class="square-1">
- <view class="searchBox">
- <view class="searchIcon"><uni-icons type="search" size="20" color="#dadada"></uni-icons></view>
- <view class="searchArea"><input type="text" placeholder=" 璇疯緭鍏�"></view>
- <view class="closeIcon"><uni-icons type="closeempty" size="20" color="#dadada"></uni-icons></view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- staNoList:[],
- staNo:'',
- yyds:'',
- focus:''
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- uni.hideKeyboard()
- },20)
- // #endif
- },
- methods:{
- find(){
- this.staNoList.push(this.yyds);
-
-
- this.focus = false;
- setTimeout(()=>{
- this.yyds ='';
- this.focus = true;
- console.log(this.yyds ,'1')
- }, 50);
- }
- }
- }
-
-</script>
-
-<style>
-
-</style>
diff --git a/pages/basics/demo02.vue b/pages/basics/demo02.vue
deleted file mode 100644
index d03e40c..0000000
--- a/pages/basics/demo02.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-<template>
- <!-- 绐楀彛瀹瑰櫒 -->
- <view style="width: 100%;">
- <!-- 鏉$爜鎵弿妗� -->
- <view class="search-box">
- <view>
- <view class="search-box-title">搴撲綅鐮� : </view>
- <input class="search-box-input" placeholder-style="placeholderStyle" type="text" >
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- placeholderStyle:'placeholder-style'
- }
- }
- }
-</script>
-
-<style>
- @import url("@/static/css/common.css");
-</style>
\ No newline at end of file
--
Gitblit v1.9.1