zck 11 mēneši atpakaļ
vecāks
revīzija
988776123e

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

@@ -809,6 +809,16 @@ export const ProductgetCouplet = (params) => {
         params
     })
 }
+
+//产品工艺排序
+export const ProductYgSort = (params) => {
+    return service({
+        url: '/mes_server/product/ProductYgSort',
+        method: 'get',
+        params
+    })
+}
+
 //班组人员及分配比例
 export const Team = (params) => {
     return service({

+ 20 - 3
src/view/performance/09-workOrderVerification/index.vue

@@ -28,6 +28,7 @@
 								<el-button type="primary" icon="edit"   @click="gdlcdcxconlick"    class="bt" title="流程单查询">流程单查询</el-button>
 								<el-button type="primary" icon="edit"   @click="scpconClick"    class="bt" title="工单生产批次信息查询">工单生产批次信息查询</el-button>
 								<el-button type="primary" icon="delete" class="bt" @click="handleDelete">删除</el-button>
+								<el-button type="primary" icon="edit" class="bt" @click="showHjfpfb">核检废品分布</el-button>
 								<div style="margin-left: auto;">			
 							<el-button type="primary" class="bt" icon="Download" @click="exportExcel">导出到Excel</el-button>
 						</div>
@@ -445,6 +446,9 @@
 
 
 
+					<!-- 核检废品分布 -->
+					<Hjfpfb v-if="dialogHjfpfb" v-model="dialogHjfpfb":val="hjgdbh" :jjcp_yjno="hjyjno"/>
+
 					<!-- 废品日统计 -->
 					<Meirihejiantongji v-if="dialogMrhjtj" v-model="dialogMrhjtj" />
 
@@ -453,7 +457,7 @@
 
 					<!-- 测试图表 -->
 					<Shebeizhuangtai v-if="dialogSbyxgl" v-model="dialogSbyxgl"
-						title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花盒包装纸】【01--胶印】" />
+						title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】" />
 
 				</el-main>
 			</el-container>
@@ -475,6 +479,7 @@
 	import Meirihejiantongji from '@/view/performance/09-workOrderVerification/componets/meirihejiantongji.vue'
 	import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
 	import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
+	import Hjfpfb from '@/view/performance/12-orderAccounting/componets/hjfpfb.vue'
 	import {
 	  StaGetOrderList,
 	  StaGetList,
@@ -488,6 +493,10 @@
 	const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
 	defineOptions({name: '06PackingDocuments'})
 
+
+
+
+
 	// 侧边栏数据请求
 	const treeData = reactive([])
 	const getSideData = async () => {
@@ -1415,15 +1424,23 @@ const ontuicclicks = async () => {
 	const dialogGdzjfptj = ref(false)
 	const dialogSbyxgl = ref(false)
 	const dialoglcdcx = ref(false)
+	const dialogHjfpfb = ref(false)
+	const hjgdbh = ref('')
+	const hjyjno = ref('')
 	const value1 = ref('')
 	const table = ref(null)
 
 	const showGdzjfptj = () => {
 		value1.value = currentRow.gdbh
 		dialogGdzjfptj.value = true
-		
 	}
-	const currentRow = ref()
+
+	const showHjfpfb = () => {
+		hjgdbh.value = currentRow.gdbh
+		hjyjno.value = lcdyjno.value
+		dialogHjfpfb.value = true
+	}
+	const currentRow = ref('')
 	const lcdyjno = ref()
 	const handleSelectChange = (row, column, event) => {
 		currentRow.value = row.UniqId

+ 62 - 14
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -20,6 +20,7 @@
 			        <el-button type="primary" class="bt" icon="edit"  @click="addcp_onclick" >新增产品资料</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="addcpyj_onclick" v-if="addyj=== true">新增印件资料</el-button>
               <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="Process_sorting" >工艺排序</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>
 
@@ -561,36 +562,45 @@
                 <el-input disabled  v-model="scope.row.gy0_gxmc" :clearable="false"/>
               </el-table-column>
               <!-- 原难度系数、原损耗系数、原计损色数-->
-              <el-table-column v-slot="scope" align="left" label=原难度系数 width="115" >
+              <el-table-column v-slot="scope" align="left" label=原难度系数 width="95" >
                 <el-input disabled  v-model="scope.row.hscstzold_difficulty_coe" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=原损耗系数 width="115" >
+              <el-table-column v-slot="scope" align="left" label=原损耗系数 width="95" >
                 <el-input disabled  v-model="scope.row.hscstzold_loss_coe" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=原计损色数 width="115" >
+              <el-table-column v-slot="scope" align="left" label=原计损色数 width="95" >
                 <el-input disabled  v-model="scope.row.hscstzold_ms_coe" :clearable="false"/>
               </el-table-column>
               <!-- 新难度系数、新损耗系数、新计损色数-->
-              <el-table-column v-slot="scope"  align="left" label=新难度系数 width="115" >
+              <el-table-column v-slot="scope"  align="left" label=新难度系数 width="95" >
                 <el-input   v-model="scope.row.difficulty_coe" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope"  align="left" label=新损耗系数 width="115" >
+              <el-table-column v-slot="scope"  align="left" label=新损耗系数 width="95" >
                 <el-input   v-model="scope.row.loss_coe" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope"   align="left" label=新计损色数 width="115" >
+              <el-table-column v-slot="scope"  align="left" label=新损耗代号 width="115" >
+                <el-input   v-model="scope.row.shdh" @keyup.enter="getSH(scope)" :clearable="false"/>
+              </el-table-column>
+              <el-table-column v-slot="scope" align="left" label=基础损耗 width="95" >
+                <el-input disabled  v-model="scope.row.rate0" :clearable="false"/>
+              </el-table-column>
+              <el-table-column v-slot="scope" align="left" label=损耗率 width="100" >
+                <el-input disabled  v-model="scope.row.rate1" :clearable="false"/>
+              </el-table-column>
+              <el-table-column v-slot="scope"   align="left" label=新计损色数 width="95" >
                 <el-input   v-model="scope.row.ms_coe" :clearable="false"/>
               </el-table-column>
 
-              <el-table-column v-slot="scope" align="left" label=开数 width="70" >
+              <el-table-column v-slot="scope" align="left" label=开数 width="60" >
                 <el-input disabled  v-model="scope.row.Gy0_Ks" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=联数 width="70" >
+              <el-table-column v-slot="scope" align="left" label=联数 width="60" >
                 <el-input disabled  v-model="scope.row.Gy0_ls" :clearable="false"/>
               </el-table-column>
               <el-table-column v-slot="scope" align="left" label=车间 width="110" >
                 <el-input disabled  v-model="scope.row.Gy0_site" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=设备编号 width="100" >
+              <el-table-column v-slot="scope" align="left" label=设备编号 width="95" >
                 <el-input disabled  v-model="scope.row.Gy0_sbbh" :clearable="false"/>
               </el-table-column>
               <el-table-column v-slot="scope" align="left" label=客户名称 width="300" >
@@ -1589,7 +1599,8 @@ import {
   ProcessEdit,
   getCouplet,
   ProductgetCouplet,
-  gdzl_MachineList
+  gdzl_MachineList,
+  ProductYgSort
 } from '@/api/yunyin/yunying'
 defineOptions({   name: 'Company'})
 import { useUserStore } from '@/pinia/modules/user'
@@ -2481,6 +2492,7 @@ const hscstzConfirm = async () => {
       difficulty_coe: item.difficulty_coe,
       loss_coe: item.loss_coe,
       ms_coe: item.ms_coe,
+      shdh: item.shdh?item.shdh:'',
     };
   });
   const hscstz_edit = await editGy(formattedData);
@@ -3238,7 +3250,7 @@ const addcpgy_onclick =  async () => {
 const add_gyformData = reactive({
 	Gy0_cpdh: '',
   Gy0_方案: '',
-  Gy0_yjno: '',
+  Gy0_yjno: '1',
   Gy0_gxh: '',
   Gy0_Ks: '',
   Gy0_ls: '',
@@ -3329,8 +3341,13 @@ const InSH = async (value) => {
 	}
 }
 const getSHListdata = ref([]);
-const getSH = (code) => {
-  _getSH()
+let currentEditingRow = null; // 新增:用于记录当前正在编辑的行
+
+const getSH = (scope) => {
+  if (scope) {
+    currentEditingRow = scope.row; // 记录当前行
+  }
+  _getSH();
 }
 //填充树形结构
 const _getSH = async () => {
@@ -3381,11 +3398,22 @@ const selectSHNode = (node,check) => {
    	console.log(node.label)
    }
    if(node.level==2){
-   	add_gyformData.Gy0_shdh = node.sys_bh
+    if(hscstzlist.value){
+      console.log('在核算参数调整中')
+      if(currentEditingRow) {
+        currentEditingRow.shdh = node.sys_bh;
+        currentEditingRow.rate0 = node.sys_rate0;
+        currentEditingRow.rate1 = node.sys_rate1;
+      }
+      searchSHModel.value = false;
+    }else{
+      add_gyformData.Gy0_shdh = node.sys_bh
 	add_gyformData.sys_mc = node.sys_mc
 	add_gyformData.sys_rate0 = node.sys_rate0
 	add_gyformData.sys_rate1 = node.sys_rate1
 	searchSHModel.value = false;
+    }
+
    }
  
 }
@@ -3825,6 +3853,7 @@ const getKlKs = () =>{
 			if(response.data){
 				add_gyformData.Gy0_Ks = response.data['开数']
 				add_gyformData.Gy0_ls = response.data['联数']
+        add_gyformData.Gy0_gxh = response.data['工序号']
 			}else{
 				add_gyformData.Gy0_Ks = ''
 				add_gyformData.Gy0_ls = ''
@@ -4164,6 +4193,25 @@ const createROLuckyExcel = (files) => {
 	})
 }
 
+//===============工艺排序===================
+const Process_sorting = async()  => {
+  const response = await ProductYgSort({cpdh:_Gd_gdbh.value,yjno:currentGy0_yjno.value})
+  if(response.code==0){
+    ElMessage({type:'success',message: '排序成功'})	
+    const res = await getProductData({product_code:_product_code.value});
+    const processedData = res.data.gyData.map(item => {
+    return {
+      ...item,
+      combinedProp: item.Gy0_yjno + '--'+item.Gy0_gxh,
+      combinedProp2: item.gy0_gxmc + '-'+item.add_gxmc,
+	  combinedProp3: item.Gy0_Ks + '*'+item.Gy0_ls
+    };
+  });
+  gytableData.splice(0, gytableData.length, ...processedData);
+  }
+}
+
+
 //===============颜色==================================
 //工艺资料背景颜色变黄
 const currentGy0_yjno = ref(null)

+ 3 - 2
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -608,6 +608,9 @@
                   <el-table-column align="left" label="工序" prop="工序号"  width="45"/>
                   <el-table-column align="left" label="备选工序" prop="备选工序"  width="45"/>
 <!--                  <el-table-column align="left" label="工艺名称" prop="工艺名称"  width="150"/>-->
+<el-table-column align="left" label="建档用户" prop="建档用户"  width="90"/>
+<el-table-column align="left" label="更新时间" prop="更新时间"  width="150"/>
+
                   <el-table-column align="left" label="工序名称" prop="工序名称"  width="125"/>
                   <el-table-column align="left" label="计划产量" prop="计划产量"  width="73"/>
                   <el-table-column align="left" label="基础损耗" prop="基础损耗"  width="45"/>
@@ -626,9 +629,7 @@
                   <el-table-column align="left" label="备注" prop="备注"  width="115"/>
                   <el-table-column align="left" label="印刷方式" prop="印刷方式"  width="80"/>
                   <el-table-column align="center" label="版距" prop="版距"  width="60"/>
-                  <el-table-column align="left" label="建档用户" prop="建档用户"  width="90"/>
                   <el-table-column align="left" label="建档日期" prop="建档日期"  width="150"/>
-                  <el-table-column align="left" label="更新时间" prop="更新时间"  width="150"/>
                 </el-table>
               </el-tab-pane>