no message
							parent
							
								
									609e196f9b
								
							
						
					
					
						commit
						1cd39451ae
					
				| 
						 | 
					@ -26,7 +26,6 @@
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <label class="el-form-item-label">任务类型</label>
 | 
					          <label class="el-form-item-label">任务类型</label>
 | 
				
			||||||
| 
						 | 
					@ -55,6 +54,7 @@
 | 
				
			||||||
          <el-radio-button label="待执行">待执行</el-radio-button>
 | 
					          <el-radio-button label="待执行">待执行</el-radio-button>
 | 
				
			||||||
          <el-radio-button label="执行中">执行中</el-radio-button>
 | 
					          <el-radio-button label="执行中">执行中</el-radio-button>
 | 
				
			||||||
          <el-radio-button label="顶升">顶升</el-radio-button>
 | 
					          <el-radio-button label="顶升">顶升</el-radio-button>
 | 
				
			||||||
 | 
					          <el-radio-button label="已到站">已到站</el-radio-button>
 | 
				
			||||||
          <el-radio-button label="已完成">已完成</el-radio-button>
 | 
					          <el-radio-button label="已完成">已完成</el-radio-button>
 | 
				
			||||||
          <el-radio-button label="任务取消">任务取消</el-radio-button>
 | 
					          <el-radio-button label="任务取消">任务取消</el-radio-button>
 | 
				
			||||||
        </el-radio-group>
 | 
					        </el-radio-group>
 | 
				
			||||||
| 
						 | 
					@ -156,10 +156,10 @@
 | 
				
			||||||
                       align="center" size="mini"
 | 
					                       align="center" size="mini"
 | 
				
			||||||
                       @click="toAgvTaskUp(scope.row)"
 | 
					                       @click="toAgvTaskUp(scope.row)"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
              顶升
 | 
					              {{ scope.row.type == 'Fx_Off_Line' ? '到站' : '顶升' }}
 | 
				
			||||||
            </el-button>
 | 
					            </el-button>
 | 
				
			||||||
            <el-button type="success"
 | 
					            <el-button type="success"
 | 
				
			||||||
                       :disabled="scope.row.status!='UP_CONTAINER'  "
 | 
					                       :disabled="scope.row.status!='UP_CONTAINER' &&  scope.row.status!='ARRIVED'  "
 | 
				
			||||||
                       align="center"
 | 
					                       align="center"
 | 
				
			||||||
                       size="mini"
 | 
					                       size="mini"
 | 
				
			||||||
                       @click="toAgvTaskFinish(scope.row)"
 | 
					                       @click="toAgvTaskFinish(scope.row)"
 | 
				
			||||||
| 
						 | 
					@ -197,7 +197,7 @@
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import crudAgvTask from '@/api/agvTask'
 | 
					import crudAgvTask from '@/api/agvTask'
 | 
				
			||||||
import crudKmres from '@/api/kmres'
 | 
					import crudKmres from '@/api/kmres'
 | 
				
			||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
 | 
					import CRUD, {presenter, header, form, crud} from '@crud/crud'
 | 
				
			||||||
import rrOperation from '@crud/RR.operation'
 | 
					import rrOperation from '@crud/RR.operation'
 | 
				
			||||||
import crudOperation from '@crud/CRUD.operation'
 | 
					import crudOperation from '@crud/CRUD.operation'
 | 
				
			||||||
import udOperation from '@crud/UD.operation'
 | 
					import udOperation from '@crud/UD.operation'
 | 
				
			||||||
