From bdf7c2508711ee78c65a935da518b4a75a70e8e7 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 03 八月 2022 10:34:25 +0800
Subject: [PATCH] #
---
pages/basics/putOnSale.vue | 114 ++++++++++++++++++++++++++++++++++++--
pages/basics/demo.vue | 2
static/css/putOnSale.css | 34 +++++++++++
3 files changed, 143 insertions(+), 7 deletions(-)
diff --git a/pages/basics/demo.vue b/pages/basics/demo.vue
index abaf447..bd0cdf2 100644
--- a/pages/basics/demo.vue
+++ b/pages/basics/demo.vue
@@ -59,7 +59,7 @@
<view class="square-1">
<view class="square-title">
<view class="title-sign"><view class="sign"></view></view>
- <view class="title-text"><text>鎵樼洏鏉$爜</text></view>
+ <view class="title-text"><text>鍟嗗搧鍒楄〃</text></view>
</view>
</view>
diff --git a/pages/basics/putOnSale.vue b/pages/basics/putOnSale.vue
index e3b9a3e..fa5bfc9 100644
--- a/pages/basics/putOnSale.vue
+++ b/pages/basics/putOnSale.vue
@@ -8,7 +8,7 @@
</view>
<view class="square-content">
<view class="content-input">
- <input type="text" v-model="yyds" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
+ <input type="text" v-model="locno" placeholder="鎵爜 / 杈撳叆" :focus="locnoFocus">
<uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
</view>
</view>
@@ -21,11 +21,37 @@
</view>
<view class="square-content">
<view class="content-input">
- <input type="text" v-model="yyds" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
+ <input type="text" v-model="matnr" placeholder="鎵爜 / 杈撳叆" @input="findMat" :focus="matnrFocus">
<uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
</view>
</view>
</view>
+ <!-- 鍟嗗搧鍒楄〃琛ㄥご -->
+ <view class="square-1">
+ <view class="square-title">
+ <view class="title-sign"><view class="sign"></view></view>
+ <view class="title-text"><text>鍟嗗搧鍒楄〃</text></view>
+ </view>
+ </view>
+
+ <view class="square-none">
+ <view class="v-show" v-show="matList.length == 0">鏆傛棤鏇村鏁版嵁...</view>
+ </view>
+
+ <!-- 鍟嗗搧鍒楄〃 -->
+ <checkbox-group >
+ <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
+ <view class="list-left">
+ <view class="lists-item">No:{{listNum}}</view>
+ <view class="lists-item">鍟嗗搧缂栫爜锛歿{item.matnr}}</view>
+ <view class="lists-item">鍟嗗搧鎵瑰彿锛歿{item.batch}}</view>
+ <view class="lists-item">涓婃灦鏁伴噺锛歿{item.anfme}}</view>
+ </view>
+ <view class="list-right">
+ <uni-icons type="trash" size="20" color="#a5a5a5" @click="remove(item,index)"></uni-icons>
+ </view>
+ </view>
+ </checkbox-group>
<!-- 搴曢儴鎸夐挳 -->
<view class="footer flex justify-around">
@@ -43,20 +69,96 @@
<button class="cu-btn bg-blue " @click="comb()">涓婃灦</button>
</label>
</view>
- </view>
+
+ </view>
</template>
<script>
export default {
- data() {
+ data() {
return {
- yyds:'',
- focus:true
+ locno:null, // 搴撲綅鍙�
+ matnr:'', // 鍟嗗搧鐮�
+ locnoFocus:true,
+ matnrFocus:true,
+ matList:[], // 鍟嗗搧鍒楄〃
+ listLen:0,
+ listNum:1
+
}
+ },
+ mounted(){
+ const UIP = uni.getStorageSync('UIP');
+ this.baseIP = UIP;
+ const UPORT = uni.getStorageSync('UPORT');
+ this.basePORT = UPORT
+ },
+ methods:{
+ resst() {
+
+ },
+ findMat() {
+ let that = this
+ uni.request({
+ url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
+ data: {
+ matnr:that.matnr
+ },
+ header: {
+ 'token':uni.getStorageSync('token')
+ },
+ success(result) {
+ uni.vibrateShort();
+ let res = result.data
+ if (res.code === 200 && res.data) {
+ that.matData = res.data
+ that.matnr = ''
+ uni.navigateTo({
+ url: "matQuery",
+ events: {
+ // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ matList: function(data) {
+ that.matList.push(data.data)
+ console.log(that.matList)
+ },
+ },
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('matData', { data: that.matData })
+ },
+ });
+ }
+
+ }
+ });
+
+ },
+ // .
+ // 涓婃灦
+ comb() {
+ let that = this
+ var combList = []
+ combList['locno'] = that.locno
+ combList['combMats'] = that.matList
+ console.log(combList)
+ return;
+ uni.request({
+ url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
+ data: {
+ combParam:that.matList
+ },
+ header: { 'token':uni.getStorageSync('token') },
+ success(result) {
+ console.log(result)
+ }
+ })
+ }
+
}
}
</script>
<style>
+ @import url(@/static/css/putOnSale.css);
</style>
\ No newline at end of file
diff --git a/static/css/putOnSale.css b/static/css/putOnSale.css
new file mode 100644
index 0000000..7daaa9a
--- /dev/null
+++ b/static/css/putOnSale.css
@@ -0,0 +1,34 @@
+.bg-false {
+ background-color: #FFFFFF;
+}
+.bg-true {
+ background-color: #ebebeb;
+}
+.data-list {
+ height: 200rpx;
+ margin: 15rpx;
+ border-bottom: 1px solid #d8d8d8;
+ border-radius: 20rpx;
+}
+.list-left {
+ display: inline-block;
+ float: left;
+ width: 80%;
+ height: 100%;
+ /* background-color: coral; */
+
+}
+.lists-item {
+ text-indent: 1em;
+ height: 25%;
+ line-height: 50rpx;
+}
+.list-right {
+ display: inline-block;
+ float: left;
+ width: 20%;
+ height: 100%;
+ /* background-color: cadetblue; */
+ line-height: 200rpx;
+ text-align: center;
+}
\ No newline at end of file
--
Gitblit v1.9.1