This commit is contained in:
2026-01-04 15:33:01 +08:00
parent 245f3c07b8
commit d661432ab1
8 changed files with 84 additions and 12 deletions

View File

@@ -28,13 +28,45 @@
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<!-- <th>序号</th>
<th>卷号</th>
<th>物料编码</th>
<th>物料品种</th>
<th>数量</th>
<th>单位</th> -->
<th>{{$t('grid.number')}}</th>
<th>{{$t('grid.roll-number')}}</th>
<th>{{$t('grid.material-code')}}</th>
<th>{{$t('grid.material-name')}}</th>
<th>{{$t('grid.quantity')}}</th>
<th>{{$t('grid.unit')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.container_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.qty}}</td>
<td>{{e.measure_unit_id}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_materialTransfer">确认</button> -->
<button class="zd-col-8 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-7 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm')}}</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -40,9 +40,9 @@
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-8 button-primary" @tap="searchList">查询</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button> -->
<button class="zd-col-8 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-7 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" @tap="toSure">{{$t('button.confirm')}}</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -55,9 +55,9 @@
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-8 button-primary" @tap="searchList">查询</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button> -->
<button class="zd-col-8 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-7 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" @tap="toSure">{{$t('button.confirm')}}</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -37,6 +37,7 @@
</template>
<script>
import {messageConfirm} from '@/utils/getData4.js'
export default {
data() {
return {
@@ -75,7 +76,9 @@
// }
// },
mounted() {
this.initWebSocket()
if (this.$store.getters.saveIssend == '2') {
this.initWebSocket()
}
},
methods: {
initWebSocket() {
@@ -128,11 +131,19 @@
},
handleWebSocketMessage(res) {
console.log(res, 'res')
// console.log(res, 'res')
console.log(res.msg.data, 'res.msg.data')
uni.showToast({
uni.showModal({
title: res.msg.data,
icon: 'none'
cancelText: '关闭',
confirmText: '稍后提醒',
success: res => {
if (res.confirm) {
this._messageConfirm('1')
} else if (res.cancel) {
this._messageConfirm('2')
}
}
})
},
@@ -156,6 +167,16 @@
this.initWebSocket()
}, 5000) // 5秒后重连
},
async _messageConfirm (type) {
try {
let res = await messageConfirm(type)
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
}
},
toPage1 (e) {
if (e.sonTree.length > 0) {
this.show = true

View File

@@ -97,6 +97,7 @@
}
this.$store.dispatch('saveUserInfo', JSON.stringify(res.data.user))
this.$store.dispatch('saveToken', res.data.token)
this.$store.dispatch('saveIssend', res.data.is_send)
uni.redirectTo({
url: '/pages/home/home'
})