| 
						 | 
					@ -227,7 +227,7 @@ const defaultForm = {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'AgvTask',
 | 
					  name: 'AgvTask',
 | 
				
			||||||
  components: { DateRangePicker, pagination, crudOperation, rrOperation, udOperation },
 | 
					  components: {DateRangePicker, pagination, crudOperation, rrOperation, udOperation},
 | 
				
			||||||
  mixins: [presenter(), header(), form(defaultForm), crud()],
 | 
					  mixins: [presenter(), header(), form(defaultForm), crud()],
 | 
				
			||||||
  dicts: ['base_staus', 'task_status', 'task_type'],
 | 
					  dicts: ['base_staus', 'task_status', 'task_type'],
 | 
				
			||||||
  cruds() {
 | 
					  cruds() {
 | 
				
			||||||
| 
						 | 
					@ -239,7 +239,7 @@ export default {
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      idField: 'id',
 | 
					      idField: 'id',
 | 
				
			||||||
      sort: 'id,desc',
 | 
					      sort: 'id,desc',
 | 
				
			||||||
      crudMethod: { ...crudAgvTask },
 | 
					      crudMethod: {...crudAgvTask},
 | 
				
			||||||
      optShow: {
 | 
					      optShow: {
 | 
				
			||||||
        add: false,
 | 
					        add: false,
 | 
				
			||||||
        edit: false,
 | 
					        edit: false,
 | 
				
			||||||
| 
						 | 
					@ -256,18 +256,16 @@ export default {
 | 
				
			||||||
        edit: ['admin', 'agvTask:edit'],
 | 
					        edit: ['admin', 'agvTask:edit'],
 | 
				
			||||||
        del: ['admin', 'agvTask:del']
 | 
					        del: ['admin', 'agvTask:del']
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      rules: {
 | 
					      rules: {},
 | 
				
			||||||
        containerCode: [
 | 
					 | 
				
			||||||
          { required: true, message: '容器码不能为空', trigger: 'blur' }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      radio3: '执行中',
 | 
					      radio3: '执行中',
 | 
				
			||||||
      agvTaskUpDialog: false,
 | 
					      agvTaskUpDialog: false,
 | 
				
			||||||
      agvTaskUpForm: {
 | 
					      agvTaskUpForm: {
 | 
				
			||||||
        containerCode: null,
 | 
					        containerCode: null,
 | 
				
			||||||
 | 
					        type: null,
 | 
				
			||||||
        missionCode: null
 | 
					        missionCode: null
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      missionStatus: null
 | 
					      missionStatus: null,
 | 
				
			||||||
 | 
					      currentPosition: null
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
| 
						 | 
					@ -282,16 +280,19 @@ export default {
 | 
				
			||||||
    toAgvTaskUpContainer() {
 | 
					    toAgvTaskUpContainer() {
 | 
				
			||||||
      this.$refs['agvTaskUpForm'].validate((valid) => {
 | 
					      this.$refs['agvTaskUpForm'].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
 | 
					          this.missionStatus = (this.agvTaskUpForm.type === 'Fx_Off_Line') ? 'ARRIVED' : 'UP_CONTAINER'
 | 
				
			||||||
 | 
					          this.currentPosition = (this.agvTaskUpForm.type === 'Fx_Off_Line') ? 'FX001' : null
 | 
				
			||||||
          crudKmres.missionStateCallback({
 | 
					          crudKmres.missionStateCallback({
 | 
				
			||||||
            missionCode: this.agvTaskUpForm.missionCode,
 | 
					            missionCode: this.agvTaskUpForm.missionCode,
 | 
				
			||||||
            containerCode: this.agvTaskUpForm.containerCode,
 | 
					            containerCode: this.agvTaskUpForm.containerCode,
 | 
				
			||||||
            missionStatus: 'UP_CONTAINER'
 | 
					            missionStatus: this.missionStatus,
 | 
				
			||||||
 | 
					            currentPosition: this.currentPosition
 | 
				
			||||||
          }).then(res => {
 | 
					          }).then(res => {
 | 
				
			||||||
            if (res.status == 200) {
 | 
					            if (res.status == 200) {
 | 
				
			||||||
              this.agvTaskUpDialog = false
 | 
					              this.agvTaskUpDialog = false
 | 
				
			||||||
              this.crud.notify('顶升成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
 | 
					              this.crud.notify('顶升成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
 | 
				
			||||||
              this.crud.toQuery()
 | 
					              this.crud.toQuery()
 | 
				
			||||||
              this.agvTaskUpForm = { boxCode: null, missionCode: null }
 | 
					              this.agvTaskUpForm = {boxCode: null, missionCode: null}
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
 | 
					              this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -365,6 +366,7 @@ export default {
 | 
				
			||||||
    toAgvTaskUp(data) {//弹出顶升盒子
 | 
					    toAgvTaskUp(data) {//弹出顶升盒子
 | 
				
			||||||
      this.agvTaskUpForm.missionCode = data.id
 | 
					      this.agvTaskUpForm.missionCode = data.id
 | 
				
			||||||
      this.agvTaskUpForm.containerCode = data.stockCode
 | 
					      this.agvTaskUpForm.containerCode = data.stockCode
 | 
				
			||||||
 | 
					      this.agvTaskUpForm.type = data.type
 | 
				
			||||||
      this.agvTaskUpDialog = true
 | 
					      this.agvTaskUpDialog = true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
| 
						 | 
					@ -384,6 +386,9 @@ export default {
 | 
				
			||||||
      } else if (lab === '顶升') {
 | 
					      } else if (lab === '顶升') {
 | 
				
			||||||
        this.query.status = 'UP_CONTAINER'
 | 
					        this.query.status = 'UP_CONTAINER'
 | 
				
			||||||
        this.crud.toQuery()
 | 
					        this.crud.toQuery()
 | 
				
			||||||
 | 
					      } else if (lab === '已到站') {
 | 
				
			||||||
 | 
					        this.query.status = 'ARRIVED'
 | 
				
			||||||
 | 
					        this.crud.toQuery()
 | 
				
			||||||
      } else if (lab === '已完成') {
 | 
					      } else if (lab === '已完成') {
 | 
				
			||||||
        this.query.status = 'FINISH'
 | 
					        this.query.status = 'FINISH'
 | 
				
			||||||
        this.crud.toQuery()
 | 
					        this.crud.toQuery()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue