|
|
@@ -34,10 +34,8 @@
|
|
|
<el-main>
|
|
|
<!-- 按钮区域 -->
|
|
|
<div class="gva-table-box">
|
|
|
- <div class="gva-btn-list">
|
|
|
- <el-row :span="6">
|
|
|
- <el-input v-model="positionvalue" placeholder="输入工单编号或产品名称" />
|
|
|
- </el-row>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="positionvalue" placeholder="输入工单编号或产品名称" style="width: 180px;" />
|
|
|
<el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
|
|
|
<el-button type="primary" class="bt" icon="plus" @click="onAdd">新增</el-button>
|
|
|
<el-button type="primary" class="bt" icon="refresh" @click="onRefresh">刷新质检系数</el-button>
|
|
|
@@ -46,7 +44,7 @@
|
|
|
<div style="margin-left: auto;">
|
|
|
<el-button type="primary" :icon="Download" @click="exportExcel">导出到Excel</el-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </el-form-item>
|
|
|
<!-- 数据展示 -->
|
|
|
<el-table ref="multipleTable" style="width: 100%" tooltip-effect="dark" :data="tableData" row-key="ID"
|
|
|
highlight-current-row="true" border @selection-change="handleSelectionChange" @row-click="Click"
|
|
|
@@ -133,7 +131,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="检验类别" prop="name" class="mab">
|
|
|
- <el-input v-model="formData.sczl_检验类别" id="检验类别" @keydown="ent1($event, '定额代号', '检验类别', '废品率系数')" style="width: 150px;"/>
|
|
|
+ <el-input v-model="formData.sczl_检验类别" id="检验类别" @keydown="ent1($event, '定额代号', '检验类别', '废品率系数')" @blur="getLbsubmit" style="width: 150px;"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
@@ -189,105 +187,43 @@
|
|
|
<span>每箱数量</span>
|
|
|
</el-row>
|
|
|
<el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh1" id="bh1" @keydown="ent1($event, '备注', 'bh1', 'name')" @keyup.enter.native="getygsubmit($event, '1')"/>
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh1_name" id="name1" @keydown="ent1($event, 'bh1', 'name', 'cl1')"/>
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_cl1" id="cl1" @keydown="ent1($event, 'name', 'cl1', 'fp1')" />
|
|
|
- <el-input style="width: 100px; margin-right: 60px;" v-model="formData.sczl_fp1" id="fp1" @keydown="ent1($event, 'cl1', 'fp1', 'bh7')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh7" id="bh7" @keydown="ent1($event, 'fp1', 'bh7', 'name7')" @keyup.enter.native="getygsubmit($event, '7')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh7_name" id="name7" @keydown="ent1($event, 'bh7', 'name7', 'cl7')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl7" id="cl7" @keydown="ent1($event, 'name7', 'cl7', 'fp7')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_fp7" id="fp7" @keydown="ent1($event, 'cl7', 'fp7', 'bh2')" />
|
|
|
+
|
|
|
+ <div style="width: 450px;margin-right: 30px;">
|
|
|
+ <div v-for="index in 6" :key="index">
|
|
|
+ <el-input style="width: 100px; margin-right: 5px;" v-model="formData['sczl_bh' + index]" :id="'bh' + index" @keydown="ent($event, index.toString())" />
|
|
|
+ <el-input style="width: 100px; margin-right: 5px; color: red;" :readonly="true" :value="formData['sczl_bh' + index + '_name']" :id="'name' + index" @keydown="ent1($event)"/>
|
|
|
+ <el-input style="width: 100px; margin-right: 5px;" v-model="formData['sczl_cl' + index]" :id="'cl' + index" @keydown="ent1($event)"/>
|
|
|
+ <el-input style="width: 100px;" v-model="formData['sczl_fp' + index]" :id="'fp' + index" @keydown="ent1($event)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 450px;">
|
|
|
+ <div v-for="index in 6" :key="index + 6">
|
|
|
+ <el-input style="width: 100px; margin-right: 5px;" v-model="formData['sczl_bh' + (index + 6)]" :id="'bh' + (index + 6)" @keydown="ent($event, (index + 6).toString())" />
|
|
|
+ <el-input style="width: 100px; margin-right: 5px; color: red;" :readonly="true" :value="formData['sczl_bh' + (index + 6) + '_name']" :id="'name' + (index + 6)" @keydown="ent1($event)"/>
|
|
|
+ <el-input style="width: 100px; margin-right: 5px;" :value="formData['sczl_cl' + (index + 6)]" :id="'cl' + (index + 6)" @keydown="ent1($event)"/>
|
|
|
+ <el-input style="width: 100px;" :value="formData['sczl_fp' + (index + 6)]" :id="'fp' + (index + 6)" @keydown="ent1($event)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh2" id="bh2" @keydown="ent1($event, 'fp7', 'bh2', 'name2')" @keyup.enter.native="getygsubmit($event, '2')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh2_name" id="name2" @keydown="ent1($event, 'bh2', 'name2', 'cl2')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_cl2" id="cl2" @keydown="ent1($event, 'name2', 'cl2', 'fp2')" />
|
|
|
- <el-input style="width: 100px; margin-right: 60px;" v-model="formData.sczl_fp2" id="fp2" @keydown="ent1($event, 'cl2', 'fp2', 'bh8')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh8" id="bh8" @keydown="ent1($event, 'fp2', 'bh8', 'name8')" @keyup.enter.native="getygsubmit($event, '8')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh8_name" id="name8" @keydown="ent1($event, 'bh8', 'name8', 'cl8')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl8" id="cl8" @keydown="ent1($event, 'name8', 'cl8', 'fp8')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_fp8" id="fp8" @keydown="ent1($event, 'cl8', 'fp8', 'bh3')" />
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh3" id="bh3" @keydown="ent1($event, 'fp8', 'bh3', 'name3')" @keyup.enter.native="getygsubmit($event, '3')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh3_name" id="name3" @keydown="ent1($event, 'bh3', 'name3', 'cl3')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_cl3" id="cl3" @keydown="ent1($event, 'name3', 'cl3', 'fp3')" />
|
|
|
- <el-input style="width: 100px; margin-right: 60px;" v-model="formData.sczl_fp3" id="fp3" @keydown="ent1($event, 'cl3', 'fp3', 'bh9')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh9" id="bh9" @keydown="ent1($event, 'fp3', 'bh9', 'name9')" @keyup.enter.native="getygsubmit($event, '9')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh9_name" id="name9" @keydown="ent1($event, 'bh9', 'name9', 'cl9')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl9" id="cl9" @keydown="ent1($event, 'name9', 'cl9', 'fp9')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_fp9" id="fp9" @keydown="ent1($event, 'cl9', 'fp9', 'bh4')" />
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh4" id="bh4" @keydown="ent1($event, 'fp9', 'bh4', 'name4')" @keyup.enter.native="getygsubmit($event, '4')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh4_name" id="name4" @keydown="ent1($event, 'bh4', 'name4', 'cl4')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_cl4" id="cl4" @keydown="ent1($event, 'name4', 'cl4', 'fp4')" />
|
|
|
- <el-input style="width: 100px; margin-right: 60px;" v-model="formData.sczl_fp4" id="fp4" @keydown="ent1($event, 'cl4', 'fp4', 'bh10')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh10" id="bh10" @keydown="ent1($event, 'fp4', 'bh10', 'name10')" @keyup.enter.native="getygsubmit($event, '10')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh10_name" id="name10" @keydown="ent1($event, 'bh10', 'name10', 'cl10')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl10" id="cl10" @keydown="ent1($event, 'name10', 'cl10', 'fp10')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_fp10" id="fp10" @keydown="ent1($event, 'cl10', 'fp10', 'bh5')" />
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh5" id="bh5" @keydown="ent1($event, 'fp10', 'bh5', 'name5')" @keyup.enter.native="getygsubmit($event, '5')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh5_name" id="name5" @keydown="ent1($event, 'bh5', 'name5', 'cl5')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_cl5" id="cl5" @keydown="ent1($event, 'name5', 'cl5', 'fp5')" />
|
|
|
- <el-input style="width: 100px; margin-right: 60px;" v-model="formData.sczl_fp5" id="fp5" @keydown="ent1($event, 'cl5', 'fp5', 'bh11')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh11" id="bh11" @keydown="ent1($event, 'fp5', 'bh11', 'name11')" @keyup.enter.native="getygsubmit($event, '11')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh11_name" id="name11" @keydown="ent1($event, 'bh11', 'name11', 'cl11')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl11" id="cl11" @keydown="ent1($event, 'name11', 'cl11', 'fp11')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_fp11" id="fp11" @keydown="ent1($event, 'cl11', 'fp11', 'bh6')" />
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh6" id="bh6" @keydown="ent1($event, 'fp11', 'bh6', 'name6')" @keyup.enter.native="getygsubmit($event, '6')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh6_name" id="name6" @keydown="ent1($event, 'bh6', 'name6', 'cl6')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl6" id="cl6" @keydown="ent1($event, 'name6', 'cl6', 'fp6')" />
|
|
|
- <el-input style="width: 100px; margin-right: 60px;" :readonly=true v-model="formData.sczl_fp6" id="fp6" @keydown="ent1($event, 'cl6', 'fp6', 'bh12')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" v-model="formData.sczl_bh12" id="bh12" @keydown="ent1($event, 'fp6', 'bh12', 'name12')" @keyup.enter.native="getygsubmit($event, '12')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_bh12_name" id="name12" @keydown="ent1($event, 'bh12', 'name12', 'cl12')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_cl12" id="cl12" @keydown="ent1($event, 'name12', 'cl12', 'fp12')" />
|
|
|
- <el-input style="width: 100px; margin-right: 5px;" :readonly=true v-model="formData.sczl_fp12" id="fp12" @keydown="ent1($event, 'cl12', 'fp12', '其他备注')" />
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24">
|
|
|
+ <el-row :gutter="24">
|
|
|
+
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="其他备注" prop="id" class="mab">
|
|
|
- <el-input type="textarea" rows="2" cols="50" v-model="formData.sczl_desc" id="其他备注" @keydown="ent1($event, 'fp12', '其他备注', '日期')" />
|
|
|
+ <el-input v-model="formData.sczl_desc" id="其他备注" @keydown="ent1($event, 'fp12', '其他备注', '日期')" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-model="dialogSelectVisible"
|
|
|
- title="选择"
|
|
|
- destroy-on-close
|
|
|
- width="600px"
|
|
|
- >
|
|
|
- <el-table
|
|
|
- tooltip-effect="dark"
|
|
|
- :data="selectData"
|
|
|
- row-key="ID"
|
|
|
- highlight-current-row="true"
|
|
|
- border
|
|
|
- style="width:100%"
|
|
|
- @row-dblclick="handleSelectClick"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- prop="Gd_cpmc"
|
|
|
- label="印件名称"
|
|
|
- width="340"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="jyGx"
|
|
|
- label="检验工序"
|
|
|
- width="150"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="Gy0_gxmc"
|
|
|
- label="工序名称"
|
|
|
- width="150"
|
|
|
- />
|
|
|
+ <el-dialog v-model="dialogSelectVisible" title="选择"
|
|
|
+ destroy-on-close width="800px" >
|
|
|
+ <el-table tooltip-effect="dark" :data="selectData" row-key="ID"
|
|
|
+ highlight-current-row="true" border style="width:100%"
|
|
|
+ @row-dblclick="handleSelectClick" >
|
|
|
+ <el-table-column prop="Gd_cpmc" label="印件名称" width="450" />
|
|
|
+ <el-table-column prop="jyGx" label="检验工序" width="85" />
|
|
|
+ <el-table-column prop="Gy0_gxmc" label="工序名称" width="225" />
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
|
|
|
@@ -321,6 +257,16 @@
|
|
|
<el-table-column prop="sczl_bzdh" label="班组" width="150" />
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="LbVisible" title="选择" destroy-on-close width="200px" >
|
|
|
+ <el-table tooltip-effect="dark" :data="selectDataLb" row-key="ID"
|
|
|
+ highlight-current-row="true" border style="width:100%"
|
|
|
+ :row-style="{ height: '30px' }"
|
|
|
+ @row-dblclick="SelectClickLb"
|
|
|
+ >
|
|
|
+ <el-table-column prop="sczl_检验类别" label="可选名称" width="150" />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
@@ -606,7 +552,6 @@ const getTableData = async() => {
|
|
|
page: page.value.toString(), limit: limit.value.toString(),
|
|
|
})
|
|
|
if (response.code === 0) {
|
|
|
- console.log(response)
|
|
|
const processedData = response.data.data.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
@@ -615,7 +560,6 @@ const getTableData = async() => {
|
|
|
};
|
|
|
});
|
|
|
tableData.splice(0, tableData.length, ...processedData);
|
|
|
- console.log(tableData)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -636,7 +580,6 @@ const GetLocate = async () => {
|
|
|
gdbh: params.gdbh,
|
|
|
page: page.value.toString(), limit: limit.value.toString(),
|
|
|
})
|
|
|
- console.log(response)
|
|
|
if (response.code === 0) {
|
|
|
const processedData = response.data.rows.map(item => {
|
|
|
return {
|
|
|
@@ -660,7 +603,6 @@ function onSearch() {
|
|
|
//获取详细信息
|
|
|
const GetInfo = async (value) => {
|
|
|
const response = await shougonggetInfo({UniqId:value});
|
|
|
- console.log(response)
|
|
|
if (response.code === 0) {
|
|
|
formData.value=response.data;
|
|
|
}
|
|
|
@@ -670,7 +612,16 @@ const GetInfo = async (value) => {
|
|
|
const ent1 = (event) => {
|
|
|
const inputs = document.getElementsByTagName('input');
|
|
|
const currentIndex = Array.from(inputs).indexOf(event.target);
|
|
|
- if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
|
|
|
+ if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
|
|
|
+ if(event.target.id=='其他备注'){
|
|
|
+ ElMessageBox.confirm('数据存盘?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ enterDialog()
|
|
|
+ })
|
|
|
+ }
|
|
|
for (let i = currentIndex + 1; i < inputs.length; i++) {
|
|
|
if (!inputs[i].readOnly) {
|
|
|
nextTick(()=>{
|
|
|
@@ -679,7 +630,10 @@ const ent1 = (event) => {
|
|
|
})
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
} else if (event.keyCode === 38) { // 向上箭头
|
|
|
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
|
if (!inputs[i].readOnly) {
|
|
|
@@ -689,7 +643,10 @@ const ent1 = (event) => {
|
|
|
})
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
} else if (event.keyCode === 8) { // 删除箭头
|
|
|
if (event.target.selectionStart === 0) {
|
|
|
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
|
@@ -700,7 +657,10 @@ const ent1 = (event) => {
|
|
|
})
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
}
|
|
|
} else if (event.keyCode === 37) { // 向左箭头
|
|
|
if (event.target.selectionStart === 0) {
|
|
|
@@ -712,9 +672,21 @@ const ent1 = (event) => {
|
|
|
})
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
}
|
|
|
- } else if (event.keyCode === 39) { // 向右箭头
|
|
|
+ } else if (event.keyCode === 39) { // 向右箭头
|
|
|
+ if(event.target.id=='其他备注'){
|
|
|
+ ElMessageBox.confirm('数据存盘?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ enterDialog()
|
|
|
+ })
|
|
|
+ }
|
|
|
if (event.target.selectionStart === event.target.value.length) {
|
|
|
for (let i = currentIndex + 1; i < inputs.length; i++) {
|
|
|
if (!inputs[i].readOnly) {
|
|
|
@@ -725,7 +697,10 @@ const ent1 = (event) => {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -777,46 +752,384 @@ const getygsubmit = async (event, inputName) => {
|
|
|
let Bname = 'sczl_bh' + inputName+'_name';
|
|
|
formData.value[Bname]=response.data.ygxm;
|
|
|
//设置姓名样式
|
|
|
- setColorReadonly('name'+inputName);
|
|
|
+
|
|
|
+ if(inputName>0){
|
|
|
+ unsetColorReadonly('cl'+inputName)
|
|
|
+ unsetColorReadonly('fp'+inputName)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const ent_sum = () =>{
|
|
|
+ let sum = 0;
|
|
|
+ for(var i=1;i<=12;i++){
|
|
|
+ sum += formData.value['sczl_cl'+i] * formData.value['sczl_fp'+i]
|
|
|
+ }
|
|
|
+ formData.value.sczl_cl = sum
|
|
|
+}
|
|
|
+//员工编号键盘事件
|
|
|
+const ent = (event, inputName) => {
|
|
|
+ let combinedString = 'sczl_bh' + inputName;
|
|
|
+ let value = eval('formData.value.' + combinedString);
|
|
|
+
|
|
|
+ if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
|
|
|
+ if(value){
|
|
|
+ getYg({sczl_bh:value}).then(response => {
|
|
|
+ if (response.code == 0) {
|
|
|
+ let Bname = 'sczl_bh' + inputName+'_name';
|
|
|
+ formData.value[Bname]=response.data.ygxm;
|
|
|
+ //设置姓名样式
|
|
|
+ unsetColorReadonly('cl'+inputName)
|
|
|
+ unsetColorReadonly('fp'+inputName)
|
|
|
+
|
|
|
+ document.getElementById('cl'+inputName).focus()
|
|
|
+ document.getElementById('cl'+inputName).select()
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+
|
|
|
+ if(inputName!=12){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('其他备注').focus()
|
|
|
+ document.getElementById('其他备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+ if(inputName!=12){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('其他备注').focus()
|
|
|
+ document.getElementById('其他备注').select()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ ent_sum()
|
|
|
+ } else if (event.keyCode === 38) { // 向上箭头
|
|
|
+ if(value){
|
|
|
+ getYg({sczl_bh:value}).then(response => {
|
|
|
+ if (response.code == 0) {
|
|
|
+ let Bname = 'sczl_bh' + inputName+'_name';
|
|
|
+ formData.value[Bname]=response.data.ygxm;
|
|
|
+ //设置姓名样式
|
|
|
+ unsetColorReadonly('cl'+inputName)
|
|
|
+ unsetColorReadonly('fp'+inputName)
|
|
|
+
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ent_sum()
|
|
|
+ } else if (event.keyCode === 8) { // 删除箭头
|
|
|
+ if (event.target.selectionStart === 0) {
|
|
|
+ if(value){
|
|
|
+ getYg({sczl_bh:value}).then(response => {
|
|
|
+ if (response.code == 0) {
|
|
|
+ let Bname = 'sczl_bh' + inputName+'_name';
|
|
|
+ formData.value[Bname]=response.data.ygxm;
|
|
|
+ //设置姓名样式
|
|
|
+ unsetColorReadonly('cl'+inputName)
|
|
|
+ unsetColorReadonly('fp'+inputName)
|
|
|
+
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).setSelectionRange(0, 0)
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).setSelectionRange(0, 0)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').setSelectionRange(0, 0)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).setSelectionRange(0, 0)
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).setSelectionRange(0, 0)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').setSelectionRange(0, 0)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).setSelectionRange(0, 0)
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).setSelectionRange(0, 0)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').setSelectionRange(0, 0)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
+ } else if (event.keyCode === 37) { // 向左箭头
|
|
|
+ if (event.target.selectionStart === 0) {
|
|
|
+ if(value){
|
|
|
+ getYg({sczl_bh:value}).then(response => {
|
|
|
+ if (response.code == 0) {
|
|
|
+ let Bname = 'sczl_bh' + inputName+'_name';
|
|
|
+ formData.value[Bname]=response.data.ygxm;
|
|
|
+ //设置姓名样式
|
|
|
+ unsetColorReadonly('cl'+inputName)
|
|
|
+ unsetColorReadonly('fp'+inputName)
|
|
|
+
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+ if(inputName!=1){
|
|
|
+ if(document.getElementById('fp'+(parseInt(inputName)-1)).readOnly){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)-1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).focus()
|
|
|
+ document.getElementById('fp'+(parseInt(inputName)-1)).select()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ document.getElementById('备注').focus()
|
|
|
+ document.getElementById('备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
+ } else if (event.keyCode === 39) { // 向右箭头
|
|
|
+ if (event.target.selectionStart === event.target.value.length) {
|
|
|
+ if(value){
|
|
|
+ getYg({sczl_bh:value}).then(response => {
|
|
|
+ if (response.code == 0) {
|
|
|
+ let Bname = 'sczl_bh' + inputName+'_name';
|
|
|
+ formData.value[Bname]=response.data.ygxm;
|
|
|
+ //设置姓名样式
|
|
|
+ unsetColorReadonly('cl'+inputName)
|
|
|
+ unsetColorReadonly('fp'+inputName)
|
|
|
+
|
|
|
+ document.getElementById('cl'+inputName).focus()
|
|
|
+ document.getElementById('cl'+inputName).select()
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+
|
|
|
+ if(inputName!=12){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('其他备注').focus()
|
|
|
+ document.getElementById('其他备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ formData.value['sczl_bh' + inputName+'_name']='';
|
|
|
+ formData.value['sczl_cl' + inputName]='0';
|
|
|
+ formData.value['sczl_fp' + inputName]='0';
|
|
|
+
|
|
|
+ //设置姓名样式
|
|
|
+ setColorReadonly('cl'+inputName);
|
|
|
+ setColorReadonly('fp'+inputName);
|
|
|
+ if(inputName!=12){
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).focus()
|
|
|
+ document.getElementById('bh'+(parseInt(inputName)+1)).select()
|
|
|
+ }else{
|
|
|
+ document.getElementById('其他备注').focus()
|
|
|
+ document.getElementById('其他备注').select()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ent_sum()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+const getGxMcsubmit = async() => {
|
|
|
+ if(formData.value.sczl_gdbh!=''){
|
|
|
+ const response = await shougonggetGxMc({gdbh:formData.value.sczl_gdbh});
|
|
|
+
|
|
|
+ if (response.code === 0) {
|
|
|
+ if(response.data.length==0){
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '查无此编号的工单,请仔细检查后重新输入'
|
|
|
+ })
|
|
|
+ //设置输入框的值为空
|
|
|
+ formData.value.sczl_gdbh = ''
|
|
|
+ formData.value.sczl_yjgx = ''
|
|
|
+ formData.value.sczl_gxmc = ''
|
|
|
+ formData.value.yj_yjmc = ''
|
|
|
+ }else if(response.data.length==1){
|
|
|
+ const { Gd_cpmc, Gy0_yjno, Gy0_gxh, Gy0_gxmc,jyGx} = response.data[0]
|
|
|
+ formData.value.yj_yjmc=Gd_cpmc
|
|
|
+ formData.value.sczl_gxmc=Gy0_gxmc
|
|
|
+ formData.value.sczl_yjgx=jyGx
|
|
|
+ setColorReadonly('yjgx');
|
|
|
+ setColorReadonly('gxmc');
|
|
|
+ setColorReadonly('yjmc');
|
|
|
+ }else{
|
|
|
+ if(GetDedhVisible.value){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ selectData.splice(0, selectData.length, ...response.data)
|
|
|
+ dialogSelectVisible.value=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请注意, 工单编号输入空置, 除非有特殊需要!'
|
|
|
+ })
|
|
|
+
|
|
|
+ formData.value.sczl_yjgx = ''
|
|
|
+ formData.value.sczl_gxmc = ''
|
|
|
+ formData.value.yj_yjmc = ''
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
-//工单编号失去焦点事件
|
|
|
-// const getGxMcsubmit = async() => {
|
|
|
-// if(!formData.value.sczl_gdbh){
|
|
|
-// return false
|
|
|
-// }
|
|
|
-// if(GetDedhVisible.value){
|
|
|
-// return false
|
|
|
-// }
|
|
|
-// const response = await shougonggetGxMc({gdbh:formData.value.sczl_gdbh});
|
|
|
-
|
|
|
-// if (response.code === 0) {
|
|
|
-// if(response.data.length==0){
|
|
|
-// ElMessage({
|
|
|
-// type: 'error',
|
|
|
-// message: '查无此编号的工单,请仔细检查后重新输入'
|
|
|
-// })
|
|
|
-// //设置输入框的值为空
|
|
|
-// formData.value.sczl_gdbh = ''
|
|
|
-// formData.value.sczl_yjgx = ''
|
|
|
-// formData.value.sczl_gxmc = ''
|
|
|
-// formData.value.yj_yjmc = ''
|
|
|
-// }else if(response.data.length==1){
|
|
|
-// const { Gd_cpmc, Gy0_yjno, Gy0_gxh, Gy0_gxmc,jyGx} = response.data[0]
|
|
|
-// formData.value.yj_yjmc=Gd_cpmc
|
|
|
-// formData.value.sczl_gxmc=Gy0_gxmc
|
|
|
-// formData.value.sczl_yjgx=jyGx
|
|
|
-// setColorReadonly('yjgx');
|
|
|
-// setColorReadonly('gxmc');
|
|
|
-// setColorReadonly('yjmc');
|
|
|
-// }else{
|
|
|
-// selectData.splice(0, selectData.length, ...response.data)
|
|
|
-// dialogSelectVisible.value=true
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
const dialogSelectVisible = ref(false)
|
|
|
const selectData = reactive([])
|
|
|
// 工单选择框
|
|
|
@@ -836,6 +1149,9 @@ const handleSelectClick = (row, column, event) => {
|
|
|
const getDedhsubmit = () => {
|
|
|
if(dialogSelectVisible.value){
|
|
|
return false
|
|
|
+ }
|
|
|
+ if(LbVisible.value){
|
|
|
+ return false
|
|
|
}
|
|
|
GetDedh()
|
|
|
}
|
|
|
@@ -844,7 +1160,27 @@ const GetDedhVisible = ref(false)
|
|
|
//获取定额代号
|
|
|
const GetDedh = async (value) => {
|
|
|
const response = await shougonggetDedh();
|
|
|
- const treeData = {};
|
|
|
+ const treeData = {};
|
|
|
+ // const data = [];
|
|
|
+ // data[0] = response.data;
|
|
|
+ // //判断值是否在选项中存在
|
|
|
+ // const buildTree1 = (node) => {
|
|
|
+ // const arr = [];
|
|
|
+
|
|
|
+ // // 如果存在子节点,递归地添加它们
|
|
|
+ // if (node.bh_mc && Array.isArray(node.bh_mc)) {
|
|
|
+ // node.bh_mc.forEach(childNode => {
|
|
|
+ // arr.push(...buildTree1(childNode)); // 递归调用
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // arr.push(node.sys_bh)
|
|
|
+ // }
|
|
|
+
|
|
|
+ // return arr;
|
|
|
+ // };
|
|
|
+ // // 构建树形结构的根节点
|
|
|
+ // const Data = data.map(buildTree1);
|
|
|
+
|
|
|
if(response.code==0){
|
|
|
const data = [];
|
|
|
data[0] = response.data;
|
|
|
@@ -885,6 +1221,47 @@ const GetDedhhandleNodeClick = (nodeData, node, component) => {
|
|
|
// 执行相应的父节点单击事件处理逻辑
|
|
|
}
|
|
|
|
|
|
+//检验类别失去焦点事件
|
|
|
+const getLbsubmit = () => {
|
|
|
+ if(GetDedhVisible.value){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ //弹出选择
|
|
|
+ const data = [{'sczl_检验类别':''},{'sczl_检验类别':'正品板'},{'sczl_检验类别':'次品板'},{'sczl_检验类别':'废品板'}]
|
|
|
+ selectDataLb.splice(0, selectDataLb.length, ...data)
|
|
|
+ LbVisible.value=true
|
|
|
+}
|
|
|
+//班组选择
|
|
|
+const selectDataLb = reactive([])
|
|
|
+const LbVisible = ref(false)
|
|
|
+const SelectClickLb = (row, column, event) => {
|
|
|
+ const {sczl_检验类别 } = row
|
|
|
+ formData.value.sczl_检验类别=row.sczl_检验类别
|
|
|
+
|
|
|
+ //查询废品系数
|
|
|
+ if(row.sczl_检验类别!=''){
|
|
|
+ var value = {
|
|
|
+ 'gdbh':formData.value.sczl_gdbh,
|
|
|
+ 'yjno':parseInt(formData.value.sczl_yjgx.split('-')[0]),
|
|
|
+ 'gxh':parseInt(formData.value.sczl_yjgx.split('-')[1]),
|
|
|
+ 'type':formData.value.sczl_检验类别
|
|
|
+ }
|
|
|
+ shougonggetScrapFactor(value).then(response=>{
|
|
|
+ if(response.code==0){
|
|
|
+ if(response.data!=null){
|
|
|
+ formData.value.sczl_废品率系数 = response.data.num;
|
|
|
+ }
|
|
|
+ setColorReadonly('废品率系数')
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ unsetColorReadonly('废品率系数')
|
|
|
+ }
|
|
|
+ LbVisible.value = false
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
//刷新废品率系数
|
|
|
const GetScrapFactor = async (value) => {
|
|
|
const response = await shougonggetScrapFactor(value);
|
|
|
@@ -1185,30 +1562,50 @@ const closeDialog = () => {
|
|
|
}
|
|
|
// 弹窗确定
|
|
|
const enterDialog = async () => {
|
|
|
- // elFormRef.value?.validate(async (valid) => {
|
|
|
- // if (!valid) return
|
|
|
- // let res
|
|
|
- // switch (type.value) {
|
|
|
- // case 'create':
|
|
|
- // res = await createCompany(formData.value)
|
|
|
- // break
|
|
|
- // case 'update':
|
|
|
- // res = await updateCompany(formData.value)
|
|
|
- // break
|
|
|
- // default:
|
|
|
- // res = await createCompany(formData.value)
|
|
|
- // break
|
|
|
- // }
|
|
|
- // if (res.code === 0) {
|
|
|
- // ElMessage({
|
|
|
- // type: 'success',
|
|
|
- // message: '创建/更改成功'
|
|
|
- // })
|
|
|
- // closeDialog()
|
|
|
- // getTableData()
|
|
|
- // }
|
|
|
- // })
|
|
|
- updateDetailData()
|
|
|
+ ElMessageBox.confirm('数据存盘?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+
|
|
|
+ if(formData.value.sczl_rq==''){
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请填写日期'
|
|
|
+ });
|
|
|
+ document.getElementById('日期').focus()
|
|
|
+ document.getElementById('日期').select()
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.sczl_gdbh==''){
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请填写工单编号'
|
|
|
+ });
|
|
|
+ document.getElementById('工单编号').focus()
|
|
|
+ document.getElementById('工单编号').select()
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.sczl_bzdh==''){
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请选择班组'
|
|
|
+ });
|
|
|
+ document.getElementById('组别').focus()
|
|
|
+ document.getElementById('组别').select()
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.sczl_dedh==''){
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请选择定额代号'
|
|
|
+ });
|
|
|
+ document.getElementById('定额代号').focus()
|
|
|
+ document.getElementById('定额代号').select()
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ updateDetailData()
|
|
|
+ });
|
|
|
}
|
|
|
let table=ref(5);
|
|
|
let lastCellValue=ref()
|