From 16dfdd76ec17b4e1201b64e2019ed0df505b0022 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 31 七月 2024 09:02:23 +0800
Subject: [PATCH] #
---
/dev/null | 0
pages.json | 238 -----------------------------------------------------------
2 files changed, 0 insertions(+), 238 deletions(-)
diff --git a/pages.json b/pages.json
index 9c27e08..62fddac 100644
--- a/pages.json
+++ b/pages.json
@@ -7,12 +7,6 @@
}
},
{
- "path": "pages/home/home",
- "style": {
- "navigationBarTitleText": "涓� 椤�"
- }
- },
- {
"path": "pages/mat/matSelected",
"style": {
"navigationBarTitleText": "鐗╂枡"
@@ -25,215 +19,15 @@
}
},
{
- "path": "pages/pakin/pakin",
- "style": {
- "navigationBarTitleText": "缁� 鎵�"
- }
- },
- {
- "path": "pages/pakin/pakin2",
- "style": {
- "navigationBarTitleText": "缁� 鎵�"
- }
- },
- {
- "path": "pages/AGV/AGVPakin",
- "style": {
- "navigationBarTitleText": "AGV缁勬墭"
- }
- },
- {
- "path": "pages/AGV/AGVPakinBing",
- "style": {
- "navigationBarTitleText": "AGV涓婃灦缁戝畾"
- }
- },
- {
- "path": "pages/AGV/AGVPakinOn",
- "style": {
- "navigationBarTitleText": "AGV涓婃灦缁勬墭"
- }
- },
- {
- "path": "pages/AGV/AGVStart",
- "style": {
- "navigationBarTitleText": "AGV鍚姩鍏ュ簱"
- }
- },
- {
- "path": "pages/order/orderPakin",
- "style": {
- "navigationBarTitleText": "璁㈠崟鍏ュ簱"
- }
- },
- {
- "path": "pages/order/orderPutOn",
- "style": {
- "navigationBarTitleText": "璁㈠崟涓婃灦"
- }
- },
- {
- "path": "pages/order/orderPutDown",
- "style": {
- "navigationBarTitleText": "璁㈠崟涓嬫灦"
- }
- },
- {
- "path": "pages/stock/stockQuery",
- "style": {
- "navigationBarTitleText": "搴撳瓨鏌ヨ"
- }
- },
- {
- "path": "pages/stock/stockCheck",
- "style": {
- "navigationBarTitleText": "鐩樼偣"
- }
- },
- {
- "path": "pages/print/printUNI",
- "style": {
- "navigationBarTitleText": "UNI鎵撳嵃"
- }
- },
- {
- "path": "pages/print/print",
- "style": {
- "navigationBarTitleText": "鎵撳嵃"
- }
- },
- {
- "path": "pages/stock/restock",
- "style": {
- "navigationBarTitleText": "琛ヨ揣"
- }
- },
- {
- "path": "pages/pakin/piking",
- "style": {
- "navigationBarTitleText": "鐩樼偣/鎷f枡杞叏鏉�"
- }
- },
- {
- "path": "pages/pakin/putOn",
- "style": {
- "navigationBarTitleText": "缁勬墭涓婃灦"
- }
- },
- {
- "path": "pages/stock/changePallet",
- "style": {
- "navigationBarTitleText": "鎹㈡澘缁戝畾"
- }
- },
-
- {
- "path": "pages/print/qr",
- "style": {
- "navigationBarTitleText": "浜岀淮鐮�"
- }
- },
-
- {
"path": "pages/mat/matList",
"style": {
"navigationBarTitleText": "鍟嗗搧鍒楄〃"
}
},
{
- "path": "pages/pakin/pickAgain",
- "style": {
- "navigationBarTitleText": "鍐嶆鎷f枡"
- }
- },
- {
"path": "pages/login/logOut",
"style": {
"navigationBarTitleText": "閫�鍑虹櫥褰�"
- }
- }
- ,{
- "path" : "pages/phps/stock/changePallet",
- "style" :
- {
- "navigationBarTitleText" : "鎹㈡澘缁戝畾",
- "enablePullDownRefresh" : false
- }
- }
- ,{
- "path" : "pages/phps/stock/restock",
- "style" :
- {
- "navigationBarTitleText" : "琛ヨ揣",
- "enablePullDownRefresh" : false
- }
- }
- ,{
- "path" : "pages/phps/stock/stockCheck",
- "style" :
- {
- "navigationBarTitleText" : "鐩樼偣",
- "enablePullDownRefresh" : false
- }
- }
- ,{
- "path" : "pages/phps/stock/stockQuery",
- "style" :
- {
- "navigationBarTitleText" : "搴撳瓨鏌ヨ",
- "enablePullDownRefresh" : false
- }
- }
- ,{
- "path" : "pages/phps/pakin/pakin",
- "style" :
- {
- "navigationBarTitleText" : "缁勬墭鍏ュ簱",
- "enablePullDownRefresh" : false
- }
- },{
- "path" : "pages/phps/pakin/piking",
- "style" :
- {
- "navigationBarTitleText" : "杞叏鏉�",
- "enablePullDownRefresh" : false
- }
- },{
- "path" : "pages/phps/order/orderPakin",
- "style" :
- {
- "navigationBarTitleText" : "璁㈠崟鍏ュ簱",
- "enablePullDownRefresh" : false
- }
- },{
- "path" : "pages/phps/order/orderPutDown",
- "style" :
- {
- "navigationBarTitleText" : "璁㈠崟涓嬫灦",
- "enablePullDownRefresh" : false
- }
- },{
- "path" : "pages/phps/order/orderPutOn",
- "style" :
- {
- "navigationBarTitleText" : "璁㈠崟涓婃灦",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/phps/module/modulePakin",
- "style" :
- {
- "navigationBarTitleText" : "缁勪欢鍏ュ簱",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/phps/module/module",
- "style" :
- {
- "navigationBarTitleText" : "閫夋嫨缁勪欢",
- "enablePullDownRefresh" : false
}
},
{
@@ -249,38 +43,6 @@
"style" :
{
"navigationBarTitleText" : "鍏ュ嚭搴撶鐞�",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/home/fourWayManage",
- "style" :
- {
- "navigationBarTitleText" : "鍥涘悜搴�",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/home/basicStore",
- "style" :
- {
- "navigationBarTitleText" : "骞充粨",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/home/other",
- "style" :
- {
- "navigationBarTitleText" : "閫氱敤",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/home/testView",
- "style" :
- {
- "navigationBarTitleText" : "娴嬭瘯",
"enablePullDownRefresh" : false
}
},
diff --git a/pages/AGV/AGVPakin.vue b/pages/AGV/AGVPakin.vue
deleted file mode 100644
index 6f92ee6..0000000
--- a/pages/AGV/AGVPakin.vue
+++ /dev/null
@@ -1,529 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璁㈠崟鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus"
- @input="orderNoInput()">
- </view>
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- orderNo: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- orderNoFocus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 10) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- // 鍒ゆ柇鐗╂枡闀垮害鏄惁涓�1
- if (that.dataList.length >= 1) {
- this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�"
- this.messageToggle('warn')
- that.matnr = ''
- return
- }
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } 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.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/agvMobile/comb/auth',
- data: JSON.stringify({
- orderNo: that.orderNo,
- barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .list:first-child {
- margin-top: 460rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 300rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/AGV/AGVPakinBing.vue b/pages/AGV/AGVPakinBing.vue
deleted file mode 100644
index 7f1848f..0000000
--- a/pages/AGV/AGVPakinBing.vue
+++ /dev/null
@@ -1,521 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鏆傚瓨浣�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus"
- @input="stationCodeInput()">
- <view class="item-right">
- <button></button>
- <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> -->
- <!-- <uni-icons type="right" color="#c1c1c1"></uni-icons> -->
- </view>
- </view>
- </view>
- <!-- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view> -->
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁戝畾</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁戝畾 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- stationCode: '',
- stationCodeFocus: false,
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- stationCodeInput() {
- setTimeout(() => {
- var len = this.stationCode.length
- if (len != 15) {
- this.stationCode = ''
- this.stationCodeFocus = true
- uni.showToast({
- title: '鏆傚瓨鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- return;
- }
- this.focuss()
- }, 200)
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 10) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.stationCodeFocuss()
- }, 200)
- },
- // 鏆傚瓨浣嶆湁璇噸缃�
- stationCodeFocuss() {
- let that = this;
- that.stationCodeFocus = false;
- setTimeout(() => {
- that.stationCodeFocus = true;
- }, 100);
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } 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.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁戝畾!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/agvMobile/combBinging/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- stationCode: that.stationCode
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁戝畾鎴愬姛"
- that.messageToggle('success')
- // const innerAudioContext = uni.createInnerAudioContext();
- // innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.stationCode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.stationCode = ''
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/AGV/AGVPakinOn.vue b/pages/AGV/AGVPakinOn.vue
deleted file mode 100644
index 33c2652..0000000
--- a/pages/AGV/AGVPakinOn.vue
+++ /dev/null
@@ -1,628 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璁㈠崟鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus"
- @input="orderNoInput()">
- </view>
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鏆傚瓨浣�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus"
- @input="stationCodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="agvStart('warn')">鍚姩鍏ュ簱</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb(1)" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 鍚姩鍏ュ簱 -->
- <view>
- <uni-popup ref="agvStartConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="agvStartConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- orderNo: '',
- stationCode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- stationCodeFocus: false,
- matFocus: false,
- orderNoFocus: false,
- matData: '',
- removeNum: 0,
- devNo: [],
- flag: 0
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- stationCodeInput() {
- setTimeout(() => {
- var len = this.stationCode.length
- if (len != 15) {
- this.stationCode = ''
- this.stationCodeFocus = true
- uni.showToast({
- title: '鏆傚瓨鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- return;
- }
- this.focuss()
- }, 200)
- },
- // 绗﹀悎鏉′欢鐨勮烦杞埌涓嬩竴鏍忕洰
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 10) {
- this.barcode = ''
- this.barcodeFocus = true
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- return;
- }
- this.stationCodeFocuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鏆傚瓨浣嶆湁璇噸缃�
- stationCodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.stationCodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- if (that.dataList.length >= 1) {
- this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�"
- this.messageToggle('warn')
- that.matnr = ''
- return
- }
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } 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.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- if (this.dataList.length < 1) {
- return
- }
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb(e) {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/agvMobile/comb/auth',
- data: JSON.stringify({
- orderNo: that.orderNo,
- barcode: that.barcode,
- locno: that.stationCode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.flag = 1
- if (e == 1) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- }
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- that.flag = 0
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- that.flag = 0
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.stationCode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.stationCode = ''
- this.barcodeFocus = true
- },
- // 鍚姩鍏ュ簱
- agvStart(type) {
- if (this.dataList.length < 1) {
- return
- }
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪鍚姩鍏ュ簱!'
- this.$refs.agvStartConfirm.open()
- },
- agvStartConfirm() {
- uni.showLoading()
- this.devNo = []
- this.devNo.push(this.stationCode)
- this.comb(2)
- setTimeout(()=>{
- if (this.flag != 1) {
- uni.hideLoading()
- return
- }
- this.start()
- uni.hideLoading()
- },500)
-
- },
- start() {
- let that = this
- uni.request({
- url: that.baseUrl + '/agvMobile/pakin/auth',
- data: JSON.stringify({
- devNo: that.devNo
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "鍚姩鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
-
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .list:first-child {
- margin-top: 540rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 400rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/AGV/AGVStart.vue b/pages/AGV/AGVStart.vue
deleted file mode 100644
index 7010001..0000000
--- a/pages/AGV/AGVStart.vue
+++ /dev/null
@@ -1,566 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">妤煎彿:</view>
- <uni-combox :candidates="floorList" placeholder="璇烽�夋嫨妤煎彿" v-model="floor" @input="getFloor"></uni-combox>
- </view>
- <view class="item">
- <view class="code-decs">鏆傚瓨浣�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus"
- @input="stationCodeInput()">
- </view>
- </view>
-
- <view class="mat-list-title">
- <view style="-webkit-flex: 1;flex: 1;">绔欑偣鍒楄〃</view>
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i" :class="'bg-'+item.color">
- <view class="aside">
- <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/>
- </view>
- <view class="list-left" style="display: flex;justify-content: center;">
- {{item.devNo}}
- </view>
- <view class="list-right">
- <!-- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> -->
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鍚姩</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭鍚姩 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- stationCode: '',
- stationCodeFocus: true,
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- floorList: [1,3],
- floor: "",
- devNo: []
- }
- },
- onLoad() {
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- stationCodeInput() {
- setTimeout(() => {
- var len = this.stationCode.length
- if (len != 15) {
- this.stationCode = ''
- this.stationCodeFocus = true
- uni.showToast({
- title: '鏆傚瓨鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- return;
- }
- this.pushDevNo()
- this.stationCodeFocuss()
- }, 200)
- },
- pushDevNo() {
- var devNo = {"devNo":this.stationCode}
- if (this.dataList.length == 0) {
- this.dataList.push(devNo)
- return
- }
- var flag = false
- for(var i = 0; i < this.dataList.length; i++ ) {
- if (this.dataList[i].devNo == devNo.devNo) {
- this.messageText = "绔欑偣閲嶅"
- this.messageToggle('warn')
- return
- } else {
- flag = true
- }
- }
- if(flag) {
- this.dataList.push(devNo)
- }
-
- },
- stationCodeFocuss() {
- let that = this;
- this.stationCode = ''
- that.stationCodeFocus = false;
- setTimeout(() => {
- that.stationCodeFocus = true;
- }, 100);
- },
- getChecked() {
- var checkedList = []
- for(var i = 0; i < this.dataList.length; i++) {
- var t = !this.dataList[i].checked
- if (this.dataList[i].checked) {
- checkedList.push(this.dataList[i])
- }
- }
- this.dataList = checkedList
- },
- set(e) {
- var ck = this.dataList[e].checked
- this.dataList[e].checked = ck ? false:true
- },
- getFloor() {
- let that = this
- if (this.floor == '') {
- return
- }
- uni.request({
- url: that.baseUrl + '/agvMobile/getBasDevp/auth',
- data: {
- floor: that.floor
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- method: 'POST',
- success(res) {
- res = res.data
- for(var i = 0; i < res.data.length; i++) {
- if (res.data[i].locSts === 'F') {
- // res.data[i]["color"] = "red"
- that.dataList.push(res.data[i])
- }
- }
- }
- });
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } 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.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪鍚姩!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- this.devNo = []
- uni.vibrateShort();
- let that = this;
- for (var i = 0; i < this.dataList.length; i++) {
- if (this.dataList[i].checked) {
- this.devNo.push(this.dataList[i].devNo)
- }
- }
- uni.request({
- url: that.baseUrl + '/agvMobile/pakin/auth',
- data: JSON.stringify({
- devNo: that.devNo
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "鍚姩鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.stationCode = ''
- this.floor = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.stationCode = ''
- this.floor = ''
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .bg-red {
- background-color: #e54d42;
- color: #ffffff;
- }
- .bg-white {
- background-color: #ffffff;
- color: #666666;
- }
- .list:first-child {
- margin-top: 360rpx;
- }
- .aside {
- width: 100rpx;
- /* background-color: #303133; */
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 100rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- display: flex;
- align-items: center;
- height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/home/basicStore.vue b/pages/home/basicStore.vue
deleted file mode 100644
index 2c31cf8..0000000
--- a/pages/home/basicStore.vue
+++ /dev/null
@@ -1,267 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y class="page">
- <view class="nav-list">
- <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
- :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
- v-for="(item,index) in elements" :key="index">
- <view class="nav-title">{{item.title}}</view>
- <view class="nav-name">{{item.name}}</view>
- <text :class="'cuIcon-' + item.cuIcon"></text>
- </navigator>
- </view>
- <view class="cu-tabbar-height"></view>
- </scroll-view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- icon: '',
- elements: [],
- project: 'tzsk',
- elements2: [
- {
- title: '骞冲簱缁勬墭鍏ュ簱',
- name: 'pakin',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/pakin2'
- },
- {
- title: '骞冲簱鏃犳墭涓婃灦',
- name: 'goodsUp',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/goodsUp'
- },
- {
- title: '骞冲簱缁勬墭涓婃灦',
- name: 'PutOn',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/order/orderPutOn'
- },
- {
- title: '璁㈠崟涓婃灦',
- name: 'orderPutOn',
- color: 'yellow',
- cuIcon: 'pullup',
- url: '/order/orderPutOn'
- },
- {
- title: '璁㈠崟涓嬫灦',
- name: 'orderPutDown',
- color: 'olive',
- cuIcon: 'pulldown',
- url: '/order/orderPutDown'
- },
- {
- title: '骞冲簱绉诲簱',
- name: 'locChange',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/locChage'
- },
- {
- title: '骞冲簱鎷h揣',
- name: 'locChange',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/locPick'
- },
- {
- title: '骞冲簱绉诲簱',
- name: 'locChange',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/locChage'
- },
- ],
- colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.project = uni.getStorageSync('project')
- this.getAuth()
- this.backGroundRepeat()
- },
- methods: {
- backGroundRepeat() {
- let len = this.colorList.length
- let i = 0
- for (let k in this.elements2) {
- if (i == len) {
- i = 0
- }
- this.elements2[k].color = this.colorList[i]
- i++
- }
- },
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: { 'token': uni.getStorageSync('token') },
- method: 'POST',
- success(res) {
- console.log(res);
- if (res.statusCode === 404) {
- that.elements = that.elements2
- return
- }
- res = res.data
- that.elements = []
- if (res.code === 200) {
- if (res.data == undefined || res.data == null || res.data == "") {
- that.elements = that.elements2
- return
- }
- for (var i = 0; i < res.data.length; i++) {
- if (res.data.length < 0) {
- break;
- }
- that.getIcon(res.data[i].title)
- that.elements.unshift({
- title: res.data[i].name,
- name: res.data[i].title,
- color: that.colorList[i],
- cuIcon: that.icon,
- url: `/${that.project}${res.data[i].action}`
- })
- }
- that.elements.push({
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- })
- } else if (res.code === 403) {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else if(res.status === 404) {
- that.elements = that.elements2
- // uni.showToast({
- // title: '榛樿涓婚〉',
- // icon: "none",
- // position: 'top'
- // })
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- fail(err) {
- console.log(err);
- }
- })
- },
- getIcon(e) {
- const ways = ['pakin','orderPakin','orderPutOn']
- if (ways.includes(e)) {
- this.icon = 'pullup'
- }
- }
- }
- }
-</script>
-
-<style>
- .page {
- height: 100vh;
- }
-
- .bg-red {
- background-color: #e54d42;
- color: #ffffff;
- }
-
- .bg-orange {
- background-color: #f37b1d;
- color: #ffffff;
- }
-
- .bg-yellow {
- background-color: #fbbd08;
- color: #333333;
- }
-
- .bg-olive {
- background-color: #8dc63f;
- color: #ffffff;
- }
-
- .bg-green {
- background-color: #39b54a;
- color: #ffffff;
- }
-
- .bg-cyan {
- background-color: #1cbbb4;
- color: #ffffff;
- }
-
- .bg-blue {
- background-color: #0081ff;
- color: #ffffff;
- }
-
- .bg-purple {
- background-color: #6739b6;
- color: #ffffff;
- }
-
- .bg-mauve {
- background-color: #9c26b0;
- color: #ffffff;
- }
-
- .bg-pink {
- background-color: #e03997;
- color: #ffffff;
- }
-
- .bg-brown {
- background-color: #a5673f;
- color: #ffffff;
- }
-
- .bg-grey {
- background-color: #8799a3;
- color: #ffffff;
- }
-
- .bg-gray {
- background-color: #f0f0f0;
- color: #333333;
- }
-
- .bg-black {
- background-color: #333333;
- color: #ffffff;
- }
-
- .bg-white {
- background-color: #ffffff;
- color: #666666;
- }
-</style>
diff --git a/pages/home/fourWayManage.vue b/pages/home/fourWayManage.vue
deleted file mode 100644
index dd98951..0000000
--- a/pages/home/fourWayManage.vue
+++ /dev/null
@@ -1,283 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y class="page">
- <view class="nav-list">
- <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
- :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
- v-for="(item,index) in elements" :key="index">
- <view class="nav-title">{{item.title}}</view>
- <view class="nav-name">{{item.name}}</view>
- <text :class="'cuIcon-' + item.cuIcon"></text>
- </navigator>
- </view>
- <view class="cu-tabbar-height"></view>
- </scroll-view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- icon: '',
- elements: [],
- project: 'tzsk',
- elements2: [
- {
- title: '鍥涢」缁勬墭鍏ュ簱',
- name: 'pakin',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/pakin3'
- },
- {
- title: '鍑哄簱鎷i��',
- name: 'checkOut',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/checkOut'
- },
- {
- title: '璁㈠崟鍏ュ簱',
- name: 'orderPakin',
- color: 'red',
- cuIcon: 'pullup',
- url: '/order/orderPakin'
- },
- {
- title: '鎵樼洏瑙g粦',
- name: 'untie',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/untie'
- },
- {
- title: '鍐嶆鎷f枡',
- name: 'changePallet',
- color: 'green',
- cuIcon: 'order',
- url: '/pakin/pickAgain'
- },
-
- {
- title: '搴撳瓨鏌ヨ',
- name: 'stockQuery',
- color: 'green',
- cuIcon: 'check',
- url: `/tzsk/stock/stockQuery`
- },
- {
- title: '鐩樼偣',
- name: 'stockCheck',
- color: 'red',
- cuIcon: 'post',
- url: '/stock/stockCheck'
- },
- {
- title: '鎹㈡澘缁戝畾',
- name: 'changePallet',
- color: 'green',
- cuIcon: 'order',
- url: '/stock/changePallet'
- },
- {
- title: '琛ヨ揣',
- name: 'restock',
- color: 'yellow',
- cuIcon: 'punch',
- url: '/stock/restock'
- },
- {
- title: '杞叏鏉�',
- name: 'piking',
- color: 'olive',
- cuIcon: 'order',
- url: '/pakin/piking'
- },
-
- ],
- colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.project = uni.getStorageSync('project')
- this.getAuth()
- this.backGroundRepeat()
- },
- methods: {
- backGroundRepeat() {
- let len = this.colorList.length
- let i = 0
- for (let k in this.elements2) {
- if (i == len) {
- i = 0
- }
- this.elements2[k].color = this.colorList[i]
- i++
- }
- },
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: { 'token': uni.getStorageSync('token') },
- method: 'POST',
- success(res) {
- console.log(res);
- if (res.statusCode === 404) {
- that.elements = that.elements2
- return
- }
- res = res.data
- that.elements = []
- if (res.code === 200) {
- if (res.data == undefined || res.data == null || res.data == "") {
- that.elements = that.elements2
- return
- }
- for (var i = 0; i < res.data.length; i++) {
- if (res.data.length < 0) {
- break;
- }
- that.getIcon(res.data[i].title)
- that.elements.unshift({
- title: res.data[i].name,
- name: res.data[i].title,
- color: that.colorList[i],
- cuIcon: that.icon,
- url: `/${that.project}${res.data[i].action}`
- })
- }
- that.elements.push({
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- })
- } else if (res.code === 403) {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else if(res.status === 404) {
- that.elements = that.elements2
- // uni.showToast({
- // title: '榛樿涓婚〉',
- // icon: "none",
- // position: 'top'
- // })
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- fail(err) {
- console.log(err);
- }
- })
- },
- getIcon(e) {
- const ways = ['pakin','orderPakin','orderPutOn']
- if (ways.includes(e)) {
- this.icon = 'pullup'
- }
- }
- }
- }
-</script>
-
-<style>
- .page {
- height: 100vh;
- }
-
- .bg-red {
- background-color: #e54d42;
- color: #ffffff;
- }
-
- .bg-orange {
- background-color: #f37b1d;
- color: #ffffff;
- }
-
- .bg-yellow {
- background-color: #fbbd08;
- color: #333333;
- }
-
- .bg-olive {
- background-color: #8dc63f;
- color: #ffffff;
- }
-
- .bg-green {
- background-color: #39b54a;
- color: #ffffff;
- }
-
- .bg-cyan {
- background-color: #1cbbb4;
- color: #ffffff;
- }
-
- .bg-blue {
- background-color: #0081ff;
- color: #ffffff;
- }
-
- .bg-purple {
- background-color: #6739b6;
- color: #ffffff;
- }
-
- .bg-mauve {
- background-color: #9c26b0;
- color: #ffffff;
- }
-
- .bg-pink {
- background-color: #e03997;
- color: #ffffff;
- }
-
- .bg-brown {
- background-color: #a5673f;
- color: #ffffff;
- }
-
- .bg-grey {
- background-color: #8799a3;
- color: #ffffff;
- }
-
- .bg-gray {
- background-color: #f0f0f0;
- color: #333333;
- }
-
- .bg-black {
- background-color: #333333;
- color: #ffffff;
- }
-
- .bg-white {
- background-color: #ffffff;
- color: #666666;
- }
-</style>
\ No newline at end of file
diff --git a/pages/home/home.vue b/pages/home/home.vue
deleted file mode 100644
index de1596e..0000000
--- a/pages/home/home.vue
+++ /dev/null
@@ -1,423 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y class="page">
- <view class="nav-list">
- <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
- :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
- v-for="(item,index) in elements" :key="index">
- <view class="nav-title">{{item.title}}</view>
- <view class="nav-name">{{item.name}}</view>
- <text :class="'cuIcon-' + item.cuIcon"></text>
- </navigator>
- </view>
- <view class="cu-tabbar-height"></view>
- </scroll-view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- icon: '',
- elements: [],
- project: 'tzsk',
- elements2: [
- {
- title: 'AGV缁勬墭',
- name: 'AGVPakin',
- color: 'blue',
- // cuIcon: 'pullup',
- url: `/tzsk/AGV/AGVPakin`
- },
- {
- title: 'AGV鐩樼偣/鎷f枡',
- name: 'AGVPick',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: `/tzsk/AGV/AGVPick`
- },
-
- {
- title: 'AGV涓婃灦缁戝畾',
- name: 'AGVPakinBing',
- color: 'mauve',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVPakinBing'
- },
- {
- title: 'AGV鍚姩鍏ュ簱',
- name: 'AGVStart',
- color: 'pink',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVStart'
- },
- {
- title: 'AGV涓婃灦缁勬墭',
- name: 'AGVPakinOn',
- color: 'brown',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVPakinOn'
- },
- {
- title: 'AGV瀹瑰櫒绂诲満',
- name: 'AGVContainerMove',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVContainerMove'
- },
- {
- title: 'AGV鏉$爜',
- name: 'AGVCode',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVCode'
- },
- {
- title: '骞冲簱缁勬墭鍏ュ簱',
- name: 'pakin',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/pakin2'
- },
- {
- title: '鍥涢」缁勬墭鍏ュ簱',
- name: 'pakin',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/pakin3'
- },
- {
- title: '骞冲簱缁勬墭涓婃灦',
- name: 'PutOn',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/order/orderPutOn'
- },
- {
- title: '鍑哄簱鎷i��',
- name: 'checkOut',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/checkOut'
- },
- {
- title: '璁㈠崟涓婃灦',
- name: 'orderPutOn',
- color: 'yellow',
- cuIcon: 'pullup',
- url: '/order/orderPutOn'
- },
- {
- title: '璁㈠崟涓嬫灦',
- name: 'orderPutDown',
- color: 'olive',
- cuIcon: 'pulldown',
- url: '/order/orderPutDown'
- },
- {
- title: '璁㈠崟鍏ュ簱',
- name: 'orderPakin',
- color: 'red',
- cuIcon: 'pullup',
- url: '/order/orderPakin'
- },
-
-
- {
- title: '璁㈠崟鎷h揣',
- name: 'orderPick',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/order/orderPick'
- },
- {
- title: '鎵樼洏瑙g粦',
- name: 'untie',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/untie'
- },
- {
- title: '骞冲簱绉诲簱',
- name: 'locChange',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/locChage'
- },
- {
- title: '骞冲簱鎷h揣',
- name: 'locChange',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/pakin/locPick'
- },
- {
- title: '涓存椂鍏ュ簱',
- name: 'pakin',
- color: 'cyan',
- cuIcon: 'pullup',
- url: '/pakin/pakin2'
- },
-
- {
- title: '鍐嶆鎷f枡',
- name: 'changePallet',
- color: 'green',
- cuIcon: 'order',
- url: '/pakin/pickAgain'
- },
-
-
- {
- title: '缁勬墭涓婃灦',
- name: 'putOn',
- color: 'orange',
- cuIcon: 'pullup',
- url: '/pakin/putOn'
- },
-
- {
- title: '搴撳瓨鏌ヨ',
- name: 'stockQuery',
- color: 'green',
- cuIcon: 'check',
- url: `/tzsk/stock/stockQuery`
- },
- {
- title: '鐩樼偣',
- name: 'stockCheck',
- color: 'red',
- cuIcon: 'post',
- url: '/stock/stockCheck'
- },
-
- {
- title: '鎹㈡澘缁戝畾',
- name: 'changePallet',
- color: 'green',
- cuIcon: 'order',
- url: '/stock/changePallet'
- },
- {
- title: '琛ヨ揣',
- name: 'restock',
- color: 'yellow',
- cuIcon: 'punch',
- url: '/stock/restock'
- },
- {
- title: '杞叏鏉�',
- name: 'piking',
- color: 'olive',
- cuIcon: 'order',
- url: '/pakin/piking'
- },
- {
- title: '鎵撳嵃',
- name: 'print',
- color: 'purple',
- cuIcon: 'text',
- url: '/print/print'
- },
- {
- title: '鍟嗗搧鎵撳嵃',
- name: 'matList',
- color: 'orange',
- cuIcon: 'post',
- url: '/mat/matList'
- },
- {
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- },
-
- ],
- colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.project = uni.getStorageSync('project')
- this.getAuth()
- this.backGroundRepeat()
- },
- methods: {
- backGroundRepeat() {
- let len = this.colorList.length
- let i = 0
- for (let k in this.elements2) {
- if (i == len) {
- i = 0
- }
- this.elements2[k].color = this.colorList[i]
- i++
- }
- },
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: { 'token': uni.getStorageSync('token') },
- method: 'POST',
- success(res) {
- console.log(res);
- if (res.statusCode === 404) {
- that.elements = that.elements2
- return
- }
- res = res.data
- that.elements = []
- if (res.code === 200) {
- if (res.data == undefined || res.data == null || res.data == "") {
- that.elements = that.elements2
- return
- }
- for (var i = 0; i < res.data.length; i++) {
- if (res.data.length < 0) {
- break;
- }
- that.getIcon(res.data[i].title)
- that.elements.unshift({
- title: res.data[i].name,
- name: res.data[i].title,
- color: that.colorList[i],
- cuIcon: that.icon,
- url: `/${that.project}${res.data[i].action}`
- })
- }
- that.elements.push({
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- })
- } else if (res.code === 403) {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else if(res.status === 404) {
- that.elements = that.elements2
- // uni.showToast({
- // title: '榛樿涓婚〉',
- // icon: "none",
- // position: 'top'
- // })
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- fail(err) {
- console.log(err);
- }
- })
- },
- getIcon(e) {
- const ways = ['pakin','orderPakin','orderPutOn']
- if (ways.includes(e)) {
- this.icon = 'pullup'
- }
- }
- }
- }
-</script>
-
-<style>
- .page {
- height: 100vh;
- }
-
- .bg-red {
- background-color: #e54d42;
- color: #ffffff;
- }
-
- .bg-orange {
- background-color: #f37b1d;
- color: #ffffff;
- }
-
- .bg-yellow {
- background-color: #fbbd08;
- color: #333333;
- }
-
- .bg-olive {
- background-color: #8dc63f;
- color: #ffffff;
- }
-
- .bg-green {
- background-color: #39b54a;
- color: #ffffff;
- }
-
- .bg-cyan {
- background-color: #1cbbb4;
- color: #ffffff;
- }
-
- .bg-blue {
- background-color: #0081ff;
- color: #ffffff;
- }
-
- .bg-purple {
- background-color: #6739b6;
- color: #ffffff;
- }
-
- .bg-mauve {
- background-color: #9c26b0;
- color: #ffffff;
- }
-
- .bg-pink {
- background-color: #e03997;
- color: #ffffff;
- }
-
- .bg-brown {
- background-color: #a5673f;
- color: #ffffff;
- }
-
- .bg-grey {
- background-color: #8799a3;
- color: #ffffff;
- }
-
- .bg-gray {
- background-color: #f0f0f0;
- color: #333333;
- }
-
- .bg-black {
- background-color: #333333;
- color: #ffffff;
- }
-
- .bg-white {
- background-color: #ffffff;
- color: #666666;
- }
-</style>
\ No newline at end of file
diff --git a/pages/home/other.vue b/pages/home/other.vue
deleted file mode 100644
index 385df96..0000000
--- a/pages/home/other.vue
+++ /dev/null
@@ -1,218 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y class="page">
- <view class="nav-list">
- <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
- :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
- v-for="(item,index) in elements" :key="index">
- <view class="nav-title">{{item.title}}</view>
- <view class="nav-name">{{item.name}}</view>
- <text :class="'cuIcon-' + item.cuIcon"></text>
- </navigator>
- </view>
- <view class="cu-tabbar-height"></view>
- </scroll-view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- icon: '',
- elements: [],
- project: 'tzsk',
- elements2: [
- {
- title: '閲囪喘鍏ュ簱鍗�',
- name: 'purchaseOrder',
- color: 'blue',
- // cuIcon: 'pullup',
- url: `/phyz/AGV/purchaseOrder`
- },
- ],
- colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.project = uni.getStorageSync('project')
- this.getAuth()
- this.backGroundRepeat()
- },
- methods: {
- backGroundRepeat() {
- let len = this.colorList.length
- let i = 0
- for (let k in this.elements2) {
- if (i == len) {
- i = 0
- }
- this.elements2[k].color = this.colorList[i]
- i++
- }
- },
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: { 'token': uni.getStorageSync('token') },
- method: 'POST',
- success(res) {
- console.log(res);
- if (res.statusCode === 404) {
- that.elements = that.elements2
- return
- }
- res = res.data
- that.elements = []
- if (res.code === 200) {
- if (res.data == undefined || res.data == null || res.data == "") {
- that.elements = that.elements2
- return
- }
- for (var i = 0; i < res.data.length; i++) {
- if (res.data.length < 0) {
- break;
- }
- that.getIcon(res.data[i].title)
- that.elements.unshift({
- title: res.data[i].name,
- name: res.data[i].title,
- color: that.colorList[i],
- cuIcon: that.icon,
- url: `/${that.project}${res.data[i].action}`
- })
- }
- that.elements.push({
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- })
- } else if (res.code === 403) {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else if(res.status === 404) {
- that.elements = that.elements2
- // uni.showToast({
- // title: '榛樿涓婚〉',
- // icon: "none",
- // position: 'top'
- // })
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- fail(err) {
- console.log(err);
- }
- })
- },
- getIcon(e) {
- const ways = ['pakin','orderPakin','orderPutOn']
- if (ways.includes(e)) {
- this.icon = 'pullup'
- }
- }
- }
- }
-</script>
-
-<style>
- .page {
- height: 100vh;
- }
-
- .bg-red {
- background-color: #e54d42;
- color: #ffffff;
- }
-
- .bg-orange {
- background-color: #f37b1d;
- color: #ffffff;
- }
-
- .bg-yellow {
- background-color: #fbbd08;
- color: #333333;
- }
-
- .bg-olive {
- background-color: #8dc63f;
- color: #ffffff;
- }
-
- .bg-green {
- background-color: #39b54a;
- color: #ffffff;
- }
-
- .bg-cyan {
- background-color: #1cbbb4;
- color: #ffffff;
- }
-
- .bg-blue {
- background-color: #0081ff;
- color: #ffffff;
- }
-
- .bg-purple {
- background-color: #6739b6;
- color: #ffffff;
- }
-
- .bg-mauve {
- background-color: #9c26b0;
- color: #ffffff;
- }
-
- .bg-pink {
- background-color: #e03997;
- color: #ffffff;
- }
-
- .bg-brown {
- background-color: #a5673f;
- color: #ffffff;
- }
-
- .bg-grey {
- background-color: #8799a3;
- color: #ffffff;
- }
-
- .bg-gray {
- background-color: #f0f0f0;
- color: #333333;
- }
-
- .bg-black {
- background-color: #333333;
- color: #ffffff;
- }
-
- .bg-white {
- background-color: #ffffff;
- color: #666666;
- }
-</style>
diff --git a/pages/home/testView.vue b/pages/home/testView.vue
deleted file mode 100644
index a0e4122..0000000
--- a/pages/home/testView.vue
+++ /dev/null
@@ -1,262 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y class="page">
- <view class="nav-list">
- <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
- :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
- v-for="(item,index) in elements" :key="index">
- <view class="nav-title">{{item.title}}</view>
- <view class="nav-name">{{item.name}}</view>
- <text :class="'cuIcon-' + item.cuIcon"></text>
- </navigator>
- </view>
- <view class="cu-tabbar-height"></view>
- </scroll-view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- icon: '',
- elements: [],
- project: 'tzsk',
- elements2: [
- {
- title: 'AGV缁勬墭',
- name: 'AGVPakin',
- color: 'blue',
- // cuIcon: 'pullup',
- url: `/tzsk/AGV/AGVPakin`
- },
- {
- title: 'AGV鐩樼偣/鎷f枡',
- name: 'AGVPick',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: `/tzsk/AGV/AGVPick`
- },
-
- {
- title: 'AGV涓婃灦缁戝畾',
- name: 'AGVPakinBing',
- color: 'mauve',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVPakinBing'
- },
- {
- title: 'AGV鍚姩鍏ュ簱',
- name: 'AGVStart',
- color: 'pink',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVStart'
- },
- {
- title: 'AGV涓婃灦缁勬墭',
- name: 'AGVPakinOn',
- color: 'brown',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVPakinOn'
- },
- {
- title: 'AGV瀹瑰櫒绂诲満',
- name: 'AGVContainerMove',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVContainerMove'
- },
- {
- title: 'AGV鏉$爜',
- name: 'AGVCode',
- color: 'cyan',
- // cuIcon: 'pullup',
- url: '/tzsk/AGV/AGVCode'
- },
- ],
- colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.project = uni.getStorageSync('project')
- this.getAuth()
- this.backGroundRepeat()
- },
- methods: {
- backGroundRepeat() {
- let len = this.colorList.length
- let i = 0
- for (let k in this.elements2) {
- if (i == len) {
- i = 0
- }
- this.elements2[k].color = this.colorList[i]
- i++
- }
- },
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: { 'token': uni.getStorageSync('token') },
- method: 'POST',
- success(res) {
- console.log(res);
- if (res.statusCode === 404) {
- that.elements = that.elements2
- return
- }
- res = res.data
- that.elements = []
- if (res.code === 200) {
- if (res.data == undefined || res.data == null || res.data == "") {
- that.elements = that.elements2
- return
- }
- for (var i = 0; i < res.data.length; i++) {
- if (res.data.length < 0) {
- break;
- }
- that.getIcon(res.data[i].title)
- that.elements.unshift({
- title: res.data[i].name,
- name: res.data[i].title,
- color: that.colorList[i],
- cuIcon: that.icon,
- url: `/${that.project}${res.data[i].action}`
- })
- }
- that.elements.push({
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- })
- } else if (res.code === 403) {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else if(res.status === 404) {
- that.elements = that.elements2
- // uni.showToast({
- // title: '榛樿涓婚〉',
- // icon: "none",
- // position: 'top'
- // })
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- fail(err) {
- console.log(err);
- }
- })
- },
- getIcon(e) {
- const ways = ['pakin','orderPakin','orderPutOn']
- if (ways.includes(e)) {
- this.icon = 'pullup'
- }
- }
- }
- }
-</script>
-
-<style>
- .page {
- height: 100vh;
- }
-
- .bg-red {
- background-color: #e54d42;
- color: #ffffff;
- }
-
- .bg-orange {
- background-color: #f37b1d;
- color: #ffffff;
- }
-
- .bg-yellow {
- background-color: #fbbd08;
- color: #333333;
- }
-
- .bg-olive {
- background-color: #8dc63f;
- color: #ffffff;
- }
-
- .bg-green {
- background-color: #39b54a;
- color: #ffffff;
- }
-
- .bg-cyan {
- background-color: #1cbbb4;
- color: #ffffff;
- }
-
- .bg-blue {
- background-color: #0081ff;
- color: #ffffff;
- }
-
- .bg-purple {
- background-color: #6739b6;
- color: #ffffff;
- }
-
- .bg-mauve {
- background-color: #9c26b0;
- color: #ffffff;
- }
-
- .bg-pink {
- background-color: #e03997;
- color: #ffffff;
- }
-
- .bg-brown {
- background-color: #a5673f;
- color: #ffffff;
- }
-
- .bg-grey {
- background-color: #8799a3;
- color: #ffffff;
- }
-
- .bg-gray {
- background-color: #f0f0f0;
- color: #333333;
- }
-
- .bg-black {
- background-color: #333333;
- color: #ffffff;
- }
-
- .bg-white {
- background-color: #ffffff;
- color: #666666;
- }
-</style>
-
diff --git a/pages/order/orderPakin.vue b/pages/order/orderPakin.vue
deleted file mode 100644
index ed713f7..0000000
--- a/pages/order/orderPakin.vue
+++ /dev/null
@@ -1,511 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @confirm="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> -->
- <!-- <uni-icons type="right" color="#c1c1c1"></uni-icons> -->
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鍏ュ簱</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭鍏ュ簱 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- // if (matnr[2] === null) {
- // matnr[2] = ''
- // }
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪鍏ュ簱!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '鍏ュ簱鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "鍏ュ簱鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.matnr = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 280rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 140rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/order/orderPutDown.vue b/pages/order/orderPutDown.vue
deleted file mode 100644
index dcf2de6..0000000
--- a/pages/order/orderPutDown.vue
+++ /dev/null
@@ -1,529 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">搴撲綅鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">涓嬫灦</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭涓嬫灦 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- barcode: '',
- barcodeFocus: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪涓嬫灦!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '涓嬫灦鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/manDetl/out',
- data: JSON.stringify({
- locNo: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "涓嬫灦鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 280rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/order/orderPutOn.vue b/pages/order/orderPutOn.vue
deleted file mode 100644
index ba692e6..0000000
--- a/pages/order/orderPutOn.vue
+++ /dev/null
@@ -1,559 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鐗╂枡鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- </view>
- </view>
- <view class="item">
- <view class="code-decs">搴撲綅鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus">
- <button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">鎺ㄨ崘</button>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <view>
- <!-- 鏅�氬脊绐� -->
- <uni-popup ref="popup" background-color="#fff">
- <scroll-view scroll-y="true" class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
- <view class="recommend" v-for="item in recommendLocs" @click="chose(item)"> {{ item }}</view>
- </scroll-view>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- barcode: '',
- barcodeFocus: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: false,
- matFocus: true,
- matData: '',
- removeNum: 0,
- type: 'center',
- recommendLocs: [],
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.recommendLoc()
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- // 鎺ㄨ崘搴撲綅
- recommendLoc() {
- let that = this
- that.recommendLocs = []
- uni.request({
- url: that.baseUrl + '/node/recommendLoc',
- data: {matnr: that.matnr},
- header: {'token': uni.getStorageSync('token')},
- success(res) {
- res = res.data
- if (res.code == 200 && res.data) {
- that.recommendLocs = res.data
- }
- }
-
- })
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/manDetl/in',
- data: JSON.stringify({
- locNo: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 280rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
deleted file mode 100644
index 1035979..0000000
--- a/pages/pakin/pakin.vue
+++ /dev/null
@@ -1,503 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
- }
-</style>
diff --git a/pages/pakin/pakin2.vue b/pages/pakin/pakin2.vue
deleted file mode 100644
index acd003e..0000000
--- a/pages/pakin/pakin2.vue
+++ /dev/null
@@ -1,510 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- matFocus: true,
- matData: '',
- removeNum: 0,
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- matFocuss() {
- let that = this;
- that.matFocus = false;
- setTimeout(() => {
- that.matnr = '';
- that.matFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- setTimeout(()=>{
- that.matFocuss()
- },100)
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/node/putway1',
- data: JSON.stringify({
- // barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.matFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .keyboard{
- top: 120rpx;
- }
- .list:first-child {
- margin-top: 220rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 100rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 100rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
- }
-</style>
diff --git a/pages/pakin/pickAgain.vue b/pages/pakin/pickAgain.vue
deleted file mode 100644
index 26810a9..0000000
--- a/pages/pakin/pickAgain.vue
+++ /dev/null
@@ -1,326 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鏁伴噺:</view>
- <uni-number-box :value="anfme" :max="99999999" :step='1' color="#747474" @change="changeValue2" />
- </view>
- </view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鎷f枡</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭鎷f枡 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- orderNo: '',
- anfme: 0,
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- orderNoFocus: false,
- matFocus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- changeValue2(value) {
- this.anfme = value
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- focuss() {
- this.barcodeFocus = false;
- setTimeout(() => {
- this.matnr = '';
- this.orderNoFocus = true;
- }, 100);
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪鎷f枡!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- console.log(that.anfme);
- if (that.anfme === 0) {
- this.messageText = '鎷f枡鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/pick/again/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- anfme: that.anfme
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "鎷f枡鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.barcode = ''
- this.orderNo = ''
- this.anfme = 0
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.barcode = ''
- this.orderNo = ''
- this.anfme = 0
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
- }
-</style>
diff --git a/pages/pakin/piking.vue b/pages/pakin/piking.vue
deleted file mode 100644
index 42c43c1..0000000
--- a/pages/pakin/piking.vue
+++ /dev/null
@@ -1,482 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="search()">
- </view>
- <!-- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view> -->
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <!-- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> -->
- <!-- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> -->
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">杞澘</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="pickingToFull" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: ''
-
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鏍规嵁鎵樼洏鐮佹悳绱�
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/piking/auth',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method:'GET',
- success(res) {
- res = res.data
- if(res.code === 200){
- for(var i = 0; i < res.data.length;i++){
- that.dataList.push(res.data[i])
- }
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
-
- })
- },
-
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- // #ifdef APP
- let that = this;
- that.focus = false;
- setTimeout(() => {
- that.matnr = '';
- that.focus = true;
- }, 100);
- // #endif
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- },
- },
- });
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- console.log(len);
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(i, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁纭杞澘!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- pickingToFull() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/piking/to/full',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method: 'GET',
- success(result){
- let res = result.data
- if (res.code === 200) {
- this.messageText = "杞崲瀹屾垚"
- this.messageToggle('success')
- that.dataList = []
- that.barcode = ''
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- })
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .list:first-child {
- margin-top: 210rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 100rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 100rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/pakin/putOn.vue b/pages/pakin/putOn.vue
deleted file mode 100644
index 6e26c2a..0000000
--- a/pages/pakin/putOn.vue
+++ /dev/null
@@ -1,522 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">搴撲綅鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locno" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="matFocus">
- <view class="item-right">
- <button></button>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- locno: '',
- barcode: '',
- barcodeFocus: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
-
- uni.request({
- url: that.baseUrl + '/mobile/manDetl/in/barcode',
- data: JSON.stringify({
- locNo: that.locno,
- barcode: that.barcode
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.locno = ''
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 320rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/phps/module/module.vue b/pages/phps/module/module.vue
deleted file mode 100644
index 8183fd0..0000000
--- a/pages/phps/module/module.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-<template>
- <view>
-
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
-
- }
- },
- methods: {
-
- }
- }
-</script>
-
-<style>
-
-</style>
diff --git a/pages/phps/module/modulePakin.vue b/pages/phps/module/modulePakin.vue
deleted file mode 100644
index 728370d..0000000
--- a/pages/phps/module/modulePakin.vue
+++ /dev/null
@@ -1,503 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
- }
-</style>
diff --git a/pages/phps/order/orderPakin.vue b/pages/phps/order/orderPakin.vue
deleted file mode 100644
index 427775b..0000000
--- a/pages/phps/order/orderPakin.vue
+++ /dev/null
@@ -1,511 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @confirm="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> -->
- <!-- <uni-icons type="right" color="#c1c1c1"></uni-icons> -->
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鍏ュ簱</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭鍏ュ簱 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- // if (matnr[2] === null) {
- // matnr[2] = ''
- // }
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪鍏ュ簱!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '鍏ュ簱鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "鍏ュ簱鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.matnr = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 280rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 140rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/phps/order/orderPutDown.vue b/pages/phps/order/orderPutDown.vue
deleted file mode 100644
index 7bab371..0000000
--- a/pages/phps/order/orderPutDown.vue
+++ /dev/null
@@ -1,529 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">搴撲綅鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">涓嬫灦</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭涓嬫灦 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- barcode: '',
- barcodeFocus: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪涓嬫灦!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '涓嬫灦鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/manDetl/out',
- data: JSON.stringify({
- locNo: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "涓嬫灦鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 280rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/phps/order/orderPutOn.vue b/pages/phps/order/orderPutOn.vue
deleted file mode 100644
index 7119aae..0000000
--- a/pages/phps/order/orderPutOn.vue
+++ /dev/null
@@ -1,559 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鐗╂枡鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- </view>
- </view>
- <view class="item">
- <view class="code-decs">搴撲綅鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus">
- <button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">鎺ㄨ崘</button>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細</view>
- <view class="left-item">
- <uni-tag :text="item.orderNo" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍚嶇О锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">鏂欏彿:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <view>
- <!-- 鏅�氬脊绐� -->
- <uni-popup ref="popup" background-color="#fff">
- <scroll-view scroll-y="true" class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
- <view class="recommend" v-for="item in recommendLocs" @click="chose(item)"> {{ item }}</view>
- </scroll-view>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data () {
- return {
- baseUrl: '',
- token: '',
- order: '',
- barcode: '',
- barcodeFocus: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- matnr1: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: false,
- matFocus: true,
- matData: '',
- removeNum: 0,
- type: 'center',
- recommendLocs: [],
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.matnr = matnr[1]
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- result.data.batch = matnr[2]
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.recommendLoc()
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- // 鎺ㄨ崘搴撲綅
- recommendLoc() {
- let that = this
- that.recommendLocs = []
- uni.request({
- url: that.baseUrl + '/node/recommendLoc',
- data: {matnr: that.matnr},
- header: {'token': uni.getStorageSync('token')},
- success(res) {
- res = res.data
- if (res.code == 200 && res.data) {
- that.recommendLocs = res.data
- }
- }
-
- })
- },
- checkMat(mat) {
- mat['orderNo'] = this.order
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.orderNo != this.dataList[i].orderNo) {
- add = true
- break;
- } else {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
-
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/manDetl/in',
- data: JSON.stringify({
- locNo: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.order = ''
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr1 = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: auto 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 280rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/phps/pakin/pakin.vue b/pages/phps/pakin/pakin.vue
deleted file mode 100644
index 728370d..0000000
--- a/pages/phps/pakin/pakin.vue
+++ /dev/null
@@ -1,503 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len != 8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.focuss()
- }, 200)
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
- } else if (result.code == 403) {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- uni.showToast({
- title: result.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.weight = this.dataList[i].weight
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.removeNum = i
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm() {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(this.removeNum, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.dataList[this.rowNum].weight = this.weight
- this.matnr = ''
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- comb() {
- uni.vibrateShort();
- let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
- this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
- data: JSON.stringify({
- barcode: that.barcode,
- combMats: that.dataList
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- });
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
- }
-</style>
diff --git a/pages/phps/pakin/piking.vue b/pages/phps/pakin/piking.vue
deleted file mode 100644
index bcb7488..0000000
--- a/pages/phps/pakin/piking.vue
+++ /dev/null
@@ -1,482 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="search()">
- </view>
- <!-- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view> -->
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <!-- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> -->
- <!-- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> -->
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">杞澘</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="pickingToFull" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: ''
-
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鏍规嵁鎵樼洏鐮佹悳绱�
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/piking/auth',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method:'GET',
- success(res) {
- res = res.data
- if(res.code === 200){
- for(var i = 0; i < res.data.length;i++){
- that.dataList.push(res.data[i])
- }
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
-
- })
- },
-
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- // #ifdef APP
- let that = this;
- that.focus = false;
- setTimeout(() => {
- that.matnr = '';
- that.focus = true;
- }, 100);
- // #endif
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- },
- },
- });
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- console.log(len);
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(i, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁纭杞澘!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- pickingToFull() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/piking/to/full',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method: 'GET',
- success(result){
- let res = result.data
- if (res.code === 200) {
- this.messageText = "杞崲瀹屾垚"
- this.messageToggle('success')
- that.dataList = []
- that.barcode = ''
- } else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
- }
- }
- })
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .list:first-child {
- margin-top: 210rpx;
- }
- .code {
- width: 100%;
- position: fixed;
- min-height: 100rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 100rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/phps/stock/changePallet.vue b/pages/phps/stock/changePallet.vue
deleted file mode 100644
index bbff356..0000000
--- a/pages/phps/stock/changePallet.vue
+++ /dev/null
@@ -1,321 +0,0 @@
-<template>
- <view>
-
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
-
- }
- },
- methods: {
-
- }
- }
-</script>
-
-<style>
-
-</style>
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鍘熸墭鐩�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鏂版墭鐩�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tBarcode" :focus="focus" @input="checkBarcode()">
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鎹㈡澘</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="changePallet" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- tBarcode: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- focus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- let that = this
- if (this.barcode.length != 8) {
- uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
- this.barcodeFocuss()
- }
- if (that.barcode.length == 8) {
- uni.request({
- url: that.baseUrl + '/mobile/piking/auth',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode:that.barcode},
- success(res) {
- res = res.data
- if(res.code===200) {
- that.dataList = res.data
- that.focuss()
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.barcodeFocuss()
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- }
- }
- })
-
- }
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- checkBarcode() {
- if (this.tBarcode.length != 8) {
- uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
- this.focuss()
- }
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.tBarcode = '';
- this.focus = true;
- }, 100);
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '纭杞崲!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.tBarcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- changePallet() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/piking/to/full',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {sBarcode:that.barcode,tBarcode:that.tBarcode},
- success(res) {
- res = res.data
- if (res.code === 200) {
- that.barcode = ''
- that.dataList = []
- that.tBarcode = ''
- that.barcodeFocuss()
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- } 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'})
- }
- }
- })
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/phps/stock/restock.vue b/pages/phps/stock/restock.vue
deleted file mode 100644
index 483d1c1..0000000
--- a/pages/phps/stock/restock.vue
+++ /dev/null
@@ -1,484 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="search()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <!-- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> -->
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">纭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="adjust" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: ''
-
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鏍规嵁鎵樼洏鐮佹悳绱�
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/checkDetl/auth2',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method:'GET',
- success(res) {
- console.log(res);
- res = res.data
- if(res.code === 200){
- for(var i = 0; i < res.data.length;i++){
- that.dataList.push(res.data[i])
- }
- } 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'})
- }
- }
-
- })
- },
-
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- // #ifdef APP
- let that = this;
- that.focus = false;
- setTimeout(() => {
- that.matnr = '';
- that.focus = true;
- }, 100);
- // #endif
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.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'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(i, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁纭鐩樼偣!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- adjust() {
- let that = this
- var combMats = []
- var combParam = {}
- combParam['barcode'] = that.barcode
- combParam['wrkDetls'] = that.dataList
- uni.request({
- url: that.baseUrl + '/mobile/adjustNew/v2/auth',
- method: 'POST',
- data: JSON.stringify(combParam),
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.dataList = []
- that.barcode = ''
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- } 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'})
- }
- },
- });
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/phps/stock/stockCheck.vue b/pages/phps/stock/stockCheck.vue
deleted file mode 100644
index 3c612a0..0000000
--- a/pages/phps/stock/stockCheck.vue
+++ /dev/null
@@ -1,510 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="search()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <!-- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> -->
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">纭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="adjust" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- hide: true,
- hidebg: 'kb-bgtr'
-
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鏍规嵁鎵樼洏鐮佹悳绱�
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/checkDetl/auth2',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method:'GET',
- success(res) {
- console.log(res);
- res = res.data
- if(res.code === 200){
- for(var i = 0; i < res.data.length;i++){
- that.dataList.push(res.data[i])
- }
- } 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'})
- }
- }
-
- })
- },
-
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- // #ifdef APP
- let that = this;
- that.focus = false;
- setTimeout(() => {
- that.matnr = '';
- that.focus = true;
- }, 100);
- // #endif
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.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'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- console.log(len);
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(i, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁纭鐩樼偣!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- adjust() {
- let that = this
- var combMats = []
- var combParam = {}
- combParam['barcode'] = that.barcode
- combParam['wrkDetls'] = that.dataList
- uni.request({
- url: that.baseUrl + '/mobile/adjustNew/auth',
- method: 'POST',
- data: JSON.stringify(combParam),
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.dataList = []
- that.barcode = ''
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- } 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'})
- }
- },
- });
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/phps/stock/stockQuery.vue b/pages/phps/stock/stockQuery.vue
deleted file mode 100644
index 0b139da..0000000
--- a/pages/phps/stock/stockQuery.vue
+++ /dev/null
@@ -1,250 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="code">
- <view class="item">
- <view class="code-decs">搴撲綅鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr">
- <view class="item-right">
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
-
-
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">搴撲綅鍙凤細</view>
- <view class="left-item">{{item.locNo}}</view>
- </view>
- </view>
- <!-- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view> -->
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="search()">鏌ヨ</button>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- locNo: null,
- matnr: null,
- dataList: [],
- msgType: '',
- msgType1: '',
- messageText: '',
- title: '',
- content: '',
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/locDetl/list/auth',
- header:{'token':uni.getStorageSync('token')},
- data: {
- curr: 1,
- limit: 100,
- loc_no: that.locNo,
- matnr: that.matnr
- },
- method:"GET",
- success(result) {
- console.log(result)
- let res = result.data
- let records = res.data.records
- if (res.code == 200) {
- if (records) {
- that.dataList = records
- console.log(that.dataList)
- } else {
- uni.showToast({
- title: "鏆傛棤鏇村鏁版嵁",
- position: 'top',
- duration: 1000
- });
- }
- } 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'})
- }
- }
- })
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.matnr = ''
- this.locNo = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- }
- }
-</script>
-
-<style>
- @import url('@/static/css/wms.css/wms.css');
- .code {
- width: 100%;
- position: fixed;
- min-height: 140rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/pages/print/print.vue b/pages/print/print.vue
deleted file mode 100644
index 7eace59..0000000
--- a/pages/print/print.vue
+++ /dev/null
@@ -1,174 +0,0 @@
-<template>
- <view>
- <view class="print-model" :style="style">
- <view class="display" :style="">
- <table>
- <tr>
- <td>鏂欏彿</td>
- <td>{{mat.matnr}}</td>
- <td colspan="1" rowspan="2" style="width: 150px;">
- <!-- 浜岀淮鐮� -->
- <view class="qr-box">
- <canvas canvas-id="qrcode" v-show="qrShow" style="width: 300rpx;margin: 0 auto;" />
- </view>
- </td>
- </tr>
- <tr>
- <td>鍟嗗搧</td>
- <td colspan="1">{{mat.maktx}}</td>
- </tr>
- <tr>
- <td>鏃ユ湡</td>
- <td colspan="2">{{time}}</td>
- </tr>
- </table>
- </view>
- </view>
- <view>
- <button @click="toPrint">鎵撳嵃</button>
- </view>
- </view>
-</template>
-
-<script>
- import uQRCode from '@/static/js/uqrcode.js' //寮曞叆uqrcode.js
- export default {
- data() {
- return {
- style: {
- height: '3px'
- },
- mat: {
- matnr: '1200128-10055',
- maktx: 'X5S-4-M03/333'
- },
- qrShow: false,
- time: ''
- }
- },
- onShow() {
- let getWindowInfo = uni.getWindowInfo()
- // console.log(getWindowInfo.screenHeight); //灞忓箷楂樺害
- // console.log(getWindowInfo.screenWidth); //灞忓箷瀹藉害
- // console.log(getWindowInfo.windowHeight); //鍙搷浣滈〉闈㈤珮搴�
- // console.log(getWindowInfo.windowWidth); //鍙搷浣滈〉闈㈠搴�
- // console.log(getWindowInfo);
- // console.log('鑾峰彇绐楀彛淇℃伅');
- let height = (getWindowInfo.screenWidth + 10) * 48 / 74
- // console.log(height);
- this.style.height = height + 'px'
- this.getDate()
-
- },
- onLoad(opt) {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.on('data', function(data) {
- that.mat = data.data
- that.qrFun(that.mat.matnr)
- })
-
- },
- methods: {
- // 鎵撳嵃
- toPrint() {
- let that = this
- uni.navigateTo({
- url: "../print/printUNI",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data1', {
- data: that.mat,
- time: that.time
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- },
- },
-
-
- });
- },
- //**鐢熸垚浜岀淮鐮�**//
- qrFun(text) {
- this.qrShow = true
- uQRCode.make({
- canvasId: 'qrcode',
- componentInstance: this,
- text: text,
- size: 150,
- margin: 0,
- backgroundColor: '#ffffff',
- foregroundColor: '#000000',
- fileType: 'jpg',
- errorCorrectLevel: uQRCode.errorCorrectLevel.H,
- success: res => {}
- })
- },
- // 鏃ュ巻
- getDate() {
- var dt = new Date();
- var year,month,day,hours,minutes,seconds,weeks
- year = dt.getFullYear();
- month = (dt.getMonth()+1) < 10 ? '0'+ (dt.getMonth()+1) : (dt.getMonth()+1);
- day = dt.getDate() < 10 ? '0'+dt.getDate() : dt.getDate();
- hours = dt.getHours() < 10 ? '0' + dt.getHours() : dt.getHours();
- minutes = dt.getMinutes() < 10 ? '0' + dt.getMinutes() : dt.getMinutes();
- seconds = dt.getSeconds() < 10 ? '0' + dt.getSeconds() : dt.getSeconds();
- weeks = dt.getDay();
- switch (weeks) {
- case 0: weeks = "鏄熸湡鏃�"; break;
- case 1: weeks = "鏄熸湡涓�"; break;
- case 2: weeks = "鏄熸湡浜�"; break;
- case 3: weeks = "鏄熸湡涓�"; break;
- case 4: weeks = "鏄熸湡鍥�"; break;
- case 5: weeks = "鏄熸湡浜�"; break;
- default : weeks = "鏄熸湡鍏�";
- }
- this.time = year + "骞�" + month + "鏈�" + day + "鏃� " + hours + ":" + minutes + ":" + seconds + " "
- },
- }
- }
-</script>
-
-<style>
- .print-model {
- width: 100%;
- /* background-color: #555555; */
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .display {
- width: 96%;
- height: 96%;
- border-radius: 5px;
- background-color: #FFF;
- box-shadow: #bdbdbd;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .display-pak {
- margin: 2%;
- height: 92%;
- border: 1px solid #8a8a8a;
- }
-
- table {
- width: 92%;
- height: 92%;
- border: 0;
- border-collapse: collapse;
- }
-
- td {
- border: 1px solid #8a8a8a;
- text-align: center;
- }
-</style>
\ No newline at end of file
diff --git a/pages/print/printUNI.vue b/pages/print/printUNI.vue
deleted file mode 100644
index 0a2fdf8..0000000
--- a/pages/print/printUNI.vue
+++ /dev/null
@@ -1,146 +0,0 @@
-<template>
- <view class="content">
- <view>
- <view class="bluetoothConnected">
- <view class="bluetoothList" v-for="(item,index) in GET_CONNECTBLEDATA" :key="index" @tap="confirm_bluetooth(item)">
- <view class="bluetoothList-name">鍚嶇О:{{item.name}}</view>
- <view class="bluetoothList-mac">鍦板潃:{{item.mac}}</view>
- </view>
- </view>
- <button type="default" @click="search_bluetooth">鎼滅储钃濈墮</button>
- <button @click="senBleLabel">鎵撳嵃</button>
- <view class="bluetoothItem" v-if="GET_INFODATA">
- <view class="bluetoothList" v-for="(item,index) in GET_INFODATA" :key="index" @tap="confirm_bluetooth(item)">
- <view class="bluetoothList-name">鍚嶇О:{{item.name}}</view>
- <view class="bluetoothList-mac">鍦板潃:{{item.mac}}</view>
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import printConnect from "@/common/print.js"; //寮曞叆鎵撳嵃鏈烘ā鏉挎枃浠�
- let _this = null;
- import {
- mapGetters,
- mapActions
- } from 'vuex';
- import {
- GET_INFODATA,
- GET_CONNECTBLEDATA
- } from "@/store/gettersType.js";
- import {
- SET_CONNECTBLEDATA
- } from '@/store/actionsType.js';
- // #ifdef APP-PLUS
- const HanyinPlugin = uni.requireNativePlugin('Hanyin-Plugin'); //姹夊嵃
- // #endif
- let print;
- export default {
- data() {
- return {
- bArray: [], //鐢ㄤ簬鎼滅储钃濈墮鍘婚噸鐢ㄧ殑
- no_match_list: [], //娌℃湁閰嶅鐨勮摑鐗欏垪琛�
- match_list: "", //宸茶繛鎺ヨ摑鐗欐墦鍗版満
- val: "",
- dateTimer: "",
- valArr: [],
- print_data: '',
- mat: '',
- time: '',
- // 宸存灙鍙傛暟
- // broadcase_actions: "com.android.receive_scan_action",
- // broadcast_flag: "data"
- };
- },
- computed: {
- ...mapGetters([GET_INFODATA, GET_CONNECTBLEDATA])
- },
- onShow() {
- uni.hideLoading();
- //妫�鏌ユ槸鍚﹀凡杩炴帴钃濈墮
- // this.$check_bluetooth_connect();
- console.log('onShow');
- },
- onHide() {
- console.log('onHide');
- },
- onUnload() {
- console.log('onUnload');
- },
- onLoad(options) {
- _this = this;
- this.$init_bluetooth();
- let that = this
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.on('data1', function(data1) {
- that.mat = data1.data
- that.time = data1.time
- console.log(data1);
- })
- },
- methods: {
- ...mapActions([SET_CONNECTBLEDATA]),
- senBleLabel() {
- // console.log(this.$Mock.order_data);
- if(!print) return;
- console.log(this.mat);
- this.print_data = this.$Mock.order_data
- this.print_data.MATNR = this.mat.matnr
- this.print_data.MAKTX = this.mat.maktx
- this.print_data.MODI_TIME = this.time
- print.startPrint(this.print_data);
- },
- // 杩炴帴鎵撳嵃鏈�
- confirm_bluetooth(item) {
- let {
- name,
- mac
- } = item;
- //鍒ゆ柇钃濈墮鏄惁鎵撳紑
- this.$check_bluetooth_open().then(res => {
- console.log(res);
- //杩涜鎵撳嵃鏈鸿繛鎺�
- if (res) {
- print =new printConnect(item); //鎵撳嵃鏈鸿繛鎺�
- }
- })
- },
- //鎼滅储娌″尮閰嶇殑钃濈墮璁惧
- search_bluetooth(address) {
- let _this = this;
- //妫�鏌ヨ摑鐗欐槸鍚﹀紑鍚�
- this.$check_bluetooth_open().then(ores => {
- if (ores) {
- console.log(ores);
- //鎼滅储钃濈墮
- _this.$search_bluetooth().then(bres => {
- console.log(bres);
- if (bres.code) {
- _this.$search_pipei().then(pres => {
- console.log(pres);
- })
- }
- })
- }
- })
- }
- }
- }
-</script>
-
-<style lang="scss">
- .bluetoothItem {
- width: 100%;
- height: 100%;
-
- .bluetoothList {
- display: flex;
- flex-direction: column;
- padding: 20rpx;
- border-bottom: 1rpx solid #BEBEBE;
- font-size: 18rpx;
- }
- }
-</style>
diff --git a/pages/print/qr.vue b/pages/print/qr.vue
deleted file mode 100644
index bffe6ca..0000000
--- a/pages/print/qr.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-<template>
- <view class='pages'>
- <view class='father_view'>
- <view class='son_view'>
- <view class="title-bg">闇�瑕佽浆鎹㈢殑鏂囨湰锛�</view>
- <textarea class="textarea-bg" v-model="text1" @blur="inputText" placeholder="璇峰湪杩欓噷杈撳叆" />
- </view>
- </view>
-
- <!-- 浜岀淮鐮� -->
- <view class="qr-box">
- <canvas canvas-id="qrcode" v-show="qrShow" style="width: 300rpx;margin: 0 auto;"/>
- </view>
-
- <button @click='btn'>鐢熸垚浜岀淮鐮�</button>
- </view>
-</template>
-
-<script>
- import uQRCode from '@/static/js/uqrcode.js' //寮曞叆uqrcode.js
- export default {
- data() {
- return {
- qrShow: false,
- text1:''
- }
- },
-
- methods: {
- //*鑾峰彇鏂囨湰妗嗗唴瀹�*//
- inputText:function (e) {
- this.text1 = e.detail.value
- },
-
- //*鎸夐挳*//
- btn: function () {
- if (this.text1 == '' ) {
- uni.showToast({ //鏄剧ず瀵硅瘽妗�
- title: "璇疯緭鍏ユ枃鏈�",
- icon: 'none',
- duration: 1000,
- })
- } else {
- this.qrFun(this.text1) //璋冪敤浜岀淮鐮佹柟娉�
- }
- },
-
- //**鐢熸垚浜岀淮鐮�**//
- qrFun: function(text) {
- this.qrShow = true
- uQRCode.make({
- canvasId: 'qrcode',
- componentInstance: this,
- text: text,
- size: 150,
- margin: 0,
- backgroundColor: '#ffffff',
- foregroundColor: '#000000',
- fileType: 'jpg',
- errorCorrectLevel: uQRCode.errorCorrectLevel.H,
- success: res => {}
- })
- }
- }
- }
-</script>
-
-<style>
- .pages {
- width: 98%;
- margin: auto;
- overflow: hidden;
- }
-
- /* 澶氳鏂囨湰 */
- textarea {
- width: 98%;
- height: 250rpx;
- margin-left: 10rpx;
- margin-right: 10rpx;
- margin-top: 10rpx;
- }
-
- .textarea-bg {
- width: 94%;
- border-style: solid;
- border-color: #ff007f;
- font-size: 32rpx;
- }
-
- button {
- width: 80%;
- margin-top: 180rpx;
- background-color: #ffaa00;
- }
-
- .qr-box {
- width: 400rpx;
- height: 460rpx;
- margin: 0 auto;
- margin-top: 20rpx;
- }
-</style>
-
-
diff --git a/pages/stock/changePallet.vue b/pages/stock/changePallet.vue
deleted file mode 100644
index ab0c436..0000000
--- a/pages/stock/changePallet.vue
+++ /dev/null
@@ -1,299 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鍘熸墭鐩�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
- </view>
- <view class="item">
- <view class="code-decs">鏂版墭鐩�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tBarcode" :focus="focus" @input="checkBarcode()">
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鎹㈡澘</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="changePallet" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- tBarcode: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- focus: false,
- matData: '',
- removeNum: 0,
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- let that = this
- if (this.barcode.length != 8) {
- uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
- this.barcodeFocuss()
- }
- if (that.barcode.length == 8) {
- uni.request({
- url: that.baseUrl + '/mobile/piking/auth',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode:that.barcode},
- success(res) {
- res = res.data
- if(res.code===200) {
- that.dataList = res.data
- that.focuss()
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.barcodeFocuss()
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- }
- }
- })
-
- }
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- checkBarcode() {
- if (this.tBarcode.length != 8) {
- uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
- this.focuss()
- }
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- this.focus = false;
- setTimeout(() => {
- this.tBarcode = '';
- this.focus = true;
- }, 100);
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '纭杞崲!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.tBarcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- changePallet() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/piking/to/full',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {sBarcode:that.barcode,tBarcode:that.tBarcode},
- success(res) {
- res = res.data
- if (res.code === 200) {
- that.barcode = ''
- that.dataList = []
- that.tBarcode = ''
- that.barcodeFocuss()
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- } 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'})
- }
- }
- })
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/stock/restock.vue b/pages/stock/restock.vue
deleted file mode 100644
index 867d921..0000000
--- a/pages/stock/restock.vue
+++ /dev/null
@@ -1,484 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="search()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <!-- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> -->
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">纭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="adjust" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: ''
-
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鏍规嵁鎵樼洏鐮佹悳绱�
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/checkDetl/auth2',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method:'GET',
- success(res) {
- console.log(res);
- res = res.data
- if(res.code === 200){
- for(var i = 0; i < res.data.length;i++){
- that.dataList.push(res.data[i])
- }
- } 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'})
- }
- }
-
- })
- },
-
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- // #ifdef APP
- let that = this;
- that.focus = false;
- setTimeout(() => {
- that.matnr = '';
- that.focus = true;
- }, 100);
- // #endif
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.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'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(i, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁纭鐩樼偣!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- adjust() {
- let that = this
- var combMats = []
- var combParam = {}
- combParam['barcode'] = that.barcode
- combParam['wrkDetls'] = that.dataList
- uni.request({
- url: that.baseUrl + '/mobile/adjustNew/v2/auth',
- method: 'POST',
- data: JSON.stringify(combParam),
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.dataList = []
- that.barcode = ''
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- } 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'})
- }
- },
- });
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/stock/stockCheck.vue b/pages/stock/stockCheck.vue
deleted file mode 100644
index 8c52a6b..0000000
--- a/pages/stock/stockCheck.vue
+++ /dev/null
@@ -1,510 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="search()">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <!-- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> -->
- </view>
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">纭</button>
- </view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
- <view>
- <uni-popup ref="revise" type="dialog">
- <view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
- <view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
- <view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
- </view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view>
- <view class="popup-item">
- <view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
- </view>
- </view>
- <view class="btn">
- <view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
- </view>
- </view>
- </uni-popup>
- </view>
- <!-- 绉婚櫎纭 -->
- <view>
- <!-- 鎻愮ず绐楃ず渚� -->
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
- @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭缁勬墭 -->
- <view>
- <uni-popup ref="combConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="adjust" @close="combClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- barcode: '',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- hide: true,
- hidebg: 'kb-bgtr'
-
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // 鏍规嵁鎵樼洏鐮佹悳绱�
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/checkDetl/auth2',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode: that.barcode},
- method:'GET',
- success(res) {
- console.log(res);
- res = res.data
- if(res.code === 200){
- for(var i = 0; i < res.data.length;i++){
- that.dataList.push(res.data[i])
- }
- } 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'})
- }
- }
-
- })
- },
-
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
- focuss() {
- // #ifdef APP
- let that = this;
- that.focus = false;
- setTimeout(() => {
- that.matnr = '';
- that.focus = true;
- }, 100);
- // #endif
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matnr
- },
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.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'
- })
- }
-
- }
- });
-
- },
- selectMat() {
- let that = this
- uni.navigateTo({
- url: "../mat/matQuery",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- that.matnr = ''
- },
- checkMat(mat) {
- var len = this.dataList.length
- var add = true ,sameItem = false
- for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
- }
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
- } else {
- add = true
- }
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
- }
- }
- }
- if (add) {
- this.dataList.unshift(mat)
- }
- console.log(len);
- },
- // 淇敼鎵瑰彿
- revise(item, i) {
- this.matnr = this.dataList[i].matnr
- this.count = this.dataList[i].anfme
- this.batch = this.dataList[i].batch
- this.rowNum = i
- this.eject()
- },
- eject(type) {
- this.type = type
- this.$refs.revise.open(type)
- },
- // 鍒楄〃绉婚櫎鎸夐挳
- remove(item, i, type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
- this.$refs.alertDialog.open(i)
- },
- // 纭绉婚櫎
- removeConfirm(i) {
- this.messageText = "绉婚櫎鎴愬姛"
- this.messageToggle('success')
- this.dataList.splice(i, 1)
- },
- // 鍙栨秷绉婚櫎
- removeClose() {
- this.$refs.alertDialog.close()
- },
- reviseConfirm() {
- this.dataList[this.rowNum].anfme = this.count
- this.dataList[this.rowNum].batch = this.batch
- this.messageText = "淇敼鎴愬姛"
- this.messageToggle('success')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.$refs.revise.close()
- },
- changeValue(value) {
- this.count = value
- },
- combConfirm(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁纭鐩樼偣!'
- this.$refs.combConfirm.open()
- },
- combClose() {
- this.$refs.combConfirm.close()
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.barcode = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.barcodeFocuss()
- },
- adjust() {
- let that = this
- var combMats = []
- var combParam = {}
- combParam['barcode'] = that.barcode
- combParam['wrkDetls'] = that.dataList
- uni.request({
- url: that.baseUrl + '/mobile/adjustNew/auth',
- method: 'POST',
- data: JSON.stringify(combParam),
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.dataList = []
- that.barcode = ''
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- } 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'})
- }
- },
- });
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .code {
- width: 100%;
- position: fixed;
- min-height: 200rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
diff --git a/pages/stock/stockQuery.vue b/pages/stock/stockQuery.vue
deleted file mode 100644
index 308c8d9..0000000
--- a/pages/stock/stockQuery.vue
+++ /dev/null
@@ -1,250 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="code">
- <view class="item">
- <view class="code-decs">搴撲綅鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo">
- </view>
- <view class="item">
- <view class="code-decs">鐗╂枡鍙�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr">
- <view class="item-right">
- </view>
- </view>
- </view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
- </view>
-
-
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
- </view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">搴撲綅鍙凤細</view>
- <view class="left-item">{{item.locNo}}</view>
- </view>
- </view>
- <!-- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
- </view> -->
- </view>
- </scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="search()">鏌ヨ</button>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- <!-- 纭閲嶇疆 -->
- <view>
- <uni-popup ref="resetConfirm" type="dialog">
- <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
-
- <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
- <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseUrl: '',
- token: '',
- locNo: null,
- matnr: null,
- dataList: [],
- msgType: '',
- msgType1: '',
- messageText: '',
- title: '',
- content: '',
- hide: true,
- hidebg: 'kb-bgtr'
- }
- },
- onLoad() {
- // #ifdef APP
- setInterval(()=>{
- if (this.hide) {
- uni.hideKeyboard()
- } else {
-
- }
- },20)
- // #endif
- },
- onBackPress() {
- this.hide = false
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- hideKeyboard() {
- this.hide = this.hide ? false : true
- if (this.hide) {
- this.hidebg = 'kb-bgtr'
- } else {
- this.hidebg = 'kb-bgfa'
- }
- },
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/locDetl/list/auth',
- header:{'token':uni.getStorageSync('token')},
- data: {
- curr: 1,
- limit: 100,
- loc_no: that.locNo,
- matnr: that.matnr
- },
- method:"GET",
- success(result) {
- console.log(result)
- let res = result.data
- let records = res.data.records
- if (res.code == 200) {
- if (records) {
- that.dataList = records
- console.log(that.dataList)
- } else {
- uni.showToast({
- title: "鏆傛棤鏇村鏁版嵁",
- position: 'top',
- duration: 1000
- });
- }
- } 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'})
- }
- }
- })
- },
- reset(type) {
- this.msgType = type
- this.title = '璀﹀憡'
- this.content = '鏄惁閲嶇疆!'
- this.$refs.resetConfirm.open()
- },
- // 纭閲嶇疆
- resetConfirm() {
- this.dataList = []
- this.matnr = ''
- this.locNo = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .code {
- width: 100%;
- position: fixed;
- min-height: 140rpx;
- background-color: #FFF;
- z-index: 10;
- }
-
- .item {
- display: flex;
- align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
-
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 140rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-</style>
\ No newline at end of file
diff --git a/static/img/LOGO.jpg b/static/img/LOGO.jpg
deleted file mode 100644
index a1236c2..0000000
--- a/static/img/LOGO.jpg
+++ /dev/null
Binary files differ
diff --git a/static/img/LkyLogo.jpg b/static/img/LkyLogo.jpg
deleted file mode 100644
index d23e5a8..0000000
--- a/static/img/LkyLogo.jpg
+++ /dev/null
Binary files differ
diff --git a/static/img/logo.png b/static/img/logo.png
deleted file mode 100644
index e2fc662..0000000
--- a/static/img/logo.png
+++ /dev/null
Binary files differ
--
Gitblit v1.9.1