|
|
@@ -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)
|