This commit is contained in:
2025-12-19 09:50:55 +08:00
parent f051664364
commit a8eb235513
9 changed files with 167 additions and 57 deletions

View File

@@ -48,7 +48,8 @@ uni-button:after {
.filter_label {
display: block;
line-height: 80rpx;
font-size: 28rpx;
// font-size: 28rpx;
font-size: 26rpx;
color: #323232;
font-weight: bold;
letter-spacing: 4rpx;

View File

@@ -30,6 +30,9 @@
"button.deregulate": "解除管制",
"button.pause": "暂停",
"button.recover": "恢复",
"button.finish": "完成",
"button.start-confirm": "起点确认",
"button.end-confirm": "终点确认",
"login.username": "用户名",
"login.password": "密码",
"login.remember": "记住用户名",
@@ -98,8 +101,8 @@
"grid.enter-area": "进入区域",
"grid.wltype": "物料类型",
"grid.has-task": "是否有任务",
"grid.region_code": "区域编码",
"grid.region_name": "区域名称",
"grid.region-code": "区域编码",
"grid.region-name": "区域名称",
"toast.select-row": "请选择一行",
"toast.device-not-empty": "设备不能为空",
"toast.material-not-empty": "物料不能为空",

View File

@@ -30,6 +30,9 @@
"button.deregulate": "規制解除",
"button.pause": "一時停止",
"button.recover": "回復",
"button.finish": "完了",
"button.start-confirm": "起点確認",
"button.end-confirm": "終点確認",
"login.username": "ユーザー名",
"login.password": "パスワード",
"login.remember": "ユーザー名を記憶する",
@@ -98,8 +101,8 @@
"grid.enter-area": "ゾーンに入る",
"grid.wltype": "品目タイプ",
"grid.has-task": "タスクの有無",
"grid.region_code": "ゾーンコーディング",
"grid.region_name": "領域名",
"grid.region-code": "ゾーンコーディング",
"grid.region-name": "領域名",
"toast.select-row": "行を選択してください",
"toast.device-not-empty": "デバイスを空にすることはできません",
"toast.material-not-empty": "品目を空にすることはできません",

View File

@@ -30,6 +30,9 @@
"button.deregulate": "解除管制",
"button.pause": "暂停",
"button.recover": "恢复",
"button.finish": "完成",
"button.start-confirm": "起点确认",
"button.end-confirm": "终点确认",
"login.username": "用户名",
"login.password": "密码",
"login.remember": "记住用户名",

View File

@@ -5,11 +5,11 @@
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<view class="zd-col-9">
<!-- <span class="filter_label">车号</span> -->
<span class="filter_label">{{$t('filter.carno')}}</span>
</view>
<view class="zd-col-24 filter_select">
<view class="zd-col-22 filter_select">
<uni-data-select v-model="index" :localdata="options" placeholder="" @change="selectChange"></uni-data-select>
</view>
</view>

View File

@@ -216,7 +216,13 @@
}
}
</script>
<style lang="stylus">
.checked
background #ff0
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.checked
background #ff0
.button-primary, .button-default
_fj(center)
font-size 26rpx
height 88rpx
line-height 30rpx
</style>

View File

@@ -212,3 +212,11 @@
}
}
</script>
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.button-primary, .button-default
_fj(center)
font-size 26rpx
height 88rpx
line-height 30rpx
</style>

View File

