1.增加作业计划作废功能,用于修正由于基础数据错误导致无法上料的错误作业计划为作废状态

2.修复作业计划查询相关作废状态查询问题
master
董哲奇 4 weeks ago
parent 36096bdee1
commit 0a066efd4a

@ -57,6 +57,7 @@
<el-button type="success" @click="initList"></el-button> <el-button type="success" @click="initList"></el-button>
<el-button type="success" @click="exportExcel()"></el-button> <el-button type="success" @click="exportExcel()"></el-button>
<el-button type="success" :disabled="activeName==='first'" @click="save"></el-button> <el-button type="success" :disabled="activeName==='first'" @click="save"></el-button>
<el-button type="success" :disabled="activeName==='first'" @click="zf"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -120,6 +121,7 @@
</template> </template>
<script> <script>
import { VXETable } from 'vxe-table'
import { getCzxx} from '@/api/jhzx/qfxq' import { getCzxx} from '@/api/jhzx/qfxq'
import {getYdjh, tjydjh, getCnsb, hz, getListhz, getListhzBymx, saveData} from '@/api/jhzx/sygd' import {getYdjh, tjydjh, getCnsb, hz, getListhz, getListhzBymx, saveData} from '@/api/jhzx/sygd'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -129,7 +131,7 @@ import ScrollPane from "@/layout/components/TagsView/ScrollPane.vue";
import {exportByExcel} from "@/utils/rpkj"; import {exportByExcel} from "@/utils/rpkj";
import {editZyq} from "@/api/jhzxgl/ydjh"; import {editZyq} from "@/api/jhzxgl/ydjh";
import {getBzryList} from "@/api/sjzx/bzzGL"; import {getBzryList} from "@/api/sjzx/bzzGL";
import {groupBy} from "@/utils";
export default { export default {
name:'YdjhzxCX', name:'YdjhzxCX',
components: {ScrollPane}, components: {ScrollPane},
@ -969,6 +971,27 @@ export default {
return null return null
} }
}, },
/**
* 作业计划作废功能
* 用于修正由于基础数据错误导致无法上料的错误作业计划为作废状态
*/
async zf() {
const data = this.$refs.xGrid.getCheckboxRecords()
if (data.length === 0) {
this.$message.warning('请选择要作废的数据')
return
}
const list = data.map(item => {
return {id: item.id, zt: '99'}
})
const type = await VXETable.modal.confirm('您确定要作废吗?')
if (type === 'confirm') {
saveData(list).then(res => {
this.$message.success('操作成功')
this.getListhzBymx1()
})
}
},
save(){ save(){
const data=this.$refs.xGrid.getCheckboxRecords() const data=this.$refs.xGrid.getCheckboxRecords()
if (data.length===0){ if (data.length===0){

Loading…
Cancel
Save