update 订单详情
This commit is contained in:
parent
422560c6ef
commit
907846a25c
@ -13,13 +13,13 @@
|
||||
<SubOrderDetail />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="car" label="窑车详情">
|
||||
<CarDetail :order-id="orderId" />
|
||||
<CarDetail v-if="order !== null" :order-id="order.id" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="tray" label="托盘详情">
|
||||
<TrayDetail />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="order" label="订单详情">
|
||||
<OrderDetail :configs="configs" />
|
||||
<OrderDetail ref="order-detail-tag" :configs="configs" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
@ -50,8 +50,7 @@ export default {
|
||||
detailMode: false,
|
||||
visible: false,
|
||||
activeTab: "sub",
|
||||
orderId: null,
|
||||
orderSubId: null,
|
||||
order: null,
|
||||
carLayoutKey: 0,
|
||||
};
|
||||
},
|
||||
@ -59,7 +58,6 @@ export default {
|
||||
methods: {
|
||||
handleTabClick(tab, event) {
|
||||
console.log("handle tab click", tab, event);
|
||||
// tab.getAList(this.orderId)
|
||||
switch (tab.label) {
|
||||
case "子订单进度":
|
||||
break;
|
||||
@ -75,11 +73,14 @@ export default {
|
||||
|
||||
/** init **/
|
||||
init(order, detailMode) {
|
||||
this.orderId = order.id;
|
||||
console.log("init menu dialog,", order);
|
||||
this.order = order;
|
||||
this.detailMode = detailMode ?? false;
|
||||
this.visible = true;
|
||||
|
||||
this.detailMode = detailMode ?? false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["order-detail-tag"].init(this.order.id, this.detailMode);
|
||||
});
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
|
@ -13,14 +13,7 @@
|
||||
:disabled="detailMode"
|
||||
v-bind="col.elparams"
|
||||
></el-cascader>
|
||||
<el-select
|
||||
v-if="col.select"
|
||||
v-model="dataForm[col.prop]"
|
||||
clearable
|
||||
:disabled="detailMode"
|
||||
v-bind="col.elparams"
|
||||
@change="handleSelectChange(col, $event)"
|
||||
>
|
||||
<el-select v-if="col.select" v-model="dataForm[col.prop]" clearable :disabled="detailMode" v-bind="col.elparams">
|
||||
<el-option v-for="(opt, optIdx) in col.options" :key="'option_' + optIdx" :label="opt.label" :value="opt.value" />
|
||||
</el-select>
|
||||
<el-switch
|
||||
@ -69,6 +62,7 @@ export default {
|
||||
}),
|
||||
},
|
||||
},
|
||||
inject: ["urls"],
|
||||
data() {
|
||||
const dataForm = {};
|
||||
const watchList = [];
|
||||
@ -177,12 +171,10 @@ export default {
|
||||
|
||||
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
|
||||
this.dataForm[propName] = JSON.stringify(data);
|
||||
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
|
||||
},
|
||||
|
||||
addOrUpdate(method = "POST") {
|
||||
if ("parentId" in this.dataForm) {
|
||||
// console.log("[DialogJustForm parentId]", this.dataForm.parentId);
|
||||
// 对特殊的键做特殊处理,如 parentId 是一个 cascader,获取的值是 ["xxx"],后端只需要xxx
|
||||
const lastItem = this.dataForm.parentId.length - 1;
|
||||
this.dataForm.parentId = this.dataForm.parentId[lastItem];
|
||||
@ -262,8 +254,6 @@ export default {
|
||||
},
|
||||
|
||||
handleBtnClick(payload) {
|
||||
// console.log("btn click payload: ", payload);
|
||||
|
||||
if ("name" in payload) {
|
||||
switch (payload.name) {
|
||||
case "cancel":
|
||||
@ -282,14 +272,14 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
init(order, detailMode) {
|
||||
init(orderId, detailMode) {
|
||||
if (this.$refs.dataForm) {
|
||||
this.$refs.dataForm.clearValidate();
|
||||
}
|
||||
|
||||
this.detailMode = detailMode ?? false;
|
||||
this.$nextTick(() => {
|
||||
// this.dataForm.id = id || null;
|
||||
this.dataForm.id = orderId || null;
|
||||
if (this.dataForm.id) {
|
||||
// 如果是编辑
|
||||
this.loadingStatus = true;
|
||||
@ -309,7 +299,6 @@ export default {
|
||||
url: file.fileUrl,
|
||||
}));
|
||||
}
|
||||
// console.log("[DialogJustForm] init():", this.dataForm);
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
@ -337,4 +326,10 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-date-editor {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,233 +0,0 @@
|
||||
formRows: [
|
||||
[
|
||||
{
|
||||
label: "订单状态",
|
||||
prop: "statusDictValue",
|
||||
component: textOnlyComponent,
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
elparams: { placeholder: "请输入订单号" },
|
||||
},
|
||||
{
|
||||
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",
|
||||
elparams: { placeholder: "请输入生产订单类型" },
|
||||
},
|
||||
{
|
||||
select: true,
|
||||
label: "物料编号",
|
||||
prop: "productId",
|
||||
options: [],
|
||||
optionLabel: "code",
|
||||
fetchData: () => this.$http.get("/pms/product/page", { params: { limit: 999, page: 1, key: "" } }),
|
||||
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 },
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: "生产订单砖数",
|
||||
prop: "prodqty",
|
||||
rules: [
|
||||
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
||||
],
|
||||
elparams: { placeholder: "请输入要求生产的数量" },
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: "已生产数",
|
||||
prop: "yieldqty",
|
||||
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
rules: [
|
||||
// { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
{ 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: [],
|
||||
// optionLabel: '',
|
||||
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",
|
||||
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
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: "请输入销售订单砖数" },
|
||||
},
|
||||
{
|
||||
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: "备注" } }],
|
||||
],
|
Loading…
Reference in New Issue
Block a user