This commit is contained in:
lb 2023-08-01 15:16:47 +08:00
父節點 456c9d8950
當前提交 2f1bc5906c
共有 8 個檔案被更改,包括 108 行新增67 行删除

查看文件

@ -666,10 +666,23 @@ export default {
}
case "同步":
case "全部同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
console.log("同步", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.$confirm("是否同步数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.overlayVisible = true;
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;
})
.catch((err) => {
this.overlayVisible = false;
});
});
break;
}

查看文件

@ -7,11 +7,11 @@ export default function () {
const tableProps = [
{ type: "index", label: "序号" },
{ prop: "batchNo", label: "批次编码" },
{ prop: "batchSize", label: "批次重量 [kg]" },
{ width: 108, prop: "batchSize", label: "批次重量 [kg]" },
{ prop: "status", label: "状态" },
// { prop: "startTime", label: "开始时间" },
{ prop: "endTime", label: "结束时间" },
{ prop: "task", label: "任务分类" },
{ prop: "endTime", label: "结束时间", filter: timeFilter },
{ width: 108, prop: "task", label: "任务分类" },
{ prop: "blenderCode", label: "混料机" },
// { width: 120, prop: "orderCate", label: "主订单子号" },
// { width: 160, prop: "code", label: "压制订单号" },
@ -22,10 +22,11 @@ export default function () {
// { prop: "goodqty", label: "合格数量" },
// { width: 120, prop: "badqty", label: "不合格数量" },
// { prop: "remark", label: "备注" },
// { prop: 'version', label: '配方号' },
// { prop: 'status', label: '状态', subcomponent: StatusComponent }, // subcomponent
{ prop: "description", label: "详情", subcomponent: TableTextComponent, actionName: 'view-blender-batch-details' },
{ width: 160, prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "description", label: "详情", subcomponent: TableTextComponent, actionName: "view-blender-batch-details" },
{ prop: 'bomName', label: '牌号' },
{ prop: 'bomVersion', label: '版本号' },
// { width: 160, prop: "createTime", label: "添加时间", filter: timeFilter },
{
prop: "operations",
name: "操作",
@ -36,17 +37,32 @@ export default function () {
// 只有 injectRow.task 为手动时,才允许编辑
// { name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } },
// { name: 'delete', icon: 'delete', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } },
// 只有 injectRow.status 为 waiting 时,才允许编辑
{ name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'status' in injectRow && injectRow.status === 'Waiting' } },
{ name: 'delete', icon: 'delete', emitFull: true, promptField: 'batchNo', enable: injectRow => { return 'status' in injectRow && injectRow.status === 'Waiting' } },
]
{
name: "edit",
label: "编辑",
icon: "edit-outline",
enable: (injectRow) => {
return "status" in injectRow && injectRow.status === "Waiting";
},
},
{
name: "delete",
icon: "delete",
emitFull: true,
promptField: "batchNo",
enable: (injectRow) => {
return "status" in injectRow && injectRow.status === "Waiting";
},
},
],
},
];
const headFormFields = [
{
label: '订单批次'
label: "订单批次",
},
{
button: {

查看文件

@ -7,11 +7,11 @@ export default function () {
const tableProps = [
{ type: "index", label: "序号" },
// { prop: "kilnCode", label: "窑炉" },
{ width: 160, prop: "orderCode", label: "主订单号" },
{ width: 128, prop: "orderCode", label: "主订单号" },
{ width: 60, prop: "orderCate", label: "子号" },
{ width: 160, prop: "code", label: "混料订单号" },
{ width: 128, prop: "code", label: "混料订单号" },
{
width: 60,
width: 80,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
@ -25,9 +25,10 @@ export default function () {
// { prop: "startTime", label: "开始时间" },
// { prop: "shapeCode", label: "砖型" },
{ prop: "bomCode", label: "配方" },
{ prop: "bomName", label: "牌号" },
{ width: 60, prop: "ai", label: "版本" },
{ width: 120, prop: "qty", label: "混料总量 [kg]" },
{ width: 120, prop: "comqty", label: "已完成量 [kg]" },
{ width: 60, prop: "ai", label: "版本" },
{ prop: "blenderCode", label: "混料机" },
{ width: 160, prop: "createTime", label: "添加时间", filter: timeFilter },
// { width: 120, prop: "badqty", label: "不合格数量" },

查看文件

@ -11,7 +11,7 @@ export default function () {
// { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "techCode", label: "烧制曲线" },
{ prop: "description", label: "详情", subcomponent: TableTextComponent, emitFullData: true },
// { prop: "remark", label: "备注" },
{ prop: "techRemark", label: "烧制曲线备注" },
{
prop: "operations",
name: "操作",

查看文件

@ -508,7 +508,7 @@ export default {
}
} else if (typeof cond === "object") {
Object.keys(cond).forEach((key) => {
this.cachedSearchCondition[key] = cond[key];
this.cachedSearchCondition[key] = payload[key] ? payload[key] : cond[key];
});
}
});

查看文件

@ -18,7 +18,7 @@ export default function () {
prop: "operations",
name: "操作",
fixed: "right",
width: 150,
width: 180,
subcomponent: TableOperaionComponent,
options: [
{ name: "temperature", label: "烧制温度", },
@ -29,15 +29,24 @@ export default function () {
];
const headFormFields = [
// {
// prop: 'code',
// label: "窑车号",
// input: true,
// default: { value: "" },
// bind: {
// placeholder: '请输入窑车号'
// }
// },
{
input: true,
prop: 'code',
label: "窑车号",
default: { value: "" },
bind: {
placeholder: '请输入窑车号'
}
},
{
input: true,
prop: 'orderCode',
label: "订单号",
default: { value: "" },
bind: {
placeholder: '请输入订单号'
}
},
{
timerange: true,
prop: "timerange",

查看文件

@ -4,10 +4,9 @@
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:car-payload-dialog-configs="carPayloadDialogConfigs"
:listQueryExtra="[{ code }]"
:listQueryExtra="[{ code, orderCode: '' }]"
attach-list-query-data="code"
:trigger-update="triggerUpdateKey"
/>
:trigger-update="triggerUpdateKey" />
</template>
<script>
@ -22,11 +21,11 @@ export default {
urls: this.allUrls,
};
},
computed: {
code() {
return this.$route.query.code || "";
},
},
// computed: {
// code() {
// return this.$route.query.code || "0";
// },
// },
data() {
const { tableConfig, headFormConfigs, carPayloadDialogConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
@ -36,9 +35,12 @@ export default {
allUrls: urls,
dialogConfigs,
triggerUpdateKey: "",
code: "",
};
},
activated() {
console.log("activated", this.$route.query)
this.code = this.$route.query.code || "";
this.triggerUpdateKey = Math.random().toString();
},
};

查看文件

@ -12,7 +12,7 @@ export default function () {
// { prop: "specifications", label: "规格" },
// { prop: "unitDictValue", label: "单位", filter: dictFilter("unit") },
{ prop: "weight", label: "重量", filter: (val) => (val ? val + " kg" : "-") },
{ prop: "processTime", label: "产线完成单位产品用时", width: 200, filter: (val) => val + " (分钟)" },
// { prop: "processTime", label: "产线完成单位产品用时", width: 200, filter: (val) => val + " (分钟)" },
{ prop: "remark", label: "备注" },
{
prop: "description",
@ -62,8 +62,8 @@ export default function () {
permission: "pms:product:save",
},
bind: {
plain: true
}
plain: true,
},
},
{
button: {
@ -72,8 +72,8 @@ export default function () {
permission: "",
},
bind: {
plain: true
}
plain: true,
},
},
];
@ -106,6 +106,16 @@ export default function () {
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入物料编码" },
},
{
input: true,
label: "重量",
prop: "weight",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入数字类型", trigger: "blur", transform: (val) => Number(val) },
],
elparams: { placeholder: "请输入重量" },
},
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
// {
// select: true,
@ -118,7 +128,7 @@ export default function () {
// elparams: { placeholder: "选择一个物料类型" },
// },
],
[
// [
// { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
// {
// select: true,
@ -137,27 +147,17 @@ export default function () {
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// elparams: { placeholder: "请输入规格" },
// },
{
input: true,
label: "产线完成单位产品用时",
prop: "processTime",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: 'number', message: "请输入数字类型", trigger: "blur", transform: val => Number(val) }
],
elparams: { placeholder: "请输入规格" },
},
{
input: true,
label: "重量",
prop: "weight",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{ type: 'number', message: "请输入数字类型", trigger: "blur", transform: val => Number(val) }
],
elparams: { placeholder: "请输入重量" },
},
],
// {
// input: true,
// label: "产线完成单位产品用时",
// prop: "processTime",
// rules: [
// { required: true, message: "必填项不能为空", trigger: "blur" },
// { type: 'number', message: "请输入数字类型", trigger: "blur", transform: val => Number(val) }
// ],
// elparams: { placeholder: "请输入规格" },
// },
// ],
[{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
@ -239,7 +239,7 @@ export default function () {
subase: "/pms/productArrt",
subpage: "/pms/productArrt/page",
importUrl: "/pms/product/import",
templateUrl: '/importTemplates/productImport.xlsx'
templateUrl: "/importTemplates/productImport.xlsx",
},
};
}