|
|
|
@ -452,13 +452,13 @@ |
|
|
|
<!-- </el-dialog>--> |
|
|
|
|
|
|
|
<!-- 子明细信息 --> |
|
|
|
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="471px"> |
|
|
|
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="572px"> |
|
|
|
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button> |
|
|
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button> |
|
|
|
<el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button> |
|
|
|
<div class="rq "> |
|
|
|
<el-table |
|
|
|
:height="300" |
|
|
|
:height="400" |
|
|
|
:data="tableData" |
|
|
|
border |
|
|
|
:row-class-name="rowClassName" |
|
|
|
@ -466,13 +466,19 @@ |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column type="selection" align="center" width="50"></el-table-column> |
|
|
|
<el-table-column label="序号" align="center" prop="xh" width="50"></el-table-column> |
|
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="抽样位置" width="150"> |
|
|
|
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit=='Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置"></el-input> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].samplingLocation" placeholder="请输入抽样位置"></el-input> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit=='Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].samplingLocation" placeholder="请输入抽样位置A"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200"> |
|
|
|
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit=='Y'" v-model="tableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].samplingLocationB" placeholder="请输入抽样位置B"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="150"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit=='Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input> |
|
|
|
<el-input :ref="`${row.xh-1}`" v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus(row.xh-1)" placeholder="请输入实测值"></el-input> |
|
|
|
@ -487,13 +493,16 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 批量新增子明细操作--> |
|
|
|
<el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="471px"> |
|
|
|
<el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="'默认抽样位置'"> |
|
|
|
<el-input v-model="batchAddData.samplingLocation" style="width: 210px"></el-input> |
|
|
|
<el-form-item :label="'默认抽样位置A'"> |
|
|
|
<el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'默认抽样位置B'"> |
|
|
|
<el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'抽样数量'"> |
|
|
|
<el-input type="number" v-model="batchAddData.samplingNumber" style="width: 210px"></el-input> |
|
|
|
<el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
@ -1256,6 +1265,7 @@ |
|
|
|
batchHandleAddModalFlag: false, |
|
|
|
batchAddData: { |
|
|
|
samplingLocation: '', |
|
|
|
samplingLocationB: '', |
|
|
|
samplingNumber: '' |
|
|
|
}, |
|
|
|
controlData: {}, |
|
|
|
@ -1874,6 +1884,7 @@ |
|
|
|
}) |
|
|
|
this.batchAddData = { |
|
|
|
samplingLocation: '', |
|
|
|
samplingLocationB: '', |
|
|
|
samplingNumber: '' |
|
|
|
} |
|
|
|
this.subDetailFlag = true |
|
|
|
@ -1983,6 +1994,7 @@ |
|
|
|
for (let i = 0; i < this.batchAddData.samplingNumber; i++) { |
|
|
|
let obj = {} |
|
|
|
obj.samplingLocation = this.batchAddData.samplingLocation |
|
|
|
obj.samplingLocationB = this.batchAddData.samplingLocationB |
|
|
|
obj.subDetailValue = "" |
|
|
|
this.tableData.push(obj) |
|
|
|
} |
|
|
|
@ -2047,10 +2059,8 @@ |
|
|
|
saveSubDetailResult(){ |
|
|
|
for (let i = 0; i < this.tableData.length; i++) { |
|
|
|
if(this.tableData[i].subDetailValue == '' || this.tableData[i].subDetailValue == null){ |
|
|
|
this.$alert('序号' + (i+1) +'未填写实测值!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
this.$message.warning('序号' + (i+1) +'未填写实测值!') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.subDetailData.subDetailValues = this.tableData |
|
|
|
@ -2063,8 +2073,7 @@ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|