Compare commits
3 Commits
07a05debcb
...
97c63cbfe8
Author | SHA1 | Date |
---|---|---|
|
97c63cbfe8 | 4 weeks ago |
|
d97d3bf635 | 4 weeks ago |
|
3cf1175358 | 4 weeks ago |
33 changed files with 1540 additions and 451 deletions
@ -0,0 +1,601 @@ |
|||
<template> |
|||
<el-dialog |
|||
:title="crud.status.title" |
|||
append-to-body |
|||
fullscreen |
|||
:before-close="crud.cancelCU" |
|||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0" |
|||
width="1200px" |
|||
@open="open" |
|||
@close="close" |
|||
> |
|||
<el-row v-show="crud.status.cu > 0" :gutter="20"> |
|||
<el-col :span="20" style="border: 1px solid white"> |
|||
<span /> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<span> |
|||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button> |
|||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button> |
|||
</span> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":"> |
|||
<el-form-item label="生产订单" prop="mfg_order_name"> |
|||
<el-input v-model="form.mfg_order_name" disabled placeholder="系统生成" style="width: 150px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="订单类型" prop="order_type"> |
|||
<el-select |
|||
v-model="form.order_type" |
|||
clearable |
|||
size="mini" |
|||
placeholder="请选择" |
|||
class="filter-item" |
|||
style="width: 150px" |
|||
@change="hand1" |
|||
> |
|||
<el-option |
|||
v-for="item in dict.order_type" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="母卷号" prop="parent_container_name"> |
|||
<el-input v-model="form.parent_container_name" :disabled="reform_or_normal1()" style="width: 150px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="改制母卷" prop="restruct_container_name"> |
|||
<el-input v-model="form.restruct_container_name" :disabled="reform_or_normal2()" style="width: 150px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="来源位置" prop="ware_house"> |
|||
<el-select |
|||
v-model="form.ware_house" |
|||
clearable |
|||
size="mini" |
|||
placeholder="请选择" |
|||
class="filter-item" |
|||
style="width: 150px" |
|||
@change="hand" |
|||
> |
|||
<el-option |
|||
v-for="item in dict.ware_house" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="机台编码" prop="resource_name"> |
|||
<el-input v-model="form.resource_name" disabled class="input-with-select"> |
|||
<el-button slot="append" icon="el-icon-search" @click="queryCutpointivt()" /> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="分切组" prop="split_group"> |
|||
<el-select |
|||
v-model="form.split_group" |
|||
clearable |
|||
size="mini" |
|||
placeholder="请选择" |
|||
class="filter-item" |
|||
style="width: 150px" |
|||
@change="hand" |
|||
> |
|||
<el-option |
|||
v-for="item in groups" |
|||
:label="item" |
|||
:value="item" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="生产日期" prop="manufacture_date"> |
|||
<el-date-picker |
|||
v-model="form.manufacture_date" |
|||
style="width: 150px;" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="产品编码" prop="product_name"> |
|||
<el-input v-model="form.product_name" disabled class="input-with-select"> |
|||
<el-button slot="append" icon="el-icon-search" @click="queryMater(1)" /> |
|||
</el-input> |
|||
</el-form-item> |
|||
<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-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> |
|||
<el-form-item label="明细数" prop="detail_count"> |
|||
<label slot="label">明 细 数:</label> |
|||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" /> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input v-model="form.remark" style="width: 150px;" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|||
<div class="crud-opts2" style="margin-bottom: 5px;"> |
|||
<span class="crud-opts-right2"> |
|||
<!--左侧插槽--> |
|||
<slot name="left" /> |
|||
<el-button |
|||
slot="left" |
|||
class="filter-item" |
|||
type="primary" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="insertdtl()" |
|||
> |
|||
新增一行 |
|||
</el-button> |
|||
</span> |
|||
|
|||
</div> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
:data="form.tableData" |
|||
style="width: 100%;" |
|||
border |
|||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" |
|||
> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('container_name',crud.data,'子卷号')" prop="container_name" label="子卷号"> |
|||
<template scope="scope"> |
|||
<el-input v-show="!scope.row.edit" v-model="scope.row.container_name" size="mini" /> |
|||
<span v-show="scope.row.edit">{{ scope.row.container_name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('paper_tube_or_frp',crud.data,'管件类型')" prop="paper_tube_or_frp" label="管件类型" > |
|||
<template scope="scope"> |
|||
<el-select |
|||
v-show="!scope.row.edit" |
|||
v-model="scope.row.paper_tube_or_frp" |
|||
clearable |
|||
size="mini" |
|||
placeholder="请选择" |
|||
class="filter-item" |
|||
style="width: 100px" |
|||
@change="hand2" |
|||
> |
|||
<el-option |
|||
v-for="item in dict.paper_tube_or_frp_type" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="paper_tube_material" label="纸筒物料编码" :min-width="flexWidth('paper_tube_material',crud.data,'纸筒物料编码')" > |
|||
<template scope="scope"> |
|||
<el-input v-show="!scope.row.edit" v-model="scope.row.paper_tube_material" disabled class="input-with-select"> |
|||
<el-button slot="append" icon="el-icon-search" :disabled="tube_or_FRP1()" @click="queryMater(2,scope.$index, scope.row)" /> |
|||
</el-input> |
|||
<span v-show="scope.row.edit">{{ scope.row.paper_tube_material }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column show-overflow-tooltip prop="paper_tube_description" align="center" :min-width="flexWidth('paper_tube_description',crud.data,'纸筒物料描述')" label="纸筒物料描述" /> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('paper_tube_model',crud.data,'纸筒规格')" prop="paper_tube_model" label="纸筒规格" /> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('frp_material',crud.data,'FRP管物料编码')" prop="frp_material" label="FRP管物料编码" > |
|||
<template scope="scope"> |
|||
<el-input v-show="!scope.row.edit" v-model="scope.row.frp_material" disabled class="input-with-select"> |
|||
<el-button slot="append" icon="el-icon-search" :disabled="tube_or_FRP2()" @click="queryMater(3,scope.$index, scope.row)" /> |
|||
</el-input> |
|||
<span v-show="scope.row.edit">{{ scope.row.frp_material }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('frp_description',crud.data,'FRP管物料描述')" prop="frp_description" label="FRP管物料描述" /> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('frp_model',crud.data,'FRP管规格')" prop="frp_model" label="FRP管规格" /> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('up_or_down',crud.data,'上轴下轴')" prop="up_or_down" label="上轴下轴" > |
|||
<template scope="scope"> |
|||
<el-select |
|||
v-model="scope.row.up_or_down" |
|||
clearable |
|||
size="mini" |
|||
placeholder="请选择" |
|||
class="filter-item" |
|||
style="width: 370px" |
|||
> |
|||
<el-option |
|||
v-for="item in updowns" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column show-overflow-tooltip prop="left_or_right" label="左卷右卷" :min-width="flexWidth('left_or_right',crud.data,'左卷右卷')" > |
|||
<template scope="scope"> |
|||
<el-select |
|||
v-model="scope.row.left_or_right" |
|||
clearable |
|||
size="mini" |
|||
placeholder="请选择" |
|||
class="filter-item" |
|||
style="width: 370px" |
|||
> |
|||
<el-option |
|||
v-for="item in leftorrights" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('box_code',crud.data,'木箱物料编码')" prop="frp_material" label="木箱物料编码" > |
|||
<template scope="scope"> |
|||
<el-input v-show="!scope.row.edit" v-model="scope.row.box_code" disabled class="input-with-select"> |
|||
<el-button slot="append" icon="el-icon-search" @click="queryMater(4,scope.$index, scope.row)" /> |
|||
</el-input> |
|||
<span v-show="scope.row.edit">{{ scope.row.box_code }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column show-overflow-tooltip :min-width="flexWidth('box_description',crud.data,'木箱描述')" prop="box_description" label="木箱描述" /> |
|||
<el-table-column show-overflow-tooltip prop="split_breadth" label="子卷幅宽" :min-width="flexWidth('split_breadth',crud.data,'子卷幅宽')"> |
|||
<template scope="scope"> |
|||
<el-input v-show="!scope.row.edit" v-model="scope.row.split_breadth" size="mini" /> |
|||
<span v-show="scope.row.edit">{{ scope.row.split_breadth }}</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,'子卷理论重量')"> |
|||
<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> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right"> |
|||
<template scope="scope"> |
|||
<el-button |
|||
type="danger" |
|||
class="filter-item" |
|||
size="mini" |
|||
icon="el-icon-delete" |
|||
@click.native.prevent="deleteRow(scope.$index, form.tableData)" |
|||
/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<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" /> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
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' |
|||
import CutpointivtDialog from '@/views/wms/pub/CutpointivtDialog' |
|||
|
|||
const defaultForm = { |
|||
order_type: null, |
|||
product_name: null, |
|||
description: null, |
|||
parent_container_name: null, |
|||
restruct_container_name: null, |
|||
ware_house: null, |
|||
resource_name: null, |
|||
split_group: null, |
|||
mfg_order_name: null, |
|||
manufacture_date: null, |
|||
remark: null, |
|||
qzzno: null, |
|||
customer_code: null, |
|||
customer_name: null, |
|||
show_edit: false, |
|||
tableData: [], |
|||
detail_count: '0' |
|||
} |
|||
|
|||
export default { |
|||
name: 'AddDialog', |
|||
components: { MaterDialog, CustomerDialog, CutpointivtDialog }, |
|||
mixins: [crud(), form(defaultForm)], |
|||
dicts: ['product_area', 'order_type', 'cut_product_status', 'ware_house', 'paper_tube_or_frp_type'], |
|||
props: { |
|||
dialogShow: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
bussConfig: { |
|||
type: Object |
|||
}, |
|||
openParam: { |
|||
type: Object |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
paper_type: '', |
|||
order_type_select: '', |
|||
groups: ['A', 'B', 'C', 'D', 'F'], |
|||
updowns: [{ |
|||
value: '1', |
|||
label: '上轴' |
|||
}, { |
|||
value: '2', |
|||
label: '下轴' |
|||
}], |
|||
leftorrights: [{ |
|||
value: '1', |
|||
label: '左卷' |
|||
}, { |
|||
value: '2', |
|||
label: '右卷' |
|||
}], |
|||
dialogVisible: false, |
|||
dtlShow: false, |
|||
opendtlParam: null, |
|||
bill_btn: false, |
|||
mater_btn: false, |
|||
storlist: [], |
|||
nowrow: {}, |
|||
nowindex: '', |
|||
billtypelist: [], |
|||
materType: '', |
|||
customType: '', |
|||
cutpointivtType: '', |
|||
indexType: '', |
|||
materShow: false, |
|||
customShow: false, |
|||
cutpointivtShow: false, |
|||
rules: { |
|||
order_type: [ |
|||
{ required: true, message: '订单类型不能为空', trigger: 'blur' } |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
watch: { |
|||
dialogShow: { |
|||
handler(newValue, oldValue) { |
|||
this.dialogVisible = newValue |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
open() { |
|||
crudUserStor.getUserStor().then(res => { |
|||
this.storlist = res |
|||
}) |
|||
}, |
|||
close() { |
|||
this.$emit('AddChanged') |
|||
}, |
|||
[CRUD.HOOK.afterToEdit]() { |
|||
// 获取入库单明细 |
|||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => { |
|||
this.form.tableData = res |
|||
// 将明细变成不可编辑 |
|||
for (let i = 0; i < this.form.tableData.length; i++) { |
|||
const row = this.form.tableData[i] |
|||
this.form.tableData.splice(i, 1, row) |
|||
} |
|||
}) |
|||
}, |
|||
[CRUD.HOOK.afterToAdd]() { |
|||
this.bill_btn = false |
|||
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 => { |
|||
this.form.tableData = res |
|||
// 将明细变成不可编辑 |
|||
for (let i = 0; i < this.form.tableData.length; i++) { |
|||
const row = this.form.tableData[i] |
|||
this.form.tableData.splice(i, 1, row) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
[CRUD.HOOK.beforeSubmit]() { |
|||
// 提交前校验 |
|||
if (this.form.tableData.length === 0) { |
|||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO) |
|||
return false |
|||
} |
|||
}, |
|||
billTypeChange(val) { |
|||
if (val === '000101') { |
|||
this.bill_btn = false |
|||
this.mater_btn = true |
|||
} else if (val === '000102') { |
|||
this.bill_btn = true |
|||
this.mater_btn = false |
|||
} else { |
|||
this.bill_btn = true |
|||
this.mater_btn = true |
|||
} |
|||
this.form.tableData = [] |
|||
this.form.total_qty = 0 |
|||
this.form.detail_count = 0 |
|||
}, |
|||
tableChanged2(row) { |
|||
// 新增一行物料时,给行进行赋值 |
|||
this.nowrow.material_code = row.material_code |
|||
this.nowrow.material_id = row.material_id |
|||
this.nowrow.material_name = row.material_name |
|||
this.nowrow.qty_unit_id = row.base_unit_id |
|||
this.nowrow.qty_unit_name = row.unit_name |
|||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新 |
|||
}, |
|||
fun(val) { |
|||
return Number(val).toFixed(3) |
|||
}, |
|||
// async queryMater(index, row) { |
|||
// checkoutbill.paramByCodeType({ 'bill_type': this.form.bill_type, 'io_flag': '00' }).then(res => { |
|||
// this.materType = res.materType |
|||
// this.materShow = true |
|||
// this.nowindex = index |
|||
// this.nowrow = row |
|||
// }) |
|||
// }, |
|||
hand() { |
|||
this.crud.toQuery() |
|||
}, |
|||
hand1(val) { |
|||
this.order_type_select = val |
|||
}, |
|||
hand2(val) { |
|||
this.paper_type = val |
|||
}, |
|||
async queryMater(index1, index, row) { |
|||
this.indexType = index1 |
|||
this.materShow = true |
|||
this.nowindex = index |
|||
this.nowrow = row |
|||
// 7019FRP管,4822纸管,4415木箱,7410产品 |
|||
if (index1 === 1) { |
|||
this.materType = '7410' |
|||
} else if (index1 === 2) { |
|||
this.materType = '4822' |
|||
} else if (index1 === 3) { |
|||
this.materType = '7019' |
|||
} else if (index1 === 4) { |
|||
this.materType = '4415' |
|||
} |
|||
}, |
|||
async queryCustomer() { |
|||
this.customShow = true |
|||
}, |
|||
async queryCutpointivt() { |
|||
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.detail_count = this.form.tableData.length |
|||
}, |
|||
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 |
|||
} |
|||
}, |
|||
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.nowrow.paper_tube_material = row.material_code |
|||
this.nowrow.paper_tube_description = row.material_name |
|||
this.nowrow.paper_tube_model = row.material_name |
|||
} else if (this.indexType === 3) { |
|||
this.nowrow.frp_material = row.material_code |
|||
this.nowrow.frp_description = row.material_name |
|||
this.nowrow.frp_model = row.material_name |
|||
} else if (this.indexType === 4) { |
|||
this.nowrow.box_code = row.material_code |
|||
this.nowrow.box_description = row.material_name |
|||
} |
|||
this.nowrow.edit = false |
|||
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 |
|||
}, |
|||
setCutpointivtValue(row) { |
|||
this.form.resource_name = row.ext_code |
|||
}, |
|||
deleteRow(index, rows) { |
|||
const container_name = rows[index].container_name |
|||
let len = rows.length |
|||
while (len--) { |
|||
const obj = rows[len] |
|||
if (container_name === obj.container_name) { |
|||
const index = rows.indexOf(obj) |
|||
if (index > -1) { // 移除找到的指定元素 |
|||
rows.splice(index, 1) |
|||
this.form.detail_count = this.form.tableData.length |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
tableChanged(rows) { |
|||
debugger |
|||
// 对新增的行进行校验不能存在相同物料批次 |
|||
rows.forEach((item) => { |
|||
let same_mater = true |
|||
this.form.tableData.forEach((row) => { |
|||
if (row.container_name === item.container_name) { |
|||
same_mater = false |
|||
} |
|||
}) |
|||
if (same_mater) { |
|||
item.quality_scode = '01' |
|||
item.ivt_level = '01' |
|||
item.is_active = '1' |
|||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty) |
|||
this.form.tableData.splice(-1, 0, item) |
|||
} |
|||
}) |
|||
this.form.detail_count = this.form.tableData.length |
|||
}, |
|||
async insertEvent(row) { |
|||
if (this.form.bill_type === '') { |
|||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO) |
|||
return |
|||
} |
|||
this.opendtlParam = { |
|||
optType: 'add' |
|||
} |
|||
this.dtlShow = true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.crud-opts2 { |
|||
padding: 4px 0; |
|||
display: -webkit-flex; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.crud-opts2 .crud-opts-right2 { |
|||
margin-left: auto; |
|||
} |
|||
</style> |
@ -0,0 +1,160 @@ |
|||
<template> |
|||
<el-dialog |
|||
title="客户选择" |
|||
append-to-body |
|||
:visible.sync="dialogVisible" |
|||
destroy-on-close |
|||
width="1000px" |
|||
@close="close" |
|||
@open="open" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
class="demo-form-inline" |
|||
label-position="right" |
|||
label-width="80px" |
|||
label-suffix=":" |
|||
> |
|||
<el-form-item label="模糊搜索"> |
|||
<el-input |
|||
v-model="query.search" |
|||
clearable |
|||
size="mini" |
|||
placeholder="可客户编码、客户名称" |
|||
@keyup.enter.native="crud.toQuery" |
|||
/> |
|||
</el-form-item> |
|||
<rrOperation /> |
|||
</el-form> |
|||
|
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
style="width: 100%;" |
|||
size="mini" |
|||
border |
|||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" |
|||
@select="handleSelectionChange" |
|||
@select-all="onSelectAll" |
|||
@current-change="clickChange" |
|||
> |
|||
<el-table-column v-if="!isSingle" type="selection" width="55" /> |
|||
<el-table-column v-if="isSingle" label="选择" width="55"> |
|||
<template slot-scope="scope"> |
|||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="cust_code" label="客户编码" min-width="150" show-overflow-tooltip /> |
|||
<el-table-column prop="cust_name" label="客户名称" min-width="200" show-overflow-tooltip /> |
|||
<el-table-column prop="cust_simple_name" label="客户简称" show-overflow-tooltip /> |
|||
<el-table-column prop="corp_address" label="公司地址" show-overflow-tooltip /> |
|||
<el-table-column prop="faxnumber" label="公司电话" show-overflow-tooltip /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
<el-button type="primary" @click="submit">确 定</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import crudCustomerbase from '@/views/wms/basedata/master/customer/customerbase' |
|||
import CRUD, { header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import pagination from '@crud/Pagination' |
|||
|
|||
export default { |
|||
name: 'CustomerDtl', |
|||
components: { rrOperation, pagination }, |
|||
cruds() { |
|||
return CRUD({ title: '客户', url: 'api/customerbase', crudMethod: { ...crudCustomerbase }, optShow: {}}) |
|||
}, |
|||
mixins: [presenter(), header()], |
|||
dicts: ['product_series'], |
|||
props: { |
|||
dialogShow: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isSingle: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
materOptCode: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
tableRadio: null, |
|||
checkrow: null, |
|||
rows: [] |
|||
} |
|||
}, |
|||
watch: { |
|||
dialogShow: { |
|||
handler(newValue) { |
|||
this.dialogVisible = newValue |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
clickChange(item) { |
|||
this.tableRadio = item |
|||
}, |
|||
seriesFormat(row) { |
|||
return this.dict.label.product_series[row.product_series] |
|||
}, |
|||
open() { |
|||
this.crud.query.material_type_id = this.materOptCode |
|||
this.crud.toQuery() |
|||
}, |
|||
handleSelectionChange(val, row) { |
|||
if (this.isSingle) { |
|||
if (val.length > 1) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(val.pop()) |
|||
} else { |
|||
this.checkrow = row |
|||
} |
|||
} |
|||
}, |
|||
onSelectAll() { |
|||
this.$refs.table.clearSelection() |
|||
}, |
|||
close() { |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
}, |
|||
submit() { |
|||
// 处理单选 |
|||
if (this.isSingle && this.tableRadio) { |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('setCustomValue', this.tableRadio) |
|||
return |
|||
} |
|||
this.rows = this.$refs.table.selection |
|||
if (this.rows.length <= 0) { |
|||
this.$message('请先勾选物料') |
|||
return |
|||
} |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('setCustomValue', this.rows) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
::v-deep .el-dialog__body { |
|||
padding-top: 0px; |
|||
} |
|||
</style> |
@ -0,0 +1,182 @@ |
|||
<template> |
|||
<el-dialog |
|||
title="分切点位选择" |
|||
append-to-body |
|||
:visible.sync="dialogVisible" |
|||
destroy-on-close |
|||
width="1000px" |
|||
@close="close" |
|||
@open="open" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
class="demo-form-inline" |
|||
label-position="right" |
|||
label-width="80px" |
|||
label-suffix=":" |
|||
> |
|||
<el-form-item label="模糊搜索"> |
|||
<el-input |
|||
v-model="query.search" |
|||
clearable |
|||
size="mini" |
|||
placeholder="可点位编号、外部编码" |
|||
@keyup.enter.native="crud.toQuery" |
|||
/> |
|||
</el-form-item> |
|||
<rrOperation /> |
|||
</el-form> |
|||
|
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
style="width: 100%;" |
|||
size="mini" |
|||
border |
|||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" |
|||
@select="handleSelectionChange" |
|||
@select-all="onSelectAll" |
|||
@current-change="clickChange" |
|||
> |
|||
<el-table-column v-if="!isSingle" type="selection" width="55" /> |
|||
<el-table-column v-if="isSingle" label="选择" width="55"> |
|||
<template slot-scope="scope"> |
|||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="point_code" label="点位编码" width="100px" show-overflow-tooltip /> |
|||
<el-table-column prop="full_point_code" label="满轴位" width="110px" show-overflow-tooltip /> |
|||
<el-table-column prop="full_point_status" label="满轴位状态" min-width="100" show-overflow-tooltip> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.sch_full_point_status[scope.row.full_point_status] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="container_name" label="母卷号" width="150px" show-overflow-tooltip /> |
|||
<el-table-column prop="empty_point_status" label="空轴位状态" min-width="100" show-overflow-tooltip> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.sch_empty_point_status[scope.row.empty_point_status] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="empty_vehicle_code" label="空轴编码" width="120px" show-overflow-tooltip /> |
|||
<el-table-column prop="up_qzzno" label="上气胀轴编码" width="100px" show-overflow-tooltip /> |
|||
<el-table-column prop="down_qzzno" label="下气胀轴编码" width="100px" show-overflow-tooltip /> |
|||
<el-table-column prop="ext_code" label="外部编码" width="100px" show-overflow-tooltip /> |
|||
<el-table-column prop="product_area" label="生产区域" /> |
|||
<el-table-column prop="point_location" label="位置"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.point_location[scope.row.point_location] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="is_used" label="是否启用"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.is_used[scope.row.is_used] }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
<el-button type="primary" @click="submit">确 定</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import crudCutpointivt from '@/views/wms/pdm/ivt/cutpointivt/cutpointivt' |
|||
import CRUD, { header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import pagination from '@crud/Pagination' |
|||
|
|||
export default { |
|||
name: 'CutpointivtDtl', |
|||
components: { rrOperation, pagination }, |
|||
cruds() { |
|||
return CRUD({ title: '分切设备', url: 'api/cutpointivt', crudMethod: { ...crudCutpointivt }, optShow: {}}) |
|||
}, |
|||
mixins: [presenter(), header()], |
|||
dicts: ['sch_full_point_status', 'sch_empty_point_status', 'product_area', 'is_used', 'point_location'], |
|||
props: { |
|||
dialogShow: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isSingle: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
materOptCode: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
tableRadio: null, |
|||
checkrow: null, |
|||
rows: [] |
|||
} |
|||
}, |
|||
watch: { |
|||
dialogShow: { |
|||
handler(newValue) { |
|||
this.dialogVisible = newValue |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
clickChange(item) { |
|||
this.tableRadio = item |
|||
}, |
|||
seriesFormat(row) { |
|||
return this.dict.label.product_series[row.product_series] |
|||
}, |
|||
open() { |
|||
this.crud.query.material_type_id = this.materOptCode |
|||
this.crud.toQuery() |
|||
}, |
|||
handleSelectionChange(val, row) { |
|||
if (this.isSingle) { |
|||
if (val.length > 1) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(val.pop()) |
|||
} else { |
|||
this.checkrow = row |
|||
} |
|||
} |
|||
}, |
|||
onSelectAll() { |
|||
this.$refs.table.clearSelection() |
|||
}, |
|||
close() { |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
}, |
|||
submit() { |
|||
// 处理单选 |
|||
if (this.isSingle && this.tableRadio) { |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('setCutpointivtValue', this.tableRadio) |
|||
return |
|||
} |
|||
this.rows = this.$refs.table.selection |
|||
if (this.rows.length <= 0) { |
|||
this.$message('请先勾选分切点位') |
|||
return |
|||
} |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('setCutpointivtValue', this.rows) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
::v-deep .el-dialog__body { |
|||
padding-top: 0px; |
|||
} |
|||
</style> |
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<el-dialog |
|||
title="生箔点位选择" |
|||
append-to-body |
|||
:visible.sync="dialogVisible" |
|||
destroy-on-close |
|||
width="1000px" |
|||
@close="close" |
|||
@open="open" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
class="demo-form-inline" |
|||
label-position="right" |
|||
label-width="80px" |
|||
label-suffix=":" |
|||
> |
|||
<el-form-item label="模糊搜索"> |
|||
<el-input |
|||
v-model="query.search" |
|||
clearable |
|||
size="mini" |
|||
placeholder="可点位编号、外部编码" |
|||
@keyup.enter.native="crud.toQuery" |
|||
/> |
|||
</el-form-item> |
|||
<rrOperation /> |
|||
</el-form> |
|||
|
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
style="width: 100%;" |
|||
size="mini" |
|||
border |
|||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" |
|||
@select="handleSelectionChange" |
|||
@select-all="onSelectAll" |
|||
@current-change="clickChange" |
|||
> |
|||
<el-table-column v-if="!isSingle" type="selection" width="55" /> |
|||
<el-table-column v-if="isSingle" label="选择" width="55"> |
|||
<template slot-scope="scope"> |
|||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="point_code" label="点位编码" /> |
|||
<el-table-column prop="vehicle_code" label="载具编码" /> |
|||
<el-table-column prop="full_point_code" label="满轴位" :min-width="flexWidth('full_point_code',crud.data,'满轴位')" /> |
|||
<el-table-column prop="full_point_status" label="满轴位状态" min-width="100" show-overflow-tooltip> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.sch_full_point_status[scope.row.full_point_status] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="empty_point_code" label="空轴位" :min-width="flexWidth('empty_point_code',crud.data,'空轴位')" /> |
|||
<el-table-column prop="empty_point_status" label="空轴位状态" min-width="100" show-overflow-tooltip> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.sch_empty_point_status[scope.row.empty_point_status] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="product_area" label="生产区域"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.product_area[scope.row.product_area] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="point_location" label="位置"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.point_location[scope.row.point_location] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="ext_code" label="外部编码" /> |
|||
<el-table-column prop="remark" label="备注" /> |
|||
<el-table-column prop="is_used" label="是否启用"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.is_used[scope.row.is_used] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="mes_used" label="MES启用"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.is_used[scope.row.mes_used] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
<el-button type="primary" @click="submit">确 定</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import crudSbpointivt from '@/views/wms/pdm/ivt/sbpointivt/sbpointivt' |
|||
import CRUD, { header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import pagination from '@crud/Pagination' |
|||
|
|||
export default { |
|||
name: 'SbpointivtDtl', |
|||
components: { rrOperation, pagination }, |
|||
cruds() { |
|||
return CRUD({ title: '机台编码', url: 'api/sbpointivt', crudMethod: { ...crudSbpointivt }, optShow: {}}) |
|||
}, |
|||
mixins: [presenter(), header()], |
|||
dicts: ['product_series', 'product_area', 'is_used', 'point_location', 'sch_full_point_status', 'sch_empty_point_status'], |
|||
props: { |
|||
dialogShow: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isSingle: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
materOptCode: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
tableRadio: null, |
|||
checkrow: null, |
|||
rows: [] |
|||
} |
|||
}, |
|||
watch: { |
|||
dialogShow: { |
|||
handler(newValue) { |
|||
this.dialogVisible = newValue |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
clickChange(item) { |
|||
this.tableRadio = item |
|||
}, |
|||
seriesFormat(row) { |
|||
return this.dict.label.product_series[row.product_series] |
|||
}, |
|||
open() { |
|||
this.crud.query.material_type_id = this.materOptCode |
|||
this.crud.toQuery() |
|||
}, |
|||
handleSelectionChange(val, row) { |
|||
if (this.isSingle) { |
|||
if (val.length > 1) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(val.pop()) |
|||
} else { |
|||
this.checkrow = row |
|||
} |
|||
} |
|||
}, |
|||
onSelectAll() { |
|||
this.$refs.table.clearSelection() |
|||
}, |
|||
close() { |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
}, |
|||
submit() { |
|||
// 处理单选 |
|||
if (this.isSingle && this.tableRadio) { |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('setSbpointivtValue', this.tableRadio) |
|||
return |
|||
} |
|||
this.rows = this.$refs.table.selection |
|||
if (this.rows.length <= 0) { |
|||
this.$message('请先勾选生箔点位') |
|||
return |
|||
} |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('setSbpointivtValue', this.rows) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
::v-deep .el-dialog__body { |
|||
padding-top: 0px; |
|||
} |
|||
</style> |
Loading…
Reference in new issue