This commit is contained in:
2024-02-19 13:14:35 +08:00
parent 454b7273cf
commit 27a8dedc87
2 changed files with 169 additions and 100 deletions

View File

@@ -175,6 +175,7 @@ uni-button:after {
line-height: 80rpx;
font-size: 28rpx;
color: #323232;
font-weight: bold;
text-align:justify;
text-align-last: justify;
text-justify: inter-ideograph;/*兼容ie*/
@@ -348,9 +349,9 @@ uni-button:after {
background-color: #fff
}
.btn-disabled, .submit-button[disabled] {
background-color: #c9c9c9;
border: 1px solid #c9c9c9;
color: #fff;
background-color: #c9c9c9 !important;
border: 1px solid #c9c9c9 !important;
color: #fff !important;
}
.more_btns_wraper {
position: fixed;
@@ -398,32 +399,28 @@ uni-button:after {
}
/** 弹窗 */
.popshow {
transform: translateY(0);
}
.pophide {
transform: translateY(100%);
}
.msg_wrapper {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
z-index: 201;
display: flex;
justify-content: center;
align-items: center;
}
.msg_wrapper_1 {
text-align: left;
}
.msg_box {
width: 90%;
padding: 20rpx;
width: 100%;
padding: 60rpx 28rpx;
background-color: #fff;
border-radius: 4px;
border: 1px solid #ebeef5;
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
backface-visibility: hidden;
box-shadow: 0 -8px 16px 0 rgba(28,31,33,.1);
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
z-index: 301;
transition: all .3s;
}
.msg_box {
width: 100%;
}
.msg_mask {
position: fixed;
top: 0;
@@ -432,33 +429,29 @@ uni-button:after {
height: 100%;
opacity: .7;
background: #000;
z-index: 200;
z-index: 300;
}
.msg_btns {
width: 100%;
max-width: 300px;
margin: 40rpx auto 0;
display: flex;
justify-content: center;
align-items: center;
}
.msg_btn {
width: 45%;
border-radius: 10rpx;
margin: 0;
font-size: 34rpx;
line-height: 78rpx;
color: #fff;
text-align: center;
background-color: #ff6a00;
border: 1rpx solid #ff6a00;
border-radius: 44rpx;
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
}
.msg_btn_cancle {
background-color: #fff;
border: 1rpx solid #ff6a00;
font-size: 34rpx;
line-height: 78rpx;
border-radius: 44rpx;
color: #000;
margin-right: 20rpx;
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
}
.msg_btn:disabled {
background-color: #c9c9c9;

View File

@@ -13,54 +13,92 @@
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">物料余量</span>
<span class="filter_label">起点点位</span>
</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val2">
<input type="text" class="filter_input" v-model="val2">
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">物料点位</span>
<span class="filter_label">终点点位</span>
</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val3">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
</view>
<view class="flow_wrapper" v-for="e in dataList" :key="e.point_code">
<view class="zd-row">
<view class="zd-col-24">
<view class="zd-row">
<view class="zd-col-2">
<view class="zd-row flow_icon_item_1">
<view class="iconfont icon_start_point">&#xe61f;</view>
</view>
</view>
<view class="zd-col-22">
<view class="zd-row flow_start_item" @tap="checkcode(e)" :class="{'flow_start_item_checked': pkId === e.point_code}">
<view class="zd-col-12 pdl20 pdr20 font-size-1">{{e.point_code}}</view>
<view class="zd-col-12 pdr20 font-size-2">{{e.point_name}}</view>
<view v-show="pkId === e.point_code" class="iconfont icon_choosed">&#xe66b;</view>
</view>
</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>物料数量</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.group_id === pkId}">
<td>{{e.point_code}}</td>
<td>{{e.point_name}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.material_qty}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="submit-bar_new">
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !pkId || !$store.getters.publicObj}" :disabled="disabled1" @tap="_fullVehicleOut">满托出库</button>
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !pkId || !$store.getters.publicObj}" :disabled="disabled2" @tap="_vehicleGoBack">余料回</button>
<button class="zd-col-10 submit-button_new" :class="{'btn-disabled': !pkId || !$store.getters.publicObj}" :disabled="disabled3" @tap="_fullVehicleOutConfirm">满托出库确认</button>
<button class="zd-col-4 submit-button_new" @tap="clearUp">清空</button>
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !val2 || !index1}" :disabled="disabled1" @tap="_fullVehicleOut">满托出</button>
<button class="zd-col-6 submit-button_new" @tap="popUp(1)">余料回库</button>
<button class="zd-col-7 submit-button_new" @tap="popUp(2)">满托出库确认</button>
</view>
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="msg_box">
<view class="filter_item">
<view class="filter_label">当前点位</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index2" :localdata="options1" @change="selectChange2"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">载具编码</view>
<view class="filter_input_wraper">
<search-box
v-model="val3"
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">物料数量</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val4">
</view>
</view>
</view>
<view class="zd-row msg_btns">
<button class="zd-col-9 msg_btn_cancle" @tap="toClear">清空</button>
<button class="zd-col-13 msg_btn" :class="{'btn-disabled': !index2 || !val3 || !val4}" :disabled="disabled2" @tap="toConfirm">确认</button>
</view>
</view>
<view v-if="show" class="msg_mask" @click.stop="show = false"></view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPoints, fullVehicleOut, vehicleGoBack, fullVehicleOutConfirm} from '@/utils/getData2.js'
import {queryLinkMaterial, queryPoints, fullVehicleOut, vehicleGoBack, fullVehicleOutConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -70,12 +108,18 @@
return {
val1: '',
val2: '',
options1: [],
index1: '',
index2: '',
val3: '',
val4: '',
dataList: [],
disabled1: false,
disabled2: false,
disabled3: false,
pkId: ''
pkId: '',
show: false,
type: ''
};
},
created () {
@@ -87,41 +131,51 @@
onShow() {
if (this.$store.getters.publicObj) {
this.val1 = this.$store.getters.publicObj.material_name
this.val2 = this.$store.getters.publicObj.material_qty
this.val3 = this.$store.getters.publicObj.point_code
this.val4 = this.$store.getters.publicObj.vehicle_code
this._queryLinkMaterial(this.$store.getters.publicObj.material_id)
}
},
methods: {
/** 初始化查询 */
async _queryPoints () {
let res = await queryPoints('2')
this.dataList = [...res]
},
getMater () {
uni.navigateTo({
url: '/pages/manage/search-mater'
url: '/pages/manage/search-mater-1'
})
},
checkcode (e) {
this.pkId = this.pkId === e.point_code ? '' : e.point_code
/** grid查询 */
async _queryLinkMaterial (e) {
let res = await queryLinkMaterial(e)
this.dataList = [...res]
},
/** 选择器 */
selectChange1(e) {
this.index1 = e
},
selectChange2(e) {
this.index2 = e
},
/** 点位下拉框 */
async _queryPoints () {
let res = await queryPoints('2')
res.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
this.options1 = [...res]
},
toCheck (e) {
this.pkId = this.pkId === e.group_id ? '' : e.group_id
this.val2 = this.pkId === e.group_id ? e.point_code : ''
},
/** 满托出库 */
async _fullVehicleOut () {
this.disabled1 = true
if (!this.pkId) {
if (!this.val2 || !this.index1) {
this.disabled1 = false
return
}
try {
let res = await fullVehicleOut(this.val3, this.pkId)
let res = await fullVehicleOut(this.val2, this.index1)
this.disabled1 = false
this.pkId = ''
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.$store.dispatch('setPublicObj', '')
this._queryLinkMaterial(this.$store.getters.publicObj.material_id)
uni.showToast({
title: res.message,
icon: 'none'
@@ -130,53 +184,75 @@
this.disabled1 = false
}
},
popUp (type) {
this.show = true
this.type = type
},
toClear () {
this.index2 = ''
this.val3 =''
this.val4 =''
},
toConfirm () {
if (this.type === 1) {
this._vehicleGoBack()
}
if (this.type === 2) {
this._fullVehicleOutConfirm()
}
},
/** 余料回库 */
async _vehicleGoBack () {
this.disabled2 = true
if (!this.pkId) {
if (!this.index2 || !this.val3 || !this.val4) {
this.disabled2 = false
return
}
try {
let res = await vehicleGoBack(this.pkId, this.val4, this.val2)
let res = await vehicleGoBack(this.index2, this.val3, this.val4)
this.disabled2 = false
this.pkId = ''
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.$store.dispatch('setPublicObj', '')
this.toClear()
this.show = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled2 = false
this.toClear()
this.show = false
}
},
/** 满托出库确认 */
async _fullVehicleOutConfirm () {
this.disabled3 = true
if (!this.pkId) {
this.disabled3 = false
this.disabled2 = true
if (!this.index2 || !this.val3 || !this.val4) {
this.disabled2 = false
return
}
try {
let res = await fullVehicleOutConfirm(this.pkId, this.val4, this.val2)
this.disabled3 = false
this.pkId = ''
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.$store.dispatch('setPublicObj', '')
let res = await fullVehicleOutConfirm(this.index2, this.val3, this.val4)
this.disabled2 = false
this.toClear()
this.show = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled3 = false
this.disabled2 = false
this.toClear()
this.show = false
}
},
clearUp () {
this.index1 = ''
this.val1 = ''
this.val2 = ''
this.dataList = []
this.pkId = ''
this.$store.dispatch('setPublicObj', '')
}
}
}