rev
This commit is contained in:
@@ -103,4 +103,12 @@ export function getMaterial() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial }
|
||||
export function synchronize(data) {
|
||||
return request({
|
||||
url: 'api/workorder/synchronize',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial, synchronize }
|
||||
|
||||
@@ -129,7 +129,13 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划数量" prop="plan_qty">
|
||||
<el-input v-model="form.plan_qty" :disabled="crud.status.edit" type="number" style="width: 300px"><i
|
||||
<el-input
|
||||
v-model="form.plan_qty"
|
||||
oninput="value=value.replace(/[^0-9]/g,'')"
|
||||
:disabled="crud.status.edit"
|
||||
type="number"
|
||||
style="width: 300px"
|
||||
><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>块</i></el-input>
|
||||
@@ -138,14 +144,68 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划生产日期" prop="plan_date">
|
||||
<el-date-picker
|
||||
v-model="form.plan_date"
|
||||
<el-form-item label="计划重量" prop="plan_weight">
|
||||
<el-input
|
||||
v-model="form.plan_weight"
|
||||
oninput="value=value.replace(/[^0-9]/g,'')"
|
||||
:disabled="crud.status.edit"
|
||||
type="number"
|
||||
style="width: 300px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="木托盘类型" prop="vehicle_type">
|
||||
<el-select
|
||||
v-model="form.vehicle_type"
|
||||
placeholder="木托盘类型"
|
||||
style="width: 300px"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.wood_vehicle_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单重" prop="dz">
|
||||
<el-input v-model="form.dz" oninput="value=value.replace(/\D+/,'')" type="number" style="width: 300px">
|
||||
<i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格" prop="gg">
|
||||
<el-input v-model="form.gg" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户" prop="kh">
|
||||
<el-input v-model="form.kh" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -198,8 +258,20 @@
|
||||
label="物料号"
|
||||
:min-width="flexWidth('material_number',crud.data,'物料号')"
|
||||
/>
|
||||
<el-table-column prop="vehicle_type" label="木托盘类型" :min-width="flexWidth('vehicle_type',crud.data,'类型一木托盘')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
|
||||
<el-table-column prop="plan_date" label="计划生产日期" :min-width="flexWidth('plan_date',crud.data,'计划生产日期')" />
|
||||
<el-table-column
|
||||
prop="plan_weight"
|
||||
label="计划重量"
|
||||
:min-width="flexWidth('plan_weight',crud.data,'计划重量')"
|
||||
/>
|
||||
<el-table-column prop="dz" label="单重" :min-width="flexWidth('dz',crud.data,'单重')" />
|
||||
<el-table-column prop="gg" label="规格" :min-width="flexWidth('gg',crud.data,'规格')" />
|
||||
<el-table-column prop="kh" label="客户" :min-width="flexWidth('kh',crud.data,'客户')" />
|
||||
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.true_or_false[scope.row.is_urgent] }}
|
||||
@@ -215,16 +287,10 @@
|
||||
label="实际结束时间"
|
||||
:min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')"
|
||||
/>
|
||||
<el-table-column prop="real_qty" label="实际生产数量" :min-width="flexWidth('real_qty',crud.data,'实际生产数量')" />
|
||||
<el-table-column
|
||||
prop="qualified_qty"
|
||||
label="合格数量"
|
||||
:min-width="flexWidth('qualified_qty',crud.data,'合格数量')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="unqualified_qty"
|
||||
label="不合格数量"
|
||||
:min-width="flexWidth('unqualified_qty',crud.data,'不合格数量')"
|
||||
prop="real_qty"
|
||||
label="实际生产数量"
|
||||
:min-width="flexWidth('real_qty',crud.data,'实际生产数量')"
|
||||
/>
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column
|
||||
@@ -335,7 +401,7 @@ const defaultForm = {
|
||||
material_id: null,
|
||||
material_number: null,
|
||||
material_weight: null,
|
||||
vehicle_type: '3',
|
||||
vehicle_type: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
@@ -369,7 +435,11 @@ const defaultForm = {
|
||||
qualified_qty: '0',
|
||||
unqualified_qty: '0',
|
||||
region_code: null,
|
||||
plan_date: null
|
||||
plan_date: null,
|
||||
plan_weight: null,
|
||||
dz: null,
|
||||
gg: null,
|
||||
kh: null
|
||||
}
|
||||
export default {
|
||||
name: 'FJWorkorder',
|
||||
@@ -424,8 +494,8 @@ export default {
|
||||
is_pri: [
|
||||
{ required: true, message: '是否优先包装不能为空', trigger: 'blur' }
|
||||
],
|
||||
plan_date: [
|
||||
{ required: true, message: '计划生产日期不能为空', trigger: 'blur' }
|
||||
plan_weight: [
|
||||
{ required: true, message: '计划重量不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,15 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
type="primary"
|
||||
class="filter-item"
|
||||
icon="el-icon-download"
|
||||
@click="synchronize()"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -128,21 +137,55 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划重量" prop="plan_qty">
|
||||
<el-input v-model="form.plan_qty" :disabled="form.order_status > '1'" type="number" style="width: 300px"><i slot="suffix" style="font-style:normal;margin-right: 10px;">千克</i></el-input>
|
||||
<el-form-item label="计划数量" prop="plan_qty">
|
||||
<el-input
|
||||
v-model="form.plan_qty"
|
||||
oninput="value=value.replace(/[^0-9]/g,'')"
|
||||
:disabled="crud.status.edit"
|
||||
type="number"
|
||||
style="width: 300px"
|
||||
><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>块</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划生产日期" prop="plan_date">
|
||||
<el-date-picker
|
||||
v-model="form.plan_date"
|
||||
style="width: 300px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<el-form-item label="计划重量" prop="plan_weight">
|
||||
<el-input v-model="form.plan_weight" oninput="value=value.replace(/[^0-9]/g,'')" :disabled="form.order_status > '1'" type="number" style="width: 300px"><i slot="suffix" style="font-style:normal;margin-right: 10px;">千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单重" prop="dz">
|
||||
<el-input v-model="form.dz" oninput="value=value.replace(/\D+/,'')" type="number" style="width: 300px">
|
||||
<i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格" prop="gg">
|
||||
<el-input v-model="form.gg" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户" prop="kh">
|
||||
<el-input v-model="form.kh" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -154,14 +197,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否正品料" prop="is_new">
|
||||
<el-radio v-model="form.is_new" :disabled="form.order_status > '1'" label="1">是</el-radio>
|
||||
<el-radio v-model="form.is_new" :disabled="form.order_status > '1'" label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
||||
@@ -191,8 +226,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_name" label="设备" :min-width="flexWidth('device_name',crud.data,'设备')" />
|
||||
<el-table-column prop="material_number" label="物料号" :min-width="flexWidth('material_number',crud.data,'物料号')" />
|
||||
<el-table-column prop="plan_qty" label="计划重量" :min-width="flexWidth('plan_qty',crud.data,'计划数量/重量')" />
|
||||
<el-table-column prop="plan_date" label="计划生产日期" :min-width="flexWidth('plan_date',crud.data,'计划生产日期')" />
|
||||
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
|
||||
<el-table-column prop="plan_weight" label="计划重量" :min-width="flexWidth('plan_weight',crud.data,'计划重量')" />
|
||||
<el-table-column prop="dz" label="单重" :min-width="flexWidth('dz',crud.data,'单重')" />
|
||||
<el-table-column prop="gg" label="规格" :min-width="flexWidth('gg',crud.data,'规格')" />
|
||||
<el-table-column prop="kh" label="客户" :min-width="flexWidth('kh',crud.data,'客户')" />
|
||||
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.true_or_false[scope.row.is_urgent] }}
|
||||
@@ -305,7 +343,11 @@ const defaultForm = {
|
||||
qualified_qty: '0',
|
||||
unqualified_qty: '0',
|
||||
region_code: null,
|
||||
plan_date: null
|
||||
plan_date: null,
|
||||
plan_weight: null,
|
||||
dz: null,
|
||||
gg: null,
|
||||
kh: null
|
||||
}
|
||||
export default {
|
||||
name: 'HLWorkorder',
|
||||
@@ -342,6 +384,9 @@ export default {
|
||||
orderData: {},
|
||||
finishShow: false,
|
||||
rules: {
|
||||
plan_weight: [
|
||||
{ required: true, message: '计划重量不能为空', trigger: 'blur' }
|
||||
],
|
||||
plan_qty: [
|
||||
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -359,9 +404,6 @@ export default {
|
||||
],
|
||||
is_pri: [
|
||||
{ required: true, message: '是否优先包装不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_new: [
|
||||
{ required: true, message: '是否新料不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -433,6 +475,15 @@ export default {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudWorkorder.synchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,15 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
type="primary"
|
||||
class="filter-item"
|
||||
icon="el-icon-download"
|
||||
@click="synchronize()"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -148,14 +157,31 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划生产日期" prop="plan_date">
|
||||
<el-date-picker
|
||||
v-model="form.plan_date"
|
||||
style="width: 300px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<el-form-item label="单重" prop="dz">
|
||||
<el-input v-model="form.dz" oninput="value=value.replace(/\D+/,'')" :disabled="crud.status.edit" type="number" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格" prop="gg">
|
||||
<el-input v-model="form.gg" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户" prop="kh">
|
||||
<el-input v-model="form.kh" style="width: 300px"><i
|
||||
slot="suffix"
|
||||
style="font-style:normal;margin-right: 10px;"
|
||||
>千克</i></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -218,7 +244,9 @@
|
||||
/>
|
||||
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
|
||||
<el-table-column prop="plan_weight" label="计划重量" :min-width="flexWidth('plan_weight',crud.data,'计划重量')" />
|
||||
<el-table-column prop="plan_date" label="计划生产日期" :min-width="flexWidth('plan_date',crud.data,'计划生产日期')" />
|
||||
<el-table-column prop="dz" label="单重" :min-width="flexWidth('dz',crud.data,'单重')" />
|
||||
<el-table-column prop="gg" label="规格" :min-width="flexWidth('gg',crud.data,'规格')" />
|
||||
<el-table-column prop="kh" label="客户" :min-width="flexWidth('kh',crud.data,'客户')" />
|
||||
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.true_or_false[scope.row.is_urgent] }}
|
||||
@@ -348,8 +376,6 @@ import pagination from '@crud/Pagination'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/workerorder/ViewDialog'
|
||||
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -398,7 +424,10 @@ const defaultForm = {
|
||||
unqualified_qty: '0',
|
||||
region_code: null,
|
||||
plan_date: null,
|
||||
plan_weight: null
|
||||
plan_weight: null,
|
||||
dz: null,
|
||||
gg: null,
|
||||
kh: null
|
||||
}
|
||||
export default {
|
||||
name: 'Produceshiftorder',
|
||||
@@ -453,9 +482,6 @@ export default {
|
||||
is_pri: [
|
||||
{ required: true, message: '是否优先包装不能为空', trigger: 'blur' }
|
||||
],
|
||||
plan_date: [
|
||||
{ required: true, message: '计划生产日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
plan_weight: [
|
||||
{ required: true, message: '计划重量不能为空', trigger: 'blur' }
|
||||
]
|
||||
@@ -534,14 +560,13 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
downloadExcel() {
|
||||
if (this.crud.query.createTime) {
|
||||
this.crud.query.begin_time = this.crud.query.createTime[0]
|
||||
this.crud.query.end_time = this.crud.query.createTime[1]
|
||||
}
|
||||
download('/api/workorder/downloadExcel', this.crud.query).then(res => {
|
||||
downloadFile(res, '生产统计', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudWorkorder.synchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user