You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
491 lines
18 KiB
491 lines
18 KiB
9 months ago
|
<template>
|
||
|
<div class="app-container">
|
||
|
<!--工具栏-->
|
||
|
<div class="head-container">
|
||
|
<div v-if="crud.props.searchToggle">
|
||
|
<el-form
|
||
|
:inline="true"
|
||
|
class="demo-form-inline"
|
||
|
label-position="right"
|
||
|
label-width="90px"
|
||
|
label-suffix=":"
|
||
|
>
|
||
|
<el-form-item label="点位编码">
|
||
|
<el-select
|
||
|
v-model="query.point_code"
|
||
|
clearable
|
||
|
size="mini"
|
||
|
placeholder="点位编码"
|
||
|
class="filter-item"
|
||
|
filterable
|
||
|
@remote-method="getPointList"
|
||
|
>
|
||
|
<el-option
|
||
|
v-for="item in pointList"
|
||
|
:label="item.point_code"
|
||
|
:value="item.point_code"
|
||
|
/>
|
||
|
</el-select>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="晶体编号">
|
||
|
<el-input
|
||
|
v-model="query.lotSN"
|
||
|
clearable
|
||
|
size="mini"
|
||
|
placeholder="晶体编号"
|
||
|
@keyup.enter.native="crud.toQuery"
|
||
|
/>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="供应商名称">
|
||
|
<el-select
|
||
|
v-model="query.supplierName"
|
||
|
clearable
|
||
|
size="mini"
|
||
|
placeholder="供应商名称"
|
||
|
class="filter-item"
|
||
|
filterable
|
||
|
@remote-method="getSupplierNameList"
|
||
|
>
|
||
|
<el-option
|
||
|
v-for="item in supplierNameList"
|
||
|
:label="item"
|
||
|
:value="item"
|
||
|
/>
|
||
|
</el-select>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料名称">
|
||
|
<el-select
|
||
|
v-model="query.productDescription"
|
||
|
clearable
|
||
|
size="mini"
|
||
|
placeholder="物料名称"
|
||
|
class="filter-item"
|
||
|
filterable
|
||
|
@remote-method="getProductDescriptionList"
|
||
|
>
|
||
|
<el-option
|
||
|
v-for="item in productDescriptionList"
|
||
|
:label="item"
|
||
|
:value="item"
|
||
|
/>
|
||
|
</el-select>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="批次">
|
||
|
<el-select
|
||
|
v-model="query.ingotBatch"
|
||
|
clearable
|
||
|
size="mini"
|
||
|
placeholder="批次"
|
||
|
class="filter-item"
|
||
|
filterable
|
||
|
@remote-method="getIngotBatchList"
|
||
|
>
|
||
|
<el-option
|
||
|
v-for="item in ingotBatchList"
|
||
|
:label="item"
|
||
|
:value="item"
|
||
|
/>
|
||
|
</el-select>
|
||
|
</el-form-item>
|
||
|
<rrOperation />
|
||
|
</el-form>
|
||
|
</div>
|
||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||
|
<crudOperation :permission="permission" />
|
||
|
<!--表单组件-->
|
||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
|
||
|
<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="115px" label-suffix=":">
|
||
|
<el-form-item label="母托盘编码">
|
||
|
<el-input v-model="form.vehicle_code" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<!--<el-form-item label="子托盘编码">
|
||
|
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
||
|
</el-form-item>-->
|
||
|
<!-- <el-form-item v-if="false" label="来源载具">
|
||
|
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
||
|
</el-form-item> -->
|
||
|
<el-form-item label="托盘类型">
|
||
|
<el-radio-group v-model="form.vehicle_type" style="width: 240px">
|
||
|
<el-radio label="1">子托盘</el-radio>
|
||
|
<el-radio label="0">母托盘</el-radio>
|
||
|
</el-radio-group>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="回温开始时间">
|
||
|
<el-date-picker
|
||
|
v-model="form.instorage_time"
|
||
|
type="datetime"
|
||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||
|
style="width: 240px;"
|
||
|
placeholder="选择日期时间"
|
||
|
/>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="点位编码">
|
||
|
<el-select
|
||
|
v-model="form.point_code"
|
||
|
filterable
|
||
|
placeholder="请选择"
|
||
|
style="width: 240px;"
|
||
|
@change="setPointName"
|
||
|
>
|
||
|
<el-option
|
||
|
v-for="item in pointList"
|
||
|
:key="item.point_code"
|
||
|
:label="item.point_code"
|
||
|
:value="item.point_code"
|
||
|
>
|
||
|
<span style="float: left">{{ item.point_name }}</span>
|
||
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span>
|
||
|
</el-option>
|
||
|
</el-select>
|
||
|
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
|
||
|
</el-form-item>
|
||
|
<el-form-item label="点位名称">
|
||
|
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="是否满托">
|
||
|
<el-radio-group v-model="form.is_full" style="width: 240px">
|
||
|
<el-radio :label="true">是</el-radio>
|
||
|
<el-radio :label="false">否</el-radio>
|
||
|
</el-radio-group>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="批次">
|
||
|
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="静置时间(分钟)">
|
||
|
<el-input-number
|
||
|
v-model.number="form.standing_time"
|
||
|
:min="1"
|
||
|
:max="999"
|
||
|
style="width: 240px;"
|
||
|
/>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料数量">
|
||
|
<el-input-number
|
||
|
v-model.number="form.material_qty"
|
||
|
:min="0"
|
||
|
style="width: 240px;"
|
||
|
/>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料重量">
|
||
|
<el-input-number
|
||
|
v-model.number="form.material_weight"
|
||
|
:min="0"
|
||
|
style="width: 240px;"
|
||
|
/>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="工单编码">
|
||
|
<el-input v-model="form.workorder_code" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料来源">
|
||
|
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
|
||
|
<el-radio-button label="物料" />
|
||
|
<el-radio-button label="工单" />
|
||
|
</el-radio-group>
|
||
|
</el-form-item>
|
||
|
<el-form-item v-if="false" label="物料名称">
|
||
|
<el-input v-model="form.material_id" suffix-icon="el-icon-date" clearable style="width: 370px;" @focus="getMaterial" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料名称">
|
||
|
<el-input v-model="form.material_name" clearable style="width: 240px;" @clear="clearMaterial" @focus="getMaterial" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料编码">
|
||
|
<el-input v-model="form.material_code" disabled style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="物料规格">
|
||
|
<el-input v-model="form.material_spec" disabled style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="组盘次数">
|
||
|
<el-input v-model="form.group_number" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="任务编码">
|
||
|
<el-input v-model="form.task_code" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<!--<el-form-item label="车间编码">
|
||
|
<el-input v-model="form.workshop_code" style="width: 240px;" />
|
||
|
</el-form-item>-->
|
||
|
<el-form-item label="组盘状态">
|
||
|
<el-select
|
||
|
v-model="form.group_status"
|
||
|
size="mini"
|
||
|
placeholder="点位状态"
|
||
|
class="filter-item"
|
||
|
style="width: 240px;"
|
||
|
clearable
|
||
|
>
|
||
|
<el-option
|
||
|
v-for="item in dict.group_status"
|
||
|
:label="item.label"
|
||
|
:value="item.value"
|
||
|
/>
|
||
|
</el-select>
|
||
|
</el-form-item>
|
||
|
<!--<el-form-item label="是否首个流程任务">
|
||
|
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||
|
</el-form-item>-->
|
||
|
<el-form-item label="流程编码">
|
||
|
<el-input v-model="form.flow_code" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="流程顺序">
|
||
|
<el-input v-model="form.flow_num" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="上一任务">
|
||
|
<el-input v-model="form.before_task_code" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="下一任务">
|
||
|
<el-input v-model="form.next_task_code" style="width: 240px;" />
|
||
|
</el-form-item>
|
||
|
<el-form-item label="备注" prop="remark">
|
||
|
<label slot="label">备 注:</label>
|
||
|
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||
|
</el-form-item>
|
||
|
</el-form>
|
||
|
<div slot="footer" class="dialog-footer">
|
||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||
|
</div>
|
||
|
</el-dialog>
|
||
|
<!--表格渲染-->
|
||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" height="300" @selection-change="crud.selectionChangeHandler">
|
||
|
<el-table-column prop="pointCode" label="点位编码" :min-width="flexWidth('pointCode',crud.data,'点位编码')" />
|
||
|
<el-table-column prop="pointName" label="点位名称" :min-width="flexWidth('pointName',crud.data,'点位名称')" />
|
||
|
<el-table-column prop="regionCode" label="区域编码" :min-width="flexWidth('regionCode',crud.data,'区域编码')" />
|
||
|
<el-table-column prop="regionName" label="区域名称" :min-width="flexWidth('regionName',crud.data,'区域名称')" />
|
||
|
<el-table-column prop="subTray" label="子托编码" :min-width="flexWidth('subTray',crud.data,'子托编码')" />
|
||
|
<el-table-column prop="motherTray" label="母托编码" :min-width="flexWidth('motherTray',crud.data,'母托编码')" />
|
||
|
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
||
|
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
|
||
|
<el-table-column prop="ingotBatch" label="批次" :min-width="flexWidth('ingotBatch',crud.data,'批次')" />
|
||
|
<el-table-column prop="siliconGrade" label="棒源等级" :min-width="flexWidth('siliconGrade',crud.data,'棒源等级')" />
|
||
|
<el-table-column prop="number" label="每托数量(根)" :min-width="flexWidth('number',crud.data,'每托数量(根)')" />
|
||
|
<el-table-column prop="updateTime" label="入库时间" :min-width="170" />
|
||
|
<el-table-column prop="standingTime" label="回温时间H" :min-width="70" />
|
||
|
<el-table-column prop="usedTime" label="已回温时间H" :min-width="70" />
|
||
|
<el-table-column label="是否完成" :min-width="70">
|
||
|
<template slot-scope="scope">
|
||
|
<span>{{ scope.row.standingTime > scope.row.usedTime ? '未完成' : '已完成' }}</span>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
</el-table>
|
||
|
|
||
|
<el-dialog
|
||
|
:visible.sync="dialogVisible"
|
||
|
title="选择点位"
|
||
|
>
|
||
|
<el-form ref="form" :model="form">
|
||
|
<el-form-item label="点位列表">
|
||
|
<el-select v-model="form.selectedPoint" placeholder="请选择点位">
|
||
|
<el-option
|
||
|
v-for="item in points"
|
||
|
:key="item.point_code"
|
||
|
:label="item.point_code"
|
||
|
:value="item.point_code"
|
||
|
/>
|
||
|
</el-select>
|
||
|
</el-form-item>
|
||
|
</el-form>
|
||
|
<div slot="footer" class="dialog-footer">
|
||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||
|
<el-button type="primary" @click="submitSelectedPoint">确认</el-button>
|
||
|
</div>
|
||
|
</el-dialog>
|
||
|
<!--分页组件-->
|
||
|
<pagination />
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import crudMaterial from './detail'
|
||
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||
|
import rrOperation from '@crud/RR.operation'
|
||
|
import crudOperation from '@crud/CRUD.operation'
|
||
|
import udOperation from '@crud/UD.operation'
|
||
|
import pagination from '@crud/Pagination'
|
||
|
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||
|
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||
|
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||
|
|
||
|
const defaultForm = {
|
||
|
group_id: null,
|
||
|
vehicle_code: null,
|
||
|
vehicle_type: null,
|
||
|
material_id: null,
|
||
|
child_vehicle_code: null,
|
||
|
source_vehicle_code: null,
|
||
|
point_code: null,
|
||
|
point_name: null,
|
||
|
is_full: true,
|
||
|
pcsn: null,
|
||
|
instorage_time: null,
|
||
|
standing_time: null,
|
||
|
material_qty: null,
|
||
|
material_weight: null,
|
||
|
workorder_code: null,
|
||
|
group_number: null,
|
||
|
task_code: null,
|
||
|
ext_data: null,
|
||
|
workshop_code: null,
|
||
|
group_status: null,
|
||
|
table_name: null,
|
||
|
table_fk: null,
|
||
|
table_fk_id: null,
|
||
|
buss_move_id: null,
|
||
|
is_first_flow_task: true,
|
||
|
flow_code: null,
|
||
|
flow_num: null,
|
||
|
before_task_code: null,
|
||
|
next_task_code: null,
|
||
|
remark: null,
|
||
|
is_delete: false
|
||
|
}
|
||
|
export default {
|
||
|
name: 'VehicleMaterialGroup',
|
||
|
dicts: ['group_status', 'group_bind_material_status', 'vehicle_type'],
|
||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||
|
cruds() {
|
||
|
return CRUD({
|
||
|
title: '回温间库存明细',
|
||
|
url: 'api/report/hw/out',
|
||
|
idField: 'group_id',
|
||
|
sort: 'pointCode,desc',
|
||
|
optShow: {
|
||
|
add: false,
|
||
|
edit: false,
|
||
|
del: false,
|
||
|
download: true,
|
||
|
reset: false
|
||
|
},
|
||
|
query: {
|
||
|
},
|
||
|
crudMethod: { ...crudMaterial }
|
||
|
})
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
permission: {
|
||
|
},
|
||
|
rules: {
|
||
|
},
|
||
|
workShopList: [],
|
||
|
pointList: [],
|
||
|
regionList: [],
|
||
|
supplierNameList: [],
|
||
|
lotSNList: [],
|
||
|
ingotBatchList: [],
|
||
|
productDescriptionList: [],
|
||
|
choose: '物料',
|
||
|
dialogVisible: false,
|
||
|
form: {
|
||
|
selectedPoint: null
|
||
|
},
|
||
|
points: []
|
||
|
}
|
||
|
},
|
||
|
created() {
|
||
|
this.getWorkShopList()
|
||
|
this.getPointList()
|
||
|
this.getRegionList()
|
||
|
this.getSupplierNameList()
|
||
|
// this.getLotSNList()
|
||
|
this.getIngotBatchList()
|
||
|
this.fetchPoints()
|
||
|
this.getProductDescriptionList()
|
||
|
},
|
||
|
methods: {
|
||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||
|
[CRUD.HOOK.beforeRefresh]() {
|
||
|
return true
|
||
|
},
|
||
|
getWorkShopList() { // 获取车间列表
|
||
|
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||
|
this.workShopList = res
|
||
|
})
|
||
|
},
|
||
|
getRegionList() {
|
||
|
crudSchBaseRegion.getRegionList().then(res => {
|
||
|
this.regionList = res
|
||
|
})
|
||
|
},
|
||
|
getPointList() { // 获取点位列表
|
||
|
crudSchBasePoint.getPointList().then(res => {
|
||
|
this.pointList = res
|
||
|
})
|
||
|
},
|
||
|
getSupplierNameList() {
|
||
|
crudMaterial.getSupplierNameList().then(res => {
|
||
|
this.supplierNameList = res.content
|
||
|
})
|
||
|
},
|
||
|
getLotSNList() {
|
||
|
crudMaterial.getLotSNList().then(res => {
|
||
|
this.lotSNList = res.content
|
||
|
})
|
||
|
},
|
||
|
getProductDescriptionList() {
|
||
|
crudMaterial.getProductDescriptionList().then(res => {
|
||
|
this.productDescriptionList = res.content
|
||
|
})
|
||
|
},
|
||
|
getIngotBatchList() {
|
||
|
crudMaterial.getIngotBatchList().then(res => {
|
||
|
this.ingotBatchList = res.content
|
||
|
})
|
||
|
},
|
||
|
tableChanged(row) {
|
||
|
this.form.material_name = row.material_name
|
||
|
this.form.material_id = row.material_id
|
||
|
this.form.material_spec = row.material_spec
|
||
|
this.form.material_code = row.material_code
|
||
|
if (this.choose === '工单') {
|
||
|
this.form.workorder_code = row.workorder_code
|
||
|
}
|
||
|
},
|
||
|
clearMaterial() {
|
||
|
this.form.material_name = null
|
||
|
this.form.material_id = null
|
||
|
this.form.material_spec = null
|
||
|
this.form.material_code = null
|
||
|
},
|
||
|
setPointName(data) {
|
||
|
var point = this.pointList.find(item => item.point_code === data)
|
||
|
this.form.point_name = point.point_name
|
||
|
},
|
||
|
hand(value) {
|
||
|
this.crud.toQuery()
|
||
|
}, handleButtonClick(row) {
|
||
|
this.selectedRow = row
|
||
|
this.dialogVisible = true
|
||
|
this.fetchPoints()
|
||
|
},
|
||
|
fetchPoints() {
|
||
|
crudSchBasePoint.getCBPointList().then(res => {
|
||
|
this.points = res
|
||
|
alert(points)
|
||
|
})
|
||
|
},
|
||
|
submitSelectedPoint() {
|
||
|
const selectedPoint = this.form.selectedPoint
|
||
|
if (!selectedPoint) {
|
||
|
this.$message.warning('请选择一个点位')
|
||
|
return
|
||
|
}
|
||
|
// Submit the selected point to the backend
|
||
|
this.$axios.post('/api/pda/task', {
|
||
|
start_point: this.selectedRow.pointCode,
|
||
|
next_point: selectedPoint
|
||
|
}).then(response => {
|
||
|
this.$message.success('提交成功')
|
||
|
this.dialogVisible = false
|
||
|
}).catch(error => {
|
||
|
this.$message.error('提交失败')
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|