no message
							parent
							
								
									609e196f9b
								
							
						
					
					
						commit
						1cd39451ae
					
				| 
						 | 
				
			
			@ -4,27 +4,26 @@
 | 
			
		|||
    <div class="head-container">
 | 
			
		||||
      <div v-if="crud.props.searchToggle" type="flex">
 | 
			
		||||
        <!-- 搜索 -->
 | 
			
		||||
          <label class="el-form-item-label">创建日期</label>
 | 
			
		||||
          <date-range-picker v-model="query.createTime" style="width: 250px;" class="filter-item"/>
 | 
			
		||||
 | 
			
		||||
          <label class="el-form-item-label">容器码</label>
 | 
			
		||||
          <el-input
 | 
			
		||||
            v-model="query.stockCode"
 | 
			
		||||
            clearable
 | 
			
		||||
            placeholder="请输入容器码"
 | 
			
		||||
            style="width: 170px;"
 | 
			
		||||
            class="filter-item"
 | 
			
		||||
            @keyup.enter.native="crud.toQuery"
 | 
			
		||||
          />
 | 
			
		||||
          <label class="el-form-item-label">起点</label>
 | 
			
		||||
          <el-input v-model="query.startSlotCode" clearable placeholder="起点" style="width: 170px;"
 | 
			
		||||
                    class="filter-item" @keyup.enter.native="crud.toQuery"
 | 
			
		||||
          />
 | 
			
		||||
          <label class="el-form-item-label">终点</label>
 | 
			
		||||
          <el-input v-model="query.endSlotCode" clearable placeholder="终点" style="width: 170px;"
 | 
			
		||||
                    class="filter-item" @keyup.enter.native="crud.toQuery"
 | 
			
		||||
          />
 | 
			
		||||
        <label class="el-form-item-label">创建日期</label>
 | 
			
		||||
        <date-range-picker v-model="query.createTime" style="width: 250px;" class="filter-item"/>
 | 
			
		||||
 | 
			
		||||
        <label class="el-form-item-label">容器码</label>
 | 
			
		||||
        <el-input
 | 
			
		||||
          v-model="query.stockCode"
 | 
			
		||||
          clearable
 | 
			
		||||
          placeholder="请输入容器码"
 | 
			
		||||
          style="width: 170px;"
 | 
			
		||||
          class="filter-item"
 | 
			
		||||
          @keyup.enter.native="crud.toQuery"
 | 
			
		||||
        />
 | 
			
		||||
        <label class="el-form-item-label">起点</label>
 | 
			
		||||
        <el-input v-model="query.startSlotCode" clearable placeholder="起点" style="width: 170px;"
 | 
			
		||||
                  class="filter-item" @keyup.enter.native="crud.toQuery"
 | 
			
		||||
        />
 | 
			
		||||
        <label class="el-form-item-label">终点</label>
 | 
			
		||||
        <el-input v-model="query.endSlotCode" clearable placeholder="终点" style="width: 170px;"
 | 
			
		||||
                  class="filter-item" @keyup.enter.native="crud.toQuery"
 | 
			
		||||
        />
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        <div>
 | 
			
		||||
| 
						 | 
				
			
			@ -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-group>
 | 
			
		||||
