no message
This commit is contained in:
@@ -1,205 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="托盘点位绑定"></nav-bar>
|
||||
<section class="content mgt186 mgb110">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="托盘条码"
|
||||
v-model="val1"
|
||||
:seaShow="false"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">当前区域</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option1"
|
||||
:active="active1"
|
||||
:open="open1"
|
||||
@toggleItem="toggleItem1"
|
||||
@dropdownMenu="dropdownMenu1">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">当前点位</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option2"
|
||||
:active="active2"
|
||||
:open="open2"
|
||||
@toggleItem="toggleItem2"
|
||||
@dropdownMenu="dropdownMenu2">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">点位状态</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option3"
|
||||
:active="active3"
|
||||
:open="open3"
|
||||
@toggleItem="toggleItem3"
|
||||
@dropdownMenu="dropdownMenu3">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">是否锁定</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option4"
|
||||
:active="active4"
|
||||
:open="open4"
|
||||
@toggleItem="toggleItem4"
|
||||
@dropdownMenu="dropdownMenu4">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : active2 === ''}" :disabled="disabled1" @click="_bindingConfirm">确定</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {queryArea1, queryPointByArea1, bindingConfirm} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'BindPalletPoint',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
option1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
option2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
option3: [{value: '00', label: '空位'}, {value: '01', label: '空托盘'}, {value: '02', label: '有箱有料'}],
|
||||
active3: '1',
|
||||
open3: false,
|
||||
option4: [{value: '1', label: '是'}, {value: '2', label: '否'}],
|
||||
active4: '1',
|
||||
open4: false,
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._queryArea1()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _queryArea1 () {
|
||||
let res = await queryArea1()
|
||||
if (res.code === '1') {
|
||||
this.option1 = [...res.result]
|
||||
this.option1.map(el => {
|
||||
this.$set(el, 'value', el.area_code)
|
||||
this.$set(el, 'label', el.area_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _queryPointByArea1 (code) {
|
||||
let res = await queryPointByArea1(code)
|
||||
if (res.code === '1') {
|
||||
this.option2 = [...res.result]
|
||||
this.option2.map(el => {
|
||||
this.$set(el, 'value', el.point_id)
|
||||
this.$set(el, 'label', el.point_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _bindingConfirm () {
|
||||
this.disabled1 = true
|
||||
if (this.active2 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await bindingConfirm(this.option2[this.active2].point_code, this.val1, this.option3[this.active3].value, this.option4[this.active4].value)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this.toCancle()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
/** 取消 */
|
||||
toCancle () {
|
||||
this.val1 = ''
|
||||
this.active1 = ''
|
||||
this.active2 = ''
|
||||
this.active3 = '1'
|
||||
this.active4 = '1'
|
||||
this.disabled1 = false
|
||||
},
|
||||
toggleItem1 () {
|
||||
if (!this.open1) {
|
||||
this.open1 = true
|
||||
} else {
|
||||
this.open1 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu1 (i) {
|
||||
this.active1 = i + ''
|
||||
this.open1 = false
|
||||
this._queryPointByArea1(this.option1[this.active1].area_code)
|
||||
this.active2 = ''
|
||||
},
|
||||
toggleItem2 () {
|
||||
if (!this.open2) {
|
||||
this.open2 = true
|
||||
} else {
|
||||
this.open2 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu2 (i) {
|
||||
this.active2 = i + ''
|
||||
this.open2 = false
|
||||
},
|
||||
toggleItem3 () {
|
||||
if (!this.open3) {
|
||||
this.open3 = true
|
||||
} else {
|
||||
this.open3 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu3 (i) {
|
||||
this.active3 = i + ''
|
||||
this.open3 = false
|
||||
},
|
||||
toggleItem4 () {
|
||||
if (!this.open4) {
|
||||
this.open4 = true
|
||||
} else {
|
||||
this.open4 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu4 (i) {
|
||||
this.active4 = i + ''
|
||||
this.open4 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,293 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="盘点管理"></nav-bar>
|
||||
<section class="content mgt186 mgb110" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<div class="filter-wraper">
|
||||
<div class="filter-wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">库区</div>
|
||||
<div class="fxcol mgl20 visible">
|
||||
<dropdown-menu
|
||||
:option="option1"
|
||||
:active="active1"
|
||||
:open="open1"
|
||||
@toggleItem="toggleItem1"
|
||||
@dropdownMenu="dropdownMenu1">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">仓位</div>
|
||||
<div class="fxcol mgl20 visible">
|
||||
<dropdown-menu
|
||||
:option="option2"
|
||||
:active="active2"
|
||||
:open="open2"
|
||||
@toggleItem="toggleItem2"
|
||||
@dropdownMenu="dropdownMenu2">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th><button class="iconfont check_icon check_icon--squa" :class="{'check_icon--checked': allcheckActive}" @click="allCheck"></button></th>
|
||||
<th>仓位号</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.billdtl_uuid" @click="toCheck(e)">
|
||||
<td><button class="iconfont check_icon check_icon--squa" :class="{'check_icon--checked': e.checked}"></button></td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>载具号</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>库存数量</th>
|
||||
<th>盘点数量</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.billdtl_uuid">
|
||||
<td><input type="text" class="sin_input" v-model="e.vehicle_code"></td>
|
||||
<td><div v-show="e.material_code !== '' && e.material_code !== undefined" class="click_div" @click="searchMater(e)">{{e.material_code}}</div></td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.canuse_qty}}</td>
|
||||
<td><input type="number" class="sin_input" v-model="e.check_qty"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-tips">{{desc}}</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" @click="_queryIvt">查询</button>
|
||||
<button class="btn submit-button" :class="{'btn-disabled': checkArr.length === 0}" :disabled="disabled1" @click="_checkConfirm">确定</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {querySectCode, queryStructCode, queryIvt, checkConfirm} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'CheckManage',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
option2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
dataList: [],
|
||||
checkArr: [],
|
||||
allcheckActive: false,
|
||||
page: 1,
|
||||
size: '10',
|
||||
busy: false,
|
||||
desc: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (this.$route.query.uuid) {
|
||||
this.dataList.map(el => {
|
||||
if (el.billdtl_uuid === this.$route.query.uuid) {
|
||||
el.material_code = this.$store.getters.receiveMaterObj.material_code
|
||||
el.material_name = this.$store.getters.receiveMaterObj.material_name
|
||||
el.material_uuid = this.$store.getters.receiveMaterObj.material_uuid
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._querySectCode()
|
||||
},
|
||||
methods: {
|
||||
/** 查询库区 */
|
||||
async _querySectCode () {
|
||||
let res = await querySectCode()
|
||||
if (res.code === '1') {
|
||||
this.option1 = [...res.result]
|
||||
this.option1.map(el => {
|
||||
this.$set(el, 'value', el.sect_uuid)
|
||||
this.$set(el, 'label', el.sect_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询仓位 */
|
||||
async _queryStructCode (uuid) {
|
||||
let res = await queryStructCode(uuid)
|
||||
if (res.code === '1') {
|
||||
this.option2 = [...res.result]
|
||||
this.option2.map(el => {
|
||||
this.$set(el, 'value', el.struct_uuid)
|
||||
this.$set(el, 'label', el.struct_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** grid */
|
||||
async _queryIvt () {
|
||||
this.page = 1
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
let uuid1 = ''
|
||||
let uuid2 = ''
|
||||
if (this.active1) {
|
||||
uuid1 = this.option1[this.active1].sect_uuid
|
||||
}
|
||||
if (this.active2) {
|
||||
uuid2 = this.option2[this.active2].struct_uuid
|
||||
}
|
||||
let res = await queryIvt(uuid1, uuid2, this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
res.result.content.map(el => {
|
||||
el.check_qty = Number(el.canuse_qty).toFixed(3) + ''
|
||||
el.check_qty = Number(el.check_qty).toFixed(3) + ''
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res.result.content]
|
||||
if (res.result.content.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
let uuid1 = ''
|
||||
let uuid2 = ''
|
||||
if (this.active1) {
|
||||
uuid1 = this.option1[this.active1].sect_uuid
|
||||
}
|
||||
if (this.active2) {
|
||||
uuid2 = this.option2[this.active2].struct_uuid
|
||||
}
|
||||
let res = await queryIvt(uuid1, uuid2, this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
res.result.content.map(el => {
|
||||
el.check_qty = Number(el.canuse_qty).toFixed(3) + ''
|
||||
el.check_qty = Number(el.check_qty).toFixed(3) + ''
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...this.dataList, ...res.result.content]
|
||||
if (res.result.content.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
} else {
|
||||
this.busy = false
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
/** 修改物料编码 */
|
||||
searchMater (e) {
|
||||
this.$router.push({
|
||||
path: '/SearchMater',
|
||||
query: {uuid: e.billdtl_uuid}
|
||||
})
|
||||
},
|
||||
/** 确定 */
|
||||
async _checkConfirm () {
|
||||
this.disabled1 = true
|
||||
if (!this.checkArr.length) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirm(this.checkArr)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this._queryIvt()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toCancle () {
|
||||
this.active1 = ''
|
||||
this.active2 = ''
|
||||
this.dataList = []
|
||||
this.checkArr = []
|
||||
this.allcheckActive = false
|
||||
this.page = 1
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
this.disabled1 = false
|
||||
this.$store.dispatch('receiveMaterObj', {})
|
||||
},
|
||||
toggleItem1 () {
|
||||
if (!this.open1) {
|
||||
this.open1 = true
|
||||
} else {
|
||||
this.open1 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu1 (i) {
|
||||
this.active1 = i + ''
|
||||
this.open1 = false
|
||||
this.active2 = ''
|
||||
this._queryStructCode(this.option1[this.active1].sect_uuid)
|
||||
},
|
||||
toggleItem2 () {
|
||||
if (!this.open2) {
|
||||
this.open2 = true
|
||||
} else {
|
||||
this.open2 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu2 (i) {
|
||||
this.active2 = i + ''
|
||||
this.open2 = false
|
||||
},
|
||||
allCheck () {
|
||||
this.allcheckActive = this.checkArr.length !== this.dataList.length
|
||||
this.dataList.map(el => { el.checked = this.allcheckActive })
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
this.allcheckActive = this.checkArr.length === this.dataList.length
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
>>>.content
|
||||
height calc(100% - 1.96rem)
|
||||
overflow-y auto
|
||||
</style>
|
||||
@@ -1,185 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="入窑输送线规则"></nav-bar>
|
||||
<section class="content mgt15 mgb110">
|
||||
<div class="filter-wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">规则模式</div>
|
||||
<div class="fxcol mgl20 visible">
|
||||
<dropdown-menu
|
||||
:option="option1"
|
||||
:active="active1"
|
||||
:open="open1"
|
||||
@toggleItem="toggleItem1"
|
||||
@dropdownMenu="dropdownMenu1">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">是否启用</div>
|
||||
<div class="fxcol mgl20 visible">
|
||||
<dropdown-menu
|
||||
:option="option2"
|
||||
:active="active2"
|
||||
:open="open2"
|
||||
@toggleItem="toggleItem2"
|
||||
@dropdownMenu="dropdownMenu2">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>输送线编码</th>
|
||||
<th>输送线名称</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<draggable element="tbody" v-model="dataList" @start="onStart" @end="onEnd">
|
||||
<tr v-for="e in dataList" :key="e.disrule_id">
|
||||
<td>{{e.cacheline_code}}</td>
|
||||
<td>{{e.cacheline_name}}</td>
|
||||
<td><input type="text" class="sin_input" v-model="e.material_code" @click="searchMater(e)"></td>
|
||||
<td>{{e.material_name}}</td>
|
||||
</tr>
|
||||
</draggable>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn btn-disabled submit-button" :class="{'btn-disabled': active1 === '' || active2 === '' || dataList.length === 0}" :disabled="disabled" @click="toSure">确定</button>
|
||||
<button class="btn btn-disabled submit-button bgred" @click="cancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import draggable from 'vuedraggable'
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {queryInfo, ruleSettingConfirm} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'ConveyorLine',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu,
|
||||
draggable
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [{value: '1', label: '入'}, {value: '2', label: '出'}],
|
||||
active1: '0',
|
||||
open1: false,
|
||||
option2: [{value: '1', label: '启用'}, {value: '0', label: '停用'}],
|
||||
active2: '',
|
||||
open2: false,
|
||||
drag: false,
|
||||
dataList: [],
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (JSON.stringify(this.$store.getters.receiveMaterObj) !== '{}') {
|
||||
this.dataList.map(el => {
|
||||
if (el.disrule_id === this.$route.query.id) {
|
||||
el.material_code = this.$store.getters.receiveMaterObj.material_code
|
||||
el.material_name = this.$store.getters.receiveMaterObj.material_name
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this._queryInfo()
|
||||
},
|
||||
methods: {
|
||||
onStart () {
|
||||
this.drag = true
|
||||
},
|
||||
onEnd () {
|
||||
this.drag = false
|
||||
},
|
||||
toggleItem1 () {
|
||||
if (!this.open1) {
|
||||
this.open1 = true
|
||||
} else {
|
||||
this.open1 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu1 (i) {
|
||||
this.active1 = i + ''
|
||||
this.open1 = false
|
||||
this._queryInfo()
|
||||
},
|
||||
toggleItem2 () {
|
||||
if (!this.open2) {
|
||||
this.open2 = true
|
||||
} else {
|
||||
this.open2 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu2 (i) {
|
||||
this.active2 = i + ''
|
||||
this.open2 = false
|
||||
},
|
||||
async _queryInfo () {
|
||||
if (!this.active1) {
|
||||
return
|
||||
}
|
||||
let res = await queryInfo(this.option1[this.active1].value)
|
||||
if (res.code === '1') {
|
||||
this.option2.map((el, i) => {
|
||||
if (el.value === res.result.is_used) {
|
||||
this.active2 = i + ''
|
||||
}
|
||||
})
|
||||
this.dataList = [...res.result.JSONArray]
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (this.active1 === 0 || this.active2 === 0 || this.dataList.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await ruleSettingConfirm(this.option1[this.active1].value, this.option2[this.active2].value, this.dataList)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this._queryInfo()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (err) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
cancle () {
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
this._queryInfo()
|
||||
},
|
||||
searchMater (e) {
|
||||
this.$router.push({
|
||||
path: '/SearchMater',
|
||||
query: {url: 'ConveyorLine', id: e.disrule_id}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
</style>
|
||||
@@ -1,126 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar :inner="true" title="物料查询"></nav-bar>
|
||||
<section class="content mgt15 mgb110" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.material_uuid" @click="toCheck(e)" :class="{'checked': e.material_uuid === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<th>规格</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.material_uuid" @click="toCheck(e)" :class="{'checked': e.material_uuid === pkId}">
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-tips">{{desc}}</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': pkId === ''}" @click="toSure">确认</button>
|
||||
<button class="btn submit-button" @click="$router.back()">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {queryMaterial} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'SearchMater',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
page: 1,
|
||||
size: '10',
|
||||
busy: false,
|
||||
desc: '',
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._queryMaterial()
|
||||
},
|
||||
methods: {
|
||||
async _queryMaterial () {
|
||||
this.page = 1
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
let res = await queryMaterial(this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.dataList = [...res.result.content]
|
||||
if (res.result.content.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
let res = await queryMaterial(this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...this.dataList, ...res.result.content]
|
||||
if (res.result.content.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
} else {
|
||||
this.busy = false
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId !== e.material_uuid ? e.material_uuid : ''
|
||||
this.pkObj = this.pkId === e.material_uuid ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
this.$store.dispatch('receiveMaterObj', this.pkObj)
|
||||
if (this.$route.query.url === 'ConveyorLine') {
|
||||
this.$router.push({
|
||||
path: '/ConveyorLine',
|
||||
query: {id: this.$route.query.id}
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: 'CheckManage',
|
||||
query: {uuid: this.$route.query.uuid}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.left_fixed
|
||||
width 30%
|
||||
>>>.content
|
||||
height calc(100% - 2.11rem)
|
||||
overflow-y auto
|
||||
</style>
|
||||
Reference in New Issue
Block a user