弹窗
This commit is contained in:
@@ -24,8 +24,9 @@ export const sendWork = (code) => post('api/pda/sendWork', {
|
|||||||
work_code: code
|
work_code: code
|
||||||
})
|
})
|
||||||
// 补发配料作业
|
// 补发配料作业
|
||||||
export const reSendWork = (code) => post('api/pda/reSendWork', {
|
export const reSendWork = (code, num) => post('api/pda/reSendWork', {
|
||||||
work_code: code
|
work_code: code,
|
||||||
|
require_num: num
|
||||||
})
|
})
|
||||||
// 完成配料作业
|
// 完成配料作业
|
||||||
export const finishWork = (code) => post('api/pda/finishWork', {
|
export const finishWork = (code) => post('api/pda/finishWork', {
|
||||||
|
|||||||
@@ -7,15 +7,17 @@ import store from './vuex/store'
|
|||||||
import '@config/rem.js'
|
import '@config/rem.js'
|
||||||
import '@style/reset.css'
|
import '@style/reset.css'
|
||||||
import '@style/layout.styl'
|
import '@style/layout.styl'
|
||||||
import { MessageBox, Message, Select, Option } from 'element-ui'
|
import { Dialog, Button, Message, Select, Option, InputNumber } from 'element-ui'
|
||||||
import scroll from 'vue-seamless-scroll'
|
import scroll from 'vue-seamless-scroll'
|
||||||
import JSEncrypt from 'jsencrypt'
|
import JSEncrypt from 'jsencrypt'
|
||||||
|
|
||||||
Vue.prototype.$confirm = MessageBox.confirm
|
|
||||||
Vue.prototype.$message = Message
|
Vue.prototype.$message = Message
|
||||||
|
Vue.use(Dialog)
|
||||||
|
Vue.use(Button)
|
||||||
Vue.use(Select)
|
Vue.use(Select)
|
||||||
Vue.use(Option)
|
Vue.use(Option)
|
||||||
Vue.use(scroll)
|
Vue.use(scroll)
|
||||||
|
Vue.use(InputNumber)
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' +
|
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' +
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
<td>{{ e.status }}</td>
|
<td>{{ e.status }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="zd-row btn_wraper">
|
<div class="zd-row btn_wraper">
|
||||||
<button v-show="e.status === '开始'" class="grid_button" :disabled="disabled" @click="_startOrder(e)">开始</button>
|
<button v-if="e.status === '执行中'" class="grid_button" @click="toJump(e)">执行中</button>
|
||||||
<button v-show="e.status === '执行中'" class="grid_button" @click="toJump(e)">执行中</button>
|
<button v-else class="grid_button" :class="{'grid_button_disabled': e.checked && disabled1}" :disabled="disabled1" @click="_startOrder(e)">开始</button>
|
||||||
<button class="grid_button" :disabled="disabled" @click="_forceFinish(e)">强制完成</button>
|
<button class="grid_button" :class="{'grid_button_disabled': e.checked && disabled2}" :disabled="disabled2" @click="_forceFinish(e)">强制完成</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -69,7 +69,8 @@ export default {
|
|||||||
value: '',
|
value: '',
|
||||||
options: [],
|
options: [],
|
||||||
dataList: [],
|
dataList: [],
|
||||||
disabled: false
|
disabled1: false,
|
||||||
|
disabled2: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteLeave (to, from, next) {
|
beforeRouteLeave (to, from, next) {
|
||||||
@@ -94,6 +95,9 @@ export default {
|
|||||||
async _queryOrders (e) {
|
async _queryOrders (e) {
|
||||||
let res = await queryOrders(e)
|
let res = await queryOrders(e)
|
||||||
this.dataList = [...res]
|
this.dataList = [...res]
|
||||||
|
this.dataList.map(el => {
|
||||||
|
this.$set(el, 'checked', false)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
@@ -101,11 +105,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _startOrder (e) {
|
async _startOrder (e) {
|
||||||
this.disabled = true
|
this.disabled1 = true
|
||||||
|
e.checked = true
|
||||||
try {
|
try {
|
||||||
let res = await startOrder(this.value, e.mfg_order_name)
|
let res = await startOrder(this.value, e.mfg_order_name)
|
||||||
if (res.message) {
|
if (res.message) {
|
||||||
this.disabled = false
|
this.disabled1 = false
|
||||||
|
e.checked = false
|
||||||
this.$store.dispatch('setKeepAlive', ['index'])
|
this.$store.dispatch('setKeepAlive', ['index'])
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/task',
|
path: '/task',
|
||||||
@@ -113,7 +119,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled1 = false
|
||||||
|
e.checked = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toJump (e) {
|
toJump (e) {
|
||||||
@@ -124,7 +131,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async _forceFinish (e) {
|
async _forceFinish (e) {
|
||||||
this.disabled = true
|
this.disabled2 = true
|
||||||
|
e.checked = true
|
||||||
try {
|
try {
|
||||||
let res = await forceFinish(e.mfg_order_name)
|
let res = await forceFinish(e.mfg_order_name)
|
||||||
this._queryOrders(this.value)
|
this._queryOrders(this.value)
|
||||||
@@ -132,9 +140,11 @@ export default {
|
|||||||
message: res.message,
|
message: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
this.disabled2 = false
|
||||||
|
e.checked = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled2 = false
|
||||||
|
e.checked = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,11 +31,10 @@
|
|||||||
<td>{{ e.status }}</td>
|
<td>{{ e.status }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="zd-row btn_wraper">
|
<div class="zd-row btn_wraper">
|
||||||
<button class="grid_button" :disabled="disabled" @click="_sendWork(e)">下发</button>
|
<button class="grid_button" :class="{'grid_button_disabled': e.checked && disabled1}" :disabled="disabled1" @click="_sendWork(e)">下发</button>
|
||||||
<!-- <button class="grid_button" :disabled="disabled">执行中</button> -->
|
<button class="grid_button" :class="{'grid_button_disabled': e.checked && disabled2}" :disabled="disabled2" @click="openDialog(e)">补发</button>
|
||||||
<button class="grid_button" :disabled="disabled" @click="_reSendWork(e)">补发</button>
|
<button class="grid_button" :class="{'grid_button_disabled': e.checked && disabled3}" :disabled="disabled3" @click="_pdaPause(e)">暂停</button>
|
||||||
<button class="grid_button" :disabled="disabled" @click="_pdaPause(e)">暂停</button>
|
<button class="grid_button" :class="{'grid_button_disabled': e.checked && disabled4}" :disabled="disabled4" @click="_finishWork(e)">完成</button>
|
||||||
<button class="grid_button" :disabled="disabled" @click="_finishWork(e)">完成</button>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -43,6 +42,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
|
<div class="zd-row filter-item">
|
||||||
|
<div class="zd-col-6 filter-label">补发桶数</div>
|
||||||
|
<el-input-number class="zd-col-17" v-model="inputNumber" :min="1" label="请输入数字"></el-input-number>
|
||||||
|
</div>
|
||||||
|
<div class="zd-row jccenter button-wrap">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -59,8 +68,13 @@ export default {
|
|||||||
return {
|
return {
|
||||||
timer: null,
|
timer: null,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkObj: '',
|
||||||
disabled: false
|
disabled1: false,
|
||||||
|
disabled2: false,
|
||||||
|
disabled3: false,
|
||||||
|
disabled4: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
inputNumber: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -70,9 +84,13 @@ export default {
|
|||||||
async _queryWorks () {
|
async _queryWorks () {
|
||||||
let res = await queryWorks(this.$route.query.order)
|
let res = await queryWorks(this.$route.query.order)
|
||||||
this.dataList = [...res]
|
this.dataList = [...res]
|
||||||
|
this.dataList.map(el => {
|
||||||
|
this.$set(el, 'checked', false)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
async _sendWork (e) {
|
async _sendWork (e) {
|
||||||
this.disabled = true
|
this.disabled1 = true
|
||||||
|
e.checked = true
|
||||||
try {
|
try {
|
||||||
let res = await sendWork(e.work_code)
|
let res = await sendWork(e.work_code)
|
||||||
this._queryWorks()
|
this._queryWorks()
|
||||||
@@ -80,27 +98,33 @@ export default {
|
|||||||
message: res.message,
|
message: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
this.disabled1 = false
|
||||||
|
e.checked = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled1 = false
|
||||||
|
e.checked = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _reSendWork (e) {
|
async _reSendWork (e, num) {
|
||||||
this.disabled = true
|
this.disabled2 = true
|
||||||
|
e.checked = true
|
||||||
try {
|
try {
|
||||||
let res = await reSendWork(e.work_code)
|
let res = await reSendWork(e.work_code, num)
|
||||||
this._queryWorks()
|
this._queryWorks()
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.message,
|
message: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
this.disabled2 = false
|
||||||
|
e.checked = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled2 = false
|
||||||
|
e.checked = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _pdaPause (e) {
|
async _pdaPause (e) {
|
||||||
this.disabled = true
|
this.disabled3 = true
|
||||||
|
e.checked = true
|
||||||
try {
|
try {
|
||||||
let res = await pdaPause(e.work_code)
|
let res = await pdaPause(e.work_code)
|
||||||
this._queryWorks()
|
this._queryWorks()
|
||||||
@@ -108,13 +132,16 @@ export default {
|
|||||||
message: res.message,
|
message: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
this.disabled3 = false
|
||||||
|
e.checked = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled3 = false
|
||||||
|
e.checked = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _finishWork (e) {
|
async _finishWork (e) {
|
||||||
this.disabled = true
|
this.disabled4 = true
|
||||||
|
e.checked = true
|
||||||
try {
|
try {
|
||||||
let res = await finishWork(e.work_code)
|
let res = await finishWork(e.work_code)
|
||||||
this._queryWorks()
|
this._queryWorks()
|
||||||
@@ -122,10 +149,21 @@ export default {
|
|||||||
message: res.message,
|
message: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
this.disabled4 = false
|
||||||
|
e.checked = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled4 = false
|
||||||
|
e.checked = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
openDialog (e) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.inputNumber = 1
|
||||||
|
this.pkObj = e
|
||||||
|
},
|
||||||
|
handleConfirm () {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this._reSendWork(this.pkObj, this.inputNumber)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ header
|
|||||||
margin 0 .1rem;
|
margin 0 .1rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
&:disabled
|
.grid_button_disabled
|
||||||
color: #ff803c
|
color: #ff803c
|
||||||
|
|
||||||
// 下拉框
|
// 下拉框
|
||||||
@@ -235,22 +235,26 @@ header
|
|||||||
font-size: .28rem
|
font-size: .28rem
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提示框
|
// 弹窗
|
||||||
.el-message-box {
|
.el-dialog
|
||||||
background-color: rgba(7, 22, 69, .85);
|
background linear-gradient(45deg, rgba(28, 95, 161, 70%), rgba(20, 67, 120, 70%))
|
||||||
border-color: #0b5deb;
|
border 1px solid #6fc4e2
|
||||||
}
|
.el-dialog__headerbtn
|
||||||
.el-message-box__title, .el-message-box__headerbtn .el-message-box__close, .el-message-box__content {
|
font-size .32rem
|
||||||
|
.el-dialog__headerbtn .el-dialog__close
|
||||||
|
color #fff
|
||||||
|
.el-dialog__body
|
||||||
|
padding .3rem .4rem
|
||||||
|
.button-wrap
|
||||||
|
margin-top .6rem
|
||||||
|
.el-input-number__decrease, .el-input-number__increase
|
||||||
|
width .8rem
|
||||||
|
font-size: 0.3rem;
|
||||||
|
height: 0.8rem;
|
||||||
|
line-height: .8rem;
|
||||||
|
background: #0489c0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
.el-button
|
||||||
.scroll-tab
|
font-size .34rem
|
||||||
_font(.14rem, .34rem, #fff,,center)
|
.el-button+.el-button
|
||||||
font-family YouSheBiaoTiHei;
|
margin-left .4rem
|
||||||
background-color #1F438A
|
|
||||||
.scroll-container
|
|
||||||
height calc(100% - .34rem)
|
|
||||||
overflow hidden
|
|
||||||
.scroll-item
|
|
||||||
_font(.14rem, .34rem, #fff,,center)
|
|
||||||
background: rgba(31,46,73,0.9)
|
|
||||||
border 1px solid rgba(122,159,224,0.17)
|
|
||||||
Reference in New Issue
Block a user