任务管理

master
Mr.sun 2 years ago
parent 01c8409dc1
commit 773da525f0
  1. 8
      src/api/wcs/busFunctions/taskManagement.js
  2. 108
      src/views/basicData/goods/config.js
  3. 9
      src/views/businessQuery/erpReturnQuery/outboundReturn.vue
  4. 149
      src/views/taskManagement/index.vue

@ -24,4 +24,12 @@ export function reissueTask(data) {
method: 'post',
data:data
})
}
// 修改确认
export function updateBusInDataTask(data) {
return request({
url: '/wms/datatask/updateBusInDataTask',
method: 'post',
data:data
})
}

@ -64,35 +64,35 @@ export function tableConfig() {
istrue: true,
"min-width": 120,
},
{
label: "存储分类",
prop: "storageClassify",
istrue: true,
"min-width": 120,
filter(row, value) {
return getDictLabel(value, _that.dict.type.goods_storage_classify);
},
},
{
label: "ABC分类",
prop: "abcClassify",
istrue: true,
"min-width": 120,
// {
// label: "存储分类",
// prop: "storageClassify",
// istrue: true,
// "min-width": 120,
// filter(row, value) {
// return getDictLabel(value, _that.dict.type.goods_storage_classify);
// },
// },
// {
// label: "ABC分类",
// prop: "abcClassify",
// istrue: true,
// "min-width": 120,
filter(row, value) {
return getDictLabel(value, _that.dict.type.goods_abc_classify);
},
},
{
label: "存储条件",
prop: "storageConditions",
istrue: true,
"min-width": 120,
// filter(row, value) {
// return getDictLabel(value, _that.dict.type.goods_abc_classify);
// },
// },
// {
// label: "存储条件",
// prop: "storageConditions",
// istrue: true,
// "min-width": 120,
filter(row, value) {
return getDictLabel(value, _that.dict.type.goods_storage_conditions);
},
},
// filter(row, value) {
// return getDictLabel(value, _that.dict.type.goods_storage_conditions);
// },
// },
{
label: "批号管理",
prop: "lotnoMana",
@ -601,20 +601,20 @@ export function tableConfig() {
options: this.dict.type.goods_status,
span: 8,
},
{
label: "产品分类:",
prop: "classify",
type: "selectCommon",
message: "请输入产品分类",
requireType: ["required"], // 必填修改原因
// {
// label: "产品分类:",
// prop: "classify",
// type: "selectCommon",
// message: "请输入产品分类",
// requireType: ["required"], // 必填修改原因
// options: [
// { label: "产品分类A", value: "0" },
// { label: "产品分类B", value: "1" },
// { label: "产品分类C", value: "2" },
// ],
options: this.dict.type.goods_classify,
span: 8,
},
// options: this.dict.type.goods_classify,
// span: 8,
// },
{
label: "规格:",
prop: "specifications",
@ -632,24 +632,24 @@ export function tableConfig() {
options: this.dict.type.goods_storage_classify,
span: 8,
},
{
label: "ABC分类:",
prop: "abcClassify",
type: "selectCommon",
message: "请输入ABC分类",
requireType: ["required"], // 必填修改原因
options: this.dict.type.goods_abc_classify,
span: 8,
},
{
label: "存储条件:",
prop: "storageConditions",
type: "selectCommon",
message: "请输入存储条件",
requireType: ["required"], // 必填修改原因
options: this.dict.type.goods_storage_conditions,
span: 8,
},
// {
// label: "ABC分类:",
// prop: "abcClassify",
// type: "selectCommon",
// message: "请输入ABC分类",
// requireType: ["required"], // 必填修改原因
// options: this.dict.type.goods_abc_classify,
// span: 8,
// },
// {
// label: "存储条件:",
// prop: "storageConditions",
// type: "selectCommon",
// message: "请输入存储条件",
// requireType: ["required"], // 必填修改原因
// options: this.dict.type.goods_storage_conditions,
// span: 8,
// },
{
label: "批号管理:",
prop: "lotnoMana",

@ -91,6 +91,7 @@
</template>
<script>
import { queryListInterfaceOutUpload } from '@/api/exWarehouse/erpReturnQuery.js'
import { getDictLabel } from '@/utils/index'
export default {
dicts: ['line_name_type', 'line_name_type', 'deliver_mode_dict', 'order_type_dict', 'out_order_status'],
data() {
@ -152,6 +153,14 @@ export default {
prop: 'qty',
istrue: true
},
{
label: '订单类型',
prop: 'dpsNoOne',
istrue: true,
filter(row, value) {
return getDictLabel(value, _that.dict.order_type_dict)
}
},
{
label: '错误信息',
prop: 'extend1',

@ -21,7 +21,6 @@
:default-time="['00:00:00', '00:00:00']"
></el-date-picker>
</el-form-item>
<el-form-item
label="任务编号"
prop="taskCode"
@ -121,6 +120,7 @@
<div class="layout-full">
<heavy-table
class="heavy-table tablem"
style="margin-top:22px"
highlight-current-row
:data="cheshiList"
:loading="loading"
@ -130,6 +130,7 @@
@current-change="handleCurrentChange"
@handleUpdate="handleUpdate"
@handleDelete="handleDelete"
@modifyDelete="modifyDelete"
>
<!-- <template v-slot:switchChange="scope">
<el-switch
@ -159,89 +160,42 @@
label-width="95px"
>
<el-form-item
label="点位编码"
prop="pointNo"
>
<el-input
v-model="form.pointNo"
placeholder="请输入点位编码"
/>
</el-form-item>
<el-form-item
label="点位名称"
prop="pointName"
>
<el-input
v-model="form.pointName"
placeholder="请输入点位名称"
/>
</el-form-item>
<el-form-item
label="所属分组"
prop="pointGroup"
label="任务起点"
prop="fromSide"
>
<el-select
v-model="form.pointGroup"
v-model="form.fromSide"
style="width: 100%;"
placeholder="请选择"
filterable
>
<el-option
v-for="item in pointGroupNameList"
:key="item.id"
:label="item.groupName"
:value="item.id"
:key="item.pointName"
:label="item.pointName"
:value="item.pointNo"
/>
</el-select>
</el-form-item>
<el-form-item
label="是否可用"
prop="isActive"
label="任务终点"
prop="toSide"
>
<el-select
v-model="form.isActive"
placeholder="请选择"
v-model="form.toSide"
style="width: 100%;"
clearable
>
<el-option
v-for="item in dict.type.is_use"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label="选择设备"
prop="devName"
>
<el-select
v-model="form.devCode"
placeholder="请选择"
style="width: 100%;"
:value="form.devName"
clearable
filterable
>
<el-option
v-for="item in devNameArr"
:label="item.devName"
:value="item.devCode"
:key="item.devCode"
v-for="item in pointGroupNameList"
:key="item.pointName"
:label="item.pointName"
:value="item.pointNo"
/>
</el-select>
</el-form-item>
<el-form-item
label="交互点位"
prop="handshakePoint"
>
<el-input
v-model="form.handshakePoint"
placeholder="请输入点位编码"
/>
</el-form-item>
</el-form>
<div
slot="footer"
@ -258,17 +212,14 @@
</template>
<script>
import { getBasePointGroup, updatePoint, addPoint } from '@/api/wcs/base/agvPoint.js'
import { getBasePointGroup, updatePoint, addPoint, queryPointList } from '@/api/wcs/base/agvPoint.js'
import { getWcsDeviceList } from '@/api/wcs/base/wcsDevice.js'
import { getDictLabel } from '@/utils/index'
import { queryTaskManagement, reissueTask, cancelTask } from '@/api/wcs/busFunctions/taskManagement.js'
import { queryTaskManagement, reissueTask, cancelTask, updateBusInDataTask } from '@/api/wcs/busFunctions/taskManagement.js'
import moment from 'moment'
// import { getTableHeader } from '@/api/wms/tableHeader/table'
export default {
name: 'Configuration',
dicts: ['is_use', 'task_type', 'task_status', 'order_type_dict'],
data() {
const _that = this
return {
@ -277,7 +228,6 @@ export default {
size: 50, //
total: 0
},
// value1: [moment().locale('zh-cn').format('yyyy-MM-DD 00:00:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 00:00:00')],
value1: [],
//
devNameArr: [],
@ -365,11 +315,15 @@ export default {
fixed: 'right',
align: 'center',
buttons: [
// {
// name: '',
// event: 'handleDelete',
// disable(row, prop) {}
// },
{
name: '修改任务',
event: 'modifyDelete',
disable(row, prop) {
if (row.punchNo !== 'AGV') {
return true
}
}
},
{
name: '重新下发',
event: 'handleUpdate'
@ -444,18 +398,18 @@ export default {
//
rules: {
pointNo: [{ required: true, trigger: 'blur', message: '请输入点位编码' }],
pointName: [{ required: true, trigger: 'blur', message: '请输入点位名称' }],
pointGroup: [{ required: true, trigger: 'change', message: '冲空区' }],
toSide: [{ required: true, trigger: 'blur', message: '请输入任务终点' }],
fromSide: [{ required: true, trigger: 'blur', message: '请输入任务起点' }],
isActive: [{ required: true, trigger: 'change', message: '启用' }],
devCode: [{ required: true, trigger: 'change', message: '请选择设备' }]
}
}
},
created() {
this.getList()
getBasePointGroup().then((res) => {
this.pointGroupNameList = res.data
queryPointList({ pageNum: 1, pageSize: 999 }).then((res) => {
this.pointGroupNameList = res.rows
})
this.getList()
},
computed: {},
@ -472,6 +426,19 @@ export default {
this.getList()
}
},
//
modifyDelete(row) {
this.open = true
this.title = '修改任务'
console.log(row)
let data = {
id: row.taskId,
fromSide: row.fromSide,
toSide: row.taskPath,
taskPath: row.taskPath
}
this.form = data
},
//
formatStringToTimestamp(formattedString) {
// Date
@ -603,33 +570,15 @@ export default {
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
this.devNameArr.forEach((item, index) => {
if (item.devName == this.form.devCode) {
this.form.devCode = item.devCode
}
})
// console.log(this.form)
this.form.taskPath = this.$refs['form'].validate((valid) => {
if (valid) {
this.pointGroupNameList.forEach((item, index) => {
if (item.groupName == this.form.pointGroup) {
this.form.pointGroup = item.id
}
})
if (this.title === '编辑') {
// console.log(this.form)
updatePoint(this.form).then((response) => {
if (this.title === '修改任务') {
updateBusInDataTask(this.form).then((response) => {
this.$modal.msgSuccess('修改成功')
this.open = false
console.log(this.form)
this.getList()
})
} else {
addPoint(this.form).then((response) => {
this.$modal.msgSuccess('添加成功')
this.open = false
this.getList()
})
}
}
})

Loading…
Cancel
Save