修改订单工序

This commit is contained in:
2024-09-02 14:07:36 +08:00
parent 2f0b9b40bc
commit ab6d9beb67
3 changed files with 22 additions and 18 deletions

View File

@@ -17,13 +17,13 @@
<td>{{e.order_code}}</td>
<td>
<view class="td_select">
<uni-data-select v-model="e.process" :localdata="options" @change="selectChange"></uni-data-select>
<uni-data-select v-model="e.region_code" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</td>
<td>
<uni-datetime-picker
type="datetime"
v-model="e.time"
v-model="e.due_date"
@change="changeLog"
/>
</td>
@@ -35,7 +35,7 @@
</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>
<button class="zd-col-15 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_updateOrder">入库确认</button>
</view>
</view>
</template>
@@ -43,8 +43,8 @@
<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'
// import {regionList, fabOrders} from '@/utils/mork2.js'
import {regionList, fabOrders, updateOrder} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -71,30 +71,28 @@
this.options.map(el => {
this.$set(el, 'text', el.label)
})
this._modifyProcess()
this._fabOrders()
},
async _modifyProcess () {
let res = await modifyProcess()
this.dataList = [...res]
async _fabOrders () {
let res = await fabOrders()
this.dataList = [...res.content]
},
selectChange (val) {
console.log(val)
},
changeLog (e) {
console.log(e)
},
clearUp () {
this.dataList = []
this.disabled = false
},
async _handheldBlanking () {
async _updateOrder () {
this.disabled = true
if (!this.dataList.length) {
this.disabled = false
return
}
try {
let res = await handheldBlanking(this.dataList)
let res = await updateOrder(this.dataList)
this.clearUp()
} catch (e) {
this.disabled = false

View File

@@ -65,7 +65,11 @@ export const handheldBlanking = (code, rcode, vcode, material) => request({
data: {device_code: code, region_code: rcode, vehicle_code: vcode, material: material}
})
// 修改订单工序
export const modifyProcess = (data) => request({
url:'api/handheld/modifyProcess',
export const fabOrders = (data) => request({
url:'api/fab/orders',
data: data
})
export const updateOrder = (data) => request({
url:'api/handheld/updateOrder',
data: data
})

View File

@@ -14,9 +14,11 @@ export const regionList = () => {
return res
}
export const modifyProcess = (data) => {
let res = [
{order_code: '111', process: '1', time: '2020-10-10 11:30:30'}, {order_code: '111', process: '2', time: '2020-10-10 11:30:30'}
export const fabOrders = (data) => {
let res = {
content: [
{order_code: '111', region_code: '3', due_date: '2020-10-10 11:30:30'}
]
}
return res
}