呼叫套轴、分切上料2改

This commit is contained in:
2026-09-01 16:11:22 +08:00
parent f7a69256b1
commit 42f41be3e0
6 changed files with 217 additions and 32 deletions

View File

@@ -980,3 +980,116 @@ uni-button[disabled]:not([type]) {
transform: rotate(360deg);
}
}
.confirm-modal-mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.7);
z-index: 999;
}
.confirm-modal {
width: 86%;
background: #fff;
border-radius: 20rpx;
padding-top: 40rpx;
animation: modalSlideIn 0.3s ease-out;
}
.icon_right {
text-align: center;
font-size: 40rpx;
line-height: 40rpx;
color: #f36b2a;
border-radius: 50%;
padding: 18rpx;
margin-bottom: 16rpx;
background-color: #fff3eb;
}
.confirm-modal .modal-title {
font-size: 30rpx;
text-align: center;
font-weight: 700;
color: #23272f;
padding: 0 18rpx;
margin-bottom: 12rpx;
}
.confirm-modal .modal-desc {
font-size: 24rpx;
color: #323232;
text-align: center;
padding: 0 18rpx;
margin-bottom: 32rpx;
}
.confirm-modal .info-block {
width: 90%;
background-color: #f5f5f5;
border-radius: 12rpx;
padding: 16rpx;
margin: 0 auto 36rpx;
}
.confirm-modal .info-row {
display: flex;
padding-bottom: 20rpx;
margin-bottom: 16rpx;
border-bottom: 1px solid #e5e5e5;
}
.confirm-modal .info-row:last-child {
margin-bottom: 0;
border-bottom: 0;
}
.confirm-modal .info-row .info-label {
width: 140rpx;
font-size: 28rpx;
color: #7b8491;
}
.confirm-modal .info-row .info-val {
flex: 1;
font-size: 28rpx;
font-weight: 700;
color: #23272f;
text-align: right;
}
.confirm-modal .info-row .info-val-q {
font-size: 34rpx;
color: #f36b2a;
}
.confirm-modal .modal-buttons {
display: flex;
width: 100%;
}
.confirm-modal .modal-buttons button {
flex: 1;
width: 50%;
height: 88rpx;
line-height: 88rpx;
border-top-left-radius: 0;
border-top-right-radius: 0;
font-size: 30rpx;
margin: 0;
}
/* */
.confirm-modal .btn-cancel {
background: #fff;
color: #333;
border: 1px solid #e5e5e5;
border-bottom-left-radius: 20rpx;
}
/* */
.confirm-modal .btn-confirm {
background: #ff791a;
border: 1px solid #ff791a;
color: #fff;
border-bottom-right-radius: 20rpx;
}
/* */
@keyframes modalSlideIn {
0% {
transform: translateY(100vh);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}

View File

@@ -53,6 +53,11 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
.jccenter {
justify-content: center !important;
}
.flex-column {
display: flex;
flex-direction: column;
align-items: center;
}
.zd-row {
display: flex;
justify-content: space-between;

View File

@@ -2,8 +2,8 @@
"name" : "海亮铜箔",
"appid" : "__UNI__3A002CD",
"description" : "海亮铜箔二期手持系统",
"versionName" : "1.4.8",
"versionCode" : 148,
"versionName" : "1.4.9",
"versionCode" : 149,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@@ -71,17 +71,17 @@
</view>
</view>
<view class="stats">
<view class="stat" :class="{'primary': state === 'all'}">
<view class="stat_num">{{statTotal}}</view>
<view class="stat">
<view class="stat_num">{{planSize}}</view>
<text>呼叫总数</text>
</view>
<view class="stat" :class="{'primary': state === '02'}">
<view class="stat_num">{{statFitted}}</view>
<text>已套轴</text>
<view class="stat">
<view class="stat_num">{{canUsePointCount}}</view>
<text>可用点位数</text>
</view>
<view class="stat" :class="{'primary': state === '01'}">
<view class="stat_num">{{statWaiting}}</view>
<text>待套轴</text>
<view class="stat">
<view class="stat_num">{{remainingCount}}</view>
<text>可用空闲位数</text>
</view>
</view>
</view>
@@ -118,6 +118,7 @@
<text>呼叫时间{{ item.call_time }}</text>
<text>管芯重量{{ item.paper_weight }}</text>
<text>是否套轴完成{{ item.is_child_tz_ok === 1 ? '是' : '否' }}</text>
<text>呼叫人{{item.material_type}}</text>
</view>
</view>
</block>
@@ -129,8 +130,38 @@
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !index1 || !index2 || (!upL && !upR) || !index3 || !index4 || !qty}" :disabled="disabled" @tap="_slitXnplan">呼叫套轴</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !index1 || !index2 || (!upL && !upR) || !index3 || !index4 || !qty}" :disabled="disabled" @tap="openConfirmModal">呼叫套轴</button>
</view>
<view v-if="confirmModalShow" class="zd-row jccenter confirm-modal-mask" @tap="closeConfirmModal">
<view class="flex-column confirm-modal" @tap.stop>
<view class="iconfont icon_right">&#xe66b;</view>
<view class="modal-title">确认呼叫套轴</view>
<view class="modal-desc">请核对本次呼叫信息确认后将提交</view>
<view class="info-block">
<view class="info-row">
<text class="info-label">位置</text>
<text class="info-val">{{ index2Label || '-' }}</text>
</view>
<view class="info-row">
<text class="info-label">管芯规格</text>
<text class="info-val">{{ getAxisLabel() || '-' }}</text>
</view>
<view class="info-row">
<text class="info-label">尺寸</text>
<text class="info-val">{{ index3Label || '-' }}</text>
</view>
<view class="info-row">
<text class="info-label">数量</text>
<text class="info-val info-val-q">{{ qty || 0 }}</text>
</view>
</view>
<view class="modal-buttons">
<button class="btn-cancel" @tap="closeConfirmModal">取消</button>
<button class="btn-confirm" @tap="handleConfirmCall">确认呼叫</button>
</view>
</view>
</view>
</view>
</template>
@@ -168,7 +199,13 @@
qty: null,
disabled: false,
disabled1: false,
planList: []
planList: [],
planSize: 0,
remainingCount: 0,
canUsePointCount: 0,
confirmModalShow: false,
index2Label: '',
index3Label: '',
};
},
computed: {
@@ -236,13 +273,22 @@
try {
let res = await getBindXnPlan(e)
if (res && res.status === 200) {
this.planSize = res.planSize || 0
this.canUsePointCount = res.canUsePointCount || 0
this.remainingCount = res.remainingCount || 0
this.planList = res.plans.map(p=>{
return { ...p, _expand:false }
})
} else {
this.planSize = 0
this.canUsePointCount = 0
this.remainingCount = 0
this.planList = []
}
} catch (e) {
this.planSize = 0
this.canUsePointCount = 0
this.remainingCount = 0
this.planList = []
}
},
@@ -259,6 +305,9 @@
if (e) {
this._getBindXnPlan(e)
} else {
this.planSize = 0
this.canUsePointCount = 0
this.remainingCount = 0
this.planList = []
}
},
@@ -284,14 +333,44 @@
this.disabled1 = false
this.state = 'all',
this.refreshing = false
this.planSize = 0
this.canUsePointCount = 0
this.remainingCount = 0
this.planList = []
},
async _slitXnplan () {
openConfirmModal () {
this.disabled = true
if (!this.index1 || !this.index2 || (!this.upL && !this.upR) || !this.index3 || !this.index4 || !this.qty) {
this.disabled = false
return
}
const opt2 = this.options2.find(o=>o.value === this.index2)
this.index2Label = opt2 ? opt2.text : ''
const opt3 = this.options3.find(o=>o.value === this.index3)
this.index3Label = opt3 ? opt3.text : ''
this.confirmModalShow = true
},
closeConfirmModal(){
this.confirmModalShow = false
this.disabled = false
},
getAxisLabel(){
let arr = []
if(this.upL) {
const l = this.newaxis1.find(x=>x.value === this.upL)
l && arr.push(l.text + '(左)')
}
if(this.upR) {
const r = this.newaxis2.find(x=>x.value === this.upR)
r && arr.push(r.text + '(右)')
}
return arr.join(' / ')
},
handleConfirmCall(){
this.confirmModalShow = false
this._slitXnplan()
},
async _slitXnplan () {
let upLT = ''
let upRT = ''
this.axis.map(el => {

View File

@@ -97,20 +97,12 @@
<view class="msg_content_2">
<view class="msg_filter">
<view class="relative msg_tip_2 msg_tip_2_blue">上轴信息</view>
<view class="filter_label filter_label_2">缓存架编码</view>
<view class="filter_input_wraper_2">
<input type="text" class="filter_input" placeholder="请输入缓存架编码" v-model="upShelf">
</view>
<view class="filter_label filter_label_2">绑定计划</view>
<view class="filter_input_wraper_2">
<uni-data-select v-model="upPlanCode" :searchInput="true" :localdata="PlanOptions1" @handleChange="handleChange1" @showSelector="showSelector1"></uni-data-select>
</view>
<view class="msg_fgx"></view>
<view class="relative msg_tip_2 msg_tip_2_yellow">下轴信息</view>
<view class="filter_label filter_label_2">缓存架编码</view>
<view class="filter_input_wraper_2">
<input type="text" class="filter_input" placeholder="请输入缓存架编码" v-model="downShelf">
</view>
<view class="filter_label filter_label_2">绑定计划</view>
<view class="filter_input_wraper_2 filter_input_wraper_2-bottom">
<uni-data-select v-model="downPlanCode" :searchInput="true" :localdata="PlanOptions2" @handleChange="handleChange2" @showSelector="showSelector2"></uni-data-select>
@@ -118,8 +110,7 @@
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-11 btn-submit btn-success" :class="{'btn-info': !((upShelf && upPlanCode) || (downShelf && downPlanCode))}" :disabled="disabled" @tap="bindSure(0)">确认绑定</button>
<button class="zd-col-11 btn-submit btn-success" :class="{'btn-info': !((upShelf && upPlanCode) || (downShelf && downPlanCode))}" :disabled="disabled" @tap="bindSure(1)">强制绑定</button>
<button class="zd-col-11 btn-submit btn-success" :class="{'btn-info': !(upPlanCode || downPlanCode)}" :disabled="disabled" @tap="bindSure(0)">自动分配</button>
</view>
</view>
<view v-if="modalShow1" class="msg_mask"></view>
@@ -156,9 +147,7 @@
htmlContent1: [],
htmlContent2: [],
modalShow1: false,
upShelf: '',
upPlanCode: '',
downShelf: '',
downPlanCode: '',
PlanOptions: [],
PlanOptions1: [],
@@ -358,16 +347,12 @@
return
}
this.modalShow1 = true
this.upShelf = ''
this.upPlanCode = ''
this.downShelf = ''
this.downPlanCode = ''
},
async bindSure (type) {
this.disabled = true
const upValid = this.upShelf && this.upPlanCode
const downValid = this.downShelf && this.downPlanCode
if (!upValid && !downValid) {
if (!(this.upPlanCode || this.downPlanCode)) {
uni.showToast({
title: '请至少完整填写上轴或下轴一组信息',
icon: 'none'
@@ -376,7 +361,7 @@
return
}
try {
let res = await dBindPlanDevice(this.upShelf, this.upPlanCode, this.downShelf, this.downPlanCode, type, this.index)
let res = await dBindPlanDevice(null, this.upPlanCode, null, this.downPlanCode, type, this.index)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -361,6 +361,9 @@ export const getUnbindPlan = () => {
export const getBindXnPlan = () => {
let res = {
"status" : 200,
"planSize": 10,
"canUsePointCount": 8,
"remainingCount": 2,
"plans" : [
{
"paper_tube_description": 'JH-20260824-018',