样式
This commit is contained in:
@@ -146,10 +146,12 @@ uni-button:after {
|
||||
white-space: nowrap;
|
||||
padding: 0 20rpx;
|
||||
border-bottom: 10rpx solid #f5f5f5;
|
||||
text-align: center;
|
||||
}
|
||||
.slide_new table td:first-child, .slide_new table th:first-child{
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 101;
|
||||
}
|
||||
.slide_new table thead tr th {
|
||||
position: sticky;
|
||||
@@ -159,9 +161,9 @@ uni-button:after {
|
||||
line-height: 98rpx;
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
z-index: 100;
|
||||
}
|
||||
.slide_new table thead tr th:first-child {
|
||||
z-index: 1;
|
||||
background: #d7d7d7;
|
||||
}
|
||||
.slide_new table tbody tr td {
|
||||
@@ -181,7 +183,7 @@ uni-button:after {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
z-index: 200;
|
||||
background-color: #fff;
|
||||
padding-top: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
position fixed
|
||||
_wh(100%, 72rpx)
|
||||
background-color $red
|
||||
z-index 100
|
||||
z-index 200
|
||||
padding 0 20rpx
|
||||
.page_name
|
||||
_font(32rpx, 32rpx, #fff,700,center)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>点位</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
@@ -45,6 +46,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.point_code === pkId}">
|
||||
<td>{{Number(i) + 1}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
@@ -65,7 +67,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryMaterialInfo, emptyConfirm} from '@/utils/getData2.js'
|
||||
import {queryProductArea, queryMaterialInfo1, emptyConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -80,16 +82,14 @@
|
||||
qty: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this._queryProductArea()
|
||||
this._queryProductArea()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
console.log(e)
|
||||
},
|
||||
/** 选择器 */
|
||||
selectChange(e) {
|
||||
this.index = e
|
||||
@@ -104,18 +104,18 @@
|
||||
if (!this.val1 || !this.val2 || !this.index) {
|
||||
return
|
||||
}
|
||||
let res = await queryMaterialInfo(this.val1, this.val2, this.options[this.index].value)
|
||||
this.dataList = [...res.rows]
|
||||
let res = await queryMaterialInfo1(this.val1, this.val2, this.options[this.index].value)
|
||||
this.dataList = [...res.rows]
|
||||
},
|
||||
/** 确认 */
|
||||
async _emptyConfirm () {
|
||||
this.disabled = true
|
||||
if (!pkId) {
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await emptyConfirm()
|
||||
let res = await emptyConfirm(this.pkObj, this.qty, this.val1)
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
@@ -127,10 +127,17 @@
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === point_code ? '' : e.point_code
|
||||
this.pkObj = this.pkId === point_code ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.slide_new table td:first-child, .slide_new table th:first-child
|
||||
width 92rpx
|
||||
.slide_new table td:nth-child(2), .slide_new table th:nth-child(2)
|
||||
position sticky
|
||||
left 92rpx
|
||||
z-index 102
|
||||
</style>
|
||||
|
||||
@@ -1,23 +1,168 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="container">
|
||||
<nav-bar title="子卷套管"></nav-bar>
|
||||
<view class="content">
|
||||
<view class="wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">点位</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">气涨轴</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">区域</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>选择</th>
|
||||
<th>订单号</th>
|
||||
<th>子卷号</th>
|
||||
<th>机台编号</th>
|
||||
<th>分切组</th>
|
||||
<th>生产顺序</th>
|
||||
<th>生产日期</th>
|
||||
<th>纸筒/FRP管</th>
|
||||
<th>纸筒物料编码</th>
|
||||
<th>纸筒物料描述</th>
|
||||
<th>纸筒规格</th>
|
||||
<th>FRP管物料编码</th>
|
||||
<th>FRP管物料描述</th>
|
||||
<th>FRP管规格</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{Number(i) + 1}}</td>
|
||||
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}" @tap="toCheck(e)"></span></td>
|
||||
<td>{{e.mfg_order_name}}</td>
|
||||
<td>{{e.container_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.split_group}}</td>
|
||||
<td>{{e.manufacture_sort}}</td>
|
||||
<td>{{e.manufacture_date}}</td>
|
||||
<td>{{e.paper_tube_or_FRP}}</td>
|
||||
<td>{{e.paper_tube_material}}</td>
|
||||
<td>{{e.paper_tube_description}}</td>
|
||||
<td>{{e.paper_tube_model}}</td>
|
||||
<td>{{e.FRP_material}}</td>
|
||||
<td>{{e.FRP_description}}</td>
|
||||
<td>{{e.FRP_model}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !checkArr.length || !val2}" :disabled="disabled" @tap="_casingConfirm">套轴确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !index}" @tap="_queryMaterialInfo">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryMaterialInfo2, casingConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [],
|
||||
index: '',
|
||||
qty: '',
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
checkArr: []
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this._queryProductArea()
|
||||
},
|
||||
methods: {
|
||||
/** 选择器 */
|
||||
selectChange(e) {
|
||||
this.index = e
|
||||
},
|
||||
/** 生产区域下拉框查询 */
|
||||
async _queryProductArea () {
|
||||
let res = await queryProductArea()
|
||||
this.options = [...res.rows]
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _queryMaterialInfo () {
|
||||
if (!this.val1 || !this.index) {
|
||||
return
|
||||
}
|
||||
let res = await queryMaterialInfo2(this.val1, this.options[this.index].value)
|
||||
res.rows.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res.rows]
|
||||
},
|
||||
/** 确认 */
|
||||
async _casingConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.checkArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await casingConfirm(this.checkArr, this.val2)
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
.slide_new table td:first-child, .slide_new table th:first-child
|
||||
width 92rpx
|
||||
.slide_new table td:nth-child(2), .slide_new table th:nth-child(2)
|
||||
position sticky
|
||||
left 92rpx
|
||||
width 92rpx
|
||||
z-index 102
|
||||
.slide_new table td:nth-child(3), .slide_new table th:nth-child(3)
|
||||
position sticky
|
||||
left 184rpx
|
||||
z-index 103
|
||||
</style>
|
||||
|
||||
@@ -9,14 +9,33 @@ export const queryProductArea = () => request({
|
||||
data: {}
|
||||
})
|
||||
// 1.2空纸管库设备物料初始化查询
|
||||
export const queryMaterialInfo = (code, mcode, area) => request({
|
||||
url:'api/pda/empty/queryMaterialInfo',
|
||||
data: {
|
||||
point_code: code,
|
||||
material_code: mcode,
|
||||
product_area: area
|
||||
// export const queryMaterialInfo1 = (code, mcode, area) => request({
|
||||
// url:'api/pda/empty/queryMaterialInfo',
|
||||
// data: {
|
||||
// point_code: code,
|
||||
// material_code: mcode,
|
||||
// product_area: area
|
||||
// }
|
||||
// })
|
||||
export const queryMaterialInfo1 = (code, area) => {
|
||||
let res = {
|
||||
rows: [
|
||||
{point_code: 'fdfdfdfdffedfd1',material_code: 'dfdf2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
{point_code: '1',material_code: '2', checked: false},
|
||||
]
|
||||
}
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 1.3入库确认
|
||||
export const emptyConfirm = (jo, qty, code) => request({
|
||||
url:'api/pda/empty/confirm',
|
||||
@@ -25,4 +44,24 @@ export const emptyConfirm = (jo, qty, code) => request({
|
||||
qty: qty,
|
||||
material_code: code
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 子卷套管
|
||||
*/
|
||||
// 1.1分切计划初始化查询
|
||||
export const queryMaterialInfo2 = (code, area) => request({
|
||||
url:'api/pda/casing/queryMaterialInfo',
|
||||
data: {
|
||||
point_code: code,
|
||||
product_area: area
|
||||
}
|
||||
})
|
||||
// 1.2套轴确认
|
||||
export const casingConfirm = (row, qzz) => request({
|
||||
url:'api/pda/casing/confirm',
|
||||
data: {
|
||||
cut_rows: row,
|
||||
qzzno: qzz
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user