配料任务修改
This commit is contained in:
@@ -52,10 +52,7 @@ uni-button:after {
|
|||||||
display: block;
|
display: block;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #323232;
|
color: #3e3e3e;
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: 4rpx;
|
|
||||||
padding-left: 10rpx;
|
|
||||||
/* text-align:justify;
|
/* text-align:justify;
|
||||||
text-align-last: justify;
|
text-align-last: justify;
|
||||||
text-justify: inter-ideograph; */
|
text-justify: inter-ideograph; */
|
||||||
@@ -162,8 +159,8 @@ uni-button:after {
|
|||||||
top: 0;
|
top: 0;
|
||||||
background: #d7d7d7;
|
background: #d7d7d7;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
line-height: 28rpx;
|
line-height: 58rpx;
|
||||||
padding: 35rpx 10rpx;
|
padding: 14rpx 20rpx;
|
||||||
color: #7d7d7d;
|
color: #7d7d7d;
|
||||||
background-color: #dcdfea;
|
background-color: #dcdfea;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -377,29 +374,29 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
|
|||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
.pophide {
|
.pophide {
|
||||||
transform: translateY(100%);
|
transform: translateY(300%);
|
||||||
}
|
}
|
||||||
.msg_wrapper {
|
.msg_wrapper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: auto;
|
top: 30%;
|
||||||
bottom: 0;
|
left: 5%;
|
||||||
left: 0;
|
width: 90%;
|
||||||
width: 100%;
|
padding: 40rpx 30rpx;
|
||||||
height: calc(100% - var(--status-bar-height) - 72rpx);
|
|
||||||
background-color: #f6f6f6;
|
background-color: #f6f6f6;
|
||||||
box-shadow: 0 -8px 16px 0 rgba(28,31,33,.1);
|
box-shadow: 0 -8px 16px 0 rgba(28,31,33,.1);
|
||||||
border-top-left-radius: 20rpx;
|
border-top-left-radius: 20rpx;
|
||||||
border-top-right-radius: 20rpx;
|
border-top-right-radius: 20rpx;
|
||||||
z-index: 301;
|
z-index: 301;
|
||||||
transition: all .3s;
|
transition: all .5s;
|
||||||
|
}
|
||||||
|
.msg_tip {
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 58rpx;
|
||||||
|
color: #6798ef;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.msg_content {
|
.msg_content {
|
||||||
width: 100%;
|
margin: 10rpx 0;
|
||||||
height: 100%;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
.msg_box {
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
.msg_mask {
|
.msg_mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -412,26 +409,23 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
|
|||||||
z-index: 300;
|
z-index: 300;
|
||||||
}
|
}
|
||||||
.msg_btns {
|
.msg_btns {
|
||||||
width: 100%;
|
|
||||||
margin: 40rpx auto 0;
|
margin: 40rpx auto 0;
|
||||||
}
|
}
|
||||||
.msg_btn {
|
.msg_btn {
|
||||||
font-size: 34rpx;
|
font-size: 30rpx;
|
||||||
line-height: 78rpx;
|
line-height: 68rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #ff6a00;
|
background-color: #ff6a00;
|
||||||
border: 1rpx solid #ff6a00;
|
border: 1rpx solid #ff6a00;
|
||||||
border-radius: 44rpx;
|
border-radius: 34rpx;
|
||||||
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
|
box-shadow: 0 4rpx 9rpx 0 rgba(0,0,0,.2);
|
||||||
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
.msg_btn_cancle {
|
.msg_btn_cancle {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1rpx solid #ff6a00;
|
border-color: #fff;
|
||||||
font-size: 34rpx;
|
color: #666;
|
||||||
line-height: 78rpx;
|
box-shadow: 0 4rpx 9rpx 0 rgba(0,0,0,.2);
|
||||||
border-radius: 44rpx;
|
|
||||||
color: #000;
|
|
||||||
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
|
|
||||||
}
|
}
|
||||||
.msg_btn:disabled {
|
.msg_btn:disabled {
|
||||||
background-color: #c9c9c9;
|
background-color: #c9c9c9;
|
||||||
@@ -560,4 +554,12 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
|
|||||||
}
|
}
|
||||||
.point-item_n5:nth-child(n+6) {
|
.point-item_n5:nth-child(n+6) {
|
||||||
margin-top: 20rpx
|
margin-top: 20rpx
|
||||||
|
}
|
||||||
|
.checkbox {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
border: 1rpx solid #6798ef;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>选择</th>
|
||||||
<th>任务编码</th>
|
<th>任务编码</th>
|
||||||
<th>状态</th>
|
<th>状态</th>
|
||||||
<th>工单编码</th>
|
<th>工单编码</th>
|
||||||
@@ -15,11 +16,16 @@
|
|||||||
<th>物料重量</th>
|
<th>物料重量</th>
|
||||||
<th>配料桶数</th>
|
<th>配料桶数</th>
|
||||||
<th>剩余桶数</th>
|
<th>剩余桶数</th>
|
||||||
<th>站点编码</th>
|
<th>终点编码</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.work_code === pkId}">
|
<tr v-for="(e, i) in dataList" :key="i">
|
||||||
|
<td @tap="toCheck(e)">
|
||||||
|
<view class="checkbox">
|
||||||
|
<uni-icons type="checkmarkempty" size="20" :color="e.work_code === pkId ? '#4e6ef2' : '#fff'"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</td>
|
||||||
<td>{{e.work_code}}</td>
|
<td>{{e.work_code}}</td>
|
||||||
<td>{{ e.status }}</td>
|
<td>{{ e.status }}</td>
|
||||||
<td>{{ e.mfg_order_name }}</td>
|
<td>{{ e.mfg_order_name }}</td>
|
||||||
@@ -28,7 +34,7 @@
|
|||||||
<td>{{ e.qty }}</td>
|
<td>{{ e.qty }}</td>
|
||||||
<td>{{ e.require_num }}</td>
|
<td>{{ e.require_num }}</td>
|
||||||
<td>{{ e.remain_num }}</td>
|
<td>{{ e.remain_num }}</td>
|
||||||
<td>{{ e.resource_name }}</td>
|
<td @tap="updateCode(e)">{{ e.next_device_code }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -39,13 +45,29 @@
|
|||||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||||
<button class="zd-col-11 button-primary" :disabled="disabled" :class="{'button-info': !pkId}" @tap="_handConfirm">确认</button>
|
<button class="zd-col-11 button-primary" :disabled="disabled" :class="{'button-info': !pkId}" @tap="_handConfirm">确认</button>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||||
|
<view class="msg_tip">工单编码{{pkObj.mfg_order_name}}</view>
|
||||||
|
<view class="msg_content">
|
||||||
|
<view class="zd-row">
|
||||||
|
<view class="zd-col-6 filter_label">选择终点</view>
|
||||||
|
<view class="zd-col-18 filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="msg_btns">
|
||||||
|
<button class="zd-col-24 msg_btn" :disabled="disabled" @tap="_confirmZZDevice">确定</button>
|
||||||
|
<button class="zd-col-24 msg_btn msg_btn_cancle" @tap.stop="show = false">返回</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="show" class="msg_mask"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {queryWorks, handConfirm} from '@/utils/getData2.js'
|
import {queryWorks, handConfirm, queryZDDevice, confirmZZDevice} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -54,16 +76,34 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
options1: [],
|
||||||
|
index1: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: ''
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
|
show: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
this._queryWorks()
|
this._queryWorks()
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
this._queryZDDevice()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async _queryZDDevice () {
|
||||||
|
let res = await queryZDDevice()
|
||||||
|
this.options1 = [...res]
|
||||||
|
this.options1.map(el => {
|
||||||
|
this.$set(el, 'text', el.device_name)
|
||||||
|
this.$set(el, 'value', el.device_code)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectChange1 (e) {
|
||||||
|
this.index1 = e
|
||||||
|
},
|
||||||
async _queryWorks () {
|
async _queryWorks () {
|
||||||
let res = await queryWorks()
|
let res = await queryWorks()
|
||||||
this.dataList = [...res]
|
this.dataList = [...res]
|
||||||
@@ -76,6 +116,26 @@
|
|||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.work_code ? '' : e.work_code
|
this.pkId = this.pkId === e.work_code ? '' : e.work_code
|
||||||
},
|
},
|
||||||
|
updateCode (e) {
|
||||||
|
this.show = true
|
||||||
|
this.pkObj = e
|
||||||
|
this.index1 = ''
|
||||||
|
},
|
||||||
|
async _confirmZZDevice () {
|
||||||
|
this.disabled = true
|
||||||
|
try {
|
||||||
|
let res = await confirmZZDevice(this.pkObj.mfg_order_name, this.pkObj.work_code, this.index1)
|
||||||
|
this.show = false
|
||||||
|
this.disabled = false
|
||||||
|
this._queryWorks()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
async _handConfirm () {
|
async _handConfirm () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.pkId) {
|
if (!this.pkId) {
|
||||||
|
|||||||
@@ -29,4 +29,14 @@ export const queryWorks = () => request({
|
|||||||
export const handConfirm = () => request({
|
export const handConfirm = () => request({
|
||||||
url:'api/hand/confirm',
|
url:'api/hand/confirm',
|
||||||
data: {work_code: code}
|
data: {work_code: code}
|
||||||
|
})
|
||||||
|
// 查询终点
|
||||||
|
export const queryZDDevice = () => request({
|
||||||
|
url:'api/hand/queryZDDevice',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 修改终点
|
||||||
|
export const confirmZZDevice = (code, work, ncode) => request({
|
||||||
|
url:'api/hand/confirmZZDevice',
|
||||||
|
data: {mfg_order_name: code, work_code: work, next_device_code: ncode}
|
||||||
})
|
})
|
||||||
@@ -53,4 +53,12 @@ export const handConfirm = () => {
|
|||||||
message: 'ok'
|
message: 'ok'
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
}
|
||||||
|
export const queryZDDevice = () => {
|
||||||
|
let res = [{device_code: '10001', device_name: '车号1'}, {device_code: '2', device_name: '车号2'}]
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
export const confirmZZDevice = () => {
|
||||||
|
let res = {message: 'ok'}
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user