From a8b4b7b8b5e40525b6090ee02a9d4583adc43495 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期二, 30 十二月 2025 14:22:36 +0800
Subject: [PATCH] #
---
pages/stock/stockQuery.vue | 230 ---
/dev/null | 566 ---------
pages/home/home.vue | 14
pages/AGV/agv_start.vue | 529 +++++++++
pages/order/orderPakin2.vue | 383 ------
pages.json | 293 ----
pages/order/orderDetlList.vue | 11
static/css/common.css | 423 +++++++
pages/pakin/pakin.vue | 417 -------
.hbuilderx/launch.json | 9
pages/AGV/agv_back.vue | 535 +++++++++
11 files changed, 1,555 insertions(+), 1,855 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
new file mode 100644
index 0000000..8ae452a
--- /dev/null
+++ b/.hbuilderx/launch.json
@@ -0,0 +1,9 @@
+{
+ "version" : "1.0",
+ "configurations" : [
+ {
+ "playground" : "standard",
+ "type" : "uni-app:app-android"
+ }
+ ]
+}
diff --git a/pages.json b/pages.json
index 154ebe2..8f048c9 100644
--- a/pages.json
+++ b/pages.json
@@ -1,5 +1,5 @@
{
- "pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages
+ "pages": [
{
"path": "pages/login/login",
"style": {
@@ -25,153 +25,43 @@
}
},
{
- "path": "pages/mat/matQuery2",
- "style": {
- "navigationBarTitleText": "鐗╂枡"
- }
- },
- {
"path": "pages/pakin/pakin",
"style": {
"navigationBarTitleText": "缁� 鎵�"
}
},
{
- "path": "pages/AGV/AGVPakin",
+ "path": "pages/order/orderList",
"style": {
- "navigationBarTitleText": "AGV缁勬墭"
+ "navigationBarTitleText": "鍗曟嵁鍒楄〃",
+ "enablePullDownRefresh": true
}
},
{
- "path": "pages/AGV/AGVPakinBing",
+ "path": "pages/order/orderDetlList",
"style": {
- "navigationBarTitleText": "AGV涓婃灦缁戝畾"
+ "navigationBarTitleText": "鍗曟嵁鏄庣粏鍒楄〃"
}
},
{
- "path": "pages/AGV/AGVPakinOn",
+ "path": "pages/order/orderPakin2",
"style": {
- "navigationBarTitleText": "AGV涓婃灦缁勬墭"
+ "navigationBarTitleText": "璁㈠崟缁勬墭",
+ "enablePullDownRefresh": false
}
},
{
- "path": "pages/AGV/AGVStart",
+ "path": "pages/AGV/agv_start",
"style": {
- "navigationBarTitleText": "AGV鍚姩鍏ュ簱"
+ "navigationBarTitleText": "AGV瀹瑰櫒鍏ュ簱",
+ "enablePullDownRefresh": false
}
},
{
- "path": "pages/AGV/AGVUnbind",
+ "path": "pages/AGV/agv_back",
"style": {
- "navigationBarTitleText": "AGV鍌ㄤ綅瑙g粦"
- }
- },
- {
- "path": "pages/AGV/AGVUnbind2",
- "style": {
- "navigationBarTitleText": "AGV鎷嗘墭瑙g粦"
- }
- },
- {
- "path": "pages/AGV/AGVDismantle",
- "style": {
- "navigationBarTitleText": "AGV鎷嗘墭鍛煎彨"
- }
- },
- {
- "path": "pages/AGV/AGVBind",
- "style": {
- "navigationBarTitleText": "AGV鍌ㄤ綅缁戝畾"
- }
- },
- {
- "path": "pages/AGV/AGV2F",
- "style": {
- "navigationBarTitleText": "AGV2妤兼墦鍖�"
- }
- },
- {
- "path": "pages/tzsk/AGV/AGVPakin",
- "style": {
- "navigationBarTitleText": "AGV缁勬墭"
- }
- },
- {
- "path": "pages/tzsk/AGV/AGVPakinBing",
- "style": {
- "navigationBarTitleText": "AGV涓婃灦缁戝畾"
- }
- },
- {
- "path": "pages/tzsk/AGV/AGVPakinOn",
- "style": {
- "navigationBarTitleText": "AGV涓婃灦缁勬墭"
- }
- },
- {
- "path": "pages/tzsk/AGV/AGVStart",
- "style": {
- "navigationBarTitleText": "AGV鍚姩鍏ュ簱"
- }
- },
- {
- "path": "pages/order/orderPakin",
- "style": {
- "navigationBarTitleText": "璁㈠崟鍏ュ簱"
- }
- },
- {
- "path": "pages/pingku/POrderList",
- "style": {
- "navigationBarTitleText": "骞冲簱鍏ュ簱"
- }
- },
- {
- "path": "pages/pingku/PInventoryAdjustment",
- "style": {
- "navigationBarTitleText": "骞冲簱搴撳瓨璋冩暣"
- }
- },
- {
- "path": "pages/pingku/POrderDetlList",
- "style": {
- "navigationBarTitleText": "璁㈠崟鍒楄〃"
- }
- },
- {
- "path": "pages/pingku/POrderPakin",
- "style": {
- "navigationBarTitleText": "骞冲簱涓婃灦"
- }
- },
- {
- "path": "pages/pingku/POrderListOut",
- "style": {
- "navigationBarTitleText": "骞冲簱涓嬫灦"
- }
- },
- {
- "path": "pages/pingku/POrderDetlListOut",
- "style": {
- "navigationBarTitleText": "鍑哄簱璁㈠崟鍒楄〃"
- }
- },
- {
- "path": "pages/pingku/POrderPakinOut",
- "style": {
- "navigationBarTitleText": "骞冲簱涓嬫灦"
- }
- },
- {
- "path": "pages/order/orderPutOn",
- "style": {
- "navigationBarTitleText": "璁㈠崟涓婃灦"
- }
- },
- {
- "path": "pages/order/orderPutDown",
- "style": {
- "navigationBarTitleText": "璁㈠崟涓嬫灦"
+ "navigationBarTitleText": "AGV瀹瑰櫒鍥炲簱",
+ "enablePullDownRefresh": false
}
},
{
@@ -181,163 +71,12 @@
}
},
{
- "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/pakin/mergeStore",
- "style": {
- "navigationBarTitleText": "骞舵澘鍏ュ簱"
- }
- },
- {
- "path": "pages/pakin/leftovers",
- "style": {
- "navigationBarTitleText": "鎷f枡绔欏埌绔�"
- }
- },
- {
- "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/order/orderPakin2",
- "style" :
- {
- "navigationBarTitleText" : "璁㈠崟缁勬墭",
- "enablePullDownRefresh" : false
- }
}
- ,{
- "path" : "pages/order/orderList",
- "style" :
- {
- "navigationBarTitleText": "鍗曟嵁鍒楄〃",
- "enablePullDownRefresh": true
- }
-
- },
- {
- "path": "pages/order/orderDetlList",
- "style": {
- "navigationBarTitleText": "鍗曟嵁鏄庣粏鍒楄〃"
- }
- },
- {
- "path" : "pages/AGV/AGVSiteList",
- "style" :
- {
- "navigationBarTitleText": "浜х嚎鍙枡",
- "enablePullDownRefresh": false
- }
-
- },
- {
- "path" : "pages/AGV/AGVLineCall",
- "style" :
- {
- "navigationBarTitleText": "浜х嚎鍙枡",
- "enablePullDownRefresh": false
- }
-
- },
- {
- "path" : "pages/AGV/AGVSiteList2",
- "style" :
- {
- "navigationBarTitleText": "浜х嚎鍙枡2",
- "enablePullDownRefresh": false
- }
-
- },
- {
- "path" : "pages/AGV/AGVLineCall2",
- "style" :
- {
- "navigationBarTitleText": "浜х嚎鍙枡2",
- "enablePullDownRefresh": false
- }
-
- },
- {
- "path" : "pages/AGV/AGVFinishedCall",
- "style" :
- {
- "navigationBarTitleText": "鎴愬搧鍛煎彨",
- "enablePullDownRefresh": false
- }
-
- },
- {
- "path" : "pages/AGV/AGVStaBind",
- "style" :
- {
- "navigationBarTitleText": "AGV绔欑粦瀹�",
- "enablePullDownRefresh": false
- }
-
- }
- ],
+ ],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
diff --git a/pages/AGV/AGV2F.vue b/pages/AGV/AGV2F.vue
deleted file mode 100644
index 20dc0f1..0000000
--- a/pages/AGV/AGV2F.vue
+++ /dev/null
@@ -1,488 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">浜х嚎绔�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orgSite" :focus="barcodeFocus">
- </view>
- <view class="item">
- <view class="code-decs">鐩爣鍖�:</view>
- <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="tarSite"></uni-combox>
- </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>
- </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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:"",
- orgSite:'',
- tarSite:'e',
- staList:["e"],
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('data', function(data) {
- console.log(data.data)
- that.orgSite = data.data.agvSite.name
- that.checkMat(data.data.wrkDetls)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- mounted() {
- this.tarSite = uni.getStorageSync('tarSite')
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- this.dataList = 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.setStorageSync('tarSite', this.tarSite);
- uni.vibrateShort();
- let that = this;
- if (that.orgSite === '') {
- this.messageText = "浜х嚎绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/agv2fPack',
- data: JSON.stringify({
- orgSite: that.orgSite,
- tarSite: that.tarSite
- }),
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orgSite = ''
- this.dataList = []
-
-
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .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/AGV/AGVBind.vue b/pages/AGV/AGVBind.vue
deleted file mode 100644
index bbe906f..0000000
--- a/pages/AGV/AGVBind.vue
+++ /dev/null
@@ -1,548 +0,0 @@
-<template>
- <view>
- <view class="code">
- <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: [],
- staList:[],
- sta:''
- }
- },
- onLoad() {
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- stationCodeInput() {
- },
- 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() {
- let that = this;
- if (that.stationCode === '') {
- this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/bind',
- data: JSON.stringify({
- site: 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')
- } 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.staList = []
- this.sta = ''
- 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: 30rpx;
- 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/AGV/AGVDismantle.vue b/pages/AGV/AGVDismantle.vue
deleted file mode 100644
index be492dc..0000000
--- a/pages/AGV/AGVDismantle.vue
+++ /dev/null
@@ -1,485 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璧峰鍖�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orgSite" disabled>
-
- </view>
- <view class="item">
- <view class="code-decs">鐩爣绔�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tarSite" :focus="barcodeFocus">
- </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>
- </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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:"",
- orgSite:'h',
- tarSite:'',
- staList:["h","h1","h2"],
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('data', function(data) {
- console.log(data.data)
- that.orgSite = data.data.agvSite.name
- that.checkMat(data.data.wrkDetls)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- this.dataList = 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.orgSite === '') {
- this.messageText = "浜х嚎绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/AGVDismantle',
- data: JSON.stringify({
- orgSite: that.orgSite,
- tarSite: that.tarSite
- }),
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orgSite = ''
- this.dataList = []
-
-
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .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/AGV/AGVFinishedCall.vue b/pages/AGV/AGVFinishedCall.vue
deleted file mode 100644
index 799c121..0000000
--- a/pages/AGV/AGVFinishedCall.vue
+++ /dev/null
@@ -1,487 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">浜х嚎绔�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orgSite" :focus="barcodeFocus">
- </view>
- <view class="item">
- <view class="code-decs">鐩爣鍖�:</view>
- <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="tarSite"></uni-combox>
- </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>
- </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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:"",
- orgSite:'',
- tarSite:'e',
- staList:["e"],
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('data', function(data) {
- console.log(data.data)
- that.orgSite = data.data.agvSite.name
- that.checkMat(data.data.wrkDetls)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- mounted() {
- this.tarSite = uni.getStorageSync('tarSite')
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- this.dataList = 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.orgSite === '') {
- this.messageText = "浜х嚎绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/finishedCall',
- data: JSON.stringify({
- orgSite: that.orgSite,
- tarSite: that.tarSite
- }),
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orgSite = ''
- this.dataList = []
-
-
- },
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
-
- .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/AGV/AGVLineCall.vue b/pages/AGV/AGVLineCall.vue
deleted file mode 100644
index 289d972..0000000
--- a/pages/AGV/AGVLineCall.vue
+++ /dev/null
@@ -1,495 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璐х墿绔�:</view>
- <view style="flex: 1;">
- <input type="text" v-model="orgSite" disabled>
- </view>
-
- </view>
- <view class="item">
- <view class="code-decs">浜х嚎绔�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tarSite" :focus="barcodeFocus">
- </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>
- </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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:"",
- orgSite:'',
- tarSite:''
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('data', function(data) {
- console.log(data.data)
- that.orgSite = data.data.agvSite.name
- that.checkMat(data.data.wrkDetls)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- this.dataList = 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.orgSite === '') {
- this.messageText = "璐х墿绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- if (that.tarSite === '') {
- this.messageText = "浜х嚎绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "鍟嗗搧鍒楄〃涓虹┖"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/lineCall',
- data: JSON.stringify({
- orgSite: that.orgSite,
- tarSite: that.tarSite
- }),
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orgSite = ''
- this.dataList = []
- this.tarSite = ''
-
- },
- }
- }
-</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/AGV/AGVLineCall2.vue b/pages/AGV/AGVLineCall2.vue
deleted file mode 100644
index ae1285c..0000000
--- a/pages/AGV/AGVLineCall2.vue
+++ /dev/null
@@ -1,495 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璐х墿绔�:</view>
- <view style="flex: 1;">
- <input type="text" v-model="orgSite" disabled>
- </view>
-
- </view>
- <view class="item">
- <view class="code-decs">浜х嚎绔�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tarSite" :focus="barcodeFocus">
- </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>
- </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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:"",
- orgSite:'',
- tarSite:''
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('data', function(data) {
- console.log(data.data)
- that.orgSite = data.data.agvSite.name
- that.checkMat(data.data.wrkDetls)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- this.dataList = 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.orgSite === '') {
- this.messageText = "璐х墿绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- if (that.tarSite === '') {
- this.messageText = "浜х嚎绔欎负绌�"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "鍟嗗搧鍒楄〃涓虹┖"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/lineCall2',
- data: JSON.stringify({
- orgSite: that.orgSite,
- tarSite: that.tarSite
- }),
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orgSite = ''
- this.dataList = []
- this.tarSite = ''
-
- },
- }
- }
-</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/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/AGVSiteList.vue b/pages/AGV/AGVSiteList.vue
deleted file mode 100644
index 520621a..0000000
--- a/pages/AGV/AGVSiteList.vue
+++ /dev/null
@@ -1,234 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <!-- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
- </view> -->
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >{{item.agvSite.name}}</view>
- </view>
- </view>
- <view class="tag-item">鏉$爜锛� {{item.agvSite.code}}</view>
- <view class="tag-item">绔欑偣鐘舵�侊細 {{item.agvSite.status$}}</view>
- <view class="tag-item">璐х墿淇℃伅锛� </view>
- <view v-for="(item2,j) in item.wrkDetls">
- <view class="tag-item">鐗╂枡鐮侊細 {{item2.matnr}}</view>
- <view class="tag-item">鐗╂枡鍚嶇О锛� {{item2.maktx}}</view>
- <view class="tag-item">鏁伴噺锛� {{item2.anfme}}</view>
- <view class="tag-item">---------------------</view>
- </view>
- </view>
- </view>
- <!-- <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" /> -->
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- condition: '',
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1,
-
- }
- },
- // onReachBottom() {
- // this.status = 'more';
- // this.showMat(this.tagIdNow);
- // },
- onLoad() {
- // 娌″暐鐢ㄤ簡
- let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showMat(1)
- },
- methods: {
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/order/search/pda/auth',
- data: {
- condition: that.condition
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.matList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.showMat(parentId)
- }
- that.baColor = "background-color: #0081ff;"
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/agv/site/list',
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- let list = res.data
- that.matList = list
- that.curr = that.curr + 1
- }
- if (res.data.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- toPrint(item) {
- let that = this
- uni.navigateTo({
- url: "../AGV/AGVLineCall",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- data: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
-
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/AGV/AGVSiteList2.vue b/pages/AGV/AGVSiteList2.vue
deleted file mode 100644
index e0ffcc3..0000000
--- a/pages/AGV/AGVSiteList2.vue
+++ /dev/null
@@ -1,234 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <!-- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
- </view> -->
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >{{item.agvSite.name}}</view>
- </view>
- </view>
- <view class="tag-item">鏉$爜锛� {{item.agvSite.code}}</view>
- <view class="tag-item">绔欑偣鐘舵�侊細 {{item.agvSite.status$}}</view>
- <view class="tag-item">璐х墿淇℃伅锛� </view>
- <view v-for="(item2,j) in item.wrkDetls">
- <view class="tag-item">鐗╂枡鐮侊細 {{item2.matnr}}</view>
- <view class="tag-item">鐗╂枡鍚嶇О锛� {{item2.maktx}}</view>
- <view class="tag-item">鏁伴噺锛� {{item2.anfme}}</view>
- <view class="tag-item">---------------------</view>
- </view>
- </view>
- </view>
- <!-- <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" /> -->
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- condition: '',
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1,
-
- }
- },
- // onReachBottom() {
- // this.status = 'more';
- // this.showMat(this.tagIdNow);
- // },
- onLoad() {
- // 娌″暐鐢ㄤ簡
- let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showMat(1)
- },
- methods: {
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/order/search/pda/auth',
- data: {
- condition: that.condition
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.matList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.showMat(parentId)
- }
- that.baColor = "background-color: #0081ff;"
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/agv/site/list',
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- let list = res.data
- that.matList = list
- that.curr = that.curr + 1
- }
- if (res.data.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- toPrint(item) {
- let that = this
- uni.navigateTo({
- url: "../AGV/AGVLineCall2",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- data: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
-
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/AGV/AGVStaBind.vue b/pages/AGV/AGVStaBind.vue
deleted file mode 100644
index df306cd..0000000
--- a/pages/AGV/AGVStaBind.vue
+++ /dev/null
@@ -1,512 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">鏆傚瓨浣�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- >
- </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" style="word-break: break-all;">{{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,
- ck1: true,
- ck2: false,
- isFull: true
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- isFrozen() {
- this.isFull = !this.isFull
- console.log(this.isFull);
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len >= 9 && 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
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: matnr1
- },
- 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/agv/staBind',
- 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.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 30px 0px rgba(0, 0, 0, 0.5);
- }
- .list:first-child {
- margin-top: 350rpx;
- }
-</style>
diff --git a/pages/AGV/AGVStart.vue b/pages/AGV/AGVStart.vue
deleted file mode 100644
index 08012f1..0000000
--- a/pages/AGV/AGVStart.vue
+++ /dev/null
@@ -1,594 +0,0 @@
-<template>
- <view>
- <view class="code">
- <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>
- <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="sta"></uni-combox>
- </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')" :disabled="isDisabled">鍚姩</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: [],
- staList:[],
- sta:'',
- isDisabled:false
- }
- },
- onLoad() {
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- stationCodeInput() {
- setTimeout(() => {
- console.log(this.stationCode.substring(0,1))
- this.staList=[]
- this.sta = ''
- if(this.stationCode.substring(0,1) == 'a'){
- this.staList.push(1040)
- this.sta = 1040
- }else if(this.stationCode.substring(0,1) == 'b'){
- this.staList.push(2010)
- // this.staList.push(2000)
- this.sta = 2010
- }else if(this.stationCode.substring(0,1) == 'c'){
- this.staList.push(3010)
- this.sta = 3010
- }else if(this.stationCode.substring(0,1) == 'd'){
- this.staList.push(2000)
- this.sta = 2000
-
- }else if(this.stationCode.substring(0,1) == 'e'){
- this.staList.push(1000)
- this.staList.push(1035)
- this.sta = 1035
-
- }
-
- }, 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() {
- let that = this;
- that.isDisabled = true
- if (that.stationCode === '') {
- this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜"
- this.messageToggle('error')
- that.isDisabled = false
- return;
- }
-
- uni.request({
- url: that.baseUrl + '/mobile/agv/start',
- data: JSON.stringify({
- sta: that.stationCode,
- inSta: that.sta
- }),
- 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')
- }
- },
- fail: () => {
- that.messageText = "鎺ュ彛瓒呮椂"
- that.messageToggle('error')
- },
- complete(){
- that.isDisabled = false
- }
- });
-
-
-
-
-
- },
- 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.staList = []
- this.sta = ''
- 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: 30rpx;
- 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/AGVUnbind.vue b/pages/AGV/AGVUnbind.vue
deleted file mode 100644
index fd863bd..0000000
--- a/pages/AGV/AGVUnbind.vue
+++ /dev/null
@@ -1,548 +0,0 @@
-<template>
- <view>
- <view class="code">
- <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: [],
- staList:[],
- sta:''
- }
- },
- onLoad() {
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- stationCodeInput() {
- },
- 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() {
- let that = this;
- if (that.stationCode === '') {
- this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/unbind',
- data: JSON.stringify({
- site: 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')
- } 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.staList = []
- this.sta = ''
- 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: 30rpx;
- 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/AGV/AGVUnbind2.vue b/pages/AGV/AGVUnbind2.vue
deleted file mode 100644
index 84278d0..0000000
--- a/pages/AGV/AGVUnbind2.vue
+++ /dev/null
@@ -1,548 +0,0 @@
-<template>
- <view>
- <view class="code">
- <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: [],
- staList:[],
- sta:''
- }
- },
- onLoad() {
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- stationCodeInput() {
- },
- 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() {
- let that = this;
- if (that.stationCode === '') {
- this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/agv/unbind2',
- data: JSON.stringify({
- site: 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')
- } 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.staList = []
- this.sta = ''
- 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: 30rpx;
- 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/AGV/agv_back.vue b/pages/AGV/agv_back.vue
new file mode 100644
index 0000000..9b3744f
--- /dev/null
+++ b/pages/AGV/agv_back.vue
@@ -0,0 +1,535 @@
+<template>
+ <view class="page-container">
+ <!-- 琛ㄥ崟鍖哄煙 -->
+ <view class="form-section">
+ <view class="form-item">
+ <view class="form-label">
+ <uni-icons type="scan" size="18" color="#667eea"></uni-icons>
+ <text class="label-text">鎵樼洏鐮�</text>
+ </view>
+ <view class="form-input-wrap">
+ <input class="form-input" type="text" placeholder="鎵爜 / 杈撳叆鎵樼洏鐮�" v-model="barcode"
+ :focus="barcodeFocus" @input="barcodeInput()" />
+ <uni-icons v-if="barcode" type="clear" size="18" color="#c0c4cc" @click="clearBarcode"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="form-label">
+ <uni-icons type="location" size="18" color="#667eea"></uni-icons>
+ <text class="label-text">鏆傚瓨浣�</text>
+ </view>
+ <view class="form-input-wrap">
+ <input class="form-input" type="text" placeholder="鎵爜 / 杈撳叆鏆傚瓨浣�" v-model="sourceSite" />
+ <uni-icons v-if="sourceSite" type="clear" size="18" color="#c0c4cc" @click="sourceSite=''"></uni-icons>
+ </view>
+ </view>
+ <!-- <view class="form-item">
+ <view class="form-label">
+ <uni-icons type="navigate" size="18" color="#667eea"></uni-icons>
+ <text class="label-text">鐩爣绔欑偣</text>
+ </view>
+ <view class="form-input-wrap">
+ <picker class="picker-full" :range="targetSiteList" range-key="label" @change="onTargetSiteChange">
+ <view class="picker-value">
+ <text>{{selectedTargetSite.label || '璇烽�夋嫨鐩爣绔欑偣'}}</text>
+ <view><uni-icons type="bottom" size="14" color="#909399"></uni-icons></view>
+ </view>
+ </picker>
+ </view>
+ </view> -->
+ </view>
+
+ <!-- 鍒楄〃澶撮儴 -->
+ <view class="list-header" v-if="showDetl">
+ <view class="header-left">
+ <text class="header-title">鍟嗗搧鍒楄〃</text>
+ <view class="count-badge" v-if="dataList.length > 0">
+ <text class="count-text">{{dataList.length}}</text>
+ </view>
+ </view>
+ </view>
+
+ <!-- 鍟嗗搧鍒楄〃 -->
+ <view class="list-container" v-if="showDetl">
+ <view class="mat-card" v-for="(item, i) in dataList" :key="i">
+ <!-- 鍗$墖澶撮儴 -->
+ <view class="card-top">
+ <view class="card-index">{{i + 1}}</view>
+ <view class="mat-code-wrap">
+ <text class="mat-code">{{item.matnr}}</text>
+ </view>
+ <!-- <view class="qty-badge">
+ <text class="qty-text">{{item.anfme}}</text>
+ </view> -->
+ </view>
+
+ <!-- 鍗$墖鍐呭 -->
+ <view class="card-content">
+ <view class="info-row">
+ <view class="info-col">
+ <text class="info-label">鍝佸悕</text>
+ <text class="info-value">{{item.maktx || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-col half">
+ <text class="info-label">瑙勬牸</text>
+ <text class="info-value">{{item.specs || '-'}}</text>
+ </view>
+ <view class="info-col half">
+ <text class="info-label">鎵瑰彿</text>
+ <text class="info-value highlight">{{item.batch || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-col half">
+ <text class="info-label">鏁伴噺</text>
+ <text class="info-value qty">{{item.anfme}}</text>
+ </view>
+ </view>
+ </view>
+
+ <!-- 鍗$墖鎿嶄綔 -->
+ <view class="card-actions">
+ <view class="action-btn edit-btn" @click="revise(item, i)">
+ <uni-icons type="compose" size="18" color="#667eea"></uni-icons>
+ <text class="action-text">淇敼</text>
+ </view>
+ <view class="action-btn delete-btn" @click="remove(item, i, 'warn')">
+ <uni-icons type="trash" size="18" color="#f56c6c"></uni-icons>
+ <text class="action-text delete-text">绉婚櫎</text>
+ </view>
+ </view>
+ </view>
+
+ <!-- 绌虹姸鎬� -->
+ <view class="empty-state" v-if="dataList.length === 0">
+ <uni-icons type="cart" size="60" color="#CCCCCC"></uni-icons>
+ <text class="empty-text">鏆傛棤鍟嗗搧</text>
+ <text class="empty-hint">璇锋壂鎻忕墿鏂欑爜娣诲姞鍟嗗搧</text>
+ </view>
+
+ <!-- 搴曢儴鍗犱綅 -->
+ <view class="bottom-placeholder"></view>
+ </view>
+
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <view class="bottom-bar">
+ <view class="btn-reset" @click="reset('warn')">
+ <uni-icons type="refresh" size="18" color="#909399"></uni-icons>
+ <text class="btn-text">閲嶇疆</text>
+ </view>
+ <view class="btn-submit" :class="{'btn-disabled': isSubmitting || barcode === ''}" @click="combConfirm('warn')">
+ <uni-icons type="checkbox" size="18" color="#ffffff"></uni-icons>
+ <text class="btn-text">纭鍛煎彨</text>
+ </view>
+ </view>
+
+ <!-- 寮圭獥鍖哄煙 -->
+ <!-- 淇敼鏁伴噺 -->
+ <uni-popup ref="revise" type="dialog">
+ <view class="popup-card">
+ <view class="popup-header">
+ <text class="popup-title">淇敼淇℃伅</text>
+ </view>
+ <view class="popup-body">
+ <view class="popup-row">
+ <text class="popup-label">缂栫爜</text>
+ <view class="popup-value disabled">{{editMatnr}}</view>
+ </view>
+ <view class="popup-row">
+ <text class="popup-label">鎵瑰彿</text>
+ <input class="popup-value input" type="text" v-model="batch" placeholder="杈撳叆鎵瑰彿" />
+ </view>
+ <view class="popup-row">
+ <text class="popup-label">鏁伴噺</text>
+ <view class="popup-value number">
+ <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
+ </view>
+ </view>
+ </view>
+ <view class="popup-footer">
+ <view class="popup-btn cancel" @click="reviseClose">鍙栨秷</view>
+ <view class="popup-btn confirm" @click="reviseConfirm()">纭</view>
+ </view>
+ </view>
+ </uni-popup>
+
+ <!-- 绉婚櫎纭 -->
+ <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>
+
+ <!-- 鎻愮ず淇℃伅寮圭獥 -->
+ <uni-popup ref="message" type="message">
+ <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
+ </uni-popup>
+
+ <!-- 纭缁勬墭 -->
+ <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>
+
+ <!-- 纭閲嶇疆 -->
+ <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>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ showDetl:false,
+ baseUrl: '',
+ token: '',
+ barcode: '',
+ dataList: [],
+ count: 0,
+ rowNum: '',
+ matnr: '',
+ editMatnr: '',
+ batch: '',
+ weight: '',
+ msgType1: 'success',
+ msgType: 'success',
+ messageText: '',
+ title: '',
+ content: '',
+ barcodeFocus: true,
+ matFocus: false,
+ matData: '',
+ removeNum: 0,
+ ck1: true,
+ ck2: false,
+ isFull: true,
+ isSubmitting: false,
+ sourceSite:'',
+ targetSiteList: [
+ { label: '101', value: '101' },
+ { label: '102', value: '102' }
+ ],
+ selectedTargetSite: { label: '101', value: '101' },
+ type : 2
+ }
+ },
+ onLoad() {
+
+ },
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ },
+ methods: {
+ onTargetSiteChange(e) {
+ const index = e.detail.value;
+ this.selectedTargetSite = this.targetSiteList[index];
+ },
+ clearBarcode() {
+ this.barcode = '';
+ this.barcodeFocus = false;
+ setTimeout(() => {
+ this.barcodeFocus = true;
+ }, 100);
+ },
+ clearMatnr() {
+ this.matnr = '';
+ this.matFocus = false;
+ setTimeout(() => {
+ this.matFocus = true;
+ }, 100);
+ },
+ isFrozen() {
+ this.isFull = !this.isFull
+ console.log(this.isFull);
+ },
+ messageToggle(type) {
+ this.msgType1 = type
+ this.$refs.message.open()
+ },
+ // barcode input 浜嬩欢
+ barcodeInput() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ var len = this.barcode.length
+ if (len >= 9 && 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.editMatnr = 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.editMatnr = ''
+ this.messageText = "淇敼鎴愬姛"
+ this.messageToggle('success')
+ this.$refs.revise.close()
+ },
+ reviseClose() {
+ this.$refs.revise.close()
+ },
+ changeValue(value) {
+ this.count = value
+ },
+ combConfirm(type) {
+ if (this.isSubmitting || this.barcode === '') return;
+ this.msgType = type
+ this.title = '纭鍛煎彨'
+ this.content = '纭鍛煎彨锛�'
+ this.$refs.combConfirm.open()
+ },
+ combClose() {
+ this.$refs.combConfirm.close()
+ },
+ comb() {
+ uni.vibrateShort();
+ let that = this;
+ that.isSubmitting = true;
+ if (that.barcode === '') {
+ this.messageText = "璇锋壂鎻忕珯鐐规潯鐮�"
+ this.messageToggle('error')
+ that.isSubmitting = false;
+ return;
+ }
+ uni.request({
+ url: that.baseUrl + '/mobile/agv/start',
+ data: JSON.stringify({
+ type : that.type,
+ barcode: that.barcode,
+ sourceSite:that.sourceSite
+ }),
+ 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')
+ }
+ },
+ fail: () => {
+ that.messageText = "缃戠粶璇锋眰瓒呮椂"
+ that.messageToggle('error')
+ },
+ complete: () => {
+ that.isSubmitting = false;
+ }
+ });
+ },
+ 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.sourceSite = ''
+ this.barcodeFocuss()
+ },
+ }
+ }
+</script>
+
+<style>
+ /* 寮曞叆鍏叡鏍峰紡 */
+ @import url('../../static/css/common.css');
+ /* @import url('../../static/css/wms.css/wms.css'); */
+</style>
diff --git a/pages/AGV/agv_start.vue b/pages/AGV/agv_start.vue
new file mode 100644
index 0000000..b4b190c
--- /dev/null
+++ b/pages/AGV/agv_start.vue
@@ -0,0 +1,529 @@
+<template>
+ <view class="page-container">
+ <!-- 琛ㄥ崟鍖哄煙 -->
+ <view class="form-section">
+ <view class="form-item">
+ <view class="form-label">
+ <uni-icons type="scan" size="18" color="#667eea"></uni-icons>
+ <text class="label-text">鎵樼洏鐮�</text>
+ </view>
+ <view class="form-input-wrap">
+ <input class="form-input" type="text" placeholder="鎵爜 / 杈撳叆鎵樼洏鐮�" v-model="barcode"
+ :focus="barcodeFocus" @input="barcodeInput()" />
+ <uni-icons v-if="barcode" type="clear" size="18" color="#c0c4cc" @click="clearBarcode"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="form-label">
+ <uni-icons type="location" size="18" color="#667eea"></uni-icons>
+ <text class="label-text">鏆傚瓨浣�</text>
+ </view>
+ <view class="form-input-wrap">
+ <input class="form-input" type="text" placeholder="鎵爜 / 杈撳叆鏆傚瓨浣�" v-model="sourceSite" />
+ <uni-icons v-if="sourceSite" type="clear" size="18" color="#c0c4cc" @click="sourceSite=''"></uni-icons>
+ </view>
+ </view>
+ <!-- <view class="form-item">
+ <view class="form-label">
+ <uni-icons type="navigate" size="18" color="#667eea"></uni-icons>
+ <text class="label-text">鐩爣绔欑偣</text>
+ </view>
+ <view class="form-input-wrap">
+ <picker class="picker-full" :range="targetSiteList" range-key="label" @change="onTargetSiteChange">
+ <view class="picker-value">
+ <text>{{selectedTargetSite.label || '璇烽�夋嫨鐩爣绔欑偣'}}</text>
+ <view><uni-icons type="bottom" size="14" color="#909399"></uni-icons></view>
+ </view>
+ </picker>
+ </view>
+ </view> -->
+ </view>
+
+ <!-- 鍒楄〃澶撮儴 -->
+ <view class="list-header" v-if="showDetl">
+ <view class="header-left">
+ <text class="header-title">鍟嗗搧鍒楄〃</text>
+ <view class="count-badge" v-if="dataList.length > 0">
+ <text class="count-text">{{dataList.length}}</text>
+ </view>
+ </view>
+ </view>
+
+ <!-- 鍟嗗搧鍒楄〃 -->
+ <view class="list-container" v-if="showDetl">
+ <view class="mat-card" v-for="(item, i) in dataList" :key="i">
+ <!-- 鍗$墖澶撮儴 -->
+ <view class="card-top">
+ <view class="card-index">{{i + 1}}</view>
+ <view class="mat-code-wrap">
+ <text class="mat-code">{{item.matnr}}</text>
+ </view>
+ <!-- <view class="qty-badge">
+ <text class="qty-text">{{item.anfme}}</text>
+ </view> -->
+ </view>
+
+ <!-- 鍗$墖鍐呭 -->
+ <view class="card-content">
+ <view class="info-row">
+ <view class="info-col">
+ <text class="info-label">鍝佸悕</text>
+ <text class="info-value">{{item.maktx || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-col half">
+ <text class="info-label">瑙勬牸</text>
+ <text class="info-value">{{item.specs || '-'}}</text>
+ </view>
+ <view class="info-col half">
+ <text class="info-label">鎵瑰彿</text>
+ <text class="info-value highlight">{{item.batch || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-col half">
+ <text class="info-label">鏁伴噺</text>
+ <text class="info-value qty">{{item.anfme}}</text>
+ </view>
+ </view>
+ </view>
+
+ <!-- 鍗$墖鎿嶄綔 -->
+ <view class="card-actions">
+ <view class="action-btn edit-btn" @click="revise(item, i)">
+ <uni-icons type="compose" size="18" color="#667eea"></uni-icons>
+ <text class="action-text">淇敼</text>
+ </view>
+ <view class="action-btn delete-btn" @click="remove(item, i, 'warn')">
+ <uni-icons type="trash" size="18" color="#f56c6c"></uni-icons>
+ <text class="action-text delete-text">绉婚櫎</text>
+ </view>
+ </view>
+ </view>
+
+ <!-- 绌虹姸鎬� -->
+ <view class="empty-state" v-if="dataList.length === 0">
+ <uni-icons type="cart" size="60" color="#CCCCCC"></uni-icons>
+ <text class="empty-text">鏆傛棤鍟嗗搧</text>
+ <text class="empty-hint">璇锋壂鎻忕墿鏂欑爜娣诲姞鍟嗗搧</text>
+ </view>
+
+ <!-- 搴曢儴鍗犱綅 -->
+ <view class="bottom-placeholder"></view>
+ </view>
+
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <view class="bottom-bar">
+ <view class="btn-reset" @click="reset('warn')">
+ <uni-icons type="refresh" size="18" color="#909399"></uni-icons>
+ <text class="btn-text">閲嶇疆</text>
+ </view>
+ <view class="btn-submit" :class="{'btn-disabled': isSubmitting || barcode === ''}" @click="combConfirm('warn')">
+ <uni-icons type="checkbox" size="18" color="#ffffff"></uni-icons>
+ <text class="btn-text">纭鍛煎彨</text>
+ </view>
+ </view>
+
+ <!-- 寮圭獥鍖哄煙 -->
+ <!-- 淇敼鏁伴噺 -->
+ <uni-popup ref="revise" type="dialog">
+ <view class="popup-card">
+ <view class="popup-header">
+ <text class="popup-title">淇敼淇℃伅</text>
+ </view>
+ <view class="popup-body">
+ <view class="popup-row">
+ <text class="popup-label">缂栫爜</text>
+ <view class="popup-value disabled">{{editMatnr}}</view>
+ </view>
+ <view class="popup-row">
+ <text class="popup-label">鎵瑰彿</text>
+ <input class="popup-value input" type="text" v-model="batch" placeholder="杈撳叆鎵瑰彿" />
+ </view>
+ <view class="popup-row">
+ <text class="popup-label">鏁伴噺</text>
+ <view class="popup-value number">
+ <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
+ </view>
+ </view>
+ </view>
+ <view class="popup-footer">
+ <view class="popup-btn cancel" @click="reviseClose">鍙栨秷</view>
+ <view class="popup-btn confirm" @click="reviseConfirm()">纭</view>
+ </view>
+ </view>
+ </uni-popup>
+
+ <!-- 绉婚櫎纭 -->
+ <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>
+
+ <!-- 鎻愮ず淇℃伅寮圭獥 -->
+ <uni-popup ref="message" type="message">
+ <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
+ </uni-popup>
+
+ <!-- 纭缁勬墭 -->
+ <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>
+
+ <!-- 纭閲嶇疆 -->
+ <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>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ showDetl:false,
+ baseUrl: '',
+ token: '',
+ barcode: '',
+ dataList: [],
+ count: 0,
+ rowNum: '',
+ matnr: '',
+ editMatnr: '',
+ batch: '',
+ weight: '',
+ msgType1: 'success',
+ msgType: 'success',
+ messageText: '',
+ title: '',
+ content: '',
+ barcodeFocus: true,
+ matFocus: false,
+ matData: '',
+ removeNum: 0,
+ ck1: true,
+ ck2: false,
+ isFull: true,
+ isSubmitting: false,
+ sourceSite:'',
+ targetSiteList: [
+ { label: '101', value: '101' },
+ { label: '102', value: '102' }
+ ],
+ selectedTargetSite: { label: '101', value: '101' },
+ type : 1
+ }
+ },
+ onLoad() {
+
+ },
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ },
+ methods: {
+ onTargetSiteChange(e) {
+ const index = e.detail.value;
+ this.selectedTargetSite = this.targetSiteList[index];
+ },
+ clearBarcode() {
+ this.barcode = '';
+ this.barcodeFocus = false;
+ setTimeout(() => {
+ this.barcodeFocus = true;
+ }, 100);
+ },
+ clearMatnr() {
+ this.matnr = '';
+ this.matFocus = false;
+ setTimeout(() => {
+ this.matFocus = true;
+ }, 100);
+ },
+ isFrozen() {
+ this.isFull = !this.isFull
+ console.log(this.isFull);
+ },
+ messageToggle(type) {
+ this.msgType1 = type
+ this.$refs.message.open()
+ },
+ // barcode input 浜嬩欢
+ barcodeInput() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ var len = this.barcode.length
+ if (len >= 9 && 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.editMatnr = 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.editMatnr = ''
+ this.messageText = "淇敼鎴愬姛"
+ this.messageToggle('success')
+ this.$refs.revise.close()
+ },
+ reviseClose() {
+ this.$refs.revise.close()
+ },
+ changeValue(value) {
+ this.count = value
+ },
+ combConfirm(type) {
+ if (this.isSubmitting || this.barcode === '' || this.sourceSite === '') return;
+ this.msgType = type
+ this.title = '纭鍛煎彨'
+ this.content = '纭鍛煎彨锛�'
+ this.$refs.combConfirm.open()
+ },
+ combClose() {
+ this.$refs.combConfirm.close()
+ },
+ comb() {
+ uni.vibrateShort();
+ let that = this;
+ that.isSubmitting = true;
+ uni.request({
+ url: that.baseUrl + '/mobile/agv/start',
+ data: JSON.stringify({
+ type : that.type,
+ barcode: that.barcode,
+ sourceSite:that.sourceSite
+ }),
+ 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')
+ }
+ },
+ fail: () => {
+ that.messageText = "缃戠粶璇锋眰瓒呮椂"
+ that.messageToggle('error')
+ },
+ complete: () => {
+ that.isSubmitting = false;
+ }
+ });
+ },
+ 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.sourceSite = ''
+ this.barcodeFocuss()
+ },
+ }
+ }
+</script>
+
+<style>
+ /* 寮曞叆鍏叡鏍峰紡 */
+ @import url('../../static/css/common.css');
+ /* @import url('../../static/css/wms.css/wms.css'); */
+</style>
diff --git "a/pages/home/home - \345\211\257\346\234\254 \0502\051.vue" "b/pages/home/home - \345\211\257\346\234\254 \0502\051.vue"
deleted file mode 100644
index 1791732..0000000
--- "a/pages/home/home - \345\211\257\346\234\254 \0502\051.vue"
+++ /dev/null
@@ -1,376 +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: [],
- elements2: [
- // {
- // title: '缁勬墭',
- // name: 'pakin',
- // color: 'cyan',
- // cuIcon: 'pullup',
- // url: '/pakin/pakin'
- // },
- // {
- // title: '璁㈠崟鍏ュ簱',
- // name: 'orderPakin',
- // color: 'red',
- // cuIcon: '',
- // url: '/order/orderList'
- // },
- // {
- // title: '鎷f枡绔欏埌绔�',
- // name: 'leftover',
- // color: 'orange',
- // cuIcon: 'pullup',
- // url: '/pakin/leftovers'
- // },
-
- {
- title: '骞冲簱鍏ュ簱',
- name: 'POrderPakin',
- color: 'purple',
- cuIcon: '',
- url: '/pingku/POrderList'
- },
- {
- title: '骞冲簱鍑哄簱',
- name: 'POrderPakin',
- color: 'cyan',
- cuIcon: '',
- url: '/pingku/POrderListOut'
- },
- {
- title: '骞冲簱搴撳瓨璋冩暣',
- name: 'oo',
- color: 'olive',
- cuIcon: '',
- url: '/pingku/PInventoryAdjustment'
- },
-
- // {
- // title: '鍛煎彨Agv',
- // name: 'AGVStart',
- // color: 'cyan',
- // cuIcon: '',
- // url: '/AGV/AGVStart'
- // },
- // {
- // title: 'Agv鎷嗘墭鍛煎彨',
- // name: 'AGVDismantle',
- // color: 'cyan',
- // cuIcon: '',
- // url: '/AGV/AGVDismantle'
- // },
- // {
- // title: 'Agv鍌ㄤ綅瑙g粦',
- // name: 'AGVUnbind',
- // color: 'orange',
- // cuIcon: '',
- // url: '/AGV/AGVUnbind'
- // },
- // {
- // title: 'Agv鍌ㄤ綅缁戝畾',
- // name: 'AGVBind',
- // color: 'purple',
- // cuIcon: '',
- // url: '/AGV/AGVBind'
- // },
- // {
- // title: '绔欑粦瀹�',
- // name: 'AGVStaBind',
- // color: 'red',
- // cuIcon: '',
- // url: '/AGV/AGVStaBind'
- // },
- // {
- // title: '浜х嚎鍙枡',
- // name: 'AGVSiteList',
- // color: 'red',
- // cuIcon: '',
- // url: '/AGV/AGVSiteList'
- // },
- // {
- // title: '浜х嚎鍙枡2',
- // name: 'AGVSiteList2',
- // color: 'red',
- // cuIcon: '',
- // url: '/AGV/AGVSiteList2'
- // },
- // {
- // title: '鎴愬搧鍛煎彨',
- // name: 'AGVFinishedCall',
- // color: 'orange',
- // cuIcon: '',
- // url: '/AGV/AGVFinishedCall'
- // },
- // {
- // title: '鎴愬搧鍛煎彨2',
- // name: 'AGV_2F',
- // color: 'purple',
- // cuIcon: '',
- // url: '/AGV/AGV2F'
- // },
- // {
- // title: '缁勬墭涓婃灦',
- // name: 'putOn',
- // color: 'orange',
- // cuIcon: 'pullup',
- // url: '/pakin/putOn'
- // },
- // {
- // title: '鎵撳嵃',
- // name: 'print',
- // color: 'purple',
- // cuIcon: 'text',
- // url: '/print/print'
- // },
- // {
- // title: '璁㈠崟涓婃灦',
- // name: 'orderPutOn',
- // color: 'yellow',
- // cuIcon: 'pullup',
- // url: '/order/orderPutOn'
- // },
- // {
- // title: '璁㈠崟涓嬫灦',
- // name: 'orderPutDown',
- // color: 'olive',
- // cuIcon: 'pulldown',
- // url: '/order/orderPutDown'
- // },
- // {
- // title: '搴撳瓨鏌ヨ',
- // name: 'stockQuery',
- // color: 'green',
- // cuIcon: '',
- // url: '/stock/stockQuery'
- // },
- // {
-
- // {
- // title: '鍟嗗搧鎵撳嵃',
- // name: 'matList',
- // color: 'orange',
- // cuIcon: 'post',
- // url: '/mat/matList'
- // },
- // {
- // title: '琛ヨ揣',
- // name: 'restock',
- // color: 'yellow',
- // cuIcon: 'punch',
- // url: '/stock/restock'
- // },
- // {
- // title: '杞叏鏉�',
- // name: 'piking',
- // color: 'olive',
- // cuIcon: 'order',
- // url: '/pakin/piking'
- // },
- // {
- // title: '鎹㈡澘缁戝畾',
- // name: 'changePallet',
- // color: 'green',
- // cuIcon: 'order',
- // url: '/stock/changePallet'
- // },
- {
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- },
-
- ],
- colorList: ['cyan', 'blue', 'mauve', 'pink', 'brown', 'red', 'orange', 'yellow', 'olive', 'olive', 'green',
- 'grey'
- ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.getAuth()
- },
- methods: {
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: {
- 'token': uni.getStorageSync('token')
- },
- method: 'POST',
- success(res) {
- 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: 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 - \345\211\257\346\234\254 \0503\051.vue" "b/pages/home/home - \345\211\257\346\234\254 \0503\051.vue"
deleted file mode 100644
index 30a370a..0000000
--- "a/pages/home/home - \345\211\257\346\234\254 \0503\051.vue"
+++ /dev/null
@@ -1,376 +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: [],
- elements2: [
- // {
- // title: '缁勬墭',
- // name: 'pakin',
- // color: 'cyan',
- // cuIcon: 'pullup',
- // url: '/pakin/pakin'
- // },
- {
- title: '璁㈠崟鍏ュ簱',
- name: 'orderPakin',
- color: 'red',
- cuIcon: '',
- url: '/order/orderList'
- },
- {
- title: '鎷f枡绔欏埌绔�',
- name: 'leftover',
- color: 'orange',
- cuIcon: 'pullup',
- url: '/pakin/leftovers'
- },
-
- // {
- // title: '骞冲簱鍏ュ簱',
- // name: 'POrderPakin',
- // color: 'purple',
- // cuIcon: '',
- // url: '/pingku/POrderList'
- // },
- // {
- // title: '骞冲簱鍑哄簱',
- // name: 'POrderPakin',
- // color: 'cyan',
- // cuIcon: '',
- // url: '/pingku/POrderListOut'
- // },
- // {
- // title: '骞冲簱搴撳瓨璋冩暣',
- // name: 'oo',
- // color: 'olive',
- // cuIcon: '',
- // url: '/pingku/PInventoryAdjustment'
- // },
-
- {
- title: '鍛煎彨Agv',
- name: 'AGVStart',
- color: 'cyan',
- cuIcon: '',
- url: '/AGV/AGVStart'
- },
- // {
- // title: 'Agv鎷嗘墭鍛煎彨',
- // name: 'AGVDismantle',
- // color: 'cyan',
- // cuIcon: '',
- // url: '/AGV/AGVDismantle'
- // },
- {
- title: 'Agv鍌ㄤ綅瑙g粦',
- name: 'AGVUnbind',
- color: 'orange',
- cuIcon: '',
- url: '/AGV/AGVUnbind'
- },
- // {
- // title: 'Agv鍌ㄤ綅缁戝畾',
- // name: 'AGVBind',
- // color: 'purple',
- // cuIcon: '',
- // url: '/AGV/AGVBind'
- // },
- {
- title: '绔欑粦瀹�',
- name: 'AGVStaBind',
- color: 'red',
- cuIcon: '',
- url: '/AGV/AGVStaBind'
- },
- {
- title: '浜х嚎鍙枡',
- name: 'AGVSiteList',
- color: 'red',
- cuIcon: '',
- url: '/AGV/AGVSiteList'
- },
- // {
- // title: '浜х嚎鍙枡2',
- // name: 'AGVSiteList2',
- // color: 'red',
- // cuIcon: '',
- // url: '/AGV/AGVSiteList2'
- // },
- {
- title: '鎴愬搧鍛煎彨',
- name: 'AGVFinishedCall',
- color: 'orange',
- cuIcon: '',
- url: '/AGV/AGVFinishedCall'
- },
- // {
- // title: '鎴愬搧鍛煎彨2',
- // name: 'AGV_2F',
- // color: 'purple',
- // cuIcon: '',
- // url: '/AGV/AGV2F'
- // },
- // {
- // title: '缁勬墭涓婃灦',
- // name: 'putOn',
- // color: 'orange',
- // cuIcon: 'pullup',
- // url: '/pakin/putOn'
- // },
- // {
- // title: '鎵撳嵃',
- // name: 'print',
- // color: 'purple',
- // cuIcon: 'text',
- // url: '/print/print'
- // },
- // {
- // title: '璁㈠崟涓婃灦',
- // name: 'orderPutOn',
- // color: 'yellow',
- // cuIcon: 'pullup',
- // url: '/order/orderPutOn'
- // },
- // {
- // title: '璁㈠崟涓嬫灦',
- // name: 'orderPutDown',
- // color: 'olive',
- // cuIcon: 'pulldown',
- // url: '/order/orderPutDown'
- // },
- // {
- // title: '搴撳瓨鏌ヨ',
- // name: 'stockQuery',
- // color: 'green',
- // cuIcon: '',
- // url: '/stock/stockQuery'
- // },
- // {
-
- // {
- // title: '鍟嗗搧鎵撳嵃',
- // name: 'matList',
- // color: 'orange',
- // cuIcon: 'post',
- // url: '/mat/matList'
- // },
- // {
- // title: '琛ヨ揣',
- // name: 'restock',
- // color: 'yellow',
- // cuIcon: 'punch',
- // url: '/stock/restock'
- // },
- // {
- // title: '杞叏鏉�',
- // name: 'piking',
- // color: 'olive',
- // cuIcon: 'order',
- // url: '/pakin/piking'
- // },
- // {
- // title: '鎹㈡澘缁戝畾',
- // name: 'changePallet',
- // color: 'green',
- // cuIcon: 'order',
- // url: '/stock/changePallet'
- // },
- {
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- },
-
- ],
- colorList: ['cyan', 'blue', 'mauve', 'pink', 'brown', 'red', 'orange', 'yellow', 'olive', 'olive', 'green',
- 'grey'
- ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.getAuth()
- },
- methods: {
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: {
- 'token': uni.getStorageSync('token')
- },
- method: 'POST',
- success(res) {
- 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: 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 - \345\211\257\346\234\254.vue" "b/pages/home/home - \345\211\257\346\234\254.vue"
deleted file mode 100644
index 3c64029..0000000
--- "a/pages/home/home - \345\211\257\346\234\254.vue"
+++ /dev/null
@@ -1,376 +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: [],
- elements2: [
- // {
- // title: '缁勬墭',
- // name: 'pakin',
- // color: 'cyan',
- // cuIcon: 'pullup',
- // url: '/pakin/pakin'
- // },
- // {
- // title: '璁㈠崟鍏ュ簱',
- // name: 'orderPakin',
- // color: 'red',
- // cuIcon: '',
- // url: '/order/orderList'
- // },
- // {
- // title: '鎷f枡绔欏埌绔�',
- // name: 'leftover',
- // color: 'orange',
- // cuIcon: 'pullup',
- // url: '/pakin/leftovers'
- // },
-
- // {
- // title: '骞冲簱鍏ュ簱',
- // name: 'POrderPakin',
- // color: 'purple',
- // cuIcon: '',
- // url: '/pingku/POrderList'
- // },
- // {
- // title: '骞冲簱鍑哄簱',
- // name: 'POrderPakin',
- // color: 'cyan',
- // cuIcon: '',
- // url: '/pingku/POrderListOut'
- // },
- // {
- // title: '骞冲簱搴撳瓨璋冩暣',
- // name: 'oo',
- // color: 'olive',
- // cuIcon: '',
- // url: '/pingku/PInventoryAdjustment'
- // },
-
- // {
- // title: '鍛煎彨Agv',
- // name: 'AGVStart',
- // color: 'cyan',
- // cuIcon: '',
- // url: '/AGV/AGVStart'
- // },
- {
- title: 'Agv鎷嗘墭鍛煎彨',
- name: 'AGVDismantle',
- color: 'cyan',
- cuIcon: '',
- url: '/AGV/AGVDismantle'
- },
- {
- title: 'Agv鍌ㄤ綅瑙g粦',
- name: 'AGVUnbind',
- color: 'orange',
- cuIcon: '',
- url: '/AGV/AGVUnbind'
- },
- {
- title: 'Agv鍌ㄤ綅缁戝畾',
- name: 'AGVBind',
- color: 'purple',
- cuIcon: '',
- url: '/AGV/AGVBind'
- },
- // {
- // title: '绔欑粦瀹�',
- // name: 'AGVStaBind',
- // color: 'red',
- // cuIcon: '',
- // url: '/AGV/AGVStaBind'
- // },
- {
- title: '浜х嚎鍙枡',
- name: 'AGVSiteList',
- color: 'red',
- cuIcon: '',
- url: '/AGV/AGVSiteList'
- },
- {
- title: '浜х嚎鍙枡2',
- name: 'AGVSiteList2',
- color: 'red',
- cuIcon: '',
- url: '/AGV/AGVSiteList2'
- },
- // {
- // title: '鎴愬搧鍛煎彨',
- // name: 'AGVFinishedCall',
- // color: 'orange',
- // cuIcon: '',
- // url: '/AGV/AGVFinishedCall'
- // },
- {
- title: '鎴愬搧鍛煎彨2',
- name: 'AGV_2F',
- color: 'purple',
- cuIcon: '',
- url: '/AGV/AGV2F'
- },
- // {
- // title: '缁勬墭涓婃灦',
- // name: 'putOn',
- // color: 'orange',
- // cuIcon: 'pullup',
- // url: '/pakin/putOn'
- // },
- // {
- // title: '鎵撳嵃',
- // name: 'print',
- // color: 'purple',
- // cuIcon: 'text',
- // url: '/print/print'
- // },
- // {
- // title: '璁㈠崟涓婃灦',
- // name: 'orderPutOn',
- // color: 'yellow',
- // cuIcon: 'pullup',
- // url: '/order/orderPutOn'
- // },
- // {
- // title: '璁㈠崟涓嬫灦',
- // name: 'orderPutDown',
- // color: 'olive',
- // cuIcon: 'pulldown',
- // url: '/order/orderPutDown'
- // },
- // {
- // title: '搴撳瓨鏌ヨ',
- // name: 'stockQuery',
- // color: 'green',
- // cuIcon: '',
- // url: '/stock/stockQuery'
- // },
- // {
-
- // {
- // title: '鍟嗗搧鎵撳嵃',
- // name: 'matList',
- // color: 'orange',
- // cuIcon: 'post',
- // url: '/mat/matList'
- // },
- // {
- // title: '琛ヨ揣',
- // name: 'restock',
- // color: 'yellow',
- // cuIcon: 'punch',
- // url: '/stock/restock'
- // },
- // {
- // title: '杞叏鏉�',
- // name: 'piking',
- // color: 'olive',
- // cuIcon: 'order',
- // url: '/pakin/piking'
- // },
- // {
- // title: '鎹㈡澘缁戝畾',
- // name: 'changePallet',
- // color: 'green',
- // cuIcon: 'order',
- // url: '/stock/changePallet'
- // },
- {
- title: '閫�鍑虹櫥褰�',
- name: 'logOut',
- color: 'grey',
- cuIcon: 'exit',
- url: '/login/logOut'
- },
-
- ],
- colorList: ['cyan', 'blue', 'mauve', 'pink', 'brown', 'red', 'orange', 'yellow', 'olive', 'olive', 'green',
- 'grey'
- ]
- };
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.getAuth()
- },
- methods: {
- getAuth() {
- let that = this
- uni.request({
- url: that.baseUrl + '/menu/pda/auth',
- data: {},
- header: {
- 'token': uni.getStorageSync('token')
- },
- method: 'POST',
- success(res) {
- 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: 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
index 1be4e6c..dd87680 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -66,6 +66,20 @@
url: '/order/orderList'
},
{
+ title: 'AGV瀹瑰櫒鍏ュ簱',
+ name: 'agv_start',
+ color: 'blue',
+ cuIcon: '',
+ url: '/AGV/agv_start'
+ },
+ {
+ title: 'AGV瀹瑰櫒鍥炲簱',
+ name: 'agv_back',
+ color: 'orange',
+ cuIcon: '',
+ url: '/AGV/agv_back'
+ },
+ {
title: '搴撳瓨鏌ヨ',
name: 'stockQuery',
color: 'green',
diff --git a/pages/mat/matList.vue b/pages/mat/matList.vue
deleted file mode 100644
index 0412155..0000000
--- a/pages/mat/matList.vue
+++ /dev/null
@@ -1,230 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
- </view>
- <scroll-view>
- <view class="tag-list" v-for="(item,i) in tagList" :key="i" @click="showTag(item.id)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍒嗙被</view>
- </view>
- </view>
- <view class="tag-item">{{item.name}}</view>
- </view>
- </scroll-view>
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍟嗗搧</view>
- </view>
- </view>
- <view class="tag-item">鍟嗗搧缂栧彿锛� {{item.matnr}}</view>
- <view class="tag-item">鍟嗗搧鍚嶇О锛� {{item.maktx ? item.maktx : '--'}}</view>
- <view class="tag-item">鍟嗗搧瑙勬牸锛� {{item.specs ? item.specs : '--'}}</view>
- </view>
- </view>
- <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1
- }
- },
- onReachBottom() {
- this.status = 'more';
- this.showMat(this.tagIdNow);
- },
- onLoad() {
- // 娌″暐鐢ㄤ簡
- let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showTag(1)
- },
- methods: {
- search() {
- console.log("1")
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.showMat(parentId)
- }
- that.baColor = "background-color: #0081ff;"
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- that.tagIdNow = tagId
- if (tagId == null || tagId == '' || tagId == undefined) {
- return;
- }
- // wms绔� 琛ユ帴鍙�
- // @RequestMapping(value = "/mat/list/pda/page/auth")
- // @ManagerAuth
- // public R pdaPageList(@RequestParam(required = true)Long tagId,
- // @RequestParam(defaultValue = "1")Integer curr,
- // @RequestParam(defaultValue = "10")Integer limit){
- // EntityWrapper<Mat> wrapper = new EntityWrapper<>();
- // wrapper.eq("tag_id", tagId);
- // wrapper.orderBy("create_time", false);
- // return R.ok().add(matService.selectPage(new Page<>(curr, limit), wrapper));
- // }
- uni.request({
- url: that.baseUrl + '/mat/list/pda/page/auth',
- data: {
- curr:that.curr,
- limit: 100,
- tagId: tagId
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data.records != null && res.data.records.length > 0) {
- let list = res.data.records
- that.matList = that.reload ? list : that.matList.concat(list);
- that.curr = that.curr + 1
- }
- if (res.data.records.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- toPrint(item) {
- let that = this
- uni.navigateTo({
- url: "../print/print",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- data: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/mat/matQuery2.vue b/pages/mat/matQuery2.vue
deleted file mode 100644
index c8316fb..0000000
--- a/pages/mat/matQuery2.vue
+++ /dev/null
@@ -1,239 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
- </view>
- <scroll-view>
- <view class="tag-list" v-for="(item,i) in tagList" :key="i" @click="showTag(item.id)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍒嗙被</view>
- </view>
- </view>
- <view class="tag-item">{{item.name}}</view>
- </view>
- </scroll-view>
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item.matnr)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍟嗗搧</view>
- </view>
- </view>
- <view class="tag-item">鍟嗗搧缂栧彿锛� {{item.matnr}}</view>
- <view class="tag-item">鍟嗗搧鍚嶇О锛� {{item.maktx ? item.maktx : '--'}}</view>
- <view class="tag-item">鍟嗗搧瑙勬牸锛� {{item.specs ? item.specs : '--'}}</view>
- </view>
- </view>
- <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- condition: '',
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1
- }
- },
- onReachBottom() {
- this.status = 'more';
- if (this.tagList == null) {
- this.showMat(this.tagIdNow);
- }
- },
- onLoad() {
- // 娌″暐鐢ㄤ簡
- let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showTag(1)
- },
- methods: {
- search() {
- let that = this
- that.tagList = []
- that.matList = []
- uni.request({
- url: that.baseUrl + '/mat/search/pda/auth',
- data: {
- condition: that.condition
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.matList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.tagList = []
- that.showMat(parentId)
- }
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- that.tagIdNow = tagId
- if (tagId == null || tagId == '' || tagId == undefined) {
- return;
- }
- uni.request({
- url: that.baseUrl + '/mat/list/pda/page/auth',
- data: {
- curr:that.curr,
- limit: 20,
- tagId: tagId
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data.records != null && res.data.records.length > 0) {
- let list = res.data.records
- that.matList = that.reload ? list : that.matList.concat(list);
- that.curr = that.curr + 1
- }
- if (res.data.records.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- findBySelect(matnr) {
- this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: matnr});
- uni.navigateBack({
-
- })
-
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/order/orderDetlList.vue b/pages/order/orderDetlList.vue
index 8e3be5b..e09db27 100644
--- a/pages/order/orderDetlList.vue
+++ b/pages/order/orderDetlList.vue
@@ -264,9 +264,10 @@
</script>
<style>
+ /* 寮曞叆鍏叡鏍峰紡 */
+ @import url('../../static/css/common.css');
+
.page-container {
- min-height: 100vh;
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
padding-bottom: 120rpx;
}
@@ -470,16 +471,10 @@
/* 绌虹姸鎬� */
.empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
padding: 60rpx 0;
}
.empty-text {
- font-size: 26rpx;
- color: #909399;
margin-top: 20rpx;
}
diff --git a/pages/order/orderDetlList2.vue b/pages/order/orderDetlList2.vue
deleted file mode 100644
index d41ca5f..0000000
--- a/pages/order/orderDetlList2.vue
+++ /dev/null
@@ -1,219 +0,0 @@
-<template>
- <view>
- <view class="card" v-for="item in menuList" @click="chose(item)">
- {{item}}
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1,
- menuList:[]
- }
- },
- onReachBottom() {
- this.status = 'more';
- this.showMat(this.tagIdNow);
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
-
- eventChannel.on('data', function(data) {
- that.order = data.data
- that.getOrderNoList(that.order)
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showMat(1)
- },
- methods: {
- getOrderNoList(order) {
- let that = this
- uni.request({
- url: that.baseUrl + '/orderDetl/list/pda/auth',
- method: 'POST',
- data: {
- orderNo: order.orderNo
- },
- success(res) {
- res = res.data
- that.menuList = res.data
- }
- })
- },
- search() {
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.showMat(parentId)
- }
- that.baColor = "background-color: #0081ff;"
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- // wms绔� 琛ユ帴鍙�
- // @RequestMapping(value = "/mat/list/pda/page/auth")
- // @ManagerAuth
- // public R pdaPageList(@RequestParam(required = true)Long tagId,
- // @RequestParam(defaultValue = "1")Integer curr,
- // @RequestParam(defaultValue = "10")Integer limit){
- // EntityWrapper<Mat> wrapper = new EntityWrapper<>();
- // wrapper.eq("tag_id", tagId);
- // wrapper.orderBy("create_time", false);
- // return R.ok().add(matService.selectPage(new Page<>(curr, limit), wrapper));
- // }
- uni.request({
- url: that.baseUrl + '/order/list/pda/page/auth',
- data: {
- curr:that.curr,
- limit: 100,
- tagId: tagId
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data.records != null && res.data.records.length > 0) {
- let list = res.data.records
- that.matList = that.reload ? list : that.matList.concat(list);
- that.curr = that.curr + 1
- }
- if (res.data.records.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- toPrint(item) {
- let that = this
- uni.navigateTo({
- url: "../order/orderDetlList",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- data: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/order/orderPakin.vue b/pages/order/orderPakin.vue
deleted file mode 100644
index e698924..0000000
--- a/pages/order/orderPakin.vue
+++ /dev/null
@@ -1,501 +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 class="item">
- <view class="code-decs">婊℃墭:</view>
- <radio-group @change="isFrozen">
- <label>
- <radio :checked="ck1" style="margin-left: 10rpx;"/><text>鏄�</text>
- </label>
- <label>
- <radio :checked="ck2" style="margin-left: 50rpx;"/><text>鍚�</text>
- </label>
- </radio-group>
- </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" style="word-break: break-all;">{{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>
-</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,
- ck1: true,
- ck2: false,
- isFull: true
- }
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- 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()
- },
- isFrozen() {
- this.isFull = !this.isFull
- },
- 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,
- isFull: that.isFull,
- 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: 410rpx;
- }
- .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: 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/order/orderPakin2.vue b/pages/order/orderPakin2.vue
index 7b950ef..a3b0af5 100644
--- a/pages/order/orderPakin2.vue
+++ b/pages/order/orderPakin2.vue
@@ -501,102 +501,11 @@
</script>
<style>
+ /* 寮曞叆鍏叡鏍峰紡 */
+ @import url('../../static/css/common.css');
@import url('../../static/css/wms.css/wms.css');
- page {
- height: 100%;
- background: #f5f7fa;
- }
-
- .page-container {
- min-height: 100vh;
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
- padding-bottom: 110rpx;
- box-sizing: border-box;
- }
-
- /* 琛ㄥ崟鍖哄煙 */
- .form-section {
- background: #ffffff;
- padding: 12rpx 20rpx;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
- }
-
- .form-item {
- display: flex;
- align-items: center;
- padding: 12rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- }
-
- .form-item:last-child {
- border-bottom: none;
- }
-
- .form-label {
- display: flex;
- align-items: center;
- width: 140rpx;
- flex-shrink: 0;
- }
-
- .label-text {
- font-size: 26rpx;
- color: #303133;
- margin-left: 6rpx;
- }
-
- .form-input-wrap {
- flex: 1;
- display: flex;
- align-items: center;
- background: #f5f7fa;
- border-radius: 6rpx;
- padding: 0 16rpx;
- height: 60rpx;
- }
-
- .form-input {
- flex: 1;
- height: 60rpx;
- font-size: 26rpx;
- color: #303133;
- }
-
- /* 鍒楄〃澶撮儴 */
- .list-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx 20rpx;
- background: #ffffff;
- margin-top: 12rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
- }
-
- .header-left {
- display: flex;
- align-items: center;
- }
-
- .header-title {
- font-size: 28rpx;
- color: #303133;
- font-weight: 600;
- }
-
- .count-badge {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 16rpx;
- padding: 2rpx 12rpx;
- margin-left: 12rpx;
- }
-
- .count-text {
- font-size: 20rpx;
- color: #ffffff;
- font-weight: 500;
- }
+
.header-right {
display: flex;
@@ -606,50 +515,6 @@
.review-status {
font-size: 22rpx;
color: #909399;
- }
-
- /* 鍟嗗搧鍒楄〃 */
- .list-container {
- padding: 0 20rpx;
- }
-
- .mat-card {
- background: #ffffff;
- border-radius: 12rpx;
- margin-top: 12rpx;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
- overflow: hidden;
- }
-
- .card-top {
- display: flex;
- align-items: center;
- padding: 14rpx 16rpx;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
-
- .card-index {
- width: 36rpx;
- height: 36rpx;
- background: rgba(255, 255, 255, 0.25);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 22rpx;
- color: #ffffff;
- font-weight: 600;
- margin-right: 12rpx;
- }
-
- .mat-code-wrap {
- flex: 1;
- }
-
- .mat-code {
- font-size: 26rpx;
- color: #ffffff;
- font-weight: 600;
}
.review-badge {
@@ -670,249 +535,7 @@
color: #ffffff;
}
- /* 鍗$墖鍐呭 */
- .card-content {
- padding: 12rpx 16rpx;
- }
-
- .info-row {
- display: flex;
- margin-bottom: 8rpx;
- }
-
- .info-row:last-child {
- margin-bottom: 0;
- }
-
- .info-col {
- flex: 1;
- }
-
- .info-col.half {
- width: 50%;
- flex: none;
- }
-
- .info-label {
- font-size: 20rpx;
- color: #909399;
- display: block;
- }
-
- .info-value {
- font-size: 24rpx;
- color: #303133;
- display: block;
- margin-top: 2rpx;
- }
-
- .info-value.highlight {
- color: #667eea;
- font-weight: 500;
- }
-
- .info-value.qty {
- font-size: 28rpx;
- color: #303133;
- font-weight: 600;
- }
-
- /* 鍗$墖鎿嶄綔 */
- .card-actions {
- display: flex;
- border-top: 1rpx solid #f0f0f0;
- }
-
- .action-btn {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 14rpx 0;
- }
-
- .edit-btn {
- border-right: 1rpx solid #f0f0f0;
- }
-
- .action-text {
- font-size: 24rpx;
- color: #667eea;
- margin-left: 6rpx;
- }
-
- .delete-text {
- color: #f56c6c;
- }
-
- /* 绌虹姸鎬� */
.empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
padding: 60rpx 0;
- }
-
- .empty-text {
- font-size: 26rpx;
- color: #909399;
- margin-top: 16rpx;
- }
-
- .empty-hint {
- font-size: 22rpx;
- color: #c0c4cc;
- margin-top: 8rpx;
- }
-
- .bottom-placeholder {
- height: 20rpx;
- }
-
- /* 搴曢儴鎿嶄綔鏍� */
- .bottom-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- padding: 16rpx 20rpx;
- background: #ffffff;
- box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
- }
-
- .btn-reset {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 160rpx;
- height: 72rpx;
- background: #f5f7fa;
- border-radius: 36rpx;
- margin-right: 16rpx;
- }
-
- .btn-reset .btn-text {
- font-size: 26rpx;
- color: #909399;
- margin-left: 6rpx;
- }
-
- .btn-submit {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- height: 72rpx;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 36rpx;
- }
-
- .btn-submit .btn-text {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: 500;
- margin-left: 6rpx;
- }
-
- .btn-disabled {
- background: #c0c4cc;
- opacity: 0.6;
- }
-
- /* 寮圭獥鏍峰紡 */
- .popup-card {
- width: 600rpx;
- background: #ffffff;
- border-radius: 16rpx;
- overflow: hidden;
- }
-
- .popup-header {
- padding: 24rpx;
- text-align: center;
- border-bottom: 1rpx solid #f0f0f0;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
-
- .popup-title {
- font-size: 30rpx;
- color: #ffffff;
- font-weight: 600;
- }
-
- .popup-body {
- padding: 24rpx;
- }
-
- .popup-row {
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- height: 70rpx;
- }
-
- .popup-row:last-child {
- margin-bottom: 0;
- }
-
- .popup-label {
- width: 80rpx;
- font-size: 26rpx;
- color: #606266;
- flex-shrink: 0;
- }
-
- .popup-value {
- flex: 1;
- height: 70rpx;
- background: #f5f7fa;
- border-radius: 8rpx;
- padding: 0 16rpx;
- font-size: 26rpx;
- color: #303133;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- }
-
- .popup-value.disabled {
- color: #909399;
- background: #f0f0f0;
- }
-
- .popup-value.input {
- padding: 0 16rpx;
- }
-
- .popup-value.number {
- justify-content: center;
- background: transparent;
- padding: 0;
- }
-
- .popup-footer {
- display: flex;
- border-top: 1rpx solid #f0f0f0;
- }
-
- .popup-btn {
- flex: 1;
- height: 90rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- }
-
- .popup-btn.cancel {
- color: #909399;
- border-right: 1rpx solid #f0f0f0;
- }
-
- .popup-btn.confirm {
- color: #667eea;
- font-weight: 600;
}
</style>
diff --git a/pages/order/orderPutDown.vue b/pages/order/orderPutDown.vue
deleted file mode 100644
index 5293bc6..0000000
--- a/pages/order/orderPutDown.vue
+++ /dev/null
@@ -1,501 +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>
-</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
- }
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- 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: 410rpx;
- }
- .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/order/orderPutOn.vue b/pages/order/orderPutOn.vue
deleted file mode 100644
index 0f36504..0000000
--- a/pages/order/orderPutOn.vue
+++ /dev/null
@@ -1,531 +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>
-</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: []
- }
- },
- 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
- 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: 410rpx;
- }
- .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/pakin/leftovers.vue b/pages/pakin/leftovers.vue
deleted file mode 100644
index c7e5c40..0000000
--- a/pages/pakin/leftovers.vue
+++ /dev/null
@@ -1,562 +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">鎷f枡绠�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode2" :focus="barcodeFocus2"
- @input="barcodeInput2()">
- </view>
- <!-- <view class="item">
- <view class="code-decs">婊℃墭:</view>
- <radio-group @change="isFrozen">
- <label>
- <radio :checked="ck1" style="margin-left: 10rpx;"/><text>鏄�</text>
- </label>
- <label>
- <radio :checked="ck2" style="margin-left: 50rpx;"/><text>鍚�</text>
- </label>
- </radio-group>
- </view> -->
- </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" style="word-break: break-all;">{{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: '',
- barcode2:'',
- dataList: [],
- count: 0,
- rowNum: '',
- matnr: '',
- batch: '',
- weight: '',
- msgType1: 'success',
- msgType: 'success',
- messageText: '',
- title: '',
- content: '',
- barcodeFocus: true,
- barcodeFocus2: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- ck1: true,
- ck2: false,
- isFull: true,
- floorList:[2,3],
- floor:''
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- isFrozen() {
- this.isFull = !this.isFull
- console.log(this.isFull);
- },
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode.length
- if (len >= 9 && len <=8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
- this.selectPakinDetlList()
- // this.focuss()
- }, 200)
- },
- barcodeInput2() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.barcode2.length
-
- // this.selectPakinDetlList()
- // this.focuss()
- }, 200)
- },
- selectPakinDetlList(){
- let that = this;
- uni.request({
- url: that.baseUrl + '/mobile/select/workDetl/barcode',
- data: JSON.stringify({
- barcode: that.barcode
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- result = result.data
- if (result.code === 200 && result.data) {
- for(var i =0;i<result.data.length;i++){
- console.log(result.data[i])
- that.dataList.push(result.data[i])
- }
-
- } 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'
- })
- }
-
- }
- });
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- barcodeFocuss() {
- let that = this;
- that.barcodeFocus = false;
- setTimeout(() => {
- that.barcode = '';
- that.barcodeFocus = true;
- }, 100);
- },
- barcodeFocuss2() {
- let that = this;
- that.barcodeFocus2 = false;
- setTimeout(() => {
- that.barcode2 = '';
- that.barcodeFocus2 = 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) {
- for(var i =0;i<result.data.length;i++){
- that.dataList.unshift(result.data[i])
- }
-
- } 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.barcode2 === '') {
- this.messageText = "璇锋壂鎻忔嫞鏂欑鏉$爜"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "鎷f枡鍒楄〃涓虹┖"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/leftovers/out',
- data: JSON.stringify({
- barcode: that.barcode,
- barcode2: that.barcode2
- }),
- 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.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;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
- }
-
- .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);
- }
- .list:first-child {
- margin-top: 250rpx;
- }
-</style>
diff --git a/pages/pakin/mergeStore.vue b/pages/pakin/mergeStore.vue
deleted file mode 100644
index edb9e4c..0000000
--- a/pages/pakin/mergeStore.vue
+++ /dev/null
@@ -1,611 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">Bom鍙�:</view>
- <view style="flex: 1;">
- <input type="text" placeholder=" --" disabled="true" v-model="orderNo" :focus="orderNoFocus">
- </view>
- <view style="height:100%;line-height:2;width:40rpx;margin-right: 20rpx;">
- <!-- <uni-icons type="clear" color="#c1c1c1" @click="clearOrderNo()"></uni-icons> -->
- </view>
- </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="checkBom()">
- <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="left-item">鏁伴噺锛歿{item.anfme}}</view>
- </view>
- <view class="list-left-item">
- </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='1' :max="maxAn" 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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- enterCount: 0,
- maxAnfme: 0,
- maxAn: 0
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- let _this = this
- uni.request({
- url: _this.baseUrl + '/mobile/check/mergeStore/barcode',
- data: {barcode: _this.barcode},
- header: { 'token':uni.getStorageSync('token') },
- success(res) {
- res = res.data
- if (res.code === 200) {
- _this.focuss()
- _this.orderNo = res.data
- uni.showToast({ title: '鎿嶄綔鎴愬姛', 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 {
- _this.barcodeFocuss()
- uni.showToast({ title: res.msg, icon: "none", position: 'top' })
- }
- }
- })
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- 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);
- },
- // 妫�楠屽綋鍓嶇墿鏂欐槸鍚︽槸鍦ㄥ綋鍓岯om琛ㄤ腑
- checkBom() {
- let _this = this
- uni.request({
- url: _this.baseUrl + '/mobile/comb/checkBom',
- data: JSON.stringify({
- bomCode: _this.orderNo,
- matnr: _this.matnr
- }),
- method: 'POST',
- header: { 'token': uni.getStorageSync('token') },
- success(res) {
- // console.log(res);
- res = res.data
- if (res.code === 200) {
- if (res.data) {
- _this.maxAnfme = res.data.zpalletAnfme
- _this.findMat()
- } else {
- _this.findMat()
- }
- } else if (res.code == 403) {
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- _this.matnr = ''
- uni.showToast({
- title: res.msg,
- icon: "none",
- position: 'top'
- })
- }
-
- }
- })
- },
- // 鎼滅储鐗╂枡
- 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'] = ''
- if (that.maxAnfme > 0) {
- that.matData['maxNum'] = that.maxAnfme
- } else if (that.maxAnfme == 0){
- that.matData['maxNum'] = 0
- }
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- console.log(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) {
- // if (this.maxAnfme) {
- // mat['maxAnfme'] = this.maxAnfme
- // mat.anfme = this.maxAnfme
-
- // }
- this.dataList.unshift(mat)
- }
- this.maxAnfme = ''
- },
- // 淇敼鎵瑰彿
- 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.maxAn = this.dataList[i].maxNum
- 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.orderNo === '') {
- this.messageText = "璇疯緭鍏ヨ鍗曟潯鐮�"
- this.messageToggle('error')
- return;
- }
- 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/merge/comb/auth',
- data: JSON.stringify({
- bomCode: 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orderNo = ''
- this.dataList = []
- this.barcode = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- }
- }
-</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: 210rpx;
- 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/pakin.vue b/pages/pakin/pakin.vue
index bef38bf..76b2afd 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -106,7 +106,7 @@
<uni-icons type="refresh" size="18" color="#909399"></uni-icons>
<text class="btn-text">閲嶇疆</text>
</view>
- <view class="btn-submit" :class="{'btn-disabled': dataList.length === 0}" @click="combConfirm('warn')">
+ <view class="btn-submit" :class="{'btn-disabled': isSubmitting || dataList.length === 0}" @click="combConfirm('warn')">
<uni-icons type="checkbox" size="18" color="#ffffff"></uni-icons>
<text class="btn-text">纭缁勬墭</text>
</view>
@@ -192,7 +192,8 @@
removeNum: 0,
ck1: true,
ck2: false,
- isFull: true
+ isFull: true,
+ isSubmitting: false
}
},
onLoad() {
@@ -416,7 +417,7 @@
this.count = value
},
combConfirm(type) {
- if (this.dataList.length === 0) return;
+ if (this.isSubmitting || this.dataList.length === 0) return;
this.msgType = type
this.title = '纭缁勬墭'
this.content = '纭灏嗗晢鍝佺粍鎵樺叆搴擄紵'
@@ -428,20 +429,24 @@
comb() {
uni.vibrateShort();
let that = this;
+ that.isSubmitting = true;
if (that.barcode === '') {
this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
this.messageToggle('error')
+ that.isSubmitting = false;
return;
}
if (that.dataList.length === 0) {
this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
this.messageToggle('error')
+ that.isSubmitting = false;
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')
+ that.isSubmitting = false;
return;
}
}
@@ -476,6 +481,13 @@
that.messageText = res.msg
that.messageToggle('error')
}
+ },
+ fail: () => {
+ that.messageText = "缃戠粶璇锋眰瓒呮椂"
+ that.messageToggle('error')
+ },
+ complete: () => {
+ that.isSubmitting = false;
}
});
},
@@ -507,401 +519,8 @@
</script>
<style>
+ /* 寮曞叆鍏叡鏍峰紡 */
+ @import url('../../static/css/common.css');
@import url('../../static/css/wms.css/wms.css');
-
- page {
- height: 100%;
- background: #f5f7fa;
- }
-
- .page-container {
- min-height: 100vh;
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
- padding-bottom: 110rpx;
- box-sizing: border-box;
- }
-
- /* 琛ㄥ崟鍖哄煙 */
- .form-section {
- background: #ffffff;
- padding: 12rpx 20rpx;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
- }
-
- .form-item {
- display: flex;
- align-items: center;
- padding: 12rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- }
-
- .form-item:last-child {
- border-bottom: none;
- }
-
- .form-label {
- display: flex;
- align-items: center;
- width: 140rpx;
- flex-shrink: 0;
- }
-
- .label-text {
- font-size: 26rpx;
- color: #303133;
- margin-left: 6rpx;
- }
-
- .form-input-wrap {
- flex: 1;
- display: flex;
- align-items: center;
- background: #f5f7fa;
- border-radius: 6rpx;
- padding: 0 16rpx;
- height: 60rpx;
- }
-
- .form-input {
- flex: 1;
- height: 60rpx;
- font-size: 26rpx;
- color: #303133;
- }
-
- /* 鍒楄〃澶撮儴 */
- .list-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx 20rpx;
- background: #ffffff;
- margin-top: 12rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
- }
-
- .header-left {
- display: flex;
- align-items: center;
- }
-
- .header-title {
- font-size: 28rpx;
- color: #303133;
- font-weight: 600;
- }
-
- .count-badge {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 16rpx;
- padding: 2rpx 12rpx;
- margin-left: 12rpx;
- }
-
- .count-text {
- font-size: 20rpx;
- color: #ffffff;
- font-weight: 500;
- }
-
- /* 鍟嗗搧鍒楄〃 */
- .list-container {
- padding: 0 20rpx;
- }
-
- .mat-card {
- background: #ffffff;
- border-radius: 12rpx;
- margin-top: 12rpx;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
- overflow: hidden;
- }
-
- .card-top {
- display: flex;
- align-items: center;
- padding: 14rpx 16rpx;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
-
- .card-index {
- width: 36rpx;
- height: 36rpx;
- background: rgba(255, 255, 255, 0.25);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 22rpx;
- color: #ffffff;
- font-weight: 600;
- margin-right: 12rpx;
- }
-
- .mat-code-wrap {
- flex: 1;
- }
-
- .mat-code {
- font-size: 26rpx;
- color: #ffffff;
- font-weight: 600;
- }
-
- .qty-badge {
- background: rgba(255, 255, 255, 0.3);
- padding: 4rpx 14rpx;
- border-radius: 16rpx;
- }
-
- .qty-text {
- font-size: 24rpx;
- color: #ffffff;
- font-weight: 600;
- }
-
- /* 鍗$墖鍐呭 */
- .card-content {
- padding: 12rpx 16rpx;
- }
-
- .info-row {
- display: flex;
- margin-bottom: 8rpx;
- }
-
- .info-row:last-child {
- margin-bottom: 0;
- }
-
- .info-col {
- flex: 1;
- }
-
- .info-col.half {
- width: 50%;
- flex: none;
- }
-
- .info-label {
- font-size: 20rpx;
- color: #909399;
- display: block;
- }
-
- .info-value {
- font-size: 24rpx;
- color: #303133;
- display: block;
- margin-top: 2rpx;
- }
-
- .info-value.highlight {
- color: #667eea;
- font-weight: 500;
- }
-
- .info-value.qty {
- font-size: 28rpx;
- color: #303133;
- font-weight: 600;
- }
-
- /* 鍗$墖鎿嶄綔 */
- .card-actions {
- display: flex;
- border-top: 1rpx solid #f0f0f0;
- }
-
- .action-btn {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 14rpx 0;
- }
-
- .edit-btn {
- border-right: 1rpx solid #f0f0f0;
- }
-
- .action-text {
- font-size: 24rpx;
- color: #667eea;
- margin-left: 6rpx;
- }
-
- .delete-text {
- color: #f56c6c;
- }
-
- /* 绌虹姸鎬� */
- .empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 80rpx 0;
- }
-
- .empty-text {
- font-size: 26rpx;
- color: #909399;
- margin-top: 16rpx;
- }
-
- .empty-hint {
- font-size: 22rpx;
- color: #c0c4cc;
- margin-top: 8rpx;
- }
-
- .bottom-placeholder {
- height: 20rpx;
- }
-
- /* 搴曢儴鎿嶄綔鏍� */
- .bottom-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- padding: 16rpx 20rpx;
- background: #ffffff;
- box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
- }
-
- .btn-reset {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 160rpx;
- height: 72rpx;
- background: #f5f7fa;
- border-radius: 36rpx;
- margin-right: 16rpx;
- }
-
- .btn-reset .btn-text {
- font-size: 26rpx;
- color: #909399;
- margin-left: 6rpx;
- }
-
- .btn-submit {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- height: 72rpx;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 36rpx;
- }
-
- .btn-submit .btn-text {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: 500;
- margin-left: 6rpx;
- }
-
- .btn-disabled {
- opacity: 0.6;
- }
-
- /* 寮圭獥鏍峰紡 */
- .popup-card {
- width: 600rpx;
- background: #ffffff;
- border-radius: 16rpx;
- overflow: hidden;
- }
-
- .popup-header {
- padding: 24rpx;
- text-align: center;
- border-bottom: 1rpx solid #f0f0f0;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
-
- .popup-title {
- font-size: 30rpx;
- color: #ffffff;
- font-weight: 600;
- }
-
- .popup-body {
- padding: 24rpx;
- }
-
- .popup-row {
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- height: 70rpx;
- }
-
- .popup-row:last-child {
- margin-bottom: 0;
- }
-
- .popup-label {
- width: 80rpx;
- font-size: 26rpx;
- color: #606266;
- flex-shrink: 0;
- }
-
- .popup-value {
- flex: 1;
- height: 70rpx;
- background: #f5f7fa;
- border-radius: 8rpx;
- padding: 0 16rpx;
- font-size: 26rpx;
- color: #303133;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- }
-
- .popup-value.disabled {
- color: #909399;
- background: #f0f0f0;
- }
-
- .popup-value.input {
- padding: 0 16rpx;
- }
-
- .popup-value.number {
- justify-content: center;
- background: transparent;
- padding: 0;
- }
-
- .popup-footer {
- display: flex;
- border-top: 1rpx solid #f0f0f0;
- }
-
- .popup-btn {
- flex: 1;
- height: 90rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- }
-
- .popup-btn.cancel {
- color: #909399;
- border-right: 1rpx solid #f0f0f0;
- }
-
- .popup-btn.confirm {
- color: #667eea;
- font-weight: 600;
- }
+
</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 66c6801..0000000
--- a/pages/pakin/putOn.vue
+++ /dev/null
@@ -1,494 +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>
-</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
- }
- },
- 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
- 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: 410rpx;
- }
- .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/pingku/PInventoryAdjustment.vue b/pages/pingku/PInventoryAdjustment.vue
deleted file mode 100644
index 1c49cbd..0000000
--- a/pages/pingku/PInventoryAdjustment.vue
+++ /dev/null
@@ -1,493 +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="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" disabled></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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:""
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // barcode input 浜嬩欢
- barcodeInput() {
- const that = this
- that.dataList = []
- uni.request({
- url: that.baseUrl + '/mobile/pingKu/getList/auth',
- data: JSON.stringify({
- matnr: that.matnr,
- locno: that.locNo,
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.dataList = res.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')
- }
- }
- });
-
- },
- // 鎵樼洏鐮佹湁璇噸缃�
- 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
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
-
- that.matnr = matnr1
-
- that.barcodeInput()
-
- },
- 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) {
- mat.review = "鏈鏍�"
- 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('warn')
- this.$refs.revise.close()
- },
- reviseClose() {
- this.matnr = ''
- 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.locNo === '') {
- this.messageText = "璇锋壂鎻忓簱浣嶇爜"
- this.messageToggle('error')
- return;
- }
- if (that.dataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
- return;
- }
- uni.request({
- url: that.baseUrl + '/mobile/pingKu/inventoryAdjustment/auth',
- data: JSON.stringify({
- locno: that.locNo,
- manLocDetls: 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orderNo = ''
- this.dataList = []
- this.locNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- }
- }
-</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/pingku/POrderDetlList.vue b/pages/pingku/POrderDetlList.vue
deleted file mode 100644
index b495685..0000000
--- a/pages/pingku/POrderDetlList.vue
+++ /dev/null
@@ -1,132 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @input="search" />
- </view>
- <view class="card" v-show="item.enableQty >0" v-for="item in menuList" @click="chose(item)">
- <view class="tag-item">鍗曟嵁鍙凤細 {{item.orderNo}}</view>
- <view class="tag-item">鐗╂枡鐮侊細 {{item.matnr}}</view>
- <view class="tag-item">鐗╂枡鍚嶇О锛� {{item.maktx}}</view>
- <view class="tag-item">瑙勬牸锛� {{item.specs}}</view>
- <view class="tag-item">鎵规锛� {{item.batch}}</view>
- <view class="tag-item">鏁伴噺锛� {{item.anfme}}</view>
- <view class="tag-item">鍓╀綑鏁伴噺锛� {{item.enableQty}}</view>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- data:'',
- condition:'',
- menuList: [],
- order:'',
- baseUrl: '',
- token: '',
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.on('data', function(data) {
- that.order = data.data
- that.getOrderNoList(that.order)
- });
- },
- onShow() {
- let that = this
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- that.getOrderNoList(that.order)
- },
- methods: {
- search(){
- let that = this
- uni.request({
- url: that.baseUrl + '/orderDetl/search/pda/auth',
- data: {
- condition: that.condition,
- order: that.order.orderNo
- },
- // method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.menuList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- getOrderNoList(order) {
- let that = this
- uni.request({
- url: uni.getStorageSync('baseUrl') + '/orderDetl/list/pda/auth',
- method: 'POST',
- data: {
- orderNo: order.orderNo
- },
- success(res) {
- res = res.data
- that.menuList = res.data
- }
- })
- },
- chose(item) {
- let that = this
- uni.navigateTo({
- url: "../pingku/POrderPakin",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('orderItem', {
- item: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- // that.matnr = data.data
- // that.input(that.matnr)
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- .card {
- margin: 20rpx;
- padding: 30rpx;
- background-color: #157ec1;
- border-radius: 20rpx;
- color: #FFF;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #ffffff;
- font-size: 14px;
- }
-</style>
diff --git a/pages/pingku/POrderDetlListOut.vue b/pages/pingku/POrderDetlListOut.vue
deleted file mode 100644
index 8668373..0000000
--- a/pages/pingku/POrderDetlListOut.vue
+++ /dev/null
@@ -1,132 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @input="search" />
- </view>
- <view class="card" v-show="item.enableQty >0" v-for="item in menuList" @click="chose(item)">
- <view class="tag-item">鍗曟嵁鍙凤細 {{item.orderNo}}</view>
- <view class="tag-item">鐗╂枡鐮侊細 {{item.matnr}}</view>
- <view class="tag-item">鐗╂枡鍚嶇О锛� {{item.maktx}}</view>
- <view class="tag-item">瑙勬牸锛� {{item.specs}}</view>
- <view class="tag-item">鎵规锛� {{item.batch}}</view>
- <view class="tag-item">鏁伴噺锛� {{item.anfme}}</view>
- <view class="tag-item">鍓╀綑鏁伴噺锛� {{item.enableQty}}</view>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- data:'',
- condition:'',
- menuList: [],
- order:'',
- baseUrl: '',
- token: '',
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.on('data', function(data) {
- that.order = data.data
- that.getOrderNoList(that.order)
- });
- },
- onShow() {
- let that = this
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- that.getOrderNoList(that.order)
- },
- methods: {
- search(){
- let that = this
- uni.request({
- url: that.baseUrl + '/orderDetl/search/pda/auth',
- data: {
- condition: that.condition,
- order: that.order.orderNo
- },
- // method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.menuList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- getOrderNoList(order) {
- let that = this
- uni.request({
- url: uni.getStorageSync('baseUrl') + '/orderDetl/list/pda/auth',
- method: 'POST',
- data: {
- orderNo: order.orderNo
- },
- success(res) {
- res = res.data
- that.menuList = res.data
- }
- })
- },
- chose(item) {
- let that = this
- uni.navigateTo({
- url: "../pingku/POrderPakinOut",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('orderItem', {
- item: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- // that.matnr = data.data
- // that.input(that.matnr)
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- .card {
- margin: 20rpx;
- padding: 30rpx;
- background-color: #157ec1;
- border-radius: 20rpx;
- color: #FFF;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #ffffff;
- font-size: 14px;
- }
-</style>
diff --git a/pages/pingku/POrderList.vue b/pages/pingku/POrderList.vue
deleted file mode 100644
index 481c8d0..0000000
--- a/pages/pingku/POrderList.vue
+++ /dev/null
@@ -1,246 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
- </view>
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍗曟嵁</view>
- </view>
- </view>
- <view class="tag-item">鍗曟嵁鍙凤細 {{item.orderNo}}</view>
- <view class="tag-item">鍗曟嵁绫诲瀷锛� {{item.docType$}}</view>
- <view class="tag-item">鍗曟嵁鐘舵�侊細 {{item.settle$}}</view>
- <view class="tag-item">浠撳簱锛� {{item.itemName}}</view>
- </view>
- </view>
- <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- condition: '',
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1,
-
- }
- },
- onReachBottom() {
- this.status = 'more';
- this.showMat(this.tagIdNow);
- },
- onLoad() {
- // 娌″暐鐢ㄤ簡
- let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showMat(1)
- },
- methods: {
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/order/search/pda/auth',
- data: {
- condition: that.condition
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.matList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.showMat(parentId)
- }
- that.baColor = "background-color: #0081ff;"
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- // wms绔� 琛ユ帴鍙�
- // @RequestMapping(value = "/mat/list/pda/page/auth")
- // @ManagerAuth
- // public R pdaPageList(@RequestParam(required = true)Long tagId,
- // @RequestParam(defaultValue = "1")Integer curr,
- // @RequestParam(defaultValue = "10")Integer limit){
- // EntityWrapper<Mat> wrapper = new EntityWrapper<>();
- // wrapper.eq("tag_id", tagId);
- // wrapper.orderBy("create_time", false);
- // return R.ok().add(matService.selectPage(new Page<>(curr, limit), wrapper));
- // }
- uni.request({
- url: that.baseUrl + '/order/list/pda/page/auth',
- data: {
- curr:that.curr,
- limit: 100,
- tagId: tagId
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data.records != null && res.data.records.length > 0) {
- let list = res.data.records
- that.matList = that.reload ? list : that.matList.concat(list);
- that.curr = that.curr + 1
- }
- if (res.data.records.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- toPrint(item) {
- let that = this
- uni.navigateTo({
- url: "../pingku/POrderDetlList",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- data: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/pingku/POrderListOut.vue b/pages/pingku/POrderListOut.vue
deleted file mode 100644
index f6e0b43..0000000
--- a/pages/pingku/POrderListOut.vue
+++ /dev/null
@@ -1,246 +0,0 @@
-<template>
- <view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
- </view>
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍗曟嵁</view>
- </view>
- </view>
- <view class="tag-item">鍗曟嵁鍙凤細 {{item.orderNo}}</view>
- <view class="tag-item">鍗曟嵁绫诲瀷锛� {{item.docType$}}</view>
- <view class="tag-item">鍗曟嵁鐘舵�侊細 {{item.settle$}}</view>
- <view class="tag-item">浠撳簱锛� {{item.itemName}}</view>
- </view>
- </view>
- <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- condition: '',
- reload: false,
- curr:1,
- tag: '鍒嗙被',
- baColor: "background-color: #0081ff;",
- desc: '鍟嗗搧缂栧彿:',
- baseUrl: '',
- token: '',
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1,
-
- }
- },
- onReachBottom() {
- this.status = 'more';
- this.showMat(this.tagIdNow);
- },
- onLoad() {
- // 娌″暐鐢ㄤ簡
- let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
- const eventChannel = this.getOpenerEventChannel();
-
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
- })
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- this.showMat(1)
- },
- methods: {
- search() {
- let that = this
- uni.request({
- url: that.baseUrl + '/order/search/pda/auth',
- data: {
- condition: that.condition
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- console.log(result);
- var res = result.data
- if (res.code === 200 ) {
- that.matList = res.data
- // that.save()
- } 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'})
- }
- }
- });
- },
- showTag(parentId) {
- let that = this
- uni.request({
- url: that.baseUrl + '/tag/list/pda/auth',
- header: {
- 'token':uni.getStorageSync('token'),
- },
- data: {
- limit: 100000,
- parentId: parentId
- },
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- that.matList = []
- var res = result.data
- if (res.code === 200) {
- if (res.data != null && res.data.length > 0) {
- that.tagList = res.data
- } else {
- that.showMat(parentId)
- }
- that.baColor = "background-color: #0081ff;"
- } 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'})
- }
- }
- });
- },
- showMat(tagId) {
- let that = this
- // wms绔� 琛ユ帴鍙�
- // @RequestMapping(value = "/mat/list/pda/page/auth")
- // @ManagerAuth
- // public R pdaPageList(@RequestParam(required = true)Long tagId,
- // @RequestParam(defaultValue = "1")Integer curr,
- // @RequestParam(defaultValue = "10")Integer limit){
- // EntityWrapper<Mat> wrapper = new EntityWrapper<>();
- // wrapper.eq("tag_id", tagId);
- // wrapper.orderBy("create_time", false);
- // return R.ok().add(matService.selectPage(new Page<>(curr, limit), wrapper));
- // }
- uni.request({
- url: that.baseUrl + '/order/list/pda/page/out/auth',
- data: {
- curr:that.curr,
- limit: 100,
- tagId: tagId
- },
- method:"GET",
- header: {
- 'token':uni.getStorageSync('token'),
- },
- success(result) {
- that.tagList = null
- var res = result.data
- if (res.code === 200) {
- if (res.data.records != null && res.data.records.length > 0) {
- let list = res.data.records
- that.matList = that.reload ? list : that.matList.concat(list);
- that.curr = that.curr + 1
- }
- if (res.data.records.length == 0) {
- that.status = 'noMore'
- }
- that.baColor = "background-color: #1cbbb4;"
- } 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'})
- }
-
- }
- });
- },
- toPrint(item) {
- let that = this
- uni.navigateTo({
- url: "../pingku/POrderDetlListOut",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- data: item
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data
- that.findMat(that.matnr)
- },
- },
-
-
- });
- }
- }
- }
-</script>
-
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .tag-list {
- width: 94%;
- min-height: 160rpx;
- margin: 10px auto;
- background-color: #FFF;
- border-radius: 5px;
- box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
- }
- .tag {
- display: flex;
- flex-direction: column;
- min-height: 80rpx;
- border-bottom: 1px solid #e2e2e2;
- }
- .wms-tag {
- min-width: 60rpx;
- margin-left: 50rpx;
- margin-top: 30rpx;
- color: #FFF;
- font-size: 14px;
- padding: 4rpx 12rpx;
- }
- .tag-item {
- width: 100%;
- min-height: 60rpx;
- line-height: 2;
- padding-left: 50rpx;
- color: #606266;
- font-size: 14px;
- }
-</style>
\ No newline at end of file
diff --git a/pages/pingku/POrderPakin.vue b/pages/pingku/POrderPakin.vue
deleted file mode 100644
index 4ad9f82..0000000
--- a/pages/pingku/POrderPakin.vue
+++ /dev/null
@@ -1,558 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璁㈠崟鍙�:</view>
- <view style="flex: 1;">
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus">
- </view>
-
- </view>
- <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="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 class="list-left-item">
- <view class="desc">鐘舵�侊細</view>
- <view class="left-item">{{item.review}}</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.001' :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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:""
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('orderItem', function(data) {
- console.log(data.item)
- that.orderNo = data.item.orderNo
- that.checkMat(data.item)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- mat.review = "鏈鏍�"
- 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.orderNo === '') {
- this.messageText = "璇疯緭鍏ヨ鍗曟潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.locNo === '') {
- 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].review !== "宸插鏍�" ) {
- this.messageText = that.dataList[i].matnr + '鏈鏍�'
- this.messageToggle('error')
- return;
- }
- 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/pingKu/Shelves/auth',
- data: JSON.stringify({
- orderNo: that.orderNo,
- locno: that.locNo,
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orderNo = ''
- this.dataList = []
- this.locNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- }
- }
-</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: 300rpx;
- 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/pingku/POrderPakinOut.vue b/pages/pingku/POrderPakinOut.vue
deleted file mode 100644
index a9a7072..0000000
--- a/pages/pingku/POrderPakinOut.vue
+++ /dev/null
@@ -1,558 +0,0 @@
-<template>
- <view>
- <view class="code">
- <view class="item">
- <view class="code-decs">璁㈠崟鍙�:</view>
- <view style="flex: 1;">
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus">
- </view>
-
- </view>
- <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="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 class="list-left-item">
- <view class="desc">鐘舵�侊細</view>
- <view class="left-item">{{item.review}}</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: '',
- orderNoFocus: false,
- barcodeFocus: true,
- matFocus: false,
- matData: '',
- removeNum: 0,
- locNo:""
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
-
- eventChannel.on('orderItem', function(data) {
- console.log(data.item)
- that.orderNo = data.item.orderNo
- that.checkMat(data.item)
- });
- },
- onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
- },
- methods: {
- messageToggle(type) {
- this.msgType1 = type
- this.$refs.message.open()
- },
- clearOrderNo() {
- this.orderNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- orderNoInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
- setTimeout(() => {
- var len = this.orderNo.length
- this.barcodeFocuss()
- }, 200)
- },
- // 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() {
- this.focus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
- let that = this
- let m = that.matnr.split(";")
- let matnr1 = m[0].slice(3)
- for(var i = 0;i<that.dataList.length;i++){
- if(that.dataList[i].matnr === matnr1){
- that.dataList[i].review = "宸插鏍�"
- }
-
- }
- setTimeout(() => {
- this.matnr = '';
- }, 100);
- // uni.request({
- // url: that.baseUrl + '/mat/auth',
- // data: {
- // matnr: matnr1
- // },
- // 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) {
- mat.review = "鏈鏍�"
- 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.orderNo === '') {
- this.messageText = "璇疯緭鍏ヨ鍗曟潯鐮�"
- this.messageToggle('error')
- return;
- }
- if (that.locNo === '') {
- 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].review !== "宸插鏍�" ) {
- this.messageText = that.dataList[i].matnr + '鏈鏍�'
- this.messageToggle('error')
- return;
- }
- 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/pingKu/unShelves/auth',
- data: JSON.stringify({
- orderNo: that.orderNo,
- locno: that.locNo,
- 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.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.orderNo = ''
- this.dataList = []
- this.locNo = ''
- let that = this;
- that.orderNoFocus = false;
- setTimeout(() => {
- that.orderNo = '';
- that.orderNoFocus = true;
- }, 100);
- },
- }
- }
-</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: 300rpx;
- 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/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 dbebda6..0000000
--- a/pages/stock/stockCheck.vue
+++ /dev/null
@@ -1,506 +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>
- <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">
- {{item.batch}}
- </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.checkAnfme}}</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" 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" :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
- if(that.barcode === "" || that.barcode === null || that.barcode === ''){
- return
- }
- uni.request({
- url: that.baseUrl + '/inventoryCheckOrder/StockCheck/select/barcode',
- 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 {
- that.dataList = []
- 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].checkAnfme
- 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].checkAnfme = 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
-
- for (var i = 0; i < that.dataList.length; i++) {
- if (that.dataList[i].checkAnfme == 0 || that.dataList[i].checkAnfme == '' || that.dataList[i].checkAnfme == null) {
- this.messageText = that.dataList[i].matnr + '鐩樼偣鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
- return;
- }
- }
- var combMats = []
- var combParam = {}
- combParam['barcode'] = that.barcode
- combParam['param'] = that.dataList
- uni.request({
- url: that.baseUrl + '/mobile/pda/adjust/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: 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);
- }
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: 20rpx 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 250rpx;
- }
-</style>
diff --git a/pages/stock/stockQuery.vue b/pages/stock/stockQuery.vue
index 4e36ea7..b7abae3 100644
--- a/pages/stock/stockQuery.vue
+++ b/pages/stock/stockQuery.vue
@@ -212,105 +212,15 @@
</script>
<style>
- page {
- background: #f5f7fa;
- }
-
- .page-container {
- min-height: 100vh;
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
- padding-bottom: 110rpx;
- box-sizing: border-box;
- }
-
- /* 琛ㄥ崟鍖哄煙 */
- .form-section {
- background: #ffffff;
- padding: 12rpx 20rpx;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
- }
-
- .form-item {
- display: flex;
- align-items: center;
- padding: 12rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- }
-
- .form-item:last-child {
- border-bottom: none;
- }
-
+ /* 寮曞叆鍏叡鏍峰紡 */
+ @import url('../../static/css/common.css');
+
+ /* 椤甸潰鐗规湁鏍峰紡 */
.form-label {
- display: flex;
- align-items: center;
width: 140rpx;
- flex-shrink: 0;
}
- .label-text {
- font-size: 26rpx;
- color: #303133;
- margin-left: 6rpx;
- }
-
- .form-input-wrap {
- flex: 1;
- display: flex;
- align-items: center;
- background: #f5f7fa;
- border-radius: 6rpx;
- padding: 0 16rpx;
- height: 60rpx;
- }
-
- .form-input {
- flex: 1;
- height: 60rpx;
- font-size: 26rpx;
- color: #303133;
- }
-
- /* 鍒楄〃澶撮儴 */
- .list-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx 20rpx;
- background: #ffffff;
- margin-top: 12rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
- }
-
- .header-left {
- display: flex;
- align-items: center;
- }
-
- .header-title {
- font-size: 28rpx;
- color: #303133;
- font-weight: 600;
- }
-
- .count-badge {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 16rpx;
- padding: 2rpx 12rpx;
- margin-left: 12rpx;
- }
-
- .count-text {
- font-size: 20rpx;
- color: #ffffff;
- font-weight: 500;
- }
-
- /* 搴撳瓨鍒楄〃 */
- .list-container {
- padding: 0 20rpx;
- }
-
+ /* 搴撳瓨鍗$墖 - 浣跨敤card-header鑰岄潪card-top */
.stock-card {
background: #ffffff;
border-radius: 12rpx;
@@ -327,17 +237,7 @@
}
.card-index {
- width: 36rpx;
- height: 36rpx;
background: rgba(255, 255, 255, 0.3);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 22rpx;
- color: #ffffff;
- font-weight: 600;
- margin-right: 12rpx;
}
.loc-info {
@@ -350,52 +250,9 @@
font-weight: 600;
}
- .qty-badge {
- background: rgba(255, 255, 255, 0.3);
- padding: 4rpx 14rpx;
- border-radius: 16rpx;
- }
-
- .qty-text {
- font-size: 24rpx;
- color: #ffffff;
- font-weight: 600;
- }
-
/* 鍗$墖鍐呭 */
.card-body {
padding: 12rpx 16rpx;
- }
-
- .info-row {
- display: flex;
- margin-bottom: 8rpx;
- }
-
- .info-row:last-child {
- margin-bottom: 0;
- }
-
- .info-col {
- flex: 1;
- }
-
- .info-col.half {
- width: 50%;
- flex: none;
- }
-
- .info-label {
- font-size: 20rpx;
- color: #909399;
- display: block;
- }
-
- .info-value {
- font-size: 24rpx;
- color: #303133;
- display: block;
- margin-top: 2rpx;
}
.info-value.code {
@@ -405,82 +262,5 @@
.info-value.batch {
color: #667eea;
- }
-
- .info-value.qty {
- font-size: 28rpx;
- color: #303133;
- font-weight: 600;
- }
-
- /* 绌虹姸鎬� */
- .empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 80rpx 0;
- }
-
- .empty-text {
- font-size: 26rpx;
- color: #909399;
- margin-top: 16rpx;
- }
-
- .empty-hint {
- font-size: 22rpx;
- color: #c0c4cc;
- margin-top: 8rpx;
- }
-
- .bottom-placeholder {
- height: 20rpx;
- }
-
- /* 搴曢儴鎿嶄綔鏍� */
- .bottom-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- padding: 16rpx 20rpx;
- background: #ffffff;
- box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
- }
-
- .btn-reset {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 160rpx;
- height: 72rpx;
- background: #f5f7fa;
- border-radius: 36rpx;
- margin-right: 16rpx;
- }
-
- .btn-reset .btn-text {
- font-size: 26rpx;
- color: #909399;
- margin-left: 6rpx;
- }
-
- .btn-submit {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- height: 72rpx;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 36rpx;
- }
-
- .btn-submit .btn-text {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: 500;
- margin-left: 6rpx;
}
</style>
\ No newline at end of file
diff --git a/pages/tzsk/AGV/AGVPakin.vue b/pages/tzsk/AGV/AGVPakin.vue
deleted file mode 100644
index a5e9d63..0000000
--- a/pages/tzsk/AGV/AGVPakin.vue
+++ /dev/null
@@ -1,567 +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="findOrder()">
- </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: {
- // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯�
- findOrder() {
- let that = this
- uni.request({
- url: that.baseUrl + '/mobile/order/search/orderNo/auth',
- header: {'token': uni.getStorageSync('token')},
- data: {
- orderNo: that.orderNo
- },
- success(res) {
- res = res.data
- if (res.code === 200 && res.data[0]) {
- for (var i = 0; i < res.data[0].combMats.length; i++) {
- that.checkMat(res.data[0].combMats[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'
- })
- }
- }
- })
- },
- 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.orderNo = ''
- this.messageText = "閲嶇疆瀹屾垚"
- this.messageToggle('success')
- },
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 娓呯┖
- resst() {
- this.dataList = []
- this.barcode = ''
- this.orderNo = ''
- 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/tzsk/AGV/AGVPakinBing.vue b/pages/tzsk/AGV/AGVPakinBing.vue
deleted file mode 100644
index fe7b191..0000000
--- a/pages/tzsk/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/tzsk/AGV/AGVPakinOn.vue b/pages/tzsk/AGV/AGVPakinOn.vue
deleted file mode 100644
index fe1dc72..0000000
--- a/pages/tzsk/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/tzsk/AGV/AGVStart.vue b/pages/tzsk/AGV/AGVStart.vue
deleted file mode 100644
index 378b0c7..0000000
--- a/pages/tzsk/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/static/css/common.css b/static/css/common.css
new file mode 100644
index 0000000..e3a5591
--- /dev/null
+++ b/static/css/common.css
@@ -0,0 +1,423 @@
+/**
+ * 鍏叡鏍峰紡 - 鍩轰簬 agv_start.vue 鎶界
+ * 閫傜敤浜庯細agv_start.vue, orderPakin2.vue, orderDetlList.vue 绛夐〉闈�
+ */
+
+/* ==================== 椤甸潰鍩虹鏍峰紡 ==================== */
+page {
+ height: 100%;
+ background: #f5f7fa;
+}
+
+.page-container {
+ min-height: 100vh;
+ background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
+ padding-bottom: 110rpx;
+ box-sizing: border-box;
+}
+
+/* ==================== 琛ㄥ崟鍖哄煙鏍峰紡 ==================== */
+.form-section {
+ background: #ffffff;
+ padding: 12rpx 20rpx;
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
+}
+
+.form-item {
+ display: flex;
+ align-items: center;
+ padding: 12rpx 0;
+ border-bottom: 1rpx solid #f0f0f0;
+}
+
+.form-item:last-child {
+ border-bottom: none;
+}
+
+.form-label {
+ display: flex;
+ align-items: center;
+ flex-shrink: 0;
+ white-space: nowrap;
+ margin-right: 16rpx;
+}
+
+.label-text {
+ font-size: 26rpx;
+ color: #303133;
+ margin-left: 6rpx;
+}
+
+.form-input-wrap {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ background: #f5f7fa;
+ border-radius: 6rpx;
+ padding: 0 16rpx;
+ height: 60rpx;
+}
+
+.form-input {
+ flex: 1;
+ height: 60rpx;
+ font-size: 26rpx;
+ color: #303133;
+}
+
+/* Picker 鏍峰紡 */
+.picker-full {
+ flex: 1;
+ width: 100%;
+}
+
+.picker-value {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 60rpx;
+ font-size: 26rpx;
+ color: #303133;
+}
+
+.picker-value text {
+ flex: 1;
+}
+
+/* ==================== 鍒楄〃澶撮儴鏍峰紡 ==================== */
+.list-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16rpx 20rpx;
+ background: #ffffff;
+ margin-top: 12rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
+}
+
+.header-left {
+ display: flex;
+ align-items: center;
+}
+
+.header-title {
+ font-size: 28rpx;
+ color: #303133;
+ font-weight: 600;
+}
+
+.count-badge {
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ border-radius: 16rpx;
+ padding: 2rpx 12rpx;
+ margin-left: 12rpx;
+}
+
+.count-text {
+ font-size: 20rpx;
+ color: #ffffff;
+ font-weight: 500;
+}
+
+/* ==================== 鍟嗗搧鍗$墖鏍峰紡 ==================== */
+.list-container {
+ padding: 0 20rpx;
+}
+
+.mat-card {
+ background: #ffffff;
+ border-radius: 12rpx;
+ margin-top: 12rpx;
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+ overflow: hidden;
+}
+
+.card-top {
+ display: flex;
+ align-items: center;
+ padding: 14rpx 16rpx;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+}
+
+.card-index {
+ width: 36rpx;
+ height: 36rpx;
+ background: rgba(255, 255, 255, 0.25);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 22rpx;
+ color: #ffffff;
+ font-weight: 600;
+ margin-right: 12rpx;
+}
+
+.mat-code-wrap {
+ flex: 1;
+}
+
+.mat-code {
+ font-size: 26rpx;
+ color: #ffffff;
+ font-weight: 600;
+}
+
+.qty-badge {
+ background: rgba(255, 255, 255, 0.3);
+ padding: 4rpx 14rpx;
+ border-radius: 16rpx;
+}
+
+.qty-text {
+ font-size: 24rpx;
+ color: #ffffff;
+ font-weight: 600;
+}
+
+/* ==================== 鍗$墖鍐呭鏍峰紡 ==================== */
+.card-content {
+ padding: 12rpx 16rpx;
+}
+
+.info-row {
+ display: flex;
+ margin-bottom: 8rpx;
+}
+
+.info-row:last-child {
+ margin-bottom: 0;
+}
+
+.info-col {
+ flex: 1;
+}
+
+.info-col.half {
+ width: 50%;
+ flex: none;
+}
+
+.info-label {
+ font-size: 20rpx;
+ color: #909399;
+ display: block;
+}
+
+.info-value {
+ font-size: 24rpx;
+ color: #303133;
+ display: block;
+ margin-top: 2rpx;
+}
+
+.info-value.highlight {
+ color: #667eea;
+ font-weight: 500;
+}
+
+.info-value.qty {
+ font-size: 28rpx;
+ color: #303133;
+ font-weight: 600;
+}
+
+/* ==================== 鍗$墖鎿嶄綔鎸夐挳鏍峰紡 ==================== */
+.card-actions {
+ display: flex;
+ border-top: 1rpx solid #f0f0f0;
+}
+
+.action-btn {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 14rpx 0;
+}
+
+.edit-btn {
+ border-right: 1rpx solid #f0f0f0;
+}
+
+.action-text {
+ font-size: 24rpx;
+ color: #667eea;
+ margin-left: 6rpx;
+}
+
+.delete-text {
+ color: #f56c6c;
+}
+
+/* ==================== 绌虹姸鎬佹牱寮� ==================== */
+.empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 80rpx 0;
+}
+
+.empty-text {
+ font-size: 26rpx;
+ color: #909399;
+ margin-top: 16rpx;
+}
+
+.empty-hint {
+ font-size: 22rpx;
+ color: #c0c4cc;
+ margin-top: 8rpx;
+}
+
+.bottom-placeholder {
+ height: 20rpx;
+}
+
+/* ==================== 搴曢儴鎿嶄綔鏍忔牱寮� ==================== */
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ padding: 16rpx 20rpx;
+ background: #ffffff;
+ box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
+}
+
+.btn-reset {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 160rpx;
+ height: 72rpx;
+ background: #f5f7fa;
+ border-radius: 36rpx;
+ margin-right: 16rpx;
+}
+
+.btn-reset .btn-text {
+ font-size: 26rpx;
+ color: #909399;
+ margin-left: 6rpx;
+}
+
+.btn-submit {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 72rpx;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ border-radius: 36rpx;
+}
+
+.btn-submit .btn-text {
+ font-size: 28rpx;
+ color: #ffffff;
+ font-weight: 500;
+ margin-left: 6rpx;
+}
+
+.btn-disabled {
+ background: #c0c4cc;
+ opacity: 0.6;
+}
+
+/* ==================== 寮圭獥鏍峰紡 ==================== */
+.popup-card {
+ width: 600rpx;
+ background: #ffffff;
+ border-radius: 16rpx;
+ overflow: hidden;
+}
+
+.popup-header {
+ padding: 24rpx;
+ text-align: center;
+ border-bottom: 1rpx solid #f0f0f0;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+}
+
+.popup-title {
+ font-size: 30rpx;
+ color: #ffffff;
+ font-weight: 600;
+}
+
+.popup-body {
+ padding: 24rpx;
+}
+
+.popup-row {
+ display: flex;
+ align-items: center;
+ margin-bottom: 20rpx;
+ height: 70rpx;
+}
+
+.popup-row:last-child {
+ margin-bottom: 0;
+}
+
+.popup-label {
+ width: 80rpx;
+ font-size: 26rpx;
+ color: #606266;
+ flex-shrink: 0;
+}
+
+.popup-value {
+ flex: 1;
+ height: 70rpx;
+ background: #f5f7fa;
+ border-radius: 8rpx;
+ padding: 0 16rpx;
+ font-size: 26rpx;
+ color: #303133;
+ display: flex;
+ align-items: center;
+ box-sizing: border-box;
+}
+
+.popup-value.disabled {
+ color: #909399;
+ background: #f0f0f0;
+}
+
+.popup-value.input {
+ padding: 0 16rpx;
+}
+
+.popup-value.number {
+ justify-content: center;
+ background: transparent;
+ padding: 0;
+}
+
+.popup-footer {
+ display: flex;
+ border-top: 1rpx solid #f0f0f0;
+}
+
+.popup-btn {
+ flex: 1;
+ height: 90rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 28rpx;
+}
+
+.popup-btn.cancel {
+ color: #909399;
+ border-right: 1rpx solid #f0f0f0;
+}
+
+.popup-btn.confirm {
+ color: #667eea;
+ font-weight: 600;
+}
--
Gitblit v1.9.1