修改订单工序
This commit is contained in:
116
pages/manage/modify-process.vue
Normal file
116
pages/manage/modify-process.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>下一道工序</th>
|
||||
<th>交期时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.order_code}}</td>
|
||||
<td>
|
||||
<view class="td_select">
|
||||
<uni-data-select v-model="e.process" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</td>
|
||||
<td>
|
||||
<uni-datetime-picker
|
||||
type="datetime"
|
||||
v-model="e.time"
|
||||
@change="changeLog"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {regionList, modifyProcess} from '@/utils/mork2.js'
|
||||
import {handheldBlanking} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false,
|
||||
dataList: [],
|
||||
show: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._regionList()
|
||||
},
|
||||
methods: {
|
||||
async _regionList () {
|
||||
let res = await regionList()
|
||||
this.options = [...res.content]
|
||||
this.options.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
this._modifyProcess()
|
||||
},
|
||||
async _modifyProcess () {
|
||||
let res = await modifyProcess()
|
||||
this.dataList = [...res]
|
||||
},
|
||||
selectChange (val) {
|
||||
console.log(val)
|
||||
},
|
||||
changeLog (e) {
|
||||
console.log(e)
|
||||
},
|
||||
clearUp () {
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _handheldBlanking () {
|
||||
this.disabled = true
|
||||
if (!this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await handheldBlanking(this.dataList)
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.zd_content
|
||||
height: calc(100% - var(--status-bar-height) - 212rpx);
|
||||
padding: 20rpx 14rpx 0 14rpx;
|
||||
.grid-wraper
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
.slide_new table td, .slide_new table th
|
||||
overflow: visible;
|
||||
</style>
|
||||
Reference in New Issue
Block a user