|
|
@@ -95,7 +95,7 @@
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer" style="text-align: right;top: auto;">
|
|
|
<el-button @click="add_gdgycloseDialog">取 消</el-button>
|
|
|
- <el-button type="primary" disabled @click="add_gdgyenterDialog">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="add_gdgyenterDialog">确 定</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
@@ -137,7 +137,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import {ref, reactive} from 'vue'
|
|
|
-import {gdzl_MachineList, PrintDetailList, WastageList,getDepartName, capacityList,
|
|
|
+import {gdzl_MachineList, PrintDetailList, WastageList,getDepartName, capacityList,ProcessDetailAdd,
|
|
|
} from "@/api/yunyin/yunying";
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
|
@@ -158,7 +158,10 @@ const cjList = ref([
|
|
|
}
|
|
|
])
|
|
|
const gdzl_MachineList_address = ref()
|
|
|
-
|
|
|
+import { useUserStore } from '@/pinia/modules/user'
|
|
|
+const userStore = useUserStore()
|
|
|
+const _username = ref('')
|
|
|
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
|
|
|
//新增工艺资料弹窗 键盘 input框跳转
|
|
|
const add_gyzlent = async (event,id1,id2,id3) => {
|
|
|
if (id2==='印件编号' && event.key==='Tab' || id2 === '印件编号' && event.key=== 'Enter') {
|
|
|
@@ -340,33 +343,43 @@ const add_gdgyenterDialog = async () => {
|
|
|
if(!form['设备编号']){
|
|
|
ElMessage({ type: 'warning', message: '设备编号不能为空' });return;
|
|
|
}
|
|
|
- console.log(form)
|
|
|
+ // console.log(form)
|
|
|
sbbh.value = form['设备编号'].join(' ');
|
|
|
const formattedData = {
|
|
|
Gy0_gdbh: id.value,
|
|
|
+ Gy0_方案: 'A',
|
|
|
Gy0_yjno: form['yjno'] ? form['yjno'] : "",
|
|
|
Gy0_gxh: form['工序'] ? form['工序'] : "",
|
|
|
+ Gy0_gxmc:form['工艺名称'] ? form['工艺名称'] : "",
|
|
|
+ Add_gxmc:form['工序名称'] ? form['工序名称'] : "",
|
|
|
重点工序: form['重点工序'] ? form['重点工序'] : "",
|
|
|
- 备选工序: form['备选工序'] ? form['备选工序'] : "",
|
|
|
+ 备选工序: form['备选工序'] ? "1" : "0",
|
|
|
+ Gy0_sbbh: sbbh.value ? sbbh.value : "",
|
|
|
+ Gy0_sbmc: "",
|
|
|
+ Gy0_SITE: form['车间名称'] ? form['车间名称'] : "",
|
|
|
Gy0_ks: form['开数'] ? form['开数'] : "",
|
|
|
Gy0_ls: form['联数'] ? form['联数'] : "",
|
|
|
- 车间名称: form['车间名称'] ? form['车间名称'] : "",
|
|
|
- 工艺名称: form['工艺名称'] ? form['工艺名称'] : "",
|
|
|
- 工序名称: form['工序名称'] ? form['工序名称'] : "",
|
|
|
- 计损色数: form['计损色数'] ? form['计损色数'] : "",
|
|
|
- 设备编号: sbbh.value ? sbbh.value : "",
|
|
|
- 工序损耗: form['shdh'] ? form['shdh'] : "",
|
|
|
- 工序损耗名称: form['工序损耗名称'] ? form['工序损耗名称'] : "",
|
|
|
- 装版工时: form['装版工时'] ? form['装版工时'] : "",
|
|
|
- 小时产能: form['小时产能'] ? form['小时产能'] : "",
|
|
|
- 备注: form['备注'] ? form['备注'] : "",
|
|
|
+ Gy0_ms: form['计损色数'] ? form['计损色数'] : 0,
|
|
|
+ Sys_id : _username.value,
|
|
|
+ 工价系数: form['难度系数'] ? form['难度系数'] : 0,
|
|
|
+ 损耗系数: form['损耗系数'] ? form['损耗系数'] : 0,
|
|
|
+ Gy0_shdh: form['shdh'] ? form['shdh'] : "",
|
|
|
+ Gy0_Rate1: "",
|
|
|
+ Gy0_辅助工时: form['装版工时'] ? form['装版工时'] : "",
|
|
|
+ Gy0_小时产能: form['小时产能'] ? form['小时产能'] : "",
|
|
|
+ 工序备注: form['备注'] ? form['备注'] : "",
|
|
|
质量要求: form['质量要求'] ? form['质量要求'] : "",
|
|
|
质量隐患: form['质量隐患'] ? form['质量隐患'] : "",
|
|
|
};
|
|
|
console.log(formattedData)
|
|
|
- // const ProcessDetailAdd_add = await ProcessDetailAdd(formattedData);
|
|
|
- // console.log(ProcessDetailAdd_add)
|
|
|
- // add_gdgydialogFormVisible.value = false
|
|
|
+ const ProcessDetailAdd_add = await ProcessDetailAdd(formattedData);
|
|
|
+ console.log(ProcessDetailAdd_add)
|
|
|
+ if (ProcessDetailAdd_add.code === 0) {
|
|
|
+ ElMessage({type: 'success', message: '新增成功'})
|
|
|
+ add_gdgydialogFormVisible.value = false
|
|
|
+ } else {
|
|
|
+ ElMessage({type: 'error',message: '新增失败'})
|
|
|
+ }
|
|
|
}
|
|
|
// 新增工艺资料取消
|
|
|
const add_gdgycloseDialog = () => {
|