清洗上料下料
This commit is contained in:
@@ -301,3 +301,53 @@ export const letterDeviceList = (id) => post('api/device/list', {
|
|||||||
export const letterCallVechile = (id) => post('api/pda/callVechile', {
|
export const letterCallVechile = (id) => post('api/pda/callVechile', {
|
||||||
device_code: id
|
device_code: id
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清洗上料
|
||||||
|
*/
|
||||||
|
// 1.1车间列表
|
||||||
|
export const dictAll = () => post('api/dict/all', {})
|
||||||
|
// 1.1规格列表
|
||||||
|
export const washSpecList = () => post('api/pda/wash/specList', {})
|
||||||
|
// 1.2查询列表
|
||||||
|
export const washQuery = (area, id) => post('api/pda/wash/query', {
|
||||||
|
product_area: area,
|
||||||
|
material_id: id
|
||||||
|
})
|
||||||
|
// 1.3确认上料
|
||||||
|
export const washSubmitWash = (arr) => post('api/pda/wash/submitWash', arr)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清洗下料
|
||||||
|
*/
|
||||||
|
// 1.1查询列表
|
||||||
|
// export const washWashTasks = (area) => post('api/pda/wash/washTasks', {
|
||||||
|
// product_area: area
|
||||||
|
// })
|
||||||
|
export const washWashTasks = (area) => {
|
||||||
|
let res = {
|
||||||
|
code: 200,
|
||||||
|
content: [{task_id: '1', sep_on: '1'}, {task_id: '2', sep_on: '2'}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
// 1.2获取信息
|
||||||
|
export const washWashVechileInfo = (area) => post('api/pda/wash/washVechileInfo', {
|
||||||
|
product_area: area
|
||||||
|
})
|
||||||
|
// 1.2确认下料
|
||||||
|
export const washWashFinish = (id) => post('api/pda/wash/washFinish', {
|
||||||
|
task_id: id
|
||||||
|
})
|
||||||
|
// 1.3强制完成
|
||||||
|
export const washWashTaskFinish = (id) => post('api/pda/wash/washTaskFinish', {
|
||||||
|
task_id: id
|
||||||
|
})
|
||||||
|
// 1.4强制下料
|
||||||
|
export const washWashQzFinish = (id, wegiht, code) => post('api/pda/wash/washQzFinish', {
|
||||||
|
task_id: id,
|
||||||
|
wegiht: wegiht,
|
||||||
|
vechile_code: code
|
||||||
|
})
|
||||||
|
// 1.5呼叫空框
|
||||||
|
export const bcpInCallVehicle = () => post('api/pda/bcp/in/callVehicle', {})
|
||||||
|
|||||||
@@ -18,22 +18,22 @@
|
|||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-label">下料重量</div>
|
<div class="search-label">下料重量</div>
|
||||||
<div class="filter_input_wraper">
|
<div class="filter_input_wraper">
|
||||||
<input type="number" class="filter-input">
|
<input type="number" class="filter-input" v-model="weight">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-label">料框条码</div>
|
<div class="search-label">料框条码</div>
|
||||||
<div class="filter_input_wraper">
|
<div class="filter_input_wraper">
|
||||||
<input type="text" class="filter-input">
|
<input type="text" class="filter-input" v-model="vechile_code">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item_3">
|
<div class="search-item_3">
|
||||||
<button class="button button--primary" @click="searchMater">查询</button>
|
<button class="button button--primary" @click="_washWashTasks">查询</button>
|
||||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">获取信息</button>
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === ''}" @click="_washWashVechileInfo">获取信息</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">确认下料</button>
|
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="_washWashFinish('1')">确认下料</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">强制完成</button>
|
<button class="button button--primary" :disabled="disabled3" :class="{'button--defalut': pkId === ''}" @click="_washWashTaskFinish('2')">强制完成</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">呼叫空框</button>
|
<button class="button button--primary" :disabled="disabled5" @click="_bcpInCallVehicle">呼叫空框</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">强制下料</button>
|
<button class="button button--primary" :disabled="disabled4" :class="{'button--defalut': pkId === ''}" @click="_washWashQzFinish('3')">强制下料</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,124 +49,217 @@
|
|||||||
<th>上料重量(kg)</th>
|
<th>上料重量(kg)</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 in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
|
<tr v-for="e in dataList" :key="e.task_id" :class="{'selected_icon': pkId === e.task_id}" @click="toRadio(e)">
|
||||||
<td>{{ e.sect_name }}</td>
|
<td>{{ e.sep_on }}</td>
|
||||||
<td>{{e.struct_name}}</td>
|
<td>{{ e.create_time }}</td>
|
||||||
|
<td>{{e.task_id}}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
<td>{{e.material_qty | numeric(3)}}</td>
|
||||||
<td>{{ e.qty | numeric(3) }}</td>
|
<td></td>
|
||||||
<td>{{ e.storagevehicle_code }}</td>
|
<td></td>
|
||||||
|
<td>{{ e.material_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<jxDialog
|
||||||
|
ref="child"
|
||||||
|
title="提示"
|
||||||
|
:type="type"
|
||||||
|
@toSure="toSureDialog"
|
||||||
|
@toCancle="toCancle"
|
||||||
|
>
|
||||||
|
<div class="form_wraper">当前任务号不是第一个任务是否确认下料?</div>
|
||||||
|
</jxDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {accMul} from '@config/utils.js'
|
import jxDialog from '@components/dialog.vue'
|
||||||
import {checkGetBcpStor, checkCreate} from '@config/getData2.js'
|
import {dictAll, washWashTasks, washWashVechileInfo, washWashFinish, washWashTaskFinish, washWashQzFinish, bcpInCallVehicle} from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'semifinishedcheck',
|
components: {
|
||||||
|
jxDialog
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [],
|
||||||
value1: '',
|
value1: '',
|
||||||
options2: [{device_code: '32', device_name: '临时盘点'}],
|
weight: '',
|
||||||
value2: '32',
|
vechile_code: '',
|
||||||
remark: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
|
sep_on: '',
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
disabled1: false
|
type: '',
|
||||||
}
|
disabled1: false,
|
||||||
},
|
disabled2: false,
|
||||||
beforeRouteLeave (to, from, next) {
|
disabled3: false,
|
||||||
if (to.path === '/home' || to.path === '/login') {
|
disabled4: false,
|
||||||
this.$store.dispatch('setKeepAlive', [])
|
disabled5: false
|
||||||
}
|
|
||||||
next()
|
|
||||||
},
|
|
||||||
activated () {
|
|
||||||
if (this.$store.getters.materArr.length > 0) {
|
|
||||||
let arr = this.$store.getters.materArr
|
|
||||||
this.removeRepeat(this.dataList, arr)
|
|
||||||
this.dataList = [...this.dataList, ...arr]
|
|
||||||
this.dataList.map(el => {
|
|
||||||
let res = accMul(el.canuse_qty, el.unit_weight)
|
|
||||||
this.$set(el, 'base_qty', res)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._checkGetBcpStor()
|
this._dictAll()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 数组去重
|
// 车间下拉框
|
||||||
removeRepeat (arr1, arr2) {
|
async _dictAll () {
|
||||||
for (let i = 0; i < arr1.length; i++) {
|
let res = await dictAll()
|
||||||
for (let j = 0; j < arr2.length; j++) {
|
if (res.code === 200) {
|
||||||
if (arr1[i].struct_name === arr2[j].struct_name) {
|
this.options1 = [...res.content]
|
||||||
arr2.splice(j, 1)
|
|
||||||
j--
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// grid
|
||||||
|
async _washWashTasks () {
|
||||||
|
let res = await washWashTasks(this.value1)
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this.dataList = [...res.content]
|
||||||
|
if (this.dataList.length > 0) {
|
||||||
|
this.sep_on = this.dataList[0].sep_on
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 仓库下拉框
|
toRadio (e) {
|
||||||
async _checkGetBcpStor () {
|
this.pkId = this.pkId === e.task_id ? '' : e.task_id
|
||||||
let res = await checkGetBcpStor()
|
this.pkObj = this.pkId === e.task_id ? e : {}
|
||||||
this.options1 = [...res.data]
|
|
||||||
},
|
},
|
||||||
// 生产盘点单
|
// 获取信息
|
||||||
async _checkCreate () {
|
async _washWashVechileInfo () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.value1 === '' || this.dataList.length === 0) {
|
if (this.value1 === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let from = {
|
let res = await washWashVechileInfo(this.value1)
|
||||||
stor_id: this.value1,
|
if (res.code === 200) {
|
||||||
check_type: '32',
|
if (res.content.length > 0) {
|
||||||
remark: this.remark,
|
this.weight = res.content[0].weight
|
||||||
rows: this.dataList
|
this.vechile_code = res.content[0].vechile_code
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let res = await checkCreate(from)
|
|
||||||
this.toast(res.message)
|
|
||||||
this.valu1 = ''
|
|
||||||
this.remark = ''
|
|
||||||
this.$store.dispatch('setMaterArr', [])
|
|
||||||
this.dataList = []
|
|
||||||
|
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchMater () {
|
// 确认下料
|
||||||
this.$store.dispatch('setMaterArr', [])
|
async _washWashFinish (type) {
|
||||||
this.$router.push('/structmatersearch')
|
this.disabled2 = true
|
||||||
},
|
if (this.pkId === '') {
|
||||||
toJumpSearch () {
|
this.disabled2 = false
|
||||||
this.$router.push('/semifinishedchecksearch')
|
|
||||||
},
|
|
||||||
toRadio (e) {
|
|
||||||
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
|
|
||||||
this.pkObj = this.pkId === e.struct_name ? e : {}
|
|
||||||
},
|
|
||||||
delRow () {
|
|
||||||
if (!this.pkId) {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.dataList = this.dataList.filter(el => el.struct_name !== this.pkId)
|
if (this.pkObj.sep_on !== this.sep_on) {
|
||||||
this.$store.dispatch('setMaterArr', this.dataList)
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.__washWashFinish()
|
||||||
|
},
|
||||||
|
async __washWashFinish () {
|
||||||
|
try {
|
||||||
|
let res = await washWashFinish(this.pkId)
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.toast(res.msg)
|
||||||
|
this._washWashTasks()
|
||||||
|
}
|
||||||
|
this.disabled2 = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled2 = false
|
||||||
|
this.$refs.child.active = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 强制完成
|
||||||
|
async _washWashTaskFinish (type) {
|
||||||
|
this.disabled3 = true
|
||||||
|
if (this.pkId === '') {
|
||||||
|
this.disabled3 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.pkObj.sep_on !== this.sep_on) {
|
||||||
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.__washWashTaskFinish()
|
||||||
|
},
|
||||||
|
async __washWashTaskFinish () {
|
||||||
|
try {
|
||||||
|
let res = await washWashTaskFinish(this.pkId)
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.toast(res.msg)
|
||||||
|
this._washWashTasks()
|
||||||
|
}
|
||||||
|
this.disabled3 = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled3 = false
|
||||||
|
this.$refs.child.active = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 强制下料
|
||||||
|
async _washWashQzFinish (type) {
|
||||||
|
this.disabled4 = true
|
||||||
|
if (this.pkId === '') {
|
||||||
|
this.disabled4 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.pkObj.sep_on !== this.sep_on) {
|
||||||
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.__washWashQzFinish()
|
||||||
|
},
|
||||||
|
async __washWashQzFinish () {
|
||||||
|
try {
|
||||||
|
let res = await washWashQzFinish(this.pkId, this.weight, this.vechile_code)
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.toast(res.msg)
|
||||||
|
this._washWashTasks()
|
||||||
|
}
|
||||||
|
this.disabled4 = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled4 = false
|
||||||
|
this.$refs.child.active = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toSureDialog (type) {
|
||||||
|
switch (type) {
|
||||||
|
case '1':
|
||||||
|
this.__washWashFinish()
|
||||||
|
break
|
||||||
|
case '2':
|
||||||
|
this.__washWashTaskFinish()
|
||||||
|
break
|
||||||
|
case '3':
|
||||||
|
this.__washWashQzFinish()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.disabled2 = false
|
||||||
|
this.disabled3 = false
|
||||||
|
this.disabled4 = false
|
||||||
|
},
|
||||||
|
async _bcpInCallVehicle () {
|
||||||
|
this.disabled5 = true
|
||||||
|
try {
|
||||||
|
let res = await bcpInCallVehicle()
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.toast(res.msg)
|
||||||
|
}
|
||||||
|
this.disabled5 = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled5 = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options1"
|
v-for="item in options1"
|
||||||
:key="item.stor_id"
|
:key="item.value"
|
||||||
:label="item.stor_name"
|
:label="item.label"
|
||||||
:value="item.stor_id">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,13 +18,20 @@
|
|||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-label">规格</div>
|
<div class="search-label">规格</div>
|
||||||
<div class="filter_input_wraper">
|
<div class="filter_input_wraper">
|
||||||
<input type="text" class="filter-input">
|
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item flexend">
|
<div class="search-item flexend">
|
||||||
<button class="button button--primary" @click="searchMater">查询</button>
|
<button class="button button--primary" @click="_washQuery">查询</button>
|
||||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">确认上料</button>
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': checkArr.length === 0}" @click="_washSubmitWash">确认上料</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">人工倒料</button>
|
<button class="button button--primary" @click="toJump">人工倒料</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,14 +49,16 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="e in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
|
<tr v-for="(e, i) in dataList" :key="i" @click="toRadio(e)">
|
||||||
<td>{{ e.sect_name }}</td>
|
<td>
|
||||||
<td>{{e.struct_name}}</td>
|
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
|
||||||
|
</td>
|
||||||
|
<td>{{ e.device_code }}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
<td>{{e.deviceinstor_qty | numeric(3)}}</td>
|
||||||
<td>{{ e.qty | numeric(3) }}</td>
|
<td>{{ e.deviceinstor_weight | numeric(3) }}</td>
|
||||||
<td>{{ e.storagevehicle_code }}</td>
|
<td>{{ e.task_code }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -58,103 +67,78 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {accMul} from '@config/utils.js'
|
import {dictAll, washSpecList, washQuery, washSubmitWash} from '@config/getData2.js'
|
||||||
import {checkGetBcpStor, checkCreate} from '@config/getData2.js'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'semifinishedcheck',
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [],
|
||||||
value1: '',
|
value1: '',
|
||||||
options2: [{device_code: '32', device_name: '临时盘点'}],
|
options2: [],
|
||||||
value2: '32',
|
value2: '',
|
||||||
remark: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
checkArr: [],
|
||||||
pkObj: {},
|
|
||||||
disabled1: false
|
disabled1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteLeave (to, from, next) {
|
|
||||||
if (to.path === '/home' || to.path === '/login') {
|
|
||||||
this.$store.dispatch('setKeepAlive', [])
|
|
||||||
}
|
|
||||||
next()
|
|
||||||
},
|
|
||||||
activated () {
|
|
||||||
if (this.$store.getters.materArr.length > 0) {
|
|
||||||
let arr = this.$store.getters.materArr
|
|
||||||
this.removeRepeat(this.dataList, arr)
|
|
||||||
this.dataList = [...this.dataList, ...arr]
|
|
||||||
this.dataList.map(el => {
|
|
||||||
let res = accMul(el.canuse_qty, el.unit_weight)
|
|
||||||
this.$set(el, 'base_qty', res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created () {
|
created () {
|
||||||
this._checkGetBcpStor()
|
this._dictAll()
|
||||||
|
this._washSpecList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 数组去重
|
// 车间下拉框
|
||||||
removeRepeat (arr1, arr2) {
|
async _dictAll () {
|
||||||
for (let i = 0; i < arr1.length; i++) {
|
let res = await dictAll()
|
||||||
for (let j = 0; j < arr2.length; j++) {
|
if (res.code === 200) {
|
||||||
if (arr1[i].struct_name === arr2[j].struct_name) {
|
this.options1 = [...res.content]
|
||||||
arr2.splice(j, 1)
|
|
||||||
j--
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 仓库下拉框
|
// 规格下拉框
|
||||||
async _checkGetBcpStor () {
|
async _washSpecList () {
|
||||||
let res = await checkGetBcpStor()
|
let res = await washSpecList()
|
||||||
this.options1 = [...res.data]
|
if (res.code === 200) {
|
||||||
|
this.options2 = [...res.content]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 生产盘点单
|
// grid
|
||||||
async _checkCreate () {
|
async _washQuery () {
|
||||||
|
let res = await washQuery(this.value1, this.value2)
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.content.map(el => {
|
||||||
|
this.$set(el, 'checked', false)
|
||||||
|
})
|
||||||
|
this.dataList = [...res.content]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 确认上料
|
||||||
|
async _washSubmitWash () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.value1 === '' || this.dataList.length === 0) {
|
if (this.checkArr.length === 0) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let from = {
|
let arr = []
|
||||||
stor_id: this.value1,
|
this.checkArr.map(el => {
|
||||||
check_type: '32',
|
arr.push(el.device_code)
|
||||||
remark: this.remark,
|
})
|
||||||
rows: this.dataList
|
let res = await washSubmitWash(arr)
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.toast(res.msg)
|
||||||
|
this.value1 = ''
|
||||||
|
this.value2 = ''
|
||||||
|
this._washQuery()
|
||||||
}
|
}
|
||||||
let res = await checkCreate(from)
|
|
||||||
this.toast(res.message)
|
|
||||||
this.valu1 = ''
|
|
||||||
this.remark = ''
|
|
||||||
this.$store.dispatch('setMaterArr', [])
|
|
||||||
this.dataList = []
|
|
||||||
|
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchMater () {
|
toJump () {
|
||||||
this.$store.dispatch('setMaterArr', [])
|
|
||||||
this.$router.push('/structmatersearch')
|
|
||||||
},
|
|
||||||
toJumpSearch () {
|
|
||||||
this.$router.push('/semifinishedchecksearch')
|
this.$router.push('/semifinishedchecksearch')
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
|
e.checked = !e.checked
|
||||||
this.pkObj = this.pkId === e.struct_name ? e : {}
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||||
},
|
|
||||||
delRow () {
|
|
||||||
if (!this.pkId) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.dataList = this.dataList.filter(el => el.struct_name !== this.pkId)
|
|
||||||
this.$store.dispatch('setMaterArr', this.dataList)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let res = await checkCreate(from)
|
let res = await checkCreate(from)
|
||||||
this.toast(res.message)
|
this.toast(res.message)
|
||||||
this.valu1 = ''
|
this.value1 = ''
|
||||||
this.remark = ''
|
this.remark = ''
|
||||||
this.$store.dispatch('setMaterArr', [])
|
this.$store.dispatch('setMaterArr', [])
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
|
|||||||
Reference in New Issue
Block a user