This commit is contained in:
lb 2023-09-22 14:41:11 +08:00
джерело 33d13b3eb4
коміт 506cab65a4
8 змінених файлів з 111 додано та 13 видалено

@ -40,8 +40,8 @@
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
</script>
<% } %>

@ -213,6 +213,7 @@
:url="urls.subase"
:configs="configs.subDialog"
:related-id="dataForm.id"
:code="extraCode"
@refreshDataList="getSubList"></small-dialog>
<!-- footer -->
@ -385,6 +386,7 @@ export default {
});
return {
extraCode: null,
// configs,
btnLoading: false,
loadingStatus: false,
@ -1014,6 +1016,7 @@ export default {
.catch((err) => {});
}
case "edit": {
this.extraCode = this.subList?.find((item) => item.id == data)?.code;
this.handleAddParam(data); /** data is ==> id */
break;
}

@ -36,7 +36,9 @@
:label="opt.label"
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
<span
v-if="col.customLabel"
style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "-" }}
</span>
</el-option>
@ -96,6 +98,10 @@ export default {
type: String,
default: "",
},
code: {
type: String,
default: null,
},
},
inject: ["urls"],
data() {
@ -112,7 +118,10 @@ export default {
col,
"options",
!col.customLabel
? res.data.list.map((item) => ({ label: item[col.optionLabel ?? "name"], value: item.id }))
? res.data.list.map((item) => ({
label: item[col.optionLabel ?? "name"],
value: item.id,
}))
: res.data.list.map((item) => ({
label: item[col.optionLabel ?? "name"],
value: item.id,
@ -120,11 +129,11 @@ export default {
}))
);
//console.log(
// res.data.list.map((item) => ({
// label: item.name,
// value: item.id,
// [col.customLabel]: item[col.customLabel],
// }))
// res.data.list.map((item) => ({
// label: item.name,
// value: item.id,
// [col.customLabel]: item[col.customLabel],
// }))
// );
} else {
this.$set(col, "options", []);
@ -220,14 +229,22 @@ export default {
fields[this.configs.extraParam] = this.relatedId;
// [this.configs.extraParam]: this.relatedId, // this.configs.extraParam
if (this.configs.forceAttachCode) fields["code"] = "";
let body = {
...this.dataForm,
...fields,
};
if (payload.name == "update") {
if (this.code != null) {
body.code = this.code;
}
}
console.log("body", body);
this.$http({
url: this.urls.subase,
method,
data: {
...this.dataForm,
...fields,
},
data: body,
}).then(({ data: res }) => {
//console.log("[add&update] res is: ", res);
this.btnLoading = false;

@ -37,6 +37,7 @@ export default function () {
{ width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" },
{ width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "description", label: "结束备注" },
// { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
{
prop: "operations",

@ -236,6 +236,60 @@ export default {
case "destroy-order":
//
case "end-order": {
this.$prompt("确认结束请输入结束备注", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
})
.then(({ value }) => {
return value;
})
.catch(() => {
this.$message({
type: "info",
message: "取消输入",
});
return Promise.reject();
})
.then((value) => {
return this.$http({
method: "post",
url: "/pms/order/end",
headers: {
"Content-Type": "application/json",
},
data: {
id: data,
description: value,
},
});
})
.then(({ data: res }) => {
if (res.code === 0) {
// success
this.$message({
message: "已结束订单!",
type: "success",
duration: 2000,
onClose: () => {
this.getAList(
Object.assign({}, this.listQuery, this.extraSearchConditions, this.params)
);
this.$emit("refresh-tables", ["finished"]);
},
});
} else {
// failed
throw new Error(res.msg);
}
})
.catch((err) => {
this.$message({
type: "error",
message: err,
});
});
return;
this.$confirm(`确定${type === "end-order" ? "结束订单" : "废除订单"}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -344,6 +398,22 @@ export default {
this.openDialog(data); /** data is ==> id */
break;
}
case "copy": {
this.$http({
url: "/pms/order/copy",
method: "post",
headers: {
"Content-Type": "application/json",
},
data,
}).then(({ data: res }) => {
if (res.code === 0) {
this.$message.success("复制成功!");
this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
}
});
break;
}
case "view":
case "view-detail-action": {
this.openDialog(data, true);

@ -33,6 +33,7 @@ export default function () {
// { name: "destroy-order", label: "废除", icon: "close" },
],
pending: [
{ name: "copy", label: "复制", icon: "copy-document" },
{ name: "edit", label: "编辑", icon: "edit-outline" },
{ name: "view", label: "查看详情", icon: "view" },
{ name: "confirm-order", label: "确认订单", icon: "success" },

@ -182,6 +182,7 @@
:url="urls.subase"
:configs="configs.subDialog"
:related-id="dataForm.id"
:code="extraCode"
@refreshDataList="getSubList"></small-dialog>
<!-- footer -->
@ -238,6 +239,7 @@ export default {
});
return {
extraCode: null,
visible: false,
btnLoading: false,
formLoading: false,
@ -898,6 +900,7 @@ export default {
.catch((err) => {});
}
case "edit": {
this.extraCode = this.subList.find(item => item.id == data)?.code;
this.handleAddParam(data); /** data is ==> id */
break;
}

@ -182,6 +182,7 @@
:url="urls.subase"
:configs="configs.subDialog"
:related-id="dataForm.id"
:code="extraCode"
@refreshDataList="getSubList"></small-dialog>
<!-- footer -->
@ -239,6 +240,7 @@ export default {
return {
visible: false,
extraCode: null,
btnLoading: false,
formLoading: false,
optionsLoading: false,
@ -898,6 +900,7 @@ export default {
.catch((err) => {});
}
case "edit": {
this.extraCode = this.subList.find(item => item.id == data)?.code;
this.handleAddParam(data); /** data is ==> id */
break;
}