@@ -50,12 +50,51 @@
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-6 button-primary" @tap="searchList">查询</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">重新下发</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirm">强制完成</button> -->
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="handleConfirm">{{$t('button.reissue')}}</button> -->
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.force-complete')}}</button> -->
<!-- <button class="zd-col-6 button-primary" @tap="searchList">{{$t('button.search')}}</button> -->
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled1" @tap="toStartConfirm">{{$t('button.start-confirm')}}</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="toEndConfirm">{{$t('button.end-confirm')}}</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled3" @tap="handleConfirm">{{$t('button.finish')}}</button>
</view>
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">{{$t('filter.start-point')}}</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val2"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-22 button-primary" :class="{'button-info': !val2}" :disabled="disabled1" @tap="_startPointConfirm">{{$t('button.start-confirm')}}</button>
</view>
</view>
<view v-show="show" class="msg_mask"></view>
<view class="msg_wrapper" :class="show2 ? 'popshow' : 'pophide'">
<view class="pop_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">{{$t('filter.end-point')}}</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val3"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-22 button-primary" :class="{'button-info': !val3}" :disabled="disabled2" @tap="_endPointConfirm">{{$t('button.end-confirm')}}</button>
</view>
</view>
<view v-show="show2" class="msg_mask"></view>
</view>
</template>
@@ -63,7 +102,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import { confirmAction } from '@/utils/utils.js'
import {queryTask, againTask, forceConfirm} from '@/utils/getData4.js'
import {queryTask, finishTask, startPointConfirm, endPointConfirm} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -73,8 +112,14 @@
return {
title: '',
val1: '',
val2: '',
val3: '',
show: false,
show2: false,
dataList: [],
// dataList: [{task_code: 't01', point_code1: 'p01', point_code2: 'p02'}],
pkId: '',
pkObj: {},
reload: false,
status: 'more',
contentText: {
@@ -85,8 +130,9 @@
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false,
disabled1: false,
disabled2: false,
disabled3: false,
};
},
onLoad (options) {
@@ -134,13 +180,62 @@
},
toCheck (e) {
this.pkId = e.task_code === this.pkId ? '' : e.task_code
this.pkObj = e
},
clearUp () {
this.val1 = ''
this.pkId = ''
this.dataList = []
this.disabled = false
this.disabled1 = false
this.disabled2 = false
this.disabled3 = false
this.show = false
this.show2 = false
this.searchList()
},
toStartConfirm () {
if (!this.pkId) {
return
}
this.val2 = this.pkObj.point_code1
this.show = true
},
async _startPointConfirm () {
this.disabled1 = true
this.show = false
try {
let res = await startPointConfirm(this.pkId, this.val2)
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
toEndConfirm () {
if (!this.pkId) {
return
}
this.val3 = this.pkObj.point_code2
this.show2 = true
},
async _endPointConfirm () {
this.disabled2 = true
this.show2 = false
try {
let res = await endPointConfirm(this.pkId, this.val3)
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
this.disabled2 = false
} catch (e) {
this.disabled2 = false
}
},
async handleConfirm() {
if (!this.pkId) {
@@ -148,46 +243,31 @@
}
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
if (isConfirmed) {
this._againTask()
this._finishTask()
}
},
async _againTask () {
this.disabled = true
async _finishTask () {
this.disabled3 = true
try {
let res = await againTask(this.pkId)
let res = await finishTask(this.pkId)
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
this.disabled = false
this.disabled3 = false
} catch (e) {
this.disabled = false
}
},
async handleConfirm2() {
if (!this.pkId) {
return
}
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
if (isConfirmed) {
this._forceConfirm()
}
},
async _forceConfirm () {
this.disabled2 = true
try {
let res = await forceConfirm(this.pkId)
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
this.disabled2 = false
} catch (e) {
this.disabled2 = false
this.disabled3 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.button-primary, .button-default
_fj(center)
font-size 26rpx
height 88rpx
line-height 30rpx
</style>

View File

@@ -163,16 +163,22 @@ export const queryTask = (tcode) => request({
url:'api/hand/queryTask',
data: {task_code: tcode}
})
// 1.2重新下发
export const againTask = (tcode) => request({
url:'api/hand/againTask',
// 1.2完成
export const finishTask = (tcode) => request({
url:'api/hand/finishTask',
data: {task_code: tcode}
})
// 1.3强制确认
export const forceConfirm = (tcode) => request({
url:'api/hand/forceConfirm',
data: {task_code: tcode}
// 1.3起点确认
export const startPointConfirm = (tcode, pcode) => request({
url:'api/hand/startPointConfirm',
data: {task_code: tcode, point_code: pcode}
})
// 1.3终点确认
export const endPointConfirm = (tcode, pcode) => request({
url:'api/hand/endPointConfirm',
data: {task_code: tcode, point_code: pcode}
})
// 管制区域
// 1.1根据区域查询进出区域信息