分拣排产
This commit is contained in:
@@ -7,26 +7,26 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>选择</th>
|
|
||||||
<th>工单号</th>
|
<th>工单号</th>
|
||||||
<th>物料编码</th>
|
<th>物料编码</th>
|
||||||
<th>物料名称</th>
|
<th>物料名称</th>
|
||||||
<th>规格</th>
|
<th>工单状态</th>
|
||||||
<th>客户</th>
|
<th>开工人</th>
|
||||||
<th>计划出库量</th>
|
<th>创建者</th>
|
||||||
<th>实际出库量</th>
|
<th>计划量</th>
|
||||||
|
<th>实际量</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.checked}">
|
<tr v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{'checked': e.workorder_code === pkId}">
|
||||||
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}" @tap="toCheck(e)"></span></td>
|
<td>{{e.workorder_code}}</td>
|
||||||
<td>{{e.device_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td @tap="toJump(e)">{{e.device_name}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.status_name}}</td>
|
<td>{{e.workorder_status}}</td>
|
||||||
<td>{{e.plan_start_date}}</td>
|
<td>{{e.operator}}</td>
|
||||||
<td></td>
|
<td>{{e.create_name}}</td>
|
||||||
<td></td>
|
<td><input type="number" class="sin_input" v-model="e.plan_qty"></td>
|
||||||
<td><input type="number" class="sin_input"></td>
|
<td>{{e.real_qty}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<view class="submit-bar">
|
||||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="toSure1">开工</button>
|
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toSure1">开工</button>
|
||||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="toSure1">完工</button>
|
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="toSure2">完工</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {coolIOQuery, confirmInstor, statusList} from '@/utils/getData2.js'
|
import {manualSortingOrders, manualSortingProductionScheduling, manualSortingProductionComplete} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -52,56 +52,68 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
checkArr: [],
|
pkId: '',
|
||||||
disabled: false
|
pkObj: {},
|
||||||
|
disabled1: false,
|
||||||
|
disabled2: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
this._manualSortingOrders()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 下拉框查询 */
|
|
||||||
async _statusList () {
|
|
||||||
let res = await statusList()
|
|
||||||
this.options = [...res.data]
|
|
||||||
},
|
|
||||||
/** grid查询 */
|
/** grid查询 */
|
||||||
async _empOutgetIvt (e) {
|
async _manualSortingOrders () {
|
||||||
let res = await empOutgetIvt(e)
|
let res = await manualSortingOrders()
|
||||||
res.data.map(el => {
|
this.dataList = [...res]
|
||||||
this.$set(el, 'checked', false)
|
|
||||||
})
|
|
||||||
this.dataList = [...res.data]
|
|
||||||
},
|
},
|
||||||
/** 确认 */
|
toCheck (e) {
|
||||||
async _confirmInstor () {
|
this.pkId = this.pkId === e.workorder_code ? '' : e.workorder_code
|
||||||
this.disabled = true
|
this.pkObj = this.pkId === e.workorder_code ? e : {}
|
||||||
if (!this.val1 || !this.pkId || !this.index) {
|
},
|
||||||
this.disabled = false
|
/** 开工 */
|
||||||
|
async toSure1 () {
|
||||||
|
this.disabled1 = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await confirmInstor(this.pkObj, this.val1, this.index)
|
let userName = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
|
||||||
this.disabled = false
|
let res = await manualSortingProductionScheduling(this.pkId, userName)
|
||||||
|
this.disabled1 = false
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this.pkObj = {}
|
this.pkObj = {}
|
||||||
this.searchList()
|
this._manualSortingOrders()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toCheck (e) {
|
/** 完工 */
|
||||||
e.checked = !e.checked
|
async toSure2 () {
|
||||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
this.disabled2 = true
|
||||||
},
|
if (!this.pkId) {
|
||||||
toJump (e) {
|
this.disabled2 = false
|
||||||
this.$store.dispatch('setPublicObj', e)
|
return
|
||||||
uni.navigateTo({
|
}
|
||||||
url: '/pages/warehouse/WarehouseReceiptDetails'
|
try {
|
||||||
})
|
let userName = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
|
||||||
|
let res = await manualSortingProductionComplete(this.pkId, userName)
|
||||||
|
this.disabled2 = false
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this._manualSortingOrders()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled2 = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user