质量检测全部重构
This commit is contained in:
@@ -423,7 +423,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$modal
|
||||
.confirm('是否确认删除本周所有生产工单?')
|
||||
.confirm('是否确认删除本天所有生产工单?')
|
||||
.then(function () {
|
||||
return deleteAllWorkorder(query)
|
||||
// return deleteworkplan(query)
|
||||
|
||||
@@ -363,12 +363,17 @@ export default {
|
||||
this.getcurrentWorkorder()
|
||||
},
|
||||
methods: {
|
||||
//todo 重构获取检测项
|
||||
//todo 获取检测项
|
||||
getCheckItemList() {
|
||||
GetcheckItemTable()
|
||||
// 1.拿到工单
|
||||
// 2.拿到工单的检测项数量
|
||||
const workorderId = this.CurrentWorkorder.clientWorkorder
|
||||
GetcheckItemTable(workorderId)
|
||||
.then((result) => {
|
||||
if (result.code == 200) {
|
||||
this.paint = result.data.paint
|
||||
console.log("油漆",this.paint);
|
||||
this.paint.forEach((item) => {
|
||||
if (item.counter == null) item.counter = 0
|
||||
})
|
||||
@@ -463,45 +468,13 @@ export default {
|
||||
this.DMLdialog.visiable = false
|
||||
},
|
||||
|
||||
//todo 数据同步
|
||||
/*
|
||||
1.从后台获取数据
|
||||
|
||||
*/
|
||||
|
||||
//todo 初始话 signalR
|
||||
/*initSignalR() {
|
||||
this.signal = new signalR.HubConnectionBuilder()
|
||||
//服务器地址
|
||||
// .withUrl('http://192.168.0.110:8100/myHub', {})
|
||||
.withUrl('http://localhost:8888/myHub', {})
|
||||
.withAutomaticReconnect()
|
||||
.configureLogging(signalR.LogLevel.Information)
|
||||
.build()
|
||||
// 接受集线器的方法
|
||||
this.signal.on('receive_my', (res) => {
|
||||
this.data = res
|
||||
})
|
||||
this.signal
|
||||
.start()
|
||||
.then(() => {
|
||||
console.log('myhub连接成功')
|
||||
//vue 发送请求
|
||||
this.signal.invoke('SendPublicMessage', '1111').catch((err) => console.log('err', err))
|
||||
})
|
||||
.catch(() => {
|
||||
console.log('myhub连接失败')
|
||||
})
|
||||
|
||||
// this.signalr.SR.invoke('SendMessage', 'All', 'root', '123456').catch((err) => console.log('err', err))
|
||||
},*/
|
||||
|
||||
//todo 获取当前工单号
|
||||
getcurrentWorkorder() {
|
||||
getcurrent_workorder().then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data != undefined) {
|
||||
this.CurrentWorkorder = res.data
|
||||
this.getCheckItemList()
|
||||
this.$message.success('更新今日工单号成功')
|
||||
}
|
||||
} else if (res.code == 210) {
|
||||
@@ -516,6 +489,7 @@ export default {
|
||||
if (res.code == 200) {
|
||||
if (res.data != null) {
|
||||
this.CurrentWorkorder = res.data
|
||||
this.getCheckItemList()
|
||||
this.$message.success('获取工单号成功')
|
||||
} else {
|
||||
this.$notify.warning('已经是最后一个工单,没有工单了')
|
||||
@@ -531,6 +505,7 @@ export default {
|
||||
if (res.code == 200) {
|
||||
if (res.data != null) {
|
||||
this.CurrentWorkorder = res.data
|
||||
this.getCheckItemList()
|
||||
this.$message.success('获取工单号成功')
|
||||
} else {
|
||||
this.$notify.warning('没有生产工单')
|
||||
|
||||
Reference in New Issue
Block a user