分切下料2
This commit is contained in:
@@ -360,6 +360,21 @@ uni-button:after {
|
||||
.slide_new table tr.checked td:last-child {
|
||||
border-right: 1rpx solid #6798ef;
|
||||
}
|
||||
.slide table {
|
||||
table-layout: auto;
|
||||
width: 100%;
|
||||
}
|
||||
.slide table th:first-child, .slide table td:first-child {
|
||||
box-shadow: none;
|
||||
}
|
||||
.slide table td {
|
||||
line-height: 28rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
white-space: normal;
|
||||
}
|
||||
.mini-btn {
|
||||
padding: 0 20rpx !important;
|
||||
}
|
||||
|
||||
/** 提交栏 **/
|
||||
.submitbar {
|
||||
|
||||
6
main.js
6
main.js
@@ -25,6 +25,12 @@ Vue.directive('enterNumber', {
|
||||
}
|
||||
});
|
||||
|
||||
Vue.filter('findByValue', (array, value) => {
|
||||
if (!Array.isArray(array)) return ''
|
||||
const item = array.find(item => item.value === value)
|
||||
return item ? item.text : ''
|
||||
});
|
||||
|
||||
import store from '@/vuex/store.js'
|
||||
|
||||
const app = new Vue({
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "海亮铜箔",
|
||||
"appid" : "__UNI__3A002CD",
|
||||
"description" : "海亮铜箔二期手持系统",
|
||||
"versionName" : "1.1.9",
|
||||
"versionCode" : 119,
|
||||
"versionName" : "1.2.0",
|
||||
"versionCode" : 120,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
async _showManualView () {
|
||||
let res = await showManualView()
|
||||
if (res) {
|
||||
this.dataList = [...res.data]
|
||||
this.dataList = [...res]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
async _showManualView () {
|
||||
let res = await showManualView()
|
||||
if (res) {
|
||||
this.dataList = [...res.data]
|
||||
this.dataList = [...res]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,31 +16,52 @@
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">子卷号</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper mgr20">
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
<button class="zd-col-4 btn-submit btn-success" @tap="handleAdd">添加</button>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-19">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">轴位置</view>
|
||||
<view class="filter_input_wraper">
|
||||
<radio-group @change="radioChange">
|
||||
<label class="mgr20" v-for="(item, index) in options1" :key="item.value">
|
||||
<radio :value="item.value" :checked="index === current" style="transform:scale(0.8)" />
|
||||
<text class="filter_unit">{{item.text}}</text>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<button class="mini-btn" size="mini" style="display: block;" type="primary" @tap="handleAdd">添加</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<view class="slide_new slide">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="78%">子卷号</th>
|
||||
<th width="22%">操作</th>
|
||||
<th width="60%">子卷号</th>
|
||||
<th width="20%">轴位置</th>
|
||||
<th width="20%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e}}</td>
|
||||
<td><button class="btn-submit btn-success" @tap="handleDelete(i)">删除</button></td>
|
||||
<td>{{e.container_name}}</td>
|
||||
<td>{{ options1 | findByValue(e.site)}}</td>
|
||||
<td><button class="mini-btn" size="mini" type="primary" @tap="handleDelete(i)">删除</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -71,6 +92,9 @@
|
||||
index: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
options1: [{value: '1', text: '上轴'}, {value: '2', text: '下轴'}],
|
||||
index1: '1',
|
||||
current: 0,
|
||||
val1: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
@@ -103,6 +127,9 @@
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
radioChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
handleAdd () {
|
||||
if (!this.val1.trim()) {
|
||||
return
|
||||
@@ -111,7 +138,7 @@
|
||||
if (index !== -1) {
|
||||
this.dataList.splice(index, 1)
|
||||
}
|
||||
this.dataList.push(this.val1)
|
||||
this.dataList.push({container_name: this.val1, site: this.index1})
|
||||
this.val1 = ''
|
||||
},
|
||||
handleDelete (index) {
|
||||
@@ -145,10 +172,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.slide_new table {
|
||||
table-layout: auto;
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
Reference in New Issue
Block a user