原材料库优化问题点0808:前端优化代码
This commit is contained in:
@@ -99,8 +99,7 @@
|
|||||||
:max="10000"
|
:max="10000"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
/>
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -108,7 +107,7 @@
|
|||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission" />
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler" height="300">
|
<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 v-permission="[]" label="操作" width="80px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="80px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -137,26 +136,26 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
title="选择点位"
|
title="选择点位"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form">
|
<el-form ref="form" :model="form">
|
||||||
<el-form-item label="点位列表">
|
<el-form-item label="点位列表">
|
||||||
<el-select v-model="form.selectedPoint" placeholder="请选择点位">
|
<el-select v-model="form.selectedPoint" placeholder="请选择点位">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in points"
|
v-for="item in points"
|
||||||
:key="item.point_code"
|
:key="item.point_code"
|
||||||
:label="item.point_code"
|
:label="item.point_code"
|
||||||
:value="item.point_code"
|
:value="item.point_code"
|
||||||
></el-option>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitSelectedPoint">确认</el-button>
|
<el-button type="primary" @click="submitSelectedPoint">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
@@ -228,7 +227,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getPointList() { // 获取点位列表
|
getPointList() { // 获取点位列表
|
||||||
crudSchBasePoint.getPointsByRegionCodes("HW").then(res => {
|
crudSchBasePoint.getPointsByRegionCodes('HW').then(res => {
|
||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -248,32 +247,31 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleButtonClick(row) {
|
handleButtonClick(row) {
|
||||||
this.selectedRow = row;
|
this.selectedRow = row
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true
|
||||||
this.fetchPoints();
|
this.fetchPoints()
|
||||||
},
|
},
|
||||||
fetchPoints() {
|
fetchPoints() {
|
||||||
crudSchBasePoint.getCBPointList().then(res => {
|
crudSchBasePoint.getCBPointList().then(res => {
|
||||||
this.points = res;
|
this.points = res
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
submitSelectedPoint() {
|
submitSelectedPoint() {
|
||||||
const selectedPoint = this.form.selectedPoint;
|
const selectedPoint = this.form.selectedPoint
|
||||||
if (!selectedPoint) {
|
if (!selectedPoint) {
|
||||||
this.$message.warning('请选择一个点位');
|
this.$message.warning('请选择一个点位')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
// Submit the selected point to the backend
|
// Submit the selected point to the backend
|
||||||
this.$axios.post('/api/pda/task', {
|
this.$axios.post('/api/pda/task', {
|
||||||
start_point: this.selectedRow.pointCode,
|
start_point: this.selectedRow.pointCode,
|
||||||
next_point: selectedPoint
|
next_point: selectedPoint
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$message.success('提交成功');
|
this.$message.success('提交成功')
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.error('提交失败');
|
this.$message.error('提交失败')
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,8 +99,7 @@
|
|||||||
:max="10000"
|
:max="10000"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
/>
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -136,7 +135,6 @@ import udOperation from '@crud/UD.operation'
|
|||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HwIn',
|
name: 'HwIn',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
@@ -184,7 +182,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getPointList() { // 获取点位列表
|
getPointList() { // 获取点位列表
|
||||||
crudSchBasePoint.getPointsByRegionCodes("YL,YLHC,KJHC").then(res => {
|
crudSchBasePoint.getPointsByRegionCodes('YL,YLHC,KJHC').then(res => {
|
||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -99,8 +99,7 @@
|
|||||||
:max="10000"
|
:max="10000"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
/>
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -181,7 +180,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getPointList() { // 获取点位列表
|
getPointList() { // 获取点位列表
|
||||||
crudSchBasePoint.getPointsByRegionCodes("YL,YLHC,KJHC").then(res => {
|
crudSchBasePoint.getPointsByRegionCodes('YL,YLHC,KJHC').then(res => {
|
||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -87,20 +87,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="每托根数">
|
<el-form-item label="每托根数">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="query.number"
|
v-model="query.number"
|
||||||
filterable
|
filterable
|
||||||
laceholder="每托根数"
|
laceholder="每托根数"
|
||||||
clearable
|
clearable
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="10000"
|
:max="10000"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
/>
|
||||||
</el-input-number>
|
</el-form-item>
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -191,7 +190,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getPointList() { // 获取点位列表
|
getPointList() { // 获取点位列表
|
||||||
crudSchBasePoint.getPointsByRegionCodes("HW").then(res => {
|
crudSchBasePoint.getPointsByRegionCodes('HW').then(res => {
|
||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -99,8 +99,7 @@
|
|||||||
:max="10000"
|
:max="10000"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
/>
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -182,7 +181,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getPointList() { // 获取点位列表
|
getPointList() { // 获取点位列表
|
||||||
crudSchBasePoint.getPointsByRegionCodes("HW").then(res => {
|
crudSchBasePoint.getPointsByRegionCodes('HW').then(res => {
|
||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,134 +1,135 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="物料选择"
|
title="物料选择"
|
||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
width="1000px"
|
width="1000px"
|
||||||
@close="close"
|
@close="close"
|
||||||
@open="open"
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form-item label="物料编码">
|
||||||
:inline="true"
|
<el-input
|
||||||
class="demo-form-inline"
|
v-model="query.productname"
|
||||||
label-position="right"
|
clearable
|
||||||
label-width="80px"
|
size="mini"
|
||||||
label-suffix=":"
|
placeholder="物料编码"
|
||||||
>
|
:disabled="true"
|
||||||
<el-form-item label="物料编码">
|
@keyup.enter.native="crud.toQuery"
|
||||||
<el-input
|
/>
|
||||||
v-model="query.productname"
|
</el-form-item>
|
||||||
clearable
|
<rrOperation />
|
||||||
size="mini"
|
</el-form>
|
||||||
placeholder="物料编码"
|
|
||||||
:disabled="true"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
v-loading="crud.loading"
|
v-loading="crud.loading"
|
||||||
:data="crud.data"
|
:data="crud.data"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
size="mini"
|
size="mini"
|
||||||
border
|
border
|
||||||
:cell-style="{'text-align':'center'}"
|
:cell-style="{'text-align':'center'}"
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="point_code" label="所在点位" width="120px" />
|
<el-table-column prop="point_code" label="所在点位" width="120px" />
|
||||||
<el-table-column prop="productName" label="物料编码" />
|
<el-table-column prop="productName" label="物料编码" />
|
||||||
<el-table-column prop="palletSN" label="子托盘号" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="palletSN" label="子托盘号" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="qty" label="数量" width="100" show-overflow-tooltip />
|
<el-table-column prop="qty" label="数量" width="100" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="submitSelectedRows">
|
@click="submitSelectedRows"
|
||||||
|
>
|
||||||
原材料出库
|
原材料出库
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import CRUD, { header, presenter } from '@crud/crud'
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkOrderDetailDialog',
|
name: 'WorkOrderDetailDialog',
|
||||||
components: { rrOperation, pagination },
|
components: { rrOperation, pagination },
|
||||||
dicts: ['is_used', 'vehicle_type'],
|
dicts: ['is_used', 'vehicle_type'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '点位详情', url: 'api/pointDetail', optShow: {}})
|
return CRUD({ title: '点位详情', url: 'api/pointDetail', optShow: {}})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
productname: {
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
productname: {
|
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},workorder_code: {
|
}, workorderCode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableRadio: null,
|
tableRadio: null,
|
||||||
tableData: []
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
productname(newVal) {
|
||||||
dialogShow: {
|
|
||||||
handler(newValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
},
|
|
||||||
productname(newVal) {
|
|
||||||
// 监听传递的值变化,并在变化时执行赋值操作
|
// 监听传递的值变化,并在变化时执行赋值操作
|
||||||
this.query.productname = newVal;
|
this.query.productname = newVal
|
||||||
this.executeQuery();
|
this.executeQuery()
|
||||||
},
|
},
|
||||||
workorder_code(newVal) {
|
workorder_code(newVal) {
|
||||||
// 监听传递的值变化,并在变化时执行赋值操作
|
// 监听传递的值变化,并在变化时执行赋值操作
|
||||||
this.workorder_code = newVal;
|
this.workorder_code = newVal
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
},
|
},
|
||||||
methods: {
|
close() {
|
||||||
open() {
|
this.crud.resetQuery(false)
|
||||||
},
|
this.$emit('update:dialogShow', false)
|
||||||
close() {
|
},
|
||||||
this.crud.resetQuery(false)
|
executeQuery() {
|
||||||
this.$emit('update:dialogShow', false)
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
executeQuery() {
|
submitSelectedRows() {
|
||||||
this.crud.toQuery();
|
const selectedRows = this.$refs.table.selection
|
||||||
},
|
|
||||||
submitSelectedRows() {
|
|
||||||
const selectedRows = this.$refs.table.selection;
|
|
||||||
if (selectedRows.length === 0) {
|
if (selectedRows.length === 0) {
|
||||||
this.$message.error('请至少选择一行数据');
|
this.$message.error('请至少选择一行数据')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取选中行的 point_code
|
// 获取选中行的 point_code
|
||||||
const pointCodes = selectedRows.map(row => row.point_code);
|
const pointCodes = selectedRows.map(row => row.point_code)
|
||||||
|
|
||||||
// 弹出输入回温时间和回温模式的对话框
|
// 弹出输入回温时间和回温模式的对话框
|
||||||
this.$prompt('请输入回温时间', '提示', {
|
this.$prompt('请输入回温时间', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputPattern: /\d+/,
|
inputPattern: /\d+/,
|
||||||
@@ -146,32 +147,32 @@
|
|||||||
workorder_code: this.workorder_code // 使用workorder_code属性
|
workorder_code: this.workorder_code // 使用workorder_code属性
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
// 提交成功处理
|
// 提交成功处理
|
||||||
this.$message.success('提交成功!');
|
this.$message.success('提交成功!')
|
||||||
// 关闭当前对话框
|
// 关闭当前对话框
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// 提交失败处理
|
// 提交失败处理
|
||||||
this.$message.error('提交失败,请重试');
|
this.$message.error('提交失败,请重试')
|
||||||
});
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户点击了取消按钮
|
// 用户点击了取消按钮
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消提交操作'
|
message: '已取消提交操作'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户点击了取消按钮
|
// 用户点击了取消按钮
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消提交操作'
|
message: '已取消提交操作'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
::v-deep .el-dialog__body {
|
::v-deep .el-dialog__body {
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column prop="workorder_code" label="工单编号" width="120px" />
|
<el-table-column prop="workorder_code" label="工单编号" width="120px" />
|
||||||
<el-table-column prop="matnr" label="物料编码" />
|
<el-table-column prop="matnr" label="物料编码" />
|
||||||
<el-table-column prop="maktx" label="物料名称" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="maktx" label="物料名称" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="mtype" label="产品类别" width="100" show-overflow-tooltip />
|
<el-table-column prop="mtype" label="产品类别" width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="mtytxt" label="产品类别描述" width="100" show-overflow-tooltip />
|
<el-table-column prop="mtytxt" label="产品类别描述" width="100" show-overflow-tooltip />
|
||||||
@@ -62,74 +62,74 @@
|
|||||||
<pagination />
|
<pagination />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<PointDetailDialog :dialog-show.sync="pointDetailDialog" :workorder_code="workorder_code" :productname="productname" />
|
<PointDetailDialog :dialog-show.sync="pointDetailDialog" :workorder_code="workorder_code" :productname="productname" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import CRUD, { header, presenter } from '@crud/crud'
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import PointDetailDialog from '@/views/wms/pdm/workerorder/PointDetailDialog.vue'
|
import PointDetailDialog from '@/views/wms/pdm/workerorder/PointDetailDialog.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkOrderDetailDialog',
|
name: 'WorkOrderDetailDialog',
|
||||||
components: { PointDetailDialog,rrOperation, pagination },
|
components: { PointDetailDialog, rrOperation, pagination },
|
||||||
dicts: ['is_used', 'vehicle_type'],
|
dicts: ['is_used', 'vehicle_type'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '生产工单', url: 'api/pdmBdWorkorderDetail', optShow: {}})
|
return CRUD({ title: '生产工单', url: 'api/pdmBdWorkorderDetail', optShow: {}})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
message: {
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
message: {
|
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
pointDetailDialog:false,
|
pointDetailDialog: false,
|
||||||
productname: null,
|
productname: null,
|
||||||
workorder_code: null
|
workorder_code: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
message(newVal) {
|
||||||
dialogShow: {
|
|
||||||
handler(newValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
},
|
|
||||||
message(newVal) {
|
|
||||||
// 监听传递的值变化,并在变化时执行赋值操作
|
// 监听传递的值变化,并在变化时执行赋值操作
|
||||||
this.query.workorder_code = newVal;
|
this.query.workorder_code = newVal
|
||||||
this.executeQuery();
|
this.executeQuery()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
},
|
},
|
||||||
executeQuery() {
|
executeQuery() {
|
||||||
this.crud.toQuery();
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
doOperate(row) {
|
doOperate(row) {
|
||||||
this.productname=row.matnr
|
this.productname = row.matnr
|
||||||
this.workorder_code=row.workorder_code
|
this.workorder_code = row.workorder_code
|
||||||
this.pointDetailDialog = true
|
this.pointDetailDialog = true
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
::v-deep .el-dialog__body {
|
::v-deep .el-dialog__body {
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
|
|||||||
@@ -270,7 +270,7 @@
|
|||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_name',crud.data,'物料标识')" /> -->
|
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_name',crud.data,'物料标识')" /> -->
|
||||||
<!-- <el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)"> -->
|
<!-- <el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)"> -->
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
@@ -384,7 +384,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'PdmBdWorkorder',
|
name: 'PdmBdWorkorder',
|
||||||
dicts: ['vehicle_type', 'pdm_workorder_status'],
|
dicts: ['vehicle_type', 'pdm_workorder_status'],
|
||||||
components: { WorkOrderDetailDialog,MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
components: { WorkOrderDetailDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -497,7 +497,7 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
doOperate(row) {
|
doOperate(row) {
|
||||||
this.message=row.workorder_code
|
this.message = row.workorder_code
|
||||||
this.workOrderDetailDialog = true
|
this.workOrderDetailDialog = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
label-width="90px"
|
label-width="90px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="出库单号">
|
<el-form-item label="出库单号">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.somtOrderNo"
|
v-model="query.somtOrderNo"
|
||||||
clearable
|
clearable
|
||||||
@@ -68,11 +68,11 @@
|
|||||||
<el-table-column prop="productDescription" label="物料描述" :min-width="flexWidth('productDescription',crud.data,'物料描述')" />
|
<el-table-column prop="productDescription" label="物料描述" :min-width="flexWidth('productDescription',crud.data,'物料描述')" />
|
||||||
<el-table-column prop="supplierCode" label="客户编码" :min-width="flexWidth('supplierCode',crud.data,'客户编码')" />
|
<el-table-column prop="supplierCode" label="客户编码" :min-width="flexWidth('supplierCode',crud.data,'客户编码')" />
|
||||||
<el-table-column prop="supplierName" label="客户名称" :min-width="flexWidth('supplierName',crud.data,'客户名称')" />
|
<el-table-column prop="supplierName" label="客户名称" :min-width="flexWidth('supplierName',crud.data,'客户名称')" />
|
||||||
<el-table-column prop="createTime" label="创建日期" width="150">
|
<el-table-column prop="createTime" label="创建日期" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-permission="[]" label="操作" width="70px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="70px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -100,7 +100,7 @@ import pagination from '@crud/Pagination'
|
|||||||
import PointDetailDialog from '@/views/wms/pdm/workerordertwo/PointDetailDialog.vue'
|
import PointDetailDialog from '@/views/wms/pdm/workerordertwo/PointDetailDialog.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'workorder',
|
name: 'Workorder',
|
||||||
components: { PointDetailDialog, pagination, crudOperation, rrOperation, udOperation },
|
components: { PointDetailDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
del: false,
|
del: false,
|
||||||
download: false,
|
download: false,
|
||||||
reset: false
|
reset: false
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -130,7 +130,7 @@ export default {
|
|||||||
workorder_code: '',
|
workorder_code: '',
|
||||||
productname: '',
|
productname: '',
|
||||||
pointList: [],
|
pointList: [],
|
||||||
pointDetailDialog:false,
|
pointDetailDialog: false,
|
||||||
message: null
|
message: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -142,8 +142,8 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
doOperate(row) {
|
doOperate(row) {
|
||||||
this.workorder_code=row.moname
|
this.workorder_code = row.moname
|
||||||
this.productname=row.productName
|
this.productname = row.productName
|
||||||
this.pointDetailDialog = true
|
this.pointDetailDialog = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<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">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="supplierCode" label="客户编码" min-width="100"/>
|
<el-table-column prop="supplierCode" label="客户编码" min-width="100" />
|
||||||
<el-table-column prop="supplierName" label="客户名称" min-width="150"/>
|
<el-table-column prop="supplierName" label="客户名称" min-width="150" />
|
||||||
<el-table-column prop="productName" label="物料编码" in-width="150"/>
|
<el-table-column prop="productName" label="物料编码" in-width="150" />
|
||||||
<el-table-column prop="date" label="日期"/>
|
<el-table-column prop="date" label="日期" />
|
||||||
<el-table-column prop="specification" label="规格" />
|
<el-table-column prop="specification" label="规格" />
|
||||||
<el-table-column prop="batch" label="来料批次" />
|
<el-table-column prop="batch" label="来料批次" />
|
||||||
<el-table-column prop="barLevel" label="棒源等级" />
|
<el-table-column prop="barLevel" label="棒源等级" />
|
||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
reset: false
|
reset: false
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
//start_time: new Date().format('yyyy-MM-dd')
|
// start_time: new Date().format('yyyy-MM-dd')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,28 +4,28 @@
|
|||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="选择异常出库原因"
|
title="选择异常出库原因"
|
||||||
:visible.sync="reasonDialogVisible"
|
:visible.sync="reasonDialogVisible"
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="closeReasonDialog"
|
:before-close="closeReasonDialog"
|
||||||
>
|
>
|
||||||
<el-form ref="reasonForm" :model="reasonForm" label-width="80px">
|
<el-form ref="reasonForm" :model="reasonForm" label-width="80px">
|
||||||
<el-form-item label="原因" prop="reason">
|
<el-form-item label="原因" prop="reason">
|
||||||
<el-select v-model="reasonForm.reason" placeholder="请选择异常出库原因">
|
<el-select v-model="reasonForm.reason" placeholder="请选择异常出库原因">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.reason"
|
v-for="item in dict.reason"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="closeReasonDialog">取消</el-button>
|
<el-button @click="closeReasonDialog">取消</el-button>
|
||||||
<el-button type="primary" @click="submitReason">确认</el-button>
|
<el-button type="primary" @click="submitReason">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-form
|
<el-form
|
||||||
:inline="true"
|
:inline="true"
|
||||||
class="demo-form-inline"
|
class="demo-form-inline"
|
||||||
@@ -185,19 +185,19 @@
|
|||||||
>
|
>
|
||||||
缓存区一键移库
|
缓存区一键移库
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- Confirmation Dialog -->
|
<!-- Confirmation Dialog -->
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="确认"
|
title="确认"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
width="30%"
|
width="30%"
|
||||||
>
|
>
|
||||||
<span>您确定要移库吗?</span>
|
<span>您确定要移库吗?</span>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmMove">确定</el-button>
|
<el-button type="primary" @click="confirmMove">确定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
|
||||||
@@ -366,7 +366,7 @@
|
|||||||
:permission="permission"
|
:permission="permission"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)"
|
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@@ -439,7 +439,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'SchBasePoint',
|
name: 'SchBasePoint',
|
||||||
dicts: ['vehicle_type', 'TrueOrFalse','reason'],
|
dicts: ['vehicle_type', 'TrueOrFalse', 'reason'],
|
||||||
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
|
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
@@ -478,9 +478,9 @@ export default {
|
|||||||
region_code: [
|
region_code: [
|
||||||
{ required: true, message: '区域类型不能为空', trigger: 'blur' }
|
{ required: true, message: '区域类型不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},reasonDialogVisible: false,
|
}, reasonDialogVisible: false,
|
||||||
reasonForm: {
|
reasonForm: {
|
||||||
reason: ""
|
reason: ''
|
||||||
},
|
},
|
||||||
workShopList: [],
|
workShopList: [],
|
||||||
regionList: [],
|
regionList: [],
|
||||||
@@ -489,7 +489,7 @@ export default {
|
|||||||
pointStatusDialogList: [],
|
pointStatusDialogList: [],
|
||||||
pointTypesDialogList: [],
|
pointTypesDialogList: [],
|
||||||
pointDialog: false,
|
pointDialog: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -559,8 +559,8 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showQtyButton(vehicle_qty,region_code) {
|
showQtyButton(vehicle_qty, region_code) {
|
||||||
if (vehicle_qty === 1 && (region_code === 'YL'|| region_code === 'YLHC')) {
|
if (vehicle_qty === 1 && (region_code === 'YL' || region_code === 'YLHC')) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -587,52 +587,52 @@ export default {
|
|||||||
this.crud.query.point_type = null
|
this.crud.query.point_type = null
|
||||||
this.crud.query.point_status = null
|
this.crud.query.point_status = null
|
||||||
this.hand()
|
this.hand()
|
||||||
},openReasonDialog(row) {
|
}, openReasonDialog(row) {
|
||||||
// 打开选择原因的对话框
|
// 打开选择原因的对话框
|
||||||
this.reasonDialogVisible = true;
|
this.reasonDialogVisible = true
|
||||||
// 这里可以将row存储到data中,以便在提交时使用
|
// 这里可以将row存储到data中,以便在提交时使用
|
||||||
this.selectedRow = row;
|
this.selectedRow = row
|
||||||
},closeReasonDialog() {
|
}, closeReasonDialog() {
|
||||||
// 关闭选择原因的对话框
|
// 关闭选择原因的对话框
|
||||||
this.reasonDialogVisible = false;
|
this.reasonDialogVisible = false
|
||||||
this.$refs["reasonForm"].resetFields();
|
this.$refs['reasonForm'].resetFields()
|
||||||
},submitReason() {
|
}, submitReason() {
|
||||||
// 提交选择的原因到后端接口
|
// 提交选择的原因到后端接口
|
||||||
const data = {
|
const data = {
|
||||||
reason: this.reasonForm.reason,
|
reason: this.reasonForm.reason,
|
||||||
device_code: this.selectedRow.point_code
|
device_code: this.selectedRow.point_code
|
||||||
};
|
}
|
||||||
// 调用后端接口提交数据
|
// 调用后端接口提交数据
|
||||||
// 这里假设使用axios库发送POST请求
|
// 这里假设使用axios库发送POST请求
|
||||||
this.$axios
|
this.$axios
|
||||||
.post("/api/schBasePoint/outbound", data)
|
.post('/api/schBasePoint/outbound', data)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
// 处理后端返回的数据
|
// 处理后端返回的数据
|
||||||
console.log("提交成功", response);
|
console.log('提交成功', response)
|
||||||
this.$message.success("提交成功");
|
this.$message.success('提交成功')
|
||||||
this.closeReasonDialog();
|
this.closeReasonDialog()
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// 处理错误情况
|
// 处理错误情况
|
||||||
console.error("提交失败,废包材位有货", error);
|
console.error('提交失败,废包材位有货', error)
|
||||||
this.$message.error("提交失败,废包材位有货");
|
this.$message.error('提交失败,废包材位有货')
|
||||||
});
|
})
|
||||||
},showConfirmationDialog() {
|
}, showConfirmationDialog() {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
confirmMove() {
|
confirmMove() {
|
||||||
this.$axios.post('/api/schBaseTask/move', { })
|
this.$axios.post('/api/schBaseTask/move', { })
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log(response.data);
|
console.log(response.data)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// Handle error response
|
// Handle error response
|
||||||
console.error(error);
|
console.error(error)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.dialogVisible = false; // Close the dialog
|
this.dialogVisible = false // Close the dialog
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export function getPointsByRegionCodes(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getCBPointList(data) {
|
export function getCBPointList(data) {
|
||||||
data ={ region_code: 'CB' }
|
data = { region_code: 'CB' }
|
||||||
return request({
|
return request({
|
||||||
url: 'api/schBasePoint/getPointList',
|
url: 'api/schBasePoint/getPointList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -55,4 +55,4 @@ export function getCBPointList(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, changeUsed, getPointList,getCBPointList,getPointsByRegionCodes }
|
export default { add, edit, del, changeUsed, getPointList, getCBPointList, getPointsByRegionCodes }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
label-width="90px"
|
label-width="90px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="点位编码">
|
<el-form-item label="点位编码">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.point_code"
|
v-model="query.point_code"
|
||||||
clearable
|
clearable
|
||||||
@@ -131,7 +131,7 @@ import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Report',
|
name: 'Report',
|
||||||
components: {pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -187,12 +187,12 @@ export default {
|
|||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSupplierNameList(){
|
getSupplierNameList() {
|
||||||
crudMaterial.getSupplierNameList().then(res => {
|
crudMaterial.getSupplierNameList().then(res => {
|
||||||
this.supplierNameList = res.content
|
this.supplierNameList = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getProductDescriptionList(){
|
getProductDescriptionList() {
|
||||||
crudMaterial.getProductDescriptionList().then(res => {
|
crudMaterial.getProductDescriptionList().then(res => {
|
||||||
this.productDescriptionList = res.content
|
this.productDescriptionList = res.content
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission" />
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler" height="550">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" height="550" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column prop="pointCode" label="点位编码" :min-width="flexWidth('pointCode',crud.data,'点位编码')" />
|
<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="pointName" label="点位名称" :min-width="flexWidth('pointName',crud.data,'点位名称')" />
|
||||||
<el-table-column v-if="false" prop="regionCode" label="区域编码" :min-width="flexWidth('regionCode',crud.data,'区域编码')" />
|
<el-table-column v-if="false" prop="regionCode" label="区域编码" :min-width="flexWidth('regionCode',crud.data,'区域编码')" />
|
||||||
@@ -111,11 +111,11 @@
|
|||||||
<el-table-column prop="weightCoefficientValue" label="折算系数" :min-width="flexWidth('weightCoefficientValue',crud.data,'折算系数')" />
|
<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="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 prop="incomingchipping" label="来料缺陷长度mm" :min-width="flexWidth('incomingchipping',crud.data,'来料缺陷长度mm')" />
|
||||||
<el-table-column label="有效长度mm" :min-width="flexWidth('effectiveLength', crud.data, '有效长度mm')" >
|
<el-table-column label="有效长度mm" :min-width="flexWidth('effectiveLength', crud.data, '有效长度mm')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ getEffectiveLength(scope.row) }}
|
{{ getEffectiveLength(scope.row) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -200,7 +200,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getEffectiveLength(row) {
|
getEffectiveLength(row) {
|
||||||
return (row.incomingLength - row.incomingchipping).toFixed(2);
|
return (row.incomingLength - row.incomingchipping).toFixed(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,4 +64,4 @@ export function getIngotBatchList(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList,getIngotBatchList }
|
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList, getIngotBatchList }
|
||||||
|
|||||||
@@ -105,8 +105,7 @@
|
|||||||
:max="10000"
|
:max="10000"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
/>
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -137,20 +136,22 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table"
|
<el-table
|
||||||
v-loading="crud.loading"
|
ref="table"
|
||||||
:data="crud.data"
|
v-loading="crud.loading"
|
||||||
size="mini"
|
:data="crud.data"
|
||||||
:cell-style="cellStyle"
|
size="mini"
|
||||||
style="width: 100%;"
|
:cell-style="cellStyle"
|
||||||
@selection-change="handleSelectionChange"
|
style="width: 100%;"
|
||||||
height="550">
|
height="550"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="pointCode" label="点位名称" :min-width="flexWidth('pointCode',crud.data,'点位名称')" />
|
<el-table-column prop="pointCode" label="点位名称" :min-width="flexWidth('pointCode',crud.data,'点位名称')" />
|
||||||
<el-table-column prop="regionName" label="区域名称" :min-width="flexWidth('regionName',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="subTray" label="子托编码" :min-width="flexWidth('subTray',crud.data,'子托编码')" />
|
||||||
<el-table-column prop="motherTray" label="母托编码" :min-width="flexWidth('motherTray',crud.data,'母托编码')" />
|
<el-table-column prop="motherTray" label="母托编码" :min-width="flexWidth('motherTray',crud.data,'母托编码')" />
|
||||||
<!-- <el-table-column prop="somtOrderNo" label="出库单号" :min-width="flexWidth('somtOrderNo',crud.data,'出库单号')" />-->
|
<!-- <el-table-column prop="somtOrderNo" label="出库单号" :min-width="flexWidth('somtOrderNo',crud.data,'出库单号')" />-->
|
||||||
<el-table-column prop="moname" label="生产工单" :min-width="flexWidth('moname',crud.data,'生产工单')" />
|
<el-table-column prop="moname" label="生产工单" :min-width="flexWidth('moname',crud.data,'生产工单')" />
|
||||||
<el-table-column prop="status" label="工单状态" :formatter="format_work_order_two_status" :min-width="flexWidth('status',crud.data,'工单状态')" />
|
<el-table-column prop="status" label="工单状态" :formatter="format_work_order_two_status" :min-width="flexWidth('status',crud.data,'工单状态')" />
|
||||||
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
||||||
@@ -176,7 +177,7 @@ import pagination from '@crud/Pagination'
|
|||||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'outdetail',
|
name: 'Outdetail',
|
||||||
dicts: ['work_order_two_status'],
|
dicts: ['work_order_two_status'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
@@ -232,28 +233,28 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取选中行的托盘号 subTray
|
// 获取选中行的托盘号 subTray
|
||||||
const palletSNs = this.rows.map(row => row.subTray);
|
const palletSNs = this.rows.map(row => row.subTray)
|
||||||
// 弹出输入回温时间和回温模式的对话框
|
// 弹出输入回温时间和回温模式的对话框
|
||||||
this.$prompt('请输入回温模式(0-普通模式,1-快速模式)', '提示', {
|
this.$prompt('请输入回温模式(0-普通模式,1-快速模式)', '提示', {
|
||||||
inputPattern: /^[0-1]$/,
|
inputPattern: /^[0-1]$/,
|
||||||
inputErrorMessage: '输入内容必须是 0 或 1',
|
inputErrorMessage: '输入内容必须是 0 或 1',
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消'
|
cancelButtonText: '取消'
|
||||||
}).then(({ value: mode }) => {
|
}).then(({ value: mode }) => {
|
||||||
// 提交数据给后台接口
|
// 提交数据给后台接口
|
||||||
this.$axios.post('/api/workorder/batchChange', {
|
this.$axios.post('/api/workorder/batchChange', {
|
||||||
pointCodes : palletSNs,
|
pointCodes: palletSNs,
|
||||||
mode : mode,
|
mode: mode,
|
||||||
status : '1'
|
status: '1'
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
// 提交成功处理
|
// 提交成功处理
|
||||||
this.$message.success('出库提交成功!');
|
this.$message.success('出库提交成功!')
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// 提交失败处理
|
// 提交失败处理
|
||||||
this.$message.error('出库提交失败,请重试');
|
this.$message.error('出库提交失败,请重试')
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
cancle() {
|
cancle() {
|
||||||
this.rows = this.$refs.table.selection
|
this.rows = this.$refs.table.selection
|
||||||
@@ -262,33 +263,33 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 获取选中行的托盘号 subTray
|
// 获取选中行的托盘号 subTray
|
||||||
const palletSNs = this.rows.map(row => row.subTray);
|
const palletSNs = this.rows.map(row => row.subTray)
|
||||||
// 提交数据给后台接口
|
// 提交数据给后台接口
|
||||||
this.$axios.post('/api/workorder/batchChange', {
|
this.$axios.post('/api/workorder/batchChange', {
|
||||||
pointCodes : palletSNs,
|
pointCodes: palletSNs,
|
||||||
mode : '0',
|
mode: '0',
|
||||||
status : '0'
|
status: '0'
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
// 提交成功处理
|
// 提交成功处理
|
||||||
this.$message.success('出库取消成功!');
|
this.$message.success('出库取消成功!')
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// 提交失败处理
|
// 提交失败处理
|
||||||
this.$message.error('出库取消失败,请重试');
|
this.$message.error('出库取消失败,请重试')
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
this.rows = this.$refs.table.selection
|
this.rows = this.$refs.table.selection
|
||||||
var strs = '';
|
var strs = ''
|
||||||
this.handleCurrentChange(null)
|
this.handleCurrentChange(null)
|
||||||
if (this.rows.length > 0) {
|
if (this.rows.length > 0) {
|
||||||
this.rows.forEach(now => {
|
this.rows.forEach(now => {
|
||||||
strs += now.status
|
strs += now.status
|
||||||
})
|
})
|
||||||
if(strs.indexOf('1') != -1){
|
if (strs.indexOf('1') != -1) {
|
||||||
this.confirm_flag = true
|
this.confirm_flag = true
|
||||||
}
|
}
|
||||||
if(strs.indexOf('0') != -1){
|
if (strs.indexOf('0') != -1) {
|
||||||
this.cancle_flag = true
|
this.cancle_flag = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -302,19 +303,19 @@ export default {
|
|||||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||||
const status = row.status
|
const status = row.status
|
||||||
|
|
||||||
if (column.property === 'status') {
|
if (column.property === 'status') {
|
||||||
if (status == '1') {
|
if (status == '1') {
|
||||||
return 'background: #13ce66'
|
return 'background: #13ce66'
|
||||||
}else {
|
} else {
|
||||||
return 'background: #FFBA00'
|
return 'background: #FFBA00'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
format_work_order_two_status(row, column) {
|
format_work_order_two_status(row, column) {
|
||||||
return this.dict.label.work_order_two_status[row.status]
|
return this.dict.label.work_order_two_status[row.status]
|
||||||
},
|
},
|
||||||
getPointList() { // 获取点位列表
|
getPointList() { // 获取点位列表
|
||||||
crudSchBasePoint.getPointsByRegionCodes("YL,YLHC,KJHC").then(res => {
|
crudSchBasePoint.getPointsByRegionCodes('YL,YLHC,KJHC').then(res => {
|
||||||
this.pointList = res
|
this.pointList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user