|
@@ -15,6 +15,8 @@
|
|
|
<el-button class="successBorder" @click="form_search">查询</el-button>
|
|
|
<el-button v-if="isRoleEdit" class="successBorder" @click="handleDryMatterRegulation">干物质调节</el-button>
|
|
|
<el-button v-if="isRoleEdit" class="successBorder" @click="handleSynchronous">软件牛头数同步</el-button>
|
|
|
+ <el-button v-if="isRoleEdit && !isproportion" class="successBorder" @click="handle_batchEdit">批量编辑</el-button>
|
|
|
+ <el-button v-if="isRoleEdit && isproportion" class="successBorder" @click="handle_batchEdit_save">保存</el-button>
|
|
|
<el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
|
|
|
<el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
|
|
|
</el-upload>
|
|
@@ -96,8 +98,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW1" :key="8" label="第一班比例(%)" min-width="85px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.r1 }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,1)" />
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r1 }}</span>
|
|
|
+ <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,1)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW1" :key="9" label="第一班重量" min-width="100px" align="center" :render-header="renderHeader">
|
|
@@ -108,14 +110,14 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW1 && table.isPtsfname" :key="10" label="第一班补料重量" min-width="100px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.bw1 }}</span>
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.bw1 }}</span>
|
|
|
<el-input v-if="scope.row.Edit" v-model="scope.row.bw1" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW2" :key="11" label="第二班比例(%)" min-width="85px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.r2 }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,2)" />
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r2 }}</span>
|
|
|
+ <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,2)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW2" :key="12" label="第二班重量" min-width="100px" align="center" :render-header="renderHeader">
|
|
@@ -132,8 +134,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW3" :key="14" label="第三班比例(%)" min-width="85px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.r3 }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,3)" />
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r3 }}</span>
|
|
|
+ <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,3)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW3" :key="15" label="第三班重量" min-width="100px" align="center" :render-header="renderHeader">
|
|
@@ -150,8 +152,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW4" :key="17" label="第四班比例(%)" min-width="85px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.r4 }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,4)" />
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r4 }}</span>
|
|
|
+ <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,4)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW4" :key="18" label="第四班重量" min-width="100px" align="center" :render-header="renderHeader">
|
|
@@ -168,8 +170,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW5" :key="20" label="第五班比例(%)" min-width="85px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.r5 }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model="scope.row.r5" step="0.01" type="number" :disabled="scope.row.isFiveWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,5)" />
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r5 }}</span>
|
|
|
+ <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r5" step="0.01" type="number" :disabled="scope.row.isFiveWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,5)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW5" :key="21" label="第五班重量" min-width="100px" align="center" :render-header="renderHeader">
|
|
@@ -186,8 +188,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW6" :key="23" label="第六班比例(%)" min-width="85px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.NoEdit">{{ scope.row.r6 }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model="scope.row.r6" step="0.01" type="number" :disabled="scope.row.isSixWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,6)" />
|
|
|
+ <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r6 }}</span>
|
|
|
+ <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r6" step="0.01" type="number" :disabled="scope.row.isSixWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,6)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="table.isRW6" :key="24" label="第六班重量" min-width="100px" align="center" :render-header="renderHeader">
|
|
@@ -787,6 +789,7 @@ export default {
|
|
|
components: { Pagination, Pagination2, DryMatterRegulation },
|
|
|
data() {
|
|
|
return {
|
|
|
+ isproportion:false,
|
|
|
dialogFull: false,
|
|
|
isRoleEdit: [],
|
|
|
headerList: [],
|
|
@@ -3119,6 +3122,21 @@ export default {
|
|
|
this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ handle_batchEdit(){
|
|
|
+ this.isproportion = true
|
|
|
+ console.log(this.isproportion)
|
|
|
+ // this.oldRowList = JSON.parse(JSON.stringify(this.table.list));
|
|
|
+ // this.table.list.forEach((item,key)=>{
|
|
|
+ // item.Edit = true
|
|
|
+ // item.NoEdit = false
|
|
|
+ // })
|
|
|
+ // row.Edit
|
|
|
+ },
|
|
|
+ handle_batchEdit_save(){
|
|
|
+ this.isproportion = false
|
|
|
+ console.log(this.oldRowList)
|
|
|
+ console.log(this.table.list)
|
|
|
}
|
|
|
}
|
|
|
}
|