|
@@ -337,7 +337,7 @@ import { checkPerm } from "@/directive/permission";
|
|
|
import { queryDictDataByType } from "@/api/system/dict";
|
|
|
import { getProExcel } from "@/api/excel";
|
|
|
import { exportDataInfo } from "@/api/order";
|
|
|
-import { getWorkshopData } from "@/api/report";
|
|
|
+import { getJobInfo, getWorkshopData } from "@/api/report";
|
|
|
import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
const updateTitle = ref("生产随工单");
|
|
@@ -656,6 +656,16 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
|
|
|
const opGroupShow = ref(true);
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
const groupStri = ref({});
|
|
|
+const switchOp = [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+];
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
searchEnter: true,
|
|
@@ -663,6 +673,7 @@ option.value = Object.assign(option.value, {
|
|
|
selection: true,
|
|
|
viewBtn: false,
|
|
|
editBtn: false,
|
|
|
+ labelWidth: 120,
|
|
|
column: [
|
|
|
{
|
|
|
label: "生产批号",
|
|
@@ -893,6 +904,9 @@ option.value = Object.assign(option.value, {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ if (value) {
|
|
|
+ getOpGroup(value);
|
|
|
+ }
|
|
|
},
|
|
|
rules: [
|
|
|
{
|
|
@@ -903,6 +917,17 @@ option.value = Object.assign(option.value, {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ label: "工单编号",
|
|
|
+ prop: "workOrderCode",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "工单编号不能为空",
|
|
|
+ trigger: "trigger",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "分组标识",
|
|
|
prop: "opGroup",
|
|
|
width: "100",
|
|
@@ -1036,21 +1061,43 @@ option.value = Object.assign(option.value, {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
- label: "工单数量",
|
|
|
- prop: "planNum",
|
|
|
- width: 85,
|
|
|
+ label: "管号最小值",
|
|
|
+ prop: "seqMin",
|
|
|
type: "number",
|
|
|
min: 1,
|
|
|
max: 99999,
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "工单数量不能为空",
|
|
|
+ message: "管号最小值不能为空",
|
|
|
trigger: "trigger",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ label: "管号最大值",
|
|
|
+ prop: "seqMax",
|
|
|
+ type: "number",
|
|
|
+ min: 1,
|
|
|
+ max: 99999,
|
|
|
+ blur: () => {
|
|
|
+ countPlanNum();
|
|
|
+ },
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "管号最小值不能为空",
|
|
|
+ trigger: "trigger",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工单数量",
|
|
|
+ prop: "planNum",
|
|
|
+ width: 85,
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "检验批号",
|
|
|
width: 85,
|
|
|
display: false,
|
|
@@ -1106,6 +1153,22 @@ option.value = Object.assign(option.value, {
|
|
|
prop: "packageUrl",
|
|
|
hide: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "水汽",
|
|
|
+ prop: "waterVapor",
|
|
|
+ span: 12,
|
|
|
+ type: "switch",
|
|
|
+ dicData: switchOp,
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "DPA",
|
|
|
+ prop: "dpa",
|
|
|
+ span: 12,
|
|
|
+ type: "switch",
|
|
|
+ dicData: switchOp,
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
],
|
|
|
});
|
|
|
|
|
@@ -1125,4 +1188,18 @@ onMounted(() => {
|
|
|
editBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_edit),
|
|
|
};
|
|
|
});
|
|
|
+
|
|
|
+// 选择完前工序或者后工序后获取这个
|
|
|
+const getOpGroup = (value) => {
|
|
|
+ getJobInfo(form.value.orderCode, value + "").then((res) => {
|
|
|
+ form.value.workOrderCode = res.data;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+// 输入完最大值和最小值计算工单数量
|
|
|
+const countPlanNum = () => {
|
|
|
+ if (form.value.seqMax && form.value.seqMin) {
|
|
|
+ form.value.planNum = form.value.seqMax - form.value.seqMin + 1;
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|