|
@ -86,6 +86,17 @@ |
|
|
> |
|
|
> |
|
|
开工 |
|
|
开工 |
|
|
</el-button> |
|
|
</el-button> |
|
|
|
|
|
<el-button |
|
|
|
|
|
slot="right" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
type="warning" |
|
|
|
|
|
icon="el-icon-position" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
:disabled="!(crud.selections[0]) || crud.selections[1]" |
|
|
|
|
|
@click="changeDevice(crud.selections[0])" |
|
|
|
|
|
> |
|
|
|
|
|
工单变更 |
|
|
|
|
|
</el-button> |
|
|
<el-button |
|
|
<el-button |
|
|
slot="right" |
|
|
slot="right" |
|
|
class="filter-item" |
|
|
class="filter-item" |
|
@ -350,11 +361,37 @@ |
|
|
<el-button type="primary" @click="toForceFinish">确认</el-button> |
|
|
<el-button type="primary" @click="toForceFinish">确认</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<!-- 提示对话框 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
:visible.sync="showDeviceChoose" |
|
|
|
|
|
title="选择设备" |
|
|
|
|
|
width="350px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="cacheOrderDevice" |
|
|
|
|
|
placeholder="转移设备" |
|
|
|
|
|
style="width: 300px" |
|
|
|
|
|
filterable |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in yzDeviceList" |
|
|
|
|
|
:key="item.device_id" |
|
|
|
|
|
:label="item.device_name" |
|
|
|
|
|
:value="item.device_code" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="showDeviceChoose = false">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="doChangeDevice">确定</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import crudWorkorder from '@/api/wms/pdm/workorder' |
|
|
import crudWorkorder from '@/api/wms/pdm/workorder' |
|
|
|
|
|
import crudDevice from '@/api/wms/pdm/device' |
|
|
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' |
|
@ -416,7 +453,7 @@ const defaultForm = { |
|
|
} |
|
|
} |
|
|
export default { |
|
|
export default { |
|
|
name: 'Produceshiftorder', |
|
|
name: 'Produceshiftorder', |
|
|
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, ViewDialog, DeviceDialog }, |
|
|
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, ViewDialog, DeviceDialog, crudDevice }, |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
dicts: ['pdm_workorder_status', 'priority_direction', 'is_used', 'is_or_not', 'material_type', 'vehicle_type', 'workorder_procedure', 'true_or_false', 'wood_vehicle_type'], |
|
|
dicts: ['pdm_workorder_status', 'priority_direction', 'is_used', 'is_or_not', 'material_type', 'vehicle_type', 'workorder_procedure', 'true_or_false', 'wood_vehicle_type'], |
|
|
cruds() { |
|
|
cruds() { |
|
@ -470,10 +507,17 @@ export default { |
|
|
plan_date: [ |
|
|
plan_date: [ |
|
|
{ required: true, message: '计划生产日期不能为空', trigger: 'blur' } |
|
|
{ required: true, message: '计划生产日期不能为空', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
} |
|
|
}, |
|
|
|
|
|
showDeviceChoose: false, |
|
|
|
|
|
cacheOrderData: {}, |
|
|
|
|
|
cacheOrderDevice: null, |
|
|
|
|
|
yzDeviceList: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
|
|
|
crudDevice.getYZDevice().then(res => { |
|
|
|
|
|
this.yzDeviceList = res |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 工单状态多选搜索 |
|
|
// 工单状态多选搜索 |
|
@ -545,6 +589,22 @@ export default { |
|
|
this.crud.toQuery() |
|
|
this.crud.toQuery() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 工单变更 |
|
|
|
|
|
changeDevice(row) { |
|
|
|
|
|
this.cacheOrderData = row |
|
|
|
|
|
this.showDeviceChoose = true |
|
|
|
|
|
}, |
|
|
|
|
|
doChangeDevice() { |
|
|
|
|
|
// 工单更换 |
|
|
|
|
|
this.cacheOrderData.new_device_code = this.cacheOrderDevice |
|
|
|
|
|
crudWorkorder.changeDevice(this.cacheOrderData).then(res => { |
|
|
|
|
|
this.crud.notify('工单转移成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
|
|
this.showDeviceChoose = false |
|
|
|
|
|
this.cacheOrderData = {} |
|
|
|
|
|
this.cacheOrderDevice = null |
|
|
|
|
|
this.crud.toQuery() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
downloadExcel() { |
|
|
downloadExcel() { |
|
|
if (this.crud.query.createTime) { |
|
|
if (this.crud.query.createTime) { |
|
|
this.crud.query.begin_time = this.crud.query.createTime[0] |
|
|
this.crud.query.begin_time = this.crud.query.createTime[0] |
|
|