rev:刻字包装任务/工序/工单merge
This commit is contained in:
@@ -199,6 +199,17 @@
|
||||
>
|
||||
取消下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="is_disopen(crud.selections)"
|
||||
@click="openstart(crud.selections)"
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -348,23 +359,16 @@
|
||||
<el-input v-model="form.sale_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否搬运" prop="is_needmove">
|
||||
<el-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.id"
|
||||
v-model="form.is_needmove"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
<el-select
|
||||
v-model="form.is_needmove" style="width: 200px" >
|
||||
<el-option v-for="item in trueorfalse" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="允许修改报工数量" prop="is_canupdate_update">
|
||||
<el-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.id"
|
||||
v-model="form.is_canupdate_update"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
<el-form-item label="修改报工数" prop="is_canupdate_update">
|
||||
<el-select
|
||||
v-model="form.is_canupdate_update" style="width: 200px" >
|
||||
<el-option v-for="item in trueorfalse" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="是否启用封箱线" prop="is_used_fxx">
|
||||
<el-radio
|
||||
@@ -375,41 +379,42 @@
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="是否翻转" prop="is_foreward">
|
||||
<el-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.id"
|
||||
v-model="form.package_ext.is_foreward"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="包装模版" prop="package_model">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.package_model"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="拆箱数量" prop="demol_num">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.demol_num"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="总袋量" prop="bag_num">
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="总袋量" prop="order_bag_num">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.bag_num"
|
||||
v-model="form.package_ext.order_bag_num"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="码盘模版" prop="stack_model">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.stack_model"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -548,11 +553,12 @@ import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import AddDialog from '@/views/wms/product_manage/workorder/AddDialog'
|
||||
import UploadDialog from '@/views/wms/product_manage/workorder/UploadDialog'
|
||||
import ReplaceDeviceDialog from '@/views/wms/product_manage/workorder/ReplaceDeviceDialog'
|
||||
import {openStart} from "./produceshiftorder";
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
workorder_code: null,
|
||||
shift_type_scode: null,
|
||||
shift_type_scode: "1",
|
||||
workprocedure_id: null,
|
||||
product_area: 'A1',
|
||||
plan_qty: null,
|
||||
@@ -570,10 +576,10 @@ const defaultForm = {
|
||||
realproduceend_date: null,
|
||||
device_code: null,
|
||||
current_produce_person_id: null,
|
||||
is_canupdate_update: null,
|
||||
is_canupdate_update: true,
|
||||
package_ext: {},
|
||||
workorder_status: null,
|
||||
is_needmove: null,
|
||||
is_needmove: true,
|
||||
sale_id: null,
|
||||
create_type: null,
|
||||
is_error: null,
|
||||
@@ -624,6 +630,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trueorfalse: [ { value: true, label: '是' }, { value: false, label: '否' }],
|
||||
deviceList: [],
|
||||
classes3: [],
|
||||
materType: '01',
|
||||
@@ -712,12 +719,12 @@ export default {
|
||||
const year = d.getFullYear()
|
||||
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||
if (val === '02') {
|
||||
if (val === '2') {
|
||||
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
const day1 = d.getDate() < 10 ? '0' + (d.getDate() + 1) : d.getDate() + 1
|
||||
this.form.planproduceend_date = [year, month, day1].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
}
|
||||
if (val === '01') {
|
||||
if (val === '1') {
|
||||
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
this.form.planproduceend_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
}
|
||||
@@ -850,6 +857,18 @@ export default {
|
||||
return true
|
||||
}
|
||||
},
|
||||
is_disopen(rows) {
|
||||
var length = rows.length
|
||||
if (length === 1 ) {
|
||||
if (rows[0].workorder_status==='2'){
|
||||
return false
|
||||
}else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
@@ -907,6 +926,12 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
openstart(rows) {
|
||||
crudProduceshiftorder.openStart(rows[0]).then(res => {
|
||||
this.crud.notify('开工成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.addShow = true
|
||||
},
|
||||
@@ -918,11 +943,22 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.beforeToAdd]() {
|
||||
this.initDataPlan()
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
console.log(this.form.package_ext)
|
||||
console.log(this.form)
|
||||
if (this.form.package_ext != null && JSON.stringify(this.form.package_ext).length>3){
|
||||
this.form.package_ext = JSON.parse(this.form.package_ext)
|
||||
}
|
||||
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (JSON.stringify(this.form.package_ext).length>3){
|
||||
this.form.package_ext = JSON.stringify(this.form.package_ext)
|
||||
}else {
|
||||
this.form.package_ext = ''
|
||||
}
|
||||
}
|
||||
// [CRUD.HOOK.afterToEdit]() {
|
||||
// const editForm1 = JSON.parse(JSON.stringify(this.form))
|
||||
// this.getNotWorkDeviceByWorkproceduceId(editForm1.workprocedure_id)
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user