|
@@ -39,6 +39,48 @@ const formOption = reactive({
|
|
|
});
|
|
|
const formConfig = reactive([
|
|
|
{
|
|
|
+ type: "title",
|
|
|
+ title: "基本信息",
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // type: "picker",
|
|
|
+ // label: "生产订单",
|
|
|
+ // prop: "prodOrderId",
|
|
|
+ // itemType: "onePicker",
|
|
|
+ // showPicker: false,
|
|
|
+ // fieldNames: {
|
|
|
+ // text: "label",
|
|
|
+ // value: "value",
|
|
|
+ // },
|
|
|
+ // data: [],
|
|
|
+ // readonly: true,
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ label: "生产订单",
|
|
|
+ prop: "prodOrderCode",
|
|
|
+ readonly: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ label: "产品编码",
|
|
|
+ prop: "productCode",
|
|
|
+ readonly: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ label: "产品名称",
|
|
|
+ prop: "productName",
|
|
|
+ readonly: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "报损信息",
|
|
|
+ },
|
|
|
+ {
|
|
|
type: "picker",
|
|
|
label: "类型",
|
|
|
prop: "type",
|
|
@@ -81,8 +123,8 @@ const formConfig = reactive([
|
|
|
},
|
|
|
{
|
|
|
type: "picker",
|
|
|
- label: "生产订单",
|
|
|
- prop: "prodOrderId",
|
|
|
+ label: "报损工序",
|
|
|
+ prop: "processId",
|
|
|
itemType: "onePicker",
|
|
|
showPicker: false,
|
|
|
fieldNames: {
|
|
@@ -90,41 +132,6 @@ const formConfig = reactive([
|
|
|
value: "value",
|
|
|
},
|
|
|
data: [],
|
|
|
- readonly: true,
|
|
|
- // changeFn: (val, data) => {
|
|
|
- // proxy.formChange(val, data, formData);
|
|
|
- // if (val.selectedValues[0]) {
|
|
|
- // let current = data.data.find((x) => x.value == val.selectedValues[0]);
|
|
|
- // if (current) {
|
|
|
- // proxy
|
|
|
- // .post("/contractProductBom/getList", {
|
|
|
- // contractId: current.contractId,
|
|
|
- // })
|
|
|
- // .then((res) => {
|
|
|
- // formConfig[4].data = res.data.map((x) => ({
|
|
|
- // ...x,
|
|
|
- // label: x.productName,
|
|
|
- // value: x.materialId,
|
|
|
- // }));
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // data.showPicker = false;
|
|
|
- // },
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- itemType: "text",
|
|
|
- label: "产品编码",
|
|
|
- prop: "productCode",
|
|
|
- readonly: true,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- itemType: "text",
|
|
|
- label: "产品名称",
|
|
|
- prop: "productName",
|
|
|
- readonly: true,
|
|
|
},
|
|
|
{
|
|
|
type: "picker",
|
|
@@ -164,18 +171,6 @@ const formConfig = reactive([
|
|
|
readonly: true,
|
|
|
},
|
|
|
{
|
|
|
- type: "picker",
|
|
|
- label: "报损工序",
|
|
|
- prop: "processId",
|
|
|
- itemType: "onePicker",
|
|
|
- showPicker: false,
|
|
|
- fieldNames: {
|
|
|
- text: "label",
|
|
|
- value: "value",
|
|
|
- },
|
|
|
- data: [],
|
|
|
- },
|
|
|
- {
|
|
|
type: "input",
|
|
|
label: "报损数量",
|
|
|
prop: "quantity",
|
|
@@ -215,7 +210,7 @@ const getDict = () => {
|
|
|
companyId: getUserInfo().companyId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- formConfig[2].data = res.rows.map((item) => {
|
|
|
+ formConfig[7].data = res.rows.map((item) => {
|
|
|
return {
|
|
|
text: item.nickName,
|
|
|
value: item.userId,
|
|
@@ -223,19 +218,19 @@ const getDict = () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- proxy
|
|
|
- .post("produceOrder/page", {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 9999,
|
|
|
- produceStatus: "0,1",
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- formConfig[3].data = res.data.rows.map((x) => ({
|
|
|
- ...x,
|
|
|
- label: x.code,
|
|
|
- value: x.id,
|
|
|
- }));
|
|
|
- });
|
|
|
+ // proxy
|
|
|
+ // .post("produceOrder/page", {
|
|
|
+ // pageNum: 1,
|
|
|
+ // pageSize: 9999,
|
|
|
+ // produceStatus: "0,1",
|
|
|
+ // })
|
|
|
+ // .then((res) => {
|
|
|
+ // formConfig[1].data = res.data.rows.map((x) => ({
|
|
|
+ // ...x,
|
|
|
+ // label: x.code,
|
|
|
+ // value: x.id,
|
|
|
+ // }));
|
|
|
+ // });
|
|
|
|
|
|
proxy
|
|
|
.post("/productionProcesses/page", {
|
|
@@ -243,12 +238,12 @@ const getDict = () => {
|
|
|
pageSize: 999,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- formConfig[9].data = res.data.rows.map((x) => ({
|
|
|
+ formConfig[8].data = res.data.rows.map((x) => ({
|
|
|
...x,
|
|
|
label: x.name,
|
|
|
value: x.id,
|
|
|
}));
|
|
|
- formConfig[9].data.unshift({
|
|
|
+ formConfig[8].data.unshift({
|
|
|
label: "无",
|
|
|
value: "",
|
|
|
});
|
|
@@ -265,6 +260,7 @@ const getDetail = () => {
|
|
|
(res) => {
|
|
|
formData.data = {
|
|
|
prodTaskId: res.data.id,
|
|
|
+ prodOrderCode: res.data.orderCode,
|
|
|
prodOrderId: res.data.produceOrderId,
|
|
|
productCode: res.data.productCode,
|
|
|
productName: res.data.productName,
|
|
@@ -274,14 +270,11 @@ const getDetail = () => {
|
|
|
processId: "",
|
|
|
fileList: [],
|
|
|
};
|
|
|
- console.log(formData.data, "saa");
|
|
|
- formConfig[6].data = res.data.contractProductBomList.map((x) => ({
|
|
|
+ formConfig[9].data = res.data.contractProductAllBomList.map((x) => ({
|
|
|
...x,
|
|
|
label: x.productName + `(${x.productCode})`,
|
|
|
- value: x.productId,
|
|
|
+ value: x.materialId,
|
|
|
}));
|
|
|
-
|
|
|
- console.log(res, "saaas");
|
|
|
setTimeout(() => {
|
|
|
formDom.value.formDataShowLabelOne();
|
|
|
}, 2000);
|