update 已完成订单独立

This commit is contained in:
lb 2023-04-11 09:32:07 +08:00
parent 9e6ec0acff
commit 84887dc9ac
4 changed files with 257 additions and 63 deletions

View File

@ -8,8 +8,6 @@
:destroy-on-close="false" :destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? true" :close-on-click-modal="configs.clickModalToClose ?? true"
> >
<!-- <el-button type="text" icon="el-icon-close" style="position: absolute; z-index: 100; top: 0; right: 18px" @click="handleClose">关闭</el-button> -->
<el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick"> <el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick">
<el-tab-pane name="sub" label="子订单进度"> <el-tab-pane name="sub" label="子订单进度">
<SubOrderDetail v-if="order !== null" :order="order" /> <SubOrderDetail v-if="order !== null" :order="order" />
@ -24,18 +22,9 @@
<OrderDetail ref="order-detail-tag" :configs="configs" /> <OrderDetail ref="order-detail-tag" :configs="configs" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!--
<div style="width: 100%; height: 76px; position: absolute; z-index: 100; bottom: 0; text-align: right;">
<el-button type="" plain @click="handleClose" style="margin-right: 18px; margin-top: 18px;">关闭</el-button>
</div> -->
<!-- footer --> <!-- footer -->
<div slot="footer" style=""> <div slot="footer" style="">
<!-- <template v-for="(operate, index) in configs.form.operations">
<el-button v-if="showButton(operate)" :key="'operation_' + index" :type="operate.type" @click="handleBtnClick(operate)">{{
operate.label
}}</el-button>
</template> -->
<el-button @click="handleClose">取消</el-button> <el-button @click="handleClose">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -57,7 +46,7 @@ export default {
}, },
fullscreen: { fullscreen: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
}, },
inject: ["urls"], inject: ["urls"],
@ -104,8 +93,6 @@ export default {
setTimeout(() => { setTimeout(() => {
this.$emit("destroy-dialog"); this.$emit("destroy-dialog");
// this.resetForm();
// this.$emit("update:dialogVisible", false);
}, 200); }, 200);
}, },
}, },
@ -116,12 +103,6 @@ export default {
.dialog-with-menu >>> .el-dialog__body { .dialog-with-menu >>> .el-dialog__body {
padding-top: 40px !important; padding-top: 40px !important;
padding-bottom: 40px !important; padding-bottom: 40px !important;
/* padding-top: 0 !important;
padding-bottom: 0 !important;
padding-left: 0 !important;
padding-right: 0 !important;
height: 100%; */
} }
.el-select, .el-select,
@ -132,7 +113,6 @@ export default {
.dialog-with-menu >>> .el-dialog__header { .dialog-with-menu >>> .el-dialog__header {
padding: 0; padding: 0;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
} }
.dialog-with-menu >>> .el-dialog__body { .dialog-with-menu >>> .el-dialog__body {
height: calc(100% - 72px); height: calc(100% - 72px);

View File

@ -12,8 +12,8 @@
:current-page.sync="page" :page-sizes="[1, 5, 10, 20, 50, 100]" :page-size="size" :total="totalPage" :current-page.sync="page" :page-sizes="[1, 5, 10, 20, 50, 100]" :page-size="size" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination> layout="total, sizes, prev, pager, next, jumper"></el-pagination>
<DialogWithMenu ref="edit-dialog" v-if="!!dialogConfigs && dialogType === DIALOG_WITH_MENU" <DialogWithMenu ref="edit-dialog" v-if="!!dialogConfigs && dialogVisible" :configs="dialogConfigs" @refreshDataList="getList" />
:dialog-visible.sync="dialogVisible" :configs="dialogConfigs" @refreshDataList="getList" /> <!-- :dialog-visible.sync="dialogVisible" :configs="dialogConfigs" @refreshDataList="getList" /> -->
</div> </div>
@ -22,7 +22,7 @@
<script> <script>
import BaseListTable from "@/components/BaseListTable.vue"; import BaseListTable from "@/components/BaseListTable.vue";
import BaseSearchForm from "@/components/BaseSearchForm.vue"; import BaseSearchForm from "@/components/BaseSearchForm.vue";
import DialogWithMenu from "../../order/components/DialogWithMenu.vue"; import DialogWithMenu from "./DialogWithMenu.vue";
import moment from "moment"; import moment from "moment";
@ -308,8 +308,11 @@ export default {
}, },
/** 打开对话框 */ /** 打开对话框 */
openDialog(row_id, detail_mode, tag_info) { openDialog(row, detail) {
this.dialogVisible = true; this.dialogVisible = true;
console.log("row detail", row, detail)
let extraParams = null; let extraParams = null;
if (this.attachListQueryExtra && this.listQueryExtra.length) { if (this.attachListQueryExtra && this.listQueryExtra.length) {
this.listQueryExtra.forEach((item) => { this.listQueryExtra.forEach((item) => {
@ -319,7 +322,7 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`); console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams); this.$refs["edit-dialog"].init(/** some args... */ row, detail);
}); });
}, },
}, },

View File

@ -68,59 +68,271 @@ export default function () {
}, },
]; ];
const dialogJustFormConfigs = { const textOnlyComponent = {
props: {
modelValue: {
type: String | Number,
required: true,
},
useBuiltin: {
type: Boolean,
default: true,
},
},
data() {
return {
orderStatusMap: ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"],
};
},
render: function (h) {
return h(
"span",
{ style: { display: "block", marginTop: "0" } },
this.useBuiltin ? this.orderStatusMap[this.modelValue] ?? "-" : this.modelValue.toString().trim() === "" ? "-" : this.modelValue.toString()
);
},
};
const dictList = JSON.parse(localStorage.getItem("dictList"));
const dialogConfigs = {
form: { form: {
rows: [ rows: [
[ [
{ {
select: true, label: "订单状态",
label: "窑车号", prop: "statusDictValue",
prop: "carId", component: textOnlyComponent,
options: [], },
fetchData: () => this.$http.get("/pms/car/page", { params: { page: 1, limit: 999 } }), {
input: true,
label: "订单号",
prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { elparams: { placeholder: "请输入订单号" },
disabled: true, },
} {
input: true,
label: "订单子号",
prop: "cate",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
],
elparams: { placeholder: "请输入订单子号" },
},
{
input: true,
label: "生产订单类型",
prop: "specifications",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入生产订单类型" },
}, },
{ {
select: true, select: true,
label: "状态", label: "物料编号",
prop: "stateDictValue", prop: "productId",
options: getDictDataList('car_state').map(i => ({ label: i.dictLabel, value: i.dictValue })), options: [],
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, optionLabel: "code",
elparams: { fetchData: () => this.$http.get("/pms/product/page", { params: { limit: 999, page: 1, key: "" } }),
fliterable: true elparams: { placeholder: "请选择物料", filterable: true },
} },
{
select: true,
label: "包装代码",
prop: "packTech",
options: [],
optionLabel: "code",
fetchData: () => this.$http.post("/pms/equipmentTech/pageView", { limit: 999, page: 1, key: "", shape: "", wsId: 5 }),
elparams: { placeholder: "请选择物料", filterable: true },
}, },
], ],
[ [
{ {
// select: true,
input: true, input: true,
label: "位置", label: "生产订单砖数",
prop: "pos", prop: "prodqty",
// options: getDictDataList(), rules: [
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { { type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
// fliterable: true ],
elparams: { placeholder: "请输入要求生产的数量" },
}
}, },
{ {
label: "查看载砖详情", input: true,
button: true, label: "已生产数",
onClick: function (id) { // 必须用 function 形式 prop: "yieldqty",
console.log(`查看载砖详情`, id) rules: [
this.$emit('emit-data', { type: 'to-car-payload', data: id }) { type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
} ],
elparams: { placeholder: "请输入已经生产的数量" },
},
{
input: true,
label: "托盘码放砖数",
prop: "pcsKilnCar",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
],
elparams: { placeholder: "请输入要求生产的数量" },
},
{
input: true,
label: "Add on",
prop: "sapParam1",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入addon" },
},
{
select: true,
label: "砖型",
prop: "shape",
optionLabel: "code",
options: [],
fetchData: () => this.$http.get("/pms/shape/page", { params: { limit: 999, page: 1, key: "" } }),
elparams: { placeholder: "请选择砖型", filterable: true },
},
{
select: true,
label: "压机",
prop: "press",
options: [],
optionLabel: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
elparams: { placeholder: "请选择压机号", filterable: true },
}, },
], ],
[
{
select: true,
label: "牌号",
prop: "bomId",
options: [],
fetchData: () => this.$http.get("/pms/bom/page", { params: { limit: 999, page: 1, key: "", externalCode: "" } }),
elparams: { placeholder: "请选择牌号", filterable: true },
injectTo: [
['bomCode', 'code'],
['ai', 'externalCode']
]
},
{
label: "配方号代码",
prop: "bomCode",
component: textOnlyComponent,
bind: {
useBuiltin: false,
},
},
{
label: "版本号",
prop: "ai",
component: textOnlyComponent,
bind: {
useBuiltin: false,
},
},
{
select: true,
label: "混料机号",
prop: "blender",
options: [],
optionLabel: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
elparams: { placeholder: "请选择混料机号", filterable: true },
},
{
select: true,
label: "隧道窑号",
prop: "kiln",
options: [],
optionLabel: "code",
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
elparams: { placeholder: "请选择隧道窑号", filterable: true },
},
{
input: true,
label: "烧成温度 ℃",
prop: "sapParam6",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
],
elparams: { placeholder: "请输入烧成温度" },
},
],
[
{
input: true,
label: "烧成时间 H",
prop: "sapParam7",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
],
elparams: { placeholder: "请输入烧成时间" },
},
{
input: true,
label: "销售订单号",
prop: "saleNo",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入销售订单号" },
},
{
input: true,
label: "销售订单item号",
prop: "saleOrderItem",
elparams: { placeholder: "请输入销售订单item号" },
},
{
input: true,
label: "销售订单砖数",
prop: "soqty",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
],
elparams: { placeholder: "请输入销售订单砖数" },
},
{
// time
datetime: true,
label: "销售时间",
prop: "deliveryTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择销售时间" },
},
{
select: true,
label: "客户",
prop: "customerId",
option: [],
optionLabel: "name",
fetchData: () => this.$http.get("/pms/customer/page", { params: { limit: 999, page: 1, name: "" } }),
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择客户" },
},
],
[
{
label: "物料号销售文本",
prop: "shortDesc",
component: textOnlyComponent,
bind: {
useBuiltin: false,
},
},
],
// 备注
[{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
], ],
operations: [ operations: [
// { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false }, { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
// { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },
// { name: "reset", label: "重置", type: "warning", showAlways: true }, { name: "reset", label: "重置", type: "warning", showAlways: true },
], ],
}, },
}; };
@ -128,7 +340,7 @@ export default function () {
return { return {
dialogConfigs: dialogJustFormConfigs, dialogConfigs,
tableConfig: { tableConfig: {
table: null, // 此处可省略el-table 上的配置项 table: null, // 此处可省略el-table 上的配置项
column: tableProps, // el-column-item 上的配置项 column: tableProps, // el-column-item 上的配置项

View File

@ -3,7 +3,6 @@
:table-config="tableConfig" :table-config="tableConfig"
:head-config="headFormConfigs" :head-config="headFormConfigs"
:dialog-configs="dialogConfigs" :dialog-configs="dialogConfigs"
:car-payload-dialog-configs="carPayloadDialogConfigs"
:list-query-extra="[ :list-query-extra="[
/** { pos: [] } **/ /** { pos: [] } **/
]" ]"
@ -13,7 +12,7 @@
<script> <script>
import initConfig from "./config"; import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue"; import ListViewWithHead from "./components/ListViewWithHead.vue";
export default { export default {
name: "FinishedOrderView", name: "FinishedOrderView",