draftFixBugAction.js 928 Bytes
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
/**
 * 修改草稿线上bug
 * 将数据库中所有的草稿json数据重置屏蔽字段
 * @author fengjiansheng
 * @date 2022-01-11
 */
export default {
    execute: function (bill, param) {
        GMS.$hideContainer.$Modal.confirm({
            title: '提示',
            content: '确认是否扫库(请做好备份 GMS_BILLDATA_DRAFT)',
            onOk: () => {
                this.fixBug()
            },
            onCancel: () => {
                GMS.$hideContainer.$Message['error']({
                    content: '已取消',
                });
            }
        });
    },
    fixBug() {
        GMS.$http.post('/rbcfunc/billdraft/fixBug', null).then(res => {
            GMS.$hideContainer.$Message.success('重置数据成功');
        }).catch(resp => {
            GMS.$hideContainer.$Message.success('重置数据失败,请联系管理员');
            console.log(resp)
        })
    }
}