输送线

This commit is contained in:
2022-07-22 09:26:01 +08:00
parent fb4f6608cb
commit 15c5eedb84
3 changed files with 16 additions and 16 deletions

View File

@@ -74,8 +74,7 @@ export const queryStructCode = (uuid) => post('api/pda/check/queryStructCode', {
export const queryInfo = (mode) => post('api/pda/ruleSetting/queryInfo', { export const queryInfo = (mode) => post('api/pda/ruleSetting/queryInfo', {
mode: mode mode: mode
}) })
export const ruleSettingConfirm = (obj, mode, is, JSONArray) => post('api/pda/ruleSetting/confirm', { export const ruleSettingConfirm = (mode, is, JSONArray) => post('api/pda/ruleSetting/confirm', {
data: obj,
mode: mode, mode: mode,
is_used: is, is_used: is,
JSONArray: JSONArray JSONArray: JSONArray

View File

@@ -16,17 +16,17 @@
<div class="con"> <div class="con">
<ul> <ul>
<li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li> <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li>
<li @click="goInner('/TaskManage')">任务管理</li> <!-- <li @click="goInner('/TaskManage')">任务管理</li>
<li @click="goInner('/ZlManage')">指令管理</li> <li @click="goInner('/ZlManage')">指令管理</li>
<li @click="goInner('/Password')">修改密码</li> <li @click="goInner('/Password')">修改密码</li>
<li @click="goInner('/SendMater')">送料</li> <li @click="goInner('/SendMater')">送料</li>
<li @click="goInner('/PressCallMater')">压制叫料</li> <li @click="goInner('/EquipCallMater')">设备叫料</li>
<li @click="goInner('/SendEmptyPallet')">送空托盘</li> <li @click="goInner('/SendEmptyPallet')">送空托盘</li>
<li @click="goInner('/CallEmptyPallet')">呼叫空托盘</li> <li @click="goInner('/CallEmptyPallet')">呼叫空托盘</li>
<li @click="goInner('/BindPalletPoint')">托盘点位绑定</li> <li @click="goInner('/BindPalletPoint')">托盘点位绑定</li>
<li @click="goInner('/CheckManage')">盘点管理</li> <li @click="goInner('/CheckManage')">盘点管理</li>
<li @click="goInner('/ConveyorLine')">入窑输送线规则</li> <li @click="goInner('/ConveyorLine')">入窑输送线规则</li>
<li @click="goInner('/BindMaterPoint')">托盘物料绑定</li> <li @click="goInner('/BindMaterPoint')">托盘物料绑定</li> -->
</ul> </ul>
</div> </div>
</section> </section>
@@ -53,7 +53,7 @@ export default {
methods: { methods: {
toPage (e) { toPage (e) {
let name = e.path.substr(2) let name = e.path.substr(2)
if (name === 'CheckManage') { if (name === 'CheckManage' || name === 'ConveyorLine') {
this.$store.dispatch('setKeepAlive', [name]) this.$store.dispatch('setKeepAlive', [name])
} }
this.$router.push(e.path.substr(2)) this.$router.push(e.path.substr(2))

View File

@@ -52,7 +52,6 @@
</div> </div>
</section> </section>
<section class="submit-bar"> <section class="submit-bar">
<button class="btn submit-button" :class="{'btn-disabled': active1 === ''}" @click="_queryInfo">查询</button>
<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" :class="{'btn-disabled': active1 === '' || active2 === '' || dataList.length === 0}" :disabled="disabled" @click="toSure">确定</button>
<button class="btn btn-disabled submit-button bgred" @click="cancle">取消</button> <button class="btn btn-disabled submit-button bgred" @click="cancle">取消</button>
</section> </section>
@@ -74,13 +73,12 @@ export default {
data () { data () {
return { return {
option1: [{value: '1', label: '入'}, {value: '2', label: '出'}], option1: [{value: '1', label: '入'}, {value: '2', label: '出'}],
active1: '', active1: '0',
open1: false, open1: false,
option2: [{value: '1', label: '启用'}, {value: '0', label: '停用'}], option2: [{value: '1', label: '启用'}, {value: '0', label: '停用'}],
active2: '', active2: '',
open2: false, open2: false,
drag: false, drag: false,
result: {},
dataList: [], dataList: [],
disabled: false disabled: false
} }
@@ -101,6 +99,9 @@ export default {
}) })
} }
}, },
mounted () {
this._queryInfo()
},
methods: { methods: {
onStart () { onStart () {
this.drag = true this.drag = true
@@ -118,6 +119,7 @@ export default {
dropdownMenu1 (i) { dropdownMenu1 (i) {
this.active1 = i + '' this.active1 = i + ''
this.open1 = false this.open1 = false
this._queryInfo()
}, },
toggleItem2 () { toggleItem2 () {
if (!this.open2) { if (!this.open2) {
@@ -136,13 +138,12 @@ export default {
} }
let res = await queryInfo(this.option1[this.active1].value) let res = await queryInfo(this.option1[this.active1].value)
if (res.code === '1') { if (res.code === '1') {
this.result = res.result
this.option2.map((el, i) => { this.option2.map((el, i) => {
if (el.value === res.is_used) { if (el.value === res.result.is_used) {
this.active2 = `i` this.active2 = i + ''
} }
}) })
this.dataList = [...res.JSONArray] this.dataList = [...res.result.JSONArray]
} else { } else {
this.Dialog(res.desc) this.Dialog(res.desc)
} }
@@ -154,7 +155,7 @@ export default {
return return
} }
try { try {
let res = await ruleSettingConfirm(this.result, this.option1[this.active1].value, this.option2[this.active2].value, this.dataList) let res = await ruleSettingConfirm(this.option1[this.active1].value, this.option2[this.active2].value, this.dataList)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
this._queryInfo() this._queryInfo()
@@ -167,8 +168,8 @@ export default {
} }
}, },
cancle () { cancle () {
console.log(this.dataList) Object.assign(this.$data, this.$options.data())
// Object.assign(this.$data, this.$options.data()) this._queryInfo()
}, },
searchMater (e) { searchMater (e) {
this.$router.push({ this.$router.push({