Šī revīzija ir iekļauta:
朱文强 2021-12-01 19:04:33 +08:00
vecāks e0e522c4c5
revīzija 9fe84a5697
2 mainīti faili ar 140 papildinājumiem un 55 dzēšanām

Parādīt failu

@ -11,7 +11,7 @@
@keyup.enter.native="dataFormSubmit()"
label-width="80px"
>
<el-form-item label="任务类型" prop="taskType">
<!-- <el-form-item label="任务类型" prop="taskType">
<el-select
v-model="dataForm.taskType"
placeholder="任务类型0 出库1入库"
@ -20,7 +20,7 @@
<el-option label="出库" :value="0"></el-option>
<el-option label="入库" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="产品编码" prop="model">
<el-autocomplete
class="inline-input"
@ -31,22 +31,35 @@
clearable
></el-autocomplete>
</el-form-item>
<!-- <el-form-item label="起点" prop="startPoint">
<el-input v-model="dataForm.startPoint" placeholder="起点"></el-input>
</el-form-item> -->
<!-- <el-form-item label="终点" prop="endPoint">
<el-input v-model="dataForm.endPoint" placeholder="终点"></el-input>
</el-form-item> -->
<el-form-item label="起点" prop="startPoint">
<el-select v-model="dataForm.startPoint" filterable placeholder="请选择起点">
<el-option
v-for="item in PointArr"
:key="item.id"
:label="item.anotherName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="终点" prop="endPoint">
<el-select v-model="dataForm.endPoint" filterable placeholder="请选择终点">
<el-option
v-for="item in PointArr"
:key="item.id"
:label="item.anotherName"
:value="item.id">
</el-option>
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input v-model="dataForm.num" placeholder="数量" oninput = "value=value.replace(/[^\d]/g,'')"></el-input>
</el-form-item>
<el-form-item label="批次号" prop="dateNum">
<!-- <el-form-item label="批次号" prop="dateNum">
<el-input
v-model="dataForm.dateNum"
placeholder="请填写批次号"
></el-input>
<!-- oninput = "value=value.replace(/[^\d]/g,'')" -->
</el-form-item>
oninput = "value=value.replace(/[^\d]/g,'')"
</el-form-item> -->
<el-form-item label="备注" prop="remarks">
<el-input v-model="dataForm.remarks" placeholder="备注"></el-input>
</el-form-item>
@ -67,29 +80,30 @@ export default {
id: 0,
taskType: '',
model: '',
// startPoint: '',
// endPoint: '',
startPoint: '',
endPoint: '',
num: '',
unit: '',
remarks: '',
dateNum: ''
},
PointArr: [],
dataRule: {
taskType: [
{ required: true, message: '任务类型不能为空', trigger: 'blur' }
],
// taskType: [
// { required: true, message: '', trigger: 'blur' }
// ],
model: [
{ required: true, message: '型号不能为空', trigger: 'blur' }
],
num: [
{ required: true, message: '数量不能为空', trigger: 'blur' }
],
startPoint: [
{ required: true, message: '起点不能为空', trigger: 'change' }
],
endPoint: [
{ required: true, message: '终点不能为空', trigger: 'change' }
]
// startPoint: [
// { required: true, message: '', trigger: 'blur' }
// ],
// endPoint: [
// { required: true, message: '', trigger: 'blur' }
// ]
}
}
},
@ -100,13 +114,19 @@ export default {
},
methods: {
init (id) {
if (this.inout === 1) {
this.dataForm.taskType = 0
} else if (this.inout === 2) {
this.dataForm.taskType = 1
}
// if (this.inout === 1) {
// this.dataForm.taskType = 0
// } else if (this.inout === 2) {
// this.dataForm.taskType = 1
// }
this.dataForm.id = id || 0
this.visible = true
this.$http({
url: this.$http.adornUrl('/generator/mtccwarehousrank/list'),
method: 'post'
}).then(({data}) => {
this.PointArr = data.list
})
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
@ -148,11 +168,11 @@ export default {
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'taskType': this.dataForm.taskType,
// 'taskType': this.dataForm.taskType,
'model': this.dataForm.model,
'num': this.dataForm.num,
// 'startPoint': this.dataForm.startPoint,
// 'endPoint': this.dataForm.endPoint,
'startPoint': this.dataForm.startPoint,
'endPoint': this.dataForm.endPoint,
'remarks': this.dataForm.remarks,
'dateNum': this.dataForm.dateNum
})

Parādīt failu

@ -10,7 +10,7 @@
</el-form-item> -->
<el-form-item>
<el-button @click="getDataListShow()">刷新</el-button>
<el-button type="success" @click="showTask()">执行演示任务</el-button>
<!-- <el-button type="success" @click="showTask()">执行演示任务</el-button> -->
<el-button
v-if="isAuth('generator:mtcctaskruninfo:save')"
type="primary"
@ -26,6 +26,14 @@
:disabled="dataListSelections.length <= 0"
>批量删除</el-button> -->
</el-form-item>
<el-form-item>
<el-button type="success" @click="showTask(1)">执行单托盘演示任务</el-button>
<el-button type="success" @click="showTask(2)">执行多托盘演示任务</el-button>
<el-button type="success" @click="showTask(0)">暂停演示任务</el-button>
</el-form-item>
<el-form-item>
<span style="margin-left:20px"><el-tag type="warning">已执行任务记数:{{showTaskMsg}}</el-tag></span>
</el-form-item>
</el-form>
<el-table
:data="dataList"
@ -201,19 +209,19 @@
</el-table-column>
</el-table>
</div> -->
<el-dialog
<!-- <el-dialog
title="信息"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
width="30%"
>
>演示任务弹窗
<span>{{taskMsg}}</span>
<span slot="footer" class="dialog-footer">
<el-button v-show="showTaskBtn" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</el-dialog> -->
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
:inout="inout"
@ -249,6 +257,7 @@ export default {
btnText: '执行任务',
dialogVisible: false,
taskMsg: '演示任务正在执行,请勿操作',
showTaskMsg: 0,
showTaskBtn: false,
sTaskInfo: [],
sTaskInfoNum: 0,
@ -339,22 +348,68 @@ export default {
this.$refs.infoDet.init(row, bol)
})
},
showTask () {
this.dialogVisible = true
this.taskMsg = '演示任务正在执行,请勿操作'
this.showTaskBtn = false
this.$http({
url: this.$http.adornUrl('/generator/mtcctaskruninfo/runExampleTask'),
method: 'post'
}).then(({ data }) => {
if (data.code === 0 && data) {
this.dialogVisible = false
} else {
this.$message.error(data.msg)
this.taskMsg = data.msg
this.showTaskBtn = true
}
})
showTask (type) {
// this.dialogVisible = true
// this.taskMsg = ''
// this.showTaskBtn = false
// this.$http({
// url: this.$http.adornUrl('/generator/mtcctaskruninfo/runExampleTask'),
// method: 'post'
// }).then(({ data }) => {
// if (data.code === 0 && data) {
// this.dialogVisible = false
// } else {
// this.$message.error(data.msg)
// this.taskMsg = data.msg
// this.showTaskBtn = true
// }
// })
if (type === 0) {
this.$http({
url: this.$http.adornUrl('/generator/mtcctaskruninfo/setOff'),
method: 'post'
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
} else if (type === 1) {
this.$http({
url: this.$http.adornUrl('/generator/mtcctaskruninfo/runOneTask'),
method: 'post'
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
} else if (type === 2) {
this.$http({
url: this.$http.adornUrl('/generator/mtcctaskruninfo/runExampleTask'),
method: 'post'
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
}
},
//
selectionChangeHandle (val) {
@ -407,16 +462,26 @@ export default {
},
showSTaskInfo () {
this.$http({
url: this.$http.adornUrl(
'/generator/mtcctaskruninfodet/taskruninfodetlist'
),
url: this.$http.adornUrl('/generator/mtcctaskruninfo/alreadyRun'),
method: 'post'
}).then(({ data }) => {
if (data && data.code === 0) {
this.sTaskInfo = data.list
this.sTaskInfoNum = this.sTaskInfo.length
this.showTaskMsg = data.msg
} else {
this.$message.error(data.msg)
}
})
// this.$http({
// url: this.$http.adornUrl(
// '/generator/mtcctaskruninfodet/taskruninfodetlist'
// ),
// method: 'post'
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.sTaskInfo = data.list
// this.sTaskInfoNum = this.sTaskInfo.length
// }
// })
},
sTaskClick () {
this.openSTask = !this.openSTask