✨ feat: 生产管理初步重构
This commit is contained in:
@@ -87,6 +87,12 @@
|
||||
:disabled="!canEdit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="handleSpec(scope.row)"
|
||||
>产品规范</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -136,16 +142,34 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="产品规范" :visible.sync="specDialogVisible" width="500px" append-to-body>
|
||||
<ProductSpec v-if="form.groupId" :groupId="form.groupId" :readonly="!canEdit"/>
|
||||
<div v-else-if="canEdit">
|
||||
<el-select placeholder="请选择产品规范" @change="handleChangeSpec">
|
||||
<el-option v-for="item in productSpecList" :key="item.groupId" :label="item.specName" :value="item.groupId" />
|
||||
|
||||
<template #empty>
|
||||
<el-button type="primary" @click="handleAddSpec">新增产品规范</el-button>
|
||||
</template>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无产品规范
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOrderDetail, getOrderDetail, delOrderDetail, addOrderDetail, updateOrderDetail } from "@/api/wms/orderDetail";
|
||||
import { listProductSpecGroup } from "@/api/work/productSpecGroup";
|
||||
import { getOrder } from "@/api/wms/order";
|
||||
import ProductSelect from '@/components/KLPService/ProductSelect';
|
||||
import { EOrderStatus } from "@/utils/enums";
|
||||
import { ProductInfo } from '@/components/KLPService';
|
||||
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||
import ProductSpec from './spec.vue';
|
||||
|
||||
export default {
|
||||
name: "OrderDetailPanel",
|
||||
@@ -159,7 +183,8 @@ export default {
|
||||
components: {
|
||||
ProductSelect,
|
||||
ProductInfo,
|
||||
BomInfoMini
|
||||
BomInfoMini,
|
||||
ProductSpec
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -200,7 +225,9 @@ export default {
|
||||
unit: [
|
||||
{ required: true, message: "单位不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
},
|
||||
specDialogVisible: false,
|
||||
productSpecList: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -219,6 +246,9 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getOrderInfo();
|
||||
listProductSpecGroup().then(response => {
|
||||
this.productSpecList = response.rows;
|
||||
});
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
@@ -344,6 +374,22 @@ export default {
|
||||
this.download && this.download('wms/orderDetail/export', {
|
||||
...this.queryParams
|
||||
}, `orderDetail_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
handleSpec(row) {
|
||||
this.specDialogVisible = true;
|
||||
this.form = row;
|
||||
},
|
||||
handleChangeSpec(groupId) {
|
||||
// 确认更换
|
||||
this.$modal && this.$modal.confirm('是否确认更换产品规范?').then(() => {
|
||||
this.form.groupId = groupId;
|
||||
this.submitForm();
|
||||
});
|
||||
},
|
||||
handleAddSpec() {
|
||||
this.$router.push({
|
||||
path: '/production/pspec',
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user