报表优化
This commit is contained in:
@@ -55,5 +55,13 @@ export function getLotSNList(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getIngotBatchList(data) {
|
||||
return request({
|
||||
url: 'api/report/getIngotBatchList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList }
|
||||
|
||||
|
||||
@@ -70,6 +70,23 @@
|
||||
/>
|
||||
</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>
|
||||
@@ -228,7 +245,16 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler" height="300">
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-add"
|
||||
@click="handleButtonClick(scope.row)"
|
||||
>回温出库</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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,'区域编码')" />
|
||||
@@ -237,7 +263,7 @@
|
||||
<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="batch" label="批次" :min-width="flexWidth('batch',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" />
|
||||
@@ -249,6 +275,28 @@
|
||||
</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-option>
|
||||
</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>
|
||||
@@ -335,8 +383,14 @@ export default {
|
||||
regionList: [],
|
||||
supplierNameList: [],
|
||||
lotSNList: [],
|
||||
ingotBatchList: [],
|
||||
productDescriptionList: [],
|
||||
choose: '物料'
|
||||
choose: '物料',
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
selectedPoint: null
|
||||
},
|
||||
points: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -345,6 +399,8 @@ export default {
|
||||
this.getRegionList()
|
||||
this.getSupplierNameList()
|
||||
// this.getLotSNList()
|
||||
this.getIngotBatchList()
|
||||
this.fetchPoints()
|
||||
this.getProductDescriptionList()
|
||||
},
|
||||
methods: {
|
||||
@@ -382,6 +438,11 @@ export default {
|
||||
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
|
||||
@@ -403,6 +464,34 @@ export default {
|
||||
},
|
||||
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('提交失败');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,5 +39,13 @@ export function getPointList(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getCBPointList(data) {
|
||||
data ={ region_code: 'CB' }
|
||||
return request({
|
||||
url: 'api/schBasePoint/getPointList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeUsed, getPointList }
|
||||
export default { add, edit, del, changeUsed, getPointList,getCBPointList }
|
||||
|
||||
@@ -78,6 +78,23 @@
|
||||
/>
|
||||
</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>
|
||||
@@ -245,6 +262,7 @@
|
||||
<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>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -330,6 +348,7 @@ export default {
|
||||
pointList: [],
|
||||
regionList: [],
|
||||
supplierNameList: [],
|
||||
ingotBatchList: [],
|
||||
productDescriptionList: [],
|
||||
choose: '物料'
|
||||
}
|
||||
@@ -339,6 +358,7 @@ export default {
|
||||
this.getPointList()
|
||||
this.getRegionList()
|
||||
this.getSupplierNameList()
|
||||
this.getIngotBatchList()
|
||||
this.getProductDescriptionList()
|
||||
},
|
||||
methods: {
|
||||
@@ -371,6 +391,11 @@ export default {
|
||||
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
|
||||
@@ -392,6 +417,9 @@ export default {
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getEffectiveLength(row) {
|
||||
return (row.incomingLength - row.incomingchipping).toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,12 @@ export function getProductDescriptionList(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup,getSupplierNameList,getProductDescriptionList }
|
||||
export function getIngotBatchList(data) {
|
||||
return request({
|
||||
url: 'api/report/getIngotBatchList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup,getSupplierNameList,getProductDescriptionList,getIngotBatchList }
|
||||
|
||||
@@ -56,4 +56,12 @@ export function getLotSNList(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList }
|
||||
export function getIngotBatchList(data) {
|
||||
return request({
|
||||
url: 'api/report/getIngotBatchList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList,getIngotBatchList }
|
||||
|
||||
@@ -70,6 +70,23 @@
|
||||
/>
|
||||
</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>
|
||||
@@ -228,7 +245,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler" height="550">
|
||||
<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,'区域编码')" />
|
||||
@@ -237,12 +254,20 @@
|
||||
<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="productName" label="物料名称" :min-width="flexWidth('productName',crud.data,'物料名称')" />
|
||||
<el-table-column prop="lotSN" label="晶体编号" :min-width="flexWidth('lotSN',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="updateTime" label="入库时间" :min-width="70" />
|
||||
<el-table-column prop="incomingWeight" label="重量KG" :min-width="70" />
|
||||
<el-table-column prop="incomingLength" label="长度mm" :min-width="flexWidth('incomingLength',crud.data,'长度mm')" />
|
||||
<el-table-column prop="weightCoefficientValue" label="折算系数" :min-width="flexWidth('weightCoefficientValue',crud.data,'折算系数')" />
|
||||
<el-table-column prop="incomingLength" label="来料长度mm" :min-width="flexWidth('incomingLength',crud.data,'来料长度mm')" />
|
||||
<el-table-column prop="incomingchipping" label="来料缺陷长度mm" :min-width="flexWidth('incomingchipping',crud.data,'来料缺陷长度mm')" />
|
||||
<el-table-column label="有效长度mm" :min-width="flexWidth('effectiveLength', crud.data, '有效长度mm')" >
|
||||
<template slot-scope="scope">
|
||||
{{ getEffectiveLength(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -330,6 +355,7 @@ export default {
|
||||
regionList: [],
|
||||
supplierNameList: [],
|
||||
lotSNList: [],
|
||||
ingotBatchList: [],
|
||||
productDescriptionList: [],
|
||||
choose: '物料'
|
||||
}
|
||||
@@ -340,6 +366,7 @@ export default {
|
||||
this.getRegionList()
|
||||
this.getSupplierNameList()
|
||||
// this.getLotSNList()
|
||||
this.getIngotBatchList()
|
||||
this.getProductDescriptionList()
|
||||
},
|
||||
methods: {
|
||||
@@ -377,6 +404,11 @@ export default {
|
||||
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
|
||||
@@ -398,6 +430,9 @@ export default {
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getEffectiveLength(row) {
|
||||
return (row.incomingLength - row.incomingchipping).toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user