Переглянути джерело

新增产品资料,部分功能优化

Lexie 1 рік тому
батько
коміт
f9bd20ac7e

+ 9 - 0
src/api/yunyin/yunying.js

@@ -312,6 +312,14 @@ export const DataList = (params) => {
         params
     })
 }
+// 美浓产品数据同步
+export const ProductDetailData = (params) => {
+    return service({
+        url:'/mes_server/product/ProductDetailData',
+        method: 'get',
+        params
+    })
+}
 // 工单资料
 export const WorkList = (params) => {
     return service({
@@ -927,3 +935,4 @@ export const WorkOrderDetailListCope = (data) => {
         data
     })
 }
+

+ 0 - 3
src/view/performance/jjgzzhys.vue

@@ -146,20 +146,17 @@ const jjgzzhysclick = async () => {
   };
   console.log(formattedData);
   const staffSalaryCount_add = await staffSalaryCount(formattedData);//调用接口
-<<<<<<< HEAD
   console.log(staffSalaryCount_add);
   // if (staffSalaryCount_add.code === 0) {
   //   ElMessage({type: 'success',message: msg})
   // }else{
   //   ElMessage({type: 'error',message: '更新失败'})
   // }
-=======
   if (staffSalaryCount_add.code === 0) {
     ElMessage({type: 'success',message: msg})
   }else{
     ElMessage({type: 'error',message: '更新成功'})
   }
->>>>>>> de9ed826175bbf174cd077b307a9089dbda4147c
 };
 </script>
 <style scoped>

+ 46 - 2
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -22,12 +22,26 @@
               <el-button type="primary" class="bt" icon="edit"  @click="addcpgy_onclick" v-if="addgy=== true">新增工艺资料</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="addyb_onclick" v-if="addyb=== true">新增印版资料</el-button>
 			  <el-button type="primary" icon="edit"   @click="delgd_delclick" v-if="delall=== true" :disabled="yjSelection === '' && gySelection === ''"  class="bt" title="选择批量删除(印件资料或工艺资料)"  >删除</el-button>
+
 <!--              <el-button type="primary" class="bt" icon="Download" @click="cpexportToExcel" disabled>导出产品资料</el-button>-->
 <!--              <el-button type="primary" class="bt" icon="Download" @click="gyexportToExcel" disabled>导出工艺流程</el-button>-->
             </el-form-item>
           </el-form>
 
           <!--按钮弹窗部分-->
+          <!--mes同步-->
+          <el-dialog v-model="messtatuslist" title="mes同步" style="width: 300px; top: 20%">
+            <div>
+              <el-form-item label="工单编号:" prop="process" class="mab">
+                <el-input  v-model="mesformDataTest['gdbh']" id="process" placeholder="" style="width: 160px;"/>
+              </el-form-item>
+            </div>
+            <br>
+            <div slot="footer" class="dialog-footer" style="text-align: right;">
+              <el-button @click="meshandleCancel">取消</el-button>
+              <el-button type="primary" @click="meshandleConfirm">确定</el-button>
+            </div>
+          </el-dialog>
 
           <!--状态设置-->
           <el-dialog v-model="onstatuslist" title="状态设置" style="width: 300px; top: 20%">
@@ -1603,6 +1617,7 @@ import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import { ref, reactive, nextTick, } from 'vue'
 import {
   DataList,
+  ProductDetailData,
   editGyName,
   editGyNo,
   editProduct,
@@ -2585,7 +2600,7 @@ const delgd_delclick = async () => {
   console.log(gySelection.value)
 	  
   if (yjSelection.value !== '') {
-    try {	
+    try {
       const res1 = await PrintlDel({UniqId: yjSelection.value})
       res1.code === 0 && ElMessage.success('印件资料删除成功')
     } catch(err) {
@@ -2593,7 +2608,8 @@ const delgd_delclick = async () => {
     }
   }
   if (gySelection.value !== ''){
-    try {		
+    try {
+
       const res2 = await ProcessDel({UniqId: gySelection.value})
       res2.code === 0 && ElMessage.success('工艺资料删除成功')
     } catch(err) {
@@ -3452,6 +3468,34 @@ const _getProductYbMaterialDetail = async () => {
   }))
 }
 
+//=========mes同步========
+const messtatuslist = ref(false)
+const mesformDataTest = reactive({
+  gdbh:'',
+})
+const mestb_oncilck = async () => {
+  messtatuslist.value = true;
+}
+//确定
+const meshandleConfirm = async () => {
+  // const formattedData = {
+  //   productCode: mesformDataTest['gdbh'],
+  //   sys_id: _username.value,
+  // }
+  // console.log(formattedData)
+  const ProductDetailData_add = await ProductDetailData({productCode: mesformDataTest['gdbh'],sys_id: _username.value})
+  console.log(ProductDetailData_add)
+  // if (ProductDetailData_add.code === 0) {
+  //   ElMessage({type: 'success',message: '更新成功'})
+  // } else {
+  //   ElMessage({ type: 'error',message: '更新失败'})
+  // }
+  // messtatuslist.value = false;
+}
+//取消
+const meshandleCancel = async () => {
+  messtatuslist.value = false;
+}
 
 //=========修改工艺资料========
 let gyformDataTest = reactive({})

+ 19 - 11
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -2993,29 +2993,37 @@ DataListdata();
 const tableData = reactive([])
 const _Gd_khdh = ref(null)
 const handleNodeClick = async (node) => {
-  if(node.id === '印刷工单' || node.id === '糊盒工单'){
-    tableData.splice(0);
-    return false;
-  }
+  // if(node.id === '印刷工单' || node.id === '糊盒工单'){
+  //   tableData.splice(0);
+  //   return false;
+  // }
   searchInfo.value = '';
   gytableData.value = [];
   yjtableData.value = [];
   bomtableData.value = [];
   jstableData.value = [];
   if (node.label) {
-    var parts = node.label.split('【');
-    if (parts.length > 1) {
-      _Gd_khdh.value = parts[0]
-    } else {
-      // console.log(node.label); // 如果没有“【”,直接输出原字符串
-      // _Gd_khdh.value = node.label
-    }
+    // var parts = node.label.split('【');
+    // var parts = node.label.slice(0, 5);
+    _Gd_khdh.value = node.label.slice(0, 5);
+    // if (parts.length > 1) {
+    //   _Gd_khdh.value = parts[0]
+    // } else {
+    //   // console.log(node.label); // 如果没有“【”,直接输出原字符串
+    //   // _Gd_khdh.value = node.label
+    // }
   }
   _WorkList_page();
 };
 //工单资料
 const _WorkList_page = async () => {
   console.log(_Gd_khdh.value)
+  if(_Gd_khdh.value === '印刷工单'){
+    _Gd_khdh.value = 'Y';
+  }
+  if(_Gd_khdh.value === '糊盒工单'){
+    _Gd_khdh.value = 'J';
+  }
   try {
     const WorkListdata = await WorkList({Gd_khdh:_Gd_khdh.value,limit:pageSize.value,page:page.value});
     console.log(WorkListdata)