|
|
@@ -54,20 +54,27 @@
|
|
|
<el-table-column align="center" type="selection" width="40"/>
|
|
|
<el-table-column align="center" label="附件状态" prop="status" width="100" />
|
|
|
<el-table-column align="left" sortable label="订单编号" prop="订单编号" width="110" />
|
|
|
- <el-table-column align="left" sortable label="客户" prop="客户编号" width="80" />
|
|
|
+ <el-table-column align="left" label="客户" prop="客户编号" width="80" />
|
|
|
<el-table-column align="left" sortable label="生产款号" prop="生产款号" width="110" />
|
|
|
<el-table-column align="left" sortable label="款式" prop="款式" width="100"/>
|
|
|
- <el-table-column align="left" sortable label="订单数量" prop="订单数量" width="110" />
|
|
|
+ <el-table-column align="left" label="订单数量" prop="订单数量" width="100" />
|
|
|
+ <el-table-column align="left" label="工单状态" prop="gd_statu" width="100" >
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="row.gd_statu === '1-计划中' ? 'success' : (row.gd_statu === '2-生产中' ? 'info' : 'danger')">
|
|
|
+ {{ row.gd_statu === '1-计划中' ? '计划中' : (row.gd_statu === '2-生产中' ? '生产中' : '已完工') }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="left" sortable label="落货日期" prop="落货日期" width="120" />
|
|
|
- <el-table-column align="left" sortable label="船样合计" prop="船样合计" width="110" />
|
|
|
- <el-table-column align="left" sortable label="船样描述" prop="船样描述" width="140" />
|
|
|
- <el-table-column align="left" sortable label="单位" prop="单位" width="80" />
|
|
|
- <el-table-column align="left" sortable label="面料" prop="面料" width="130" />
|
|
|
- <el-table-column align="left" sortable label="备注" prop="要求" width="130" />
|
|
|
- <el-table-column align="left" sortable label="粘衬" prop="粘衬" width="80" />
|
|
|
- <el-table-column align="left" sortable label="箱唛要求" prop="箱唛要求" width="110" />
|
|
|
- <el-table-column align="left" sortable label="制单人" prop="Sys_id" width="160" />
|
|
|
- <el-table-column align="left" sortable label="制单日期" prop="Sys_rq" width="160" />
|
|
|
+ <el-table-column align="left" label="船样合计" prop="船样合计" width="90" />
|
|
|
+ <el-table-column align="left" label="船样描述" prop="船样描述" width="140" />
|
|
|
+ <el-table-column align="left" label="单位" prop="单位" width="60" />
|
|
|
+ <el-table-column align="left" label="面料" prop="面料" width="230" />
|
|
|
+ <el-table-column align="left" label="备注" prop="要求" width="130" />
|
|
|
+ <el-table-column align="left" label="粘衬" prop="粘衬" width="80" />
|
|
|
+ <el-table-column align="left" label="箱唛要求" prop="箱唛要求" width="110" />
|
|
|
+ <el-table-column align="left" label="制单人" prop="Sys_id" width="160" />
|
|
|
+ <el-table-column align="left" label="制单日期" prop="Sys_rq" width="160" />
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
<div class="gva-pagination">
|
|
|
@@ -153,7 +160,6 @@
|
|
|
<el-table-column align="left" label="版本号" prop="version" width="80"/>
|
|
|
<el-table-column align="left" label="建档用户" prop="sys_id" width="160"/>
|
|
|
<el-table-column align="left" label="建档时间" prop="sys_rq" width="160"/>
|
|
|
- <el-table-column align="left" label="更新时间" prop="updatetime" width="160"/>
|
|
|
<!-- 操作列,新增修改和删除按钮 -->
|
|
|
<el-table-column align="left" label="操作" width="230" fixed="right">
|
|
|
<template #default="scope">
|
|
|
@@ -228,7 +234,7 @@
|
|
|
<el-table-column align="left" label="裁床实际用料" prop="裁床实际用料" width="110"/>
|
|
|
<el-table-column align="left" label="备注" prop="备注" width="180"/>
|
|
|
<el-table-column align="left" label="单位" prop="投料单位" width="60"/>
|
|
|
- <el-table-column align="left" label="更新用户" prop="ID" width="110"/>
|
|
|
+ <el-table-column align="left" label="更新用户" prop="ID" width="160"/>
|
|
|
<el-table-column align="left" label="更新日期" prop="日期" width="160"/>
|
|
|
<!-- <el-table-column align="left" label="UNIQID" prop="UNIQID" width="80"/> -->
|
|
|
</el-table>
|
|
|
@@ -1273,7 +1279,7 @@ import jsPDF from 'jspdf';
|
|
|
import {Datalist,WorkOrderList,WorkOrderAdd,PrintListData,
|
|
|
printDetailAdd,PrintDetailDel,orderDataDel,getWorkOrder,
|
|
|
getSuborder,PrintDataEdit,WorkOrderEdit,gdAnnexAdd,upload,OrderAttachments,
|
|
|
-getPonumber,FabricEdit,orderBomList,FabricDetail,fabricList,Bomdel} from '@/api/mes/job'
|
|
|
+getPonumber,FabricEdit,orderBomList,FabricDetail,fabricList,Bomdel,delfujian} from '@/api/mes/job'
|
|
|
import PrintPage from './components/print.vue'
|
|
|
import luckyexcelPage from './components/luckyexcel.vue'
|
|
|
import AddGongYi from './components/addGongYi.vue'
|
|
|
@@ -1458,18 +1464,19 @@ const handleNodeClick = async (node) => {
|
|
|
// 删除
|
|
|
const deleteItem = async (row) => {
|
|
|
console.log(row)
|
|
|
- ElMessageBox.confirm('确定删除此行数据吗?', '提示', {
|
|
|
+ if(row.sys_id.split('/'[1])===_username.value.split('/')[1]||_username.value.split('/')[0] === '超级管理员'){
|
|
|
+ ElMessageBox.confirm('确定删除此行数据吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(async () => {
|
|
|
- // const delfujian_del = await delfujian({UniqId:row['UniqId']});
|
|
|
- // if(delfujian_del.code === 0){
|
|
|
- // ElMessage({type: 'success',message: '删除成功'})
|
|
|
- // }else{
|
|
|
- // ElMessage({type: 'error',message: '删除失败'})
|
|
|
- // }
|
|
|
- // tableRowClick (row)
|
|
|
+ const delfujian_del = await delfujian({UniqId:row['UniqId']});
|
|
|
+ if(delfujian_del.code === 0){
|
|
|
+ ElMessage({type: 'success',message: '删除成功'})
|
|
|
+ }else{
|
|
|
+ ElMessage({type: 'error',message: '删除失败'})
|
|
|
+ }
|
|
|
+ tableRowClick (row)
|
|
|
}).catch(() => {
|
|
|
// 取消删除
|
|
|
ElMessage({
|
|
|
@@ -1477,6 +1484,10 @@ const deleteItem = async (row) => {
|
|
|
message: '已取消删除'
|
|
|
});
|
|
|
});
|
|
|
+}else{
|
|
|
+ return ElMessage({type: 'error',message: '无法删除其他用户附件'})
|
|
|
+}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1535,8 +1546,9 @@ const updateCompanyFunc = async (row) => {
|
|
|
|
|
|
//订单资料修改确认
|
|
|
const dd_edit_Dialog = async () => {
|
|
|
- //日期转换
|
|
|
- let lhrq_formattedDeliveryDate = '';
|
|
|
+ if(edit_ddformData.value.Sys_id.split('/')[1]===_username.value.split('/')[1]||_username.value.split('/')[0] === '超级管理员'){
|
|
|
+//日期转换
|
|
|
+let lhrq_formattedDeliveryDate = '';
|
|
|
if (edit_ddformData.value.落货日期) {
|
|
|
const date = new Date(edit_ddformData.value.落货日期);
|
|
|
lhrq_formattedDeliveryDate = `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${('0' + date.getDate()).slice(-2)}`;
|
|
|
@@ -1571,6 +1583,10 @@ const dd_edit_Dialog = async () => {
|
|
|
}else{
|
|
|
ElMessage({type: 'error',message: '修改失败'})
|
|
|
}
|
|
|
+ }else{
|
|
|
+ return ElMessage({type: 'error',message: '无法修改其他用户订单数据'})
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//订单资料修改取消
|
|
|
@@ -2583,51 +2599,51 @@ const add_bomenterDialog = async() => {
|
|
|
}
|
|
|
|
|
|
// BOM删除
|
|
|
-const record_deleteRow = async (row, index) => {
|
|
|
- console.log(row.UNIQID);
|
|
|
-
|
|
|
- // 使用 ElMessageBox 提示确认删除
|
|
|
- ElMessageBox.confirm('确定删除此行数据吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- // 确认删除,检查UNIQID是否为空
|
|
|
- if (row.UNIQID === '' || row.UNIQID === null || row.UNIQID === undefined) {
|
|
|
- // 删除当前行数据
|
|
|
- resbomtableData.value.splice(index, 1);
|
|
|
- ElMessage({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功'
|
|
|
- });
|
|
|
- } else {
|
|
|
- // 调用接口删除
|
|
|
- // const Bomdel_del = await Bomdel({ row.UNIQID });
|
|
|
- // if (Bomdel_del.code === 0) {
|
|
|
- // ElMessage({
|
|
|
- // type: 'success',
|
|
|
- // message: '删除成功'
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // ElMessage({
|
|
|
- // type: 'error',
|
|
|
- // message: '删除失败'
|
|
|
- // });
|
|
|
+const record_deleteRow = async (row, index) => {
|
|
|
+ console.log(row.UNIQID);
|
|
|
+
|
|
|
+ // 使用 ElMessageBox 提示确认删除
|
|
|
+ ElMessageBox.confirm('确定删除此行数据吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ // 确认删除,检查UNIQID是否为空
|
|
|
+ if (row.UNIQID === '' || row.UNIQID === null || row.UNIQID === undefined) {
|
|
|
+ // 删除当前行数据
|
|
|
+ resbomtableData.value.splice(index, 1);
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 调用接口删除
|
|
|
+ // const Bomdel_del = await Bomdel({ row.UNIQID });
|
|
|
+ // if (Bomdel_del.code === 0) {
|
|
|
+ // ElMessage({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '删除成功'
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // ElMessage({
|
|
|
+ // type: 'error',
|
|
|
+ // message: '删除失败'
|
|
|
+ // });
|
|
|
// }
|
|
|
// 重新获取BOM列表数据
|
|
|
const orderBomListdata = await orderBomList({ order: _Gd_gdbh.value });
|
|
|
//BOM资料列表
|
|
|
bomtableData.splice(0, bomtableData.length, ...orderBomListdata.data);
|
|
|
//批量新增/更新BOM数据列表
|
|
|
- resbomtableData.value = orderBomListdata.data;
|
|
|
- }
|
|
|
- }).catch(() => {
|
|
|
- // 取消删除
|
|
|
- ElMessage({
|
|
|
- type: 'info',
|
|
|
- message: '已取消删除'
|
|
|
- });
|
|
|
- });
|
|
|
+ resbomtableData.value = orderBomListdata.data;
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ // 取消删除
|
|
|
+ ElMessage({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
//修改
|
|
|
@@ -3409,8 +3425,8 @@ const jsfjenterDialog = () => {
|
|
|
text-overflow: ellipsis !important;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</style>
|