Commit 15b196a9 authored by yaobeibei's avatar yaobeibei

add ok

parent 78721aba
......@@ -678,6 +678,7 @@ app.post('/checkCall', async function (req, res) {
item.preNum = x.preNum / 3
if (x.pre === false) {
item.sendNum = x.number / 3
item.entry = true
} else {
item.sendNum = 0
}
......@@ -2079,36 +2080,10 @@ app.post('/entry', function(req, res) {
}
console.log(response.statusCode, response.message)
if (response.statusCode === 200) {
res.send({status: 200, datas: response.message})
res.send({status: 200, datas: response.body})
}
if (response.statusCode === 204) {
res.send({status: 204, message: '订单数据未找到(运营商未返回任务记录)'})
// res.send({status: 200, datas: {
// billCheck: {
// result : "通过", // 结果(下同)
// at : 1531979761733.0 // 执行时间戳(下同)
// },
// fileCheck: {
// result : "通过",
// at : 1531979761733.0
// },
// countCheck: {
// result : "通过",
// at : 1531979761733.0,
// now: 500, // 当前数量
// expect: 500 // 期待数量
// },
// tagCheck: {
// result : "通过",
// at : 1531979761733.0,
// lose: 0, // 缺失量
// total: 500 // 期待数量
// },
// randomCall: {
// result : "通过",
// at : 1531979761733.0
// }
// }})
}
})
})
......@@ -2124,7 +2099,7 @@ app.post('/entryIn', function(req, res) {
}
console.log(response.statusCode, response.message)
if (response.statusCode === 200) {
res.send({status: 200, datas: response.message})
res.send({status: 200, datas: response.body})
}
if (response.statusCode === 204) {
res.send({status: 204, message: '订单数据未找到'})
......
......@@ -512,6 +512,7 @@
},
updateStatus (row) {
let billID = row.name
let entryButton = row.entry
fetch('/api/entry', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
......@@ -521,8 +522,18 @@
}).then(data => {
console.dir(data)
this.entryBillID = billID
let datas = JSON.parse(data.datas)
console.log(datas)
if (data.status === 200) {
this.formatEntry(data.datas)
if (entryButton) {
self.entryBtn = true
this.$message({
type: 'success',
message: '该订单已经被录入'
})
}
this.formatEntry(datas)
} else {
this.$alert(data.message, '无法录入', {
confirmButtonText: '确定',
......@@ -566,6 +577,7 @@
closeEntry () {
this.entryBillID = null
this.statusDialog = false
this.entryBtn = false
},
fileReaderDsp () {
let self = this
......@@ -577,8 +589,11 @@
}).then(res => {
return res.json()
}).then(data => {
console.log(data)
let datas = JSON.parse(data.datas)
console.log(datas)
if (data.status === 200) {
if (data.datas.ok === 1) {
if (datas.ok === 1) {
this.message({
type: 'success',
message: '录入成功'
......@@ -586,7 +601,7 @@
self.billID = null
self.statusDialog = false
} else {
this.$alert(data.datas.err, '录入失败', {
this.$alert(datas.err, '录入失败', {
confirmButtonText: '确定',
callback: action => {
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment