rev:代码评审优化
This commit is contained in:
@@ -231,6 +231,8 @@
|
||||
<el-table-column prop="productin_qty" label="重量(Kg)" :min-width="flexWidth('productin_qty',crud.data,'重量(Kg)')" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="agvno" label="车号" :min-width="flexWidth('agvno',crud.data,'车号')" />
|
||||
<el-table-column prop="pscn" label="SAP批次号" :min-width="flexWidth('pscn',crud.data,'批次号')" />
|
||||
<el-table-column prop="origin" label="母卷来源" :min-width="flexWidth('origin',crud.data,'母卷来源')" :formatter="formatOrigin"/>
|
||||
<el-table-column prop="roll_status" label="母卷状态" :min-width="flexWidth('roll_status',crud.data,'母卷状态')" :formatter="formatRollStatus" />
|
||||
<el-table-column prop="product_area" label="生产区域" :min-width="flexWidth('product_area',crud.data,'生产区域')" />
|
||||
<el-table-column prop="is_baking" label="请求烘烤" :min-width="flexWidth('is_baking',crud.data,'请求烘烤')" :formatter="formatBakeIsOrNot" />
|
||||
<el-table-column prop="is_instor" label="请求入半成品库" :min-width="flexWidth('is_instor',crud.data,'请求入半成品库')" :formatter="formatStorIsOrNot" />
|
||||
@@ -296,7 +298,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Rawfoilworkorder',
|
||||
dicts: ['product_area', 'product_status', 'IS_OR_NOT'],
|
||||
dicts: ['product_area', 'product_status', 'IS_OR_NOT', 'ROLL_STATUS_TYPE', 'ORIGIN_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Dialog, MaterDialog, SbpointivtDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -346,7 +348,7 @@ export default {
|
||||
eqp_velocity: [
|
||||
{ required: true, message: '设备生产速度不能为空', trigger: 'blur' }
|
||||
],
|
||||
p_coiler_date: [
|
||||
up_coiler_date: [
|
||||
{ required: true, message: '上卷开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
pscn: [
|
||||
@@ -375,6 +377,12 @@ export default {
|
||||
formatStatusName(row) {
|
||||
return this.dict.label.product_status[row.status]
|
||||
},
|
||||
formatOrigin(row) {
|
||||
return this.dict.label.ORIGIN_TYPE[row.origin]
|
||||
},
|
||||
formatRollStatus(row) {
|
||||
return this.dict.label.ROLL_STATUS_TYPE[row.roll_status]
|
||||
},
|
||||
formatBakeIsOrNot(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_baking]
|
||||
},
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
<el-form-item label="产品描述" prop="description">
|
||||
<el-input v-model="form.description" disabled style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户编码" prop="customer_code">
|
||||
<el-input v-model="form.customer_code" disabled class="input-with-select">
|
||||
<el-form-item label="客户编码" prop="costomer_code">
|
||||
<el-input v-model="form.costomer_code" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryCustomer()" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customer_name">
|
||||
<el-input v-model="form.customer_name" disabled style="width: 150px;" />
|
||||
<el-form-item label="客户名称" prop="costomer_name">
|
||||
<el-input v-model="form.costomer_name" disabled style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
@@ -168,6 +168,7 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.paper_tube_or_frp_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
@@ -247,13 +248,19 @@
|
||||
<span v-show="scope.row.edit">{{ scope.row.split_breadth }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="sale_order_name" label="销售订单及行号" :min-width="flexWidth('sale_order_name',crud.data,'销售订单及行号')">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.sale_order_name" size="mini" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.sale_order_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="split_height" label="子卷理论长度" :min-width="flexWidth('split_height',crud.data,'子卷理论长度')">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.split_height" size="mini" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.split_height }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="split_weight" label="子卷理论长度" :min-width="flexWidth('split_weight',crud.data,'子卷理论重量')">
|
||||
<el-table-column show-overflow-tooltip prop="split_weight" label="子卷理论重量" :min-width="flexWidth('split_weight',crud.data,'子卷理论重量')">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.split_weight" size="mini" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.split_weight }}</span>
|
||||
@@ -278,8 +285,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudSlittingproductionplan, { getSlittingproductionplanDtl } from '@/views/wms/pdm/order/slittingplan/slittingproductionplan'
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import CustomerDialog from '@/views/wms/pub/CustomerDialog'
|
||||
@@ -293,13 +300,14 @@ const defaultForm = {
|
||||
restruct_container_name: null,
|
||||
ware_house: null,
|
||||
resource_name: null,
|
||||
paper_tube_or_frp: null,
|
||||
split_group: null,
|
||||
mfg_order_name: null,
|
||||
manufacture_date: null,
|
||||
remark: null,
|
||||
qzzno: null,
|
||||
customer_code: null,
|
||||
customer_name: null,
|
||||
costomer_code: null,
|
||||
costomer_name: null,
|
||||
show_edit: false,
|
||||
tableData: [],
|
||||
detail_count: '0'
|
||||
@@ -360,6 +368,60 @@ export default {
|
||||
rules: {
|
||||
order_type: [
|
||||
{ required: true, message: '订单类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
container_name: [
|
||||
{ required: true, message: '子卷号不能为空', trigger: 'blur' }
|
||||
],
|
||||
split_weight: [
|
||||
{ required: true, message: '子卷理论重量不能为空', trigger: 'blur' }
|
||||
],
|
||||
split_breadth: [
|
||||
{ required: true, message: '子卷幅宽不能为空', trigger: 'blur' }
|
||||
],
|
||||
split_height: [
|
||||
{ required: true, message: '子卷长度不能为空', trigger: 'blur' }
|
||||
],
|
||||
sale_order_name: [
|
||||
{ required: true, message: '销售订单及行号不能为空', trigger: 'blur' }
|
||||
],
|
||||
product_name: [
|
||||
{ required: true, message: '产品编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
description: [
|
||||
{ required: true, message: '产品描述不能为空', trigger: 'blur' }
|
||||
],
|
||||
ware_house: [
|
||||
{ required: true, message: '来源卷位置不能为空', trigger: 'blur' }
|
||||
],
|
||||
resource_name: [
|
||||
{ required: true, message: '分切机台编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
split_group: [
|
||||
{ required: true, message: '分切组别不能为空', trigger: 'blur' }
|
||||
],
|
||||
paper_tube_or_frp: [
|
||||
{ required: true, message: '管件类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
up_or_down: [
|
||||
{ required: true, message: '上轴下轴不能为空', trigger: 'blur' }
|
||||
],
|
||||
left_or_right: [
|
||||
{ required: true, message: '左卷右卷不能为空', trigger: 'blur' }
|
||||
],
|
||||
box_code: [
|
||||
{ required: true, message: '木箱物料编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
box_description: [
|
||||
{ required: true, message: '木箱描述不能为空', trigger: 'blur' }
|
||||
],
|
||||
manufacture_date: [
|
||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
costomer_code: [
|
||||
{ required: true, message: '客户编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
costomer_name: [
|
||||
{ required: true, message: '客户名称不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -381,12 +443,12 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
crudSlittingproductionplan.getSlittingproductionplanDtl({ 'parent_container_name': this.form.parent_container_name, 'split_group': this.form.split_group }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
row.edit = false
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
@@ -396,9 +458,7 @@ export default {
|
||||
this.mater_btn = false
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
crudSlittingproductionplan.getSlittingproductionplanDtl({ 'parent_container_name': this.form.parent_container_name, 'split_group': this.form.split_group }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
@@ -482,7 +542,7 @@ export default {
|
||||
this.cutpointivtShow = true
|
||||
},
|
||||
async insertdtl() {
|
||||
this.form.tableData.push({ container_name: '', paper_tube_or_frp: '', paper_tube_material: '', paper_tube_description: '', paper_tube_model: '', frp_material: '', frp_description: '', frp_model: '', up_or_down: '', left_or_right: '', box_code: '', box_description: '', box_model: '', split_length: '', split_breadth: '', split_weight: '', edit: false })
|
||||
this.form.tableData.push({ container_name: '', paper_tube_or_frp: '', paper_tube_material: '', paper_tube_description: '', paper_tube_model: '', frp_material: '', frp_description: '', frp_model: '', up_or_down: '', left_or_right: '', box_code: '', box_description: '', box_model: '', split_length: '', split_breadth: '', split_weight: '', sale_order_name: '', sale_order_name: '', edit: false })
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tube_or_FRP1() {
|
||||
@@ -533,8 +593,8 @@ export default {
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
setCustomValue(row) {
|
||||
this.form.customer_code = row.cust_code
|
||||
this.form.customer_name = row.cust_name
|
||||
this.form.costomer_code = row.cust_code
|
||||
this.form.costomer_name = row.cust_name
|
||||
},
|
||||
setCutpointivtValue(row) {
|
||||
this.form.resource_name = row.ext_code
|
||||
|
||||
@@ -329,7 +329,17 @@
|
||||
size="mini"
|
||||
@click="print"
|
||||
>
|
||||
打印
|
||||
打印卷标
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
@click="print1"
|
||||
>
|
||||
打印管标
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
@@ -410,6 +420,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="160px" />
|
||||
<el-table-column prop="start_time" label="开始时间" width="150px" />
|
||||
<el-table-column prop="costomer_code" label="客户编码" width="150px" />
|
||||
<el-table-column prop="costomer_name" label="客户名称" width="150px" />
|
||||
<el-table-column prop="end_time" label="结束时间" width="150px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -427,9 +439,6 @@
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<tube-dialog2 :dialog-show.sync="showView2" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
|
||||
<CustomerDialog :dialog-show.sync="customShow" :mater-opt-code.sync="customType" @setCustomValue="setCustomValue" />
|
||||
<CutpointivtDialog :dialog-show.sync="cutpointivtShow" :mater-opt-code.sync="cutpointivtType" @setCutpointivtValue="setCutpointivtValue" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -441,72 +450,14 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import TubeDialog2 from '@/views/wms/pdm/order/slittingplan/tubeDialog2.vue'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import CustomerDialog from '@/views/wms/pub/CustomerDialog'
|
||||
import CutpointivtDialog from '@/views/wms/pub/CutpointivtDialog'
|
||||
import cutSbpointivt from '@/views/wms/pdm/ivt/cutpointivt/cutpointivt'
|
||||
import AddDialog from '@/views/wms/pdm/order/slittingplan/AddDialog'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
order_type: null,
|
||||
container_name: null,
|
||||
product_name: null,
|
||||
description: null,
|
||||
parent_container_name: null,
|
||||
restruct_container_name: null,
|
||||
package_box_sn: null,
|
||||
ware_house: null,
|
||||
resource_name: null,
|
||||
split_group: null,
|
||||
manufacture_sort: null,
|
||||
mfg_order_name: null,
|
||||
manufacture_date: null,
|
||||
paper_tube_or_frp: null,
|
||||
paper_tube_material: null,
|
||||
paper_tube_description: null,
|
||||
paper_tube_model: null,
|
||||
frp_material: null,
|
||||
frp_description: null,
|
||||
frp_model: null,
|
||||
up_or_down: null,
|
||||
left_or_right: null,
|
||||
split_breadth: null,
|
||||
split_height: null,
|
||||
split_weight: null,
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
sale_order_name: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
sysdeptid: null,
|
||||
syscompanyid: null,
|
||||
is_delete: null,
|
||||
is_parent_ok: null,
|
||||
is_child_tz_ok: null,
|
||||
is_child_ps_ok: null,
|
||||
is_call: null,
|
||||
qzzno: null,
|
||||
box_code: null,
|
||||
box_description: null,
|
||||
pscn: null,
|
||||
customer_code: null,
|
||||
customer_name: null,
|
||||
joint_type: null,
|
||||
paper_weight: null,
|
||||
show_edit: false
|
||||
}
|
||||
export default {
|
||||
name: 'Slittingproductionplan',
|
||||
dicts: ['product_area', 'order_type', 'cut_product_status', 'ware_house', 'paper_tube_or_frp_type', 'IS_OR_NOT'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, TubeDialog2, MaterDialog, CustomerDialog, CutpointivtDialog, AddDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, TubeDialog2, AddDialog },
|
||||
mixins: [presenter(), header(), form(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '分切计划',
|
||||
@@ -648,44 +599,10 @@ export default {
|
||||
this.materType = '4415'
|
||||
}
|
||||
},
|
||||
async queryCustomer() {
|
||||
this.customShow = true
|
||||
},
|
||||
async queryCutpointivt() {
|
||||
this.cutpointivtShow = true
|
||||
},
|
||||
querytable() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
tube_or_FRP1() {
|
||||
if (this.paper_type === '1') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
tube_or_FRP2() {
|
||||
if (this.paper_type === '2') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
reform_or_normal1() {
|
||||
if (this.order_type_select === '1') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
reform_or_normal2() {
|
||||
if (this.order_type_select === '2') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
upMaterFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
@@ -696,30 +613,6 @@ export default {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
setMaterValue(row) {
|
||||
if (this.indexType === 1) {
|
||||
this.form.product_name = row.material_code
|
||||
this.form.description = row.material_name
|
||||
} else if (this.indexType === 2) {
|
||||
this.form.paper_tube_material = row.material_code
|
||||
this.form.paper_tube_description = row.material_name
|
||||
this.form.paper_tube_model = row.material_name
|
||||
} else if (this.indexType === 3) {
|
||||
this.form.frp_material = row.material_code
|
||||
this.form.frp_description = row.material_name
|
||||
this.form.frp_model = row.material_name
|
||||
} else if (this.indexType === 4) {
|
||||
this.form.box_code = row.material_code
|
||||
this.form.box_description = row.material_name
|
||||
}
|
||||
},
|
||||
setCustomValue(row) {
|
||||
this.form.customer_code = row.cust_code
|
||||
this.form.customer_name = row.cust_name
|
||||
},
|
||||
setCutpointivtValue(row) {
|
||||
this.form.resource_name = row.ext_code
|
||||
},
|
||||
caseFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
@@ -823,6 +716,17 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
print1() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (!_selectData || _selectData.length < 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudSlittingproductionplan.print1(_selectData).then(res => {
|
||||
this.crud.notify('打印成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
save(row, index) {
|
||||
row.show_edit = '0'
|
||||
crudSlittingproductionplan.updates(row).then(res => {
|
||||
|
||||
@@ -86,4 +86,20 @@ export function print(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates, print }
|
||||
export function print1(data) {
|
||||
return request({
|
||||
url: '/api/slittingproductionplan/print1',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSlittingproductionplanDtl(params) {
|
||||
return request({
|
||||
url: '/api/slittingproductionplan/getSlittingproductionplanDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates, print, getSlittingproductionplanDtl }
|
||||
|
||||
Reference in New Issue
Block a user