| 
						 | 
				
			
			@ -156,10 +156,10 @@
 | 
			
		|||
                       align="center" size="mini"
 | 
			
		||||
                       @click="toAgvTaskUp(scope.row)"
 | 
			
		||||
            >
 | 
			
		||||
              顶升
 | 
			
		||||
              {{ scope.row.type == 'Fx_Off_Line' ? '到站' : '顶升' }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button type="success"
 | 
			
		||||
                       :disabled="scope.row.status!='UP_CONTAINER'  "
 | 
			
		||||
                       :disabled="scope.row.status!='UP_CONTAINER' &&  scope.row.status!='ARRIVED'  "
 | 
			
		||||
                       align="center"
 | 
			
		||||
                       size="mini"
 | 
			
		||||
                       @click="toAgvTaskFinish(scope.row)"
 | 
			
		||||
| 
						 | 
				
			
			@ -197,7 +197,7 @@
 | 
			
		|||
<script>
 | 
			
		||||
import crudAgvTask from '@/api/agvTask'
 | 
			
		||||
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 crudOperation from '@crud/CRUD.operation'
 | 
			
		||||
import udOperation from '@crud/UD.operation'
 | 
			
		||||
| 
						 | 
				
			
			@ -227,7 +227,7 @@ const defaultForm = {
 | 
			
		|||
}
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'AgvTask',
 | 
			
		||||
  components: { DateRangePicker, pagination, crudOperation, rrOperation, udOperation },
 | 
			
		||||
  components: {DateRangePicker, pagination, crudOperation, rrOperation, udOperation},
 | 
			
		||||
  mixins: [presenter(), header(), form(defaultForm), crud()],
 | 
			
		||||
  dicts: ['base_staus', 'task_status', 'task_type'],
 | 
			
		||||
  cruds() {
 | 
			
		||||
| 
						 | 
				
			
			@ -239,7 +239,7 @@ export default {
 | 
			
		|||
      },
 | 
			
		||||
      idField: 'id',
 | 
			
		||||
      sort: 'id,desc',
 | 
			
		||||
      crudMethod: { ...crudAgvTask },
 | 
			
		||||
      crudMethod: {...crudAgvTask},
 | 
			
		||||
      optShow: {
 | 
			
		||||
        add: false,
 | 
			
		||||
        edit: false,
 | 
			
		||||
| 
						 | 
				
			
			@ -256,18 +256,16 @@ export default {
 | 
			
		|||
        edit: ['admin', 'agvTask:edit'],
 | 
			
		||||
        del: ['admin', 'agvTask:del']
 | 
			
		||||
      },
 | 
			
		||||
      rules: {
 | 
			
		||||
        containerCode: [
 | 
			
		||||
          { required: true, message: '容器码不能为空', trigger: 'blur' }
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      rules: {},
 | 
			
		||||
      radio3: '执行中',
 | 
			
		||||
      agvTaskUpDialog: false,
 | 
			
		||||
      agvTaskUpForm: {
 | 
			
		||||
        containerCode: null,
 | 
			
		||||
        type: null,
 | 
			
		||||
        missionCode: null
 | 
			
		||||
      },
 | 
			
		||||
      missionStatus: null
 | 
			
		||||
      missionStatus: null,
 | 
			
		||||
      currentPosition: null
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
| 
						 | 
				
			
			@ -282,16 +280,19 @@ export default {
 | 
			
		|||
    toAgvTaskUpContainer() {
 | 
			
		||||
      this.$refs['agvTaskUpForm'].validate((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({
 | 
			
		||||
            missionCode: this.agvTaskUpForm.missionCode,
 | 
			
		||||
            containerCode: this.agvTaskUpForm.containerCode,
 | 
			
		||||
            missionStatus: 'UP_CONTAINER'
 | 
			
		||||
            missionStatus: this.missionStatus,
 | 
			
		||||
            currentPosition: this.currentPosition
 | 
			
		||||
          }).then(res => {
 | 
			
		||||
            if (res.status == 200) {
 | 
			
		||||
              this.agvTaskUpDialog = false
 | 
			
		||||
              this.crud.notify('顶升成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
 | 
			
		||||
              this.crud.toQuery()
 | 
			
		||||
              this.agvTaskUpForm = { boxCode: null, missionCode: null }
 | 
			
		||||
              this.agvTaskUpForm = {boxCode: null, missionCode: null}
 | 
			
		||||
            } else {
 | 
			
		||||
              this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -365,6 +366,7 @@ export default {
 | 
			
		|||
    toAgvTaskUp(data) {//弹出顶升盒子
 | 
			
		||||
      this.agvTaskUpForm.missionCode = data.id
 | 
			
		||||
      this.agvTaskUpForm.containerCode = data.stockCode
 | 
			
		||||
      this.agvTaskUpForm.type = data.type
 | 
			
		||||
      this.agvTaskUpDialog = true
 | 
			
		||||
    },
 | 
			
		||||
    resetQuery() {
 | 
			
		||||
| 
						 | 
				
			
			@ -384,6 +386,9 @@ export default {
 | 
			
		|||
      } else if (lab === '顶升') {
 | 
			
		||||
        this.query.status = 'UP_CONTAINER'
 | 
			
		||||
        this.crud.toQuery()
 | 
			
		||||
      } else if (lab === '已到站') {
 | 
			
		||||
        this.query.status = 'ARRIVED'
 | 
			
		||||
        this.crud.toQuery()
 | 
			
		||||
      } else if (lab === '已完成') {
 | 
			
		||||
        this.query.status = 'FINISH'
 | 
			
		||||
        this.crud.toQuery()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue