(window['webpackJsonp'] = window['webpackJsonp'] || []).push([[54, 65, 92, 253, 266, 279, 290, 313, 328, 353, 394, 395, 432, 470, 539, 541, 544, 598, 624, 625, 631, 700, 701, 702, 703], {

    /***/ '+BMk':
        function (module, __webpack_exports__, __webpack_require__) {
            'use strict'
// ESM COMPAT FLAG
            __webpack_require__.r(__webpack_exports__)

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue?vue&type=template&id=56cf234b&scoped=true&
            var render = function () {
                var _vm = this
                var _h = _vm.$createElement
                var _c = _vm._self._c || _h
                return _c('div', [(_vm.status == 'common') ? _c('Modal', {
                    attrs: {
                        'width': '360',
                        'mask-closable': false,
                        'class-name': 'vertical-center-modal',
                        'title': '商品导入'
                    },
                    model: {
                        value: (_vm.execlModal),
                        callback: function ($$v) {
                            _vm.execlModal = $$v
                        },
                        expression: 'execlModal'
                    }
                }, [_c('div', { staticClass: 'wrap' }, [_c('Upload', {
                    ref: 'upload',
                    attrs: {
                        'action': _vm.OUTPUT_URL + _vm.actionUrl,
                        'accept': _vm.accept,
                        'multiple': false,
                        'headers': { 'Content-Type': 'multipart/form-data' },
                        'before-upload': _vm.beforeUpload,
                        'on-success': _vm.onSuccess,
                        'on-error': _vm.onError
                    }
                }, [_c('Button', {attrs: {'icon': 'ios-cloud-upload-outline'}}, [_vm._v('选择文件')])], 1), _vm._v(' '), (_vm.file !== null) ? _c('div', {staticClass: 'upload_info'}, [_vm._v('\n        上传文件名:\n        '), (_vm.file !== null) ? _c('span', [_vm._v(_vm._s(_vm.file.name))]) : _vm._e(), _vm._v(' '), _c('Progress', {
                    attrs: {
                        'percent': _vm.percent,
                        'stroke-width': 5,
                        'status': _vm.statusUpload,
                        'hide-info': false
                    }
                }), _vm._v(' '), (_vm.erroInfo) ? _c('div', [_vm._v('\n          表格填写格式有错，详细情况请\n          '), _c('BwButton', {on: {'click': _vm.getErroUrl}}, [_vm._v('下载文件')]), _vm._v('查看\n        ')], 1) : _vm._e()], 1) : _vm._e(), _vm._v(' '), _c('div', {
                    staticStyle: {
                        'color': 'red',
                        'line-height': '50px'
                    },
                    domProps: {'textContent': _vm._s(_vm.uploadTips)}
                })], 1), _vm._v(' '), _c('div', {
                    attrs: {'slot': 'footer'},
                    slot: 'footer'
                }, [_c('Button', {
                    attrs: {'type': 'text', 'size': 'large'},
                    on: {
                        'click': function ($event) {
                            _vm.execlModal = false
                        }
                    }
                }, [_vm._v('取消')]), _vm._v(' '), _c('Button', {
                    attrs: {
                        'type': 'primary',
                        'size': 'large',
                        'disabled': _vm.disabledUpload
                    },
                    on: {'click': _vm.execlOk}
                }, [_vm._v('导入')])], 1)]) : _vm._e(), _vm._v(' '), (_vm.status == 'common') ? _c('div', {staticClass: 'box'}, [_c('LabelInput', {
                    attrs: {
                        'inputLabel': '商品名称',
                        'placeholder': ' 请输入...',
                        'inputValue': _vm.goodsName
                    },
                    on: {
                        'change': function ($event) {
                            _vm.goodsName = arguments[1]
                        }
                    }
                }), _vm._v(' '), _c('LabelInput', {
                    attrs: {
                        'inputLabel': '税收商品编码',
                        'placeholder': ' 请输入...',
                        'inputValue': _vm.goodsCode
                    },
                    on: {
                        'change': function ($event) {
                            _vm.goodsCode = arguments[1]
                        }
                    }
                }), _vm._v(' '), _c('FuncButton', {
                    attrs: {
                        'buttonType': 'first',
                        'opcode': 'query',
                        'funcType': 'chaxun',
                        'inputLabel': '查询',
                        'clickCallback': _vm.search
                    }
                }), _vm._v(' '), _c('div', {staticStyle: {'margin-bottom': '6px'}}, [(_vm.isTaxBody) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'add',
                        'margin': 'margin',
                        'icon': 'tianjia'
                    },
                    on: {
                        'click': function ($event) {
                            return _vm.addGoods(1)
                        }
                    }
                }, [_vm._v('添加')]) : _vm._e(), _vm._v(' '), (_vm.isTaxBody) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'edit',
                        'margin': 'margin',
                        'icon': 'bianji'
                    },
                    on: {
                        'click': function ($event) {
                            return _vm.addGoods(2)
                        }
                    }
                }, [_vm._v('编辑')]) : _vm._e(), _vm._v(' '), (_vm.isTaxBody) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'delete',
                        'margin': 'margin',
                        'icon': 'shanchu'
                    },
                    on: {'click': _vm.deleteMsg}
                }, [_vm._v('删除')]) : _vm._e(), _vm._v(' '), (_vm.isTaxBody && _vm.haveServer) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'codeSync',
                        'margin': 'margin',
                        'icon': 'tongbu'
                    },
                    on: {'click': _vm.syncTaxServer}
                }, [_vm._v('税控商品编码同步')]) : _vm._e(), _vm._v(' '), (_vm.isTaxBody) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'initTaxRate',
                        'margin': 'margin',
                        'icon': 'chushihua'
                    },
                    on: {'click': _vm.initGoodsTax}
                }, [_vm._v('初始化税率')]) : _vm._e(), _vm._v(' '), (_vm.haveServer) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'codeImport',
                        'margin': 'margin',
                        'icon': 'daoru'
                    },
                    on: {'click': _vm.execlIntoServer}
                }, [_vm._v('商品编码导入')]) : _vm._e(), _vm._v(' '), (_vm.haveServer) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'codeImportTemplate',
                        'margin': 'margin',
                        'icon': 'daoru'
                    },
                    on: {'click': _vm.downloadTemplate}
                }, [_vm._v('商品编码导入模版')]) : _vm._e(), _vm._v(' '), (_vm.haveDish) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'codeImportDish',
                        'margin': 'margin',
                        'icon': 'daoru'
                    },
                    on: {'click': _vm.execlIntoDish}
                }, [_vm._v('商品导入(盘版)')]) : _vm._e(), _vm._v(' '), (_vm.haveDish) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'codeImportTemplateDish',
                        'margin': 'margin',
                        'icon': 'daoru'
                    },
                    on: {'click': _vm.downloadTemplate}
                }, [_vm._v('商品导入模版(盘版)')]) : _vm._e(), _vm._v(' '), (_vm.haveDish) ? _c('BwButton', {
                    attrs: {
                        'type': 'first',
                        'opcode': 'codeExport',
                        'margin': 'margin',
                        'icon': 'daochu'
                    },
                    on: {'click': _vm.exportGoods}
                }, [_vm._v('商品导出')]) : _vm._e()], 1)], 1) : _vm._e(), _vm._v(' '), _c('div', {staticClass: 'content'}, [_c('div', {
                    staticClass: 'content_ltree',
                    style: (_vm.treeStyle)
                }, [(_vm.status == 'modal') ? _c('div', {staticClass: 'filter-container'}, [_c('Input', {
                    attrs: {
                        'placeholder': '输入关键字进行搜索',
                        'icon': 'ios-search'
                    },
                    on: {'on-click': _vm.filterFn},
                    model: {
                        value: (_vm.filterText),
                        callback: function ($$v) {
                            _vm.filterText = $$v
                        },
                        expression: 'filterText'
                    }
                })], 1) : _vm._e(), _vm._v(' '), _c('p', {staticClass: 'content_ltree_title'}, [_vm._v('商品编码：')]), _vm._v(' '), (!_vm.searched && _vm.status == 'common') ? _c('Tree', {
                    ref: 'tree',
                    attrs: {'data': _vm.baseData},
                    on: {'on-select-change': _vm.selectChange, 'on-toggle-expand': _vm.selectChange}
                }) : _vm._e(), _vm._v(' '), (_vm.searched && _vm.status == 'common') ? _c('Tree', {
                    ref: 'tree',
                    attrs: {'data': _vm.baseData},
                    on: {'on-select-change': _vm.selectChange, 'on-toggle-expand': _vm.selectChange}
                }) : _vm._e(), _vm._v(' '), (_vm.status == 'modal') ? _c('Tree', {
                    ref: 'tree',
                    attrs: {'data': _vm.baseData},
                    on: {'on-select-change': _vm.selectChangeModal, 'on-toggle-expand': _vm.selectChange}
                }) : _vm._e()], 1), _vm._v(' '), _c('div', {staticClass: 'conten_rbox '}, [(_vm.status == 'common') ? _c('Form', {
                    staticStyle: {
                        'float': 'left',
                        'width': '50%'
                    },
                    attrs: {'label-width': 100}
                }, [_c('FormItem', {attrs: {'label': '编码:'}},
                    [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.goodsCode)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '名称:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.goodsName)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '税收分类简称:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.goodsSimpleName)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '说明:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.illustrate)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '增值税税率:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.vatRate)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '税率:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.rate)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '关键字:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.keyWorld)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '是否汇总项:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.summarized)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '版本:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.version)}})])], 1) : _vm._e(), _vm._v(' '), (_vm.status == 'common') ? _c('Form', {
                    staticStyle: {
                        'float': 'left',
                        'width': '50%'
                    },
                    attrs: {'label-width': 100}
                }, [_c('FormItem', {attrs: {'label': '单价:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.goodsPrice)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '是否自定义:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.userDefined)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '增值税特殊管理:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.vatSprcialManage)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '增值税政策依据:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.vatPolicyBasis)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '使用优惠:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.useDiscount)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '优惠类型:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.discountType)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '启用时间:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.useStarTime)}})]), _vm._v(' '), _c('FormItem', {attrs: {'label': '更新时间:'}}, [_c('span', {domProps: {'textContent': _vm._s(_vm.formDate.updateTime)}})])], 1) : _vm._e(), _vm._v(' '), (_vm.status == 'modal') ? _c('addBussiness', {
                    ref: 'addBus',
                    staticStyle: {'height': '600px'},
                    attrs: {
                        'disabled': _vm.isAdd,
                        'modalStatus': _vm.statusModal,
                        'addShow': _vm.addShowModal,
                        'addStatus': _vm.addStatus,
                        'addBussinessParams': _vm.addBussinessParams
                    },
                    on: {
                        'change': _vm.addBusinessChange,
                        'successchange': _vm.successchange,
                        'close': _vm.closeFun,
                        'modalChange': _vm.modalChange
                    }
                }) : _vm._e()], 1), _vm._v(' '), (_vm.status == 'common') ? _c('addBussiness', {
                    attrs: {
                        'modalStatus': _vm.statusCommon,
                        'addShow': _vm.addShow,
                        'addStatus': _vm.addStatus,
                        'addBussinessParams': _vm.addBussinessParams
                    },
                    on: {'change': _vm.addBusinessChange, 'successchange': _vm.successchange, 'close': _vm.closeFun}
                }) : _vm._e()], 1), _vm._v(' '), (_vm.spinShow) ? _c('Spin', {attrs: {'fix': ''}}, [_c('Icon', {
                    staticClass: 'demo-spin-icon-load',
                    attrs: {'type': 'load-c', 'size': '25'}
                }), _vm._v(' '), _c('div', [_vm._v('导入中，请稍等')])], 1) : _vm._e()], 1)
            }
            var staticRenderFns = []

// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue?vue&type=template&id=56cf234b&scoped=true&

// EXTERNAL MODULE: ./src/components/page/_output/CommodityMgmt/addBussiness.vue + 4 modules
            var addBussiness = __webpack_require__('7hrd')

// EXTERNAL MODULE: ./src/components/page/common/LabelInput.vue + 4 modules
            var LabelInput = __webpack_require__('m7jE')

// EXTERNAL MODULE: ./src/components/page/common/FuncButton.vue + 4 modules
            var FuncButton = __webpack_require__('ZPqo')

// EXTERNAL MODULE: ./src/mixins/serverOrDish.js
            var serverOrDish = __webpack_require__('0OwG')

// EXTERNAL MODULE: ./src/mixins/goodsCode/index.js + 1 modules
            var goodsCode = __webpack_require__('wYmx')

// EXTERNAL MODULE: ./src/components/page/_output/CommodityMgmt/CommodityClassify.vue + 4 modules
            var CommodityClassify = __webpack_require__('1Srz')

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue?vue&type=script&lang=js&
            function _slicedToArray(arr, i) {
                return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
            }

            function _nonIterableRest() {
                throw new TypeError('Invalid attempt to destructure non-iterable instance')
            }

            function _iterableToArrayLimit(arr, i) {
                if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === '[object Arguments]')) {
                    return
                }
                var _arr = []
                var _n = true
                var _d = false
                var _e = undefined
                try {
                    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                        _arr.push(_s.value)
                        if (i && _arr.length === i) break
                    }
                } catch (err) {
                    _d = true
                    _e = err
                } finally {
                    try {
                        if (!_n && _i['return'] != null) _i['return']()
                    } finally {
                        if (_d) throw _e
                    }
                }
                return _arr
            }

            function _arrayWithHoles(arr) {
                if (Array.isArray(arr)) return arr
            }

            function ownKeys(object, enumerableOnly) {
                var keys = Object.keys(object)
                if (Object.getOwnPropertySymbols) {
                    var symbols = Object.getOwnPropertySymbols(object)
                    if (enumerableOnly) {
                        symbols = symbols.filter(function (sym) {
                            return Object.getOwnPropertyDescriptor(object, sym).enumerable
                        })
                    }
                    keys.push.apply(keys, symbols)
                }
                return keys
            }

            function _objectSpread(target) {
                for (var i = 1; i < arguments.length; i++) {
                    var source = arguments[i] != null ? arguments[i] : {}
                    if (i % 2) {
                        ownKeys(Object(source), true).forEach(function (key) {
                            _defineProperty(target, key, source[key])
                        })
                    } else if (Object.getOwnPropertyDescriptors) {
                        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source))
                    } else {
                        ownKeys(Object(source)).forEach(function (key) {
                            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key))
                        })
                    }
                }
                return target
            }

            function _defineProperty(obj, key, value) {
                if (key in obj) {
                    Object.defineProperty(obj, key, {
                        value: value,
                        enumerable: true,
                        configurable: true,
                        writable: true
                    })
                } else {
                    obj[key] = value
                }
                return obj
            }

            /* eslint-disable */
            var blueSty = function blueSty() {
                return {
                    color: 'blue',
                    cursor: "pointer"
                };
            };

            var nodeRender = function nodeRender(h, _ref, flage) {
                var _this = this;

                var root = _ref.root,
                    node = _ref.node,
                    data = _ref.data;
                var nodeList = [];
                nodeList.push(node.node);
                var nodeData = node.node; // 搜索出来的节点红色显示，通过名称搜索

                var cur = this.filterText;

                var _inndex = data.title.indexOf(cur);

                var childList = [];

                if (_inndex > -1) {
                    var pre = data.title.slice(0, _inndex);
                    var curLen = cur.length;
                    var next = data.title.slice(_inndex + curLen);
                    childList = [h('span', {}, pre), h('span', {
                        style: {
                            color: 'red'
                        }
                    }, cur), h('span', {}, next)];
                } else {
                    childList = [data.title];
                }

                var divSty = {};
                if (flage) divSty = _objectSpread({}, blueSty());
                return h('div', {
                    style: divSty,
                    'class': ['ivu-tree-title', nodeData.selected ? ' ivu-tree-title-selected' : ''],
                    on: {
                        click: function click() {
                            var selectedNodes = _this.$refs.tree.getSelectedNodes();

                            selectedNodes.forEach(function (node) {
                                node.selected = false;
                            });
                            nodeData.selected = true;

                            if (_this.modalStatus == 'modal') {
                                _this.selectChangeModal(nodeList);
                            } else {
                                _this.selectChange(nodeList);
                            }
                        }
                    }
                }, childList);
            }; // count 是 60*5*1000/500 = 600  5 分钟


            var timer = null,
                count = 0;
            /* harmony default export */
            var CommodityMgmtvue_type_script_lang_js_ = ({
                data: function data() {
                    return {
                        haveDish: false,
                        // 当前税号是否具有盘模式设备
                        haveServer: false,
                        // 当前税号是否具有服务器模式设备
                        // 搜索text
                        filterText: '',
                        // 上传相关
                        disabledUpload: false,
                        statusUpload: "active",
                        percent: 0,
                        // 上传进度值
                        erroInfo: false,
                        // 是否上传失败
                        errorUrl: "",
                        // 上传错误的URL
                        actionUrl: '',
                        accept: '',
                        uploadTips: '',
                        title: '',
                        file: null,
                        spinShow: false,
                        searched: false,
                        //未查询条件
                        testShow: false,
                        //测试
                        modalStatus: "modal",
                        // 弹层status
                        addModalStatus: true,
                        //是否可保存，true不可保存 ，false可以保存
                        addShowModal: true,
                        statusModal: 'modal',
                        statusCommon: "common",
                        goodsName: '',
                        goodsCode: '',
                        //查询用的
                        addShow: false,
                        addStatus: 'add',
                        //标志状态，add添加，update编辑
                        customername: '',
                        selectItem: [],
                        //蓝色字体用作储存当前选中参数
                        execlModal: false,
                        //导入文件modal
                        goodsTreeData: {
                            "goodsCode": ''
                        },
                        addBussinessParams: {},
                        baseData: [{
                            expand: true,
                            title: '商品编码',
                            children: []
                        }],
                        formDate: {
                            goodsCode: '',
                            //商品编码
                            goodsName: '',
                            //商品名称
                            illustrate: '',
                            //说明
                            vatRate: '',
                            //增值税税率
                            rate: '',
                            //税率
                            keyWorld: '',
                            //关键字
                            summarized: '',
                            //汇总项
                            version: '',
                            //版本
                            goodsPrice: '',
                            //商品单价
                            userDefined: '',
                            //自定义
                            vatSprcialManage: '',
                            //增值税特殊管理
                            vatPolicyBasis: '',
                            //增值税政策依据
                            useDiscount: '',
                            //是否使用优惠政策
                            discountType: '',
                            //优惠政策类型
                            updateTime: '' //启用时间
                            //更新时间没有字段

                        }
                    };
                },
                mixins: [serverOrDish["a" /* default */], goodsCode["a" /* default */]],
                props: {
                    status: {
                        type: String,
                        default: "common"
                    },
                    height: {
                        type: [String, Number]
                    },
                    isShowModal: {
                        type: Boolean,
                        default: false
                    },
                    isAdd: {
                        type: Boolean,
                        default: false
                    }
                },
                computed: {
                    isTaxBody: function isTaxBody() {
                        return JSON.parse(sessionStorage.getItem('organizationInfo')).orgType == 1 ? true : false;
                    },
                    treeStyle: function treeStyle() {
                        var style = {};

                        if (this.height) {
                            var height = parseInt(this.height);
                            style.height = "".concat(height, "px");
                        }

                        return style;
                    },
                    OUTPUT_URL: function (_OUTPUT_URL) {
                        function OUTPUT_URL() {
                            return _OUTPUT_URL.apply(this, arguments);
                        }

                        OUTPUT_URL.toString = function () {
                            return _OUTPUT_URL.toString();
                        };

                        return OUTPUT_URL;
                    }(function () {
                        return "/output";
                    })
                },
                watch: {
                    execlModal: function execlModal(val) {
                        if (!val) {
                            this.file = null;
                            this.$refs.upload.clearFiles();
                        }
                    },
                    isShowModal: {
                        handler: function handler(val) {
                            if (val) this.init();
                        },
                        immediate: true
                    }
                },
                created: function created() {// this.init()
                },
                mounted: function mounted() {
                    var _this2 = this;

                    var uid = sessionStorage.getItem('goodsUid');

                    if (uid) {
                        this.getUploadResult().then(function (res) {
                            if (!res) {
                                _this2.generateTimer();
                            }
                        });
                    }

                    if (this.status !== 'modal') {
                        this.init();
                        this.searchDeviceType();
                    }
                },
                methods: {
                    // 商品编码导入---服务器
                    execlIntoServer: function execlIntoServer() {
                        this.actionUrl = "/api/taxGoodsCode/importGoodsCodeOfDisk";
                        this.accept = '.xls,.xlsx';
                        this.uploadTips = '文件必须为2003版.xls文件(.xls) 或 2007版excel文件 (.xlsx)';
                        this.title = '商品编码导入结果';
                        this.execlModal = true;
                    },
                    // 商品导入（盘版）
                    execlIntoDish: function execlIntoDish() {
                        this.actionUrl = '/api/taxGoodsCode/importGoodsCodeOfDisk';
                        this.accept = '.xml,.txt,.xls,.xlsx';
                        this.uploadTips = '文件必须为.xml文件或.txt文件或.xls文件或.xlsx文件';
                        this.title = '商品导入结果';
                        this.execlModal = true;
                    },
                    // 查询当前有几种模式的设备
                    searchDeviceType: function searchDeviceType() {
                        var _this3 = this;

                        var organizationInfo = JSON.parse(sessionStorage.getItem('organizationInfo')) || {};
                        var taxCode = organizationInfo.taxCode,
                            orgId = organizationInfo.orgId;
                        this.queryDish(taxCode, orgId).then(function (res) {
                            _this3.haveDish = res;
                        });
                        this.querySever(taxCode).then(function (res) {
                            _this3.haveServer = res;
                        });
                    },
                    init: function init() {
                        this.goodsTree();
                        this.getSelectedNodes();
                    },
                    modalChange: function modalChange(ajaxDate) {
                        this.$emit('modalChange');
                        this.$emit('add-goods', ajaxDate);
                    },
                    closeFun: function closeFun() {
                        this.addShow = false;
                        return false;
                    },
                    //组件添加后，根据当前节点信息，来刷新子节点
                    addBusinessChange: function addBusinessChange() {
                        var _this4 = this;

                        var e = this.selectItem || this.$refs.tree.getSelectedNodes();

                        if (e) {
                            var goodsCode = e[0].goodsCode || '';
                            this.goodsTree(goodsCode).then(function (res) {
                                if (res != 1) {
                                    //this.selectItem
                                    res.forEach(function (item, index) {
                                        item.title = item.goodsName;
                                        item.render = nodeRender.bind(_this4);
                                    });
                                    e[0].children = res;
                                }
                            });
                            this.addShow = false;
                        } else {
                            this.addShow = false;
                        }
                    },
                    //子组件更新成功后，触发父组件刷新
                    successchange: function successchange(goodsCode) {
                        var _this5 = this;

                        var selectItem = this.selectItem || this.$refs.tree.getSelectedNodes();
                        this.goodsTree(goodsCode).then(function (res) {
                            if (res != 1) {
                                /*   let index = targetObj.findIndex(item => {
                   if(item.goodsCode === goodsCode){
                     return true;
                   }
                 });*/
                                var chooseArr = function chooseArr(arr, goodsCode, res) {
                                    arr.forEach(function (item) {
                                        if (item.goodsCode == goodsCode) {
                                            item.children = res;
                                            return arr;
                                        } else {
                                            var childdrenArr = item.children || [];
                                            chooseArr(childdrenArr, goodsCode, res);
                                        }
                                    });
                                };

                                res.forEach(function (item, index) {
                                    item.title = item.goodsName; //触发回显事件

                                    if (item.goodsCode == selectItem[0].goodsCode) {
                                        _this5.selectItem = [];

                                        _this5.selectItem.push(item);

                                        res[index].render = nodeRender.bind(_this5);
                                    }
                                });
                                chooseArr(_this5.baseData, goodsCode, res);
                                _this5.addShow = false;
                            }
                        });
                    },
                    initGoodsTax: function initGoodsTax() {
                        var _this6 = this;

                        var e = this.selectItem || this.$refs.tree.getSelectedNodes();

                        if (!e || e == '') {
                            this.$Message.info('请先选择需要税率初始化的节点');
                            return false;
                        }

                        var goodsCode = e[0].goodsCode;
                        var goodsName = e[0].goodsName;
                        var summarized = e[0].summarized;
                        var rate = e[0].rate;
                        var children = e[0].children;

                        if (rate && rate != 'null' && rate != 0) {
                            this.$Message.info('该商品不能进行初始化!');
                            return false;
                        }

                        if (goodsCode.length == 19) {
                            var getInitItem = function getInitItem(arr) {
                                for (var i = 0; i < arr.length; i++) {
                                    if (arr[i].rate && arr[i].rate != 'null') {
                                        resultsState = 'off';
                                    } else {
                                        var _children = arr[i].children || [];

                                        getInitItem(_children);
                                    }
                                }
                            };

                            if (summarized == '否' || summarized == 'N') {
                                this.$Message.info('系统预置的商品叶子节点不允许初始化');
                                return false;
                            }

                            var resultsState = 'on';
                            getInitItem(children);

                            if (resultsState == 'off') {
                                this.$Message.info('该商品下已存在自定义商品不能进行初始化!');
                                return false;
                            } //递归如果该节点任何一个子集已经初始化则不能继续初始化

                        } //必须 goodsCode为19位,且汇总项字段为N 才可以初始化


                        if (goodsCode.length > 19) {
                            if (rate != '' && rate != 'null') {
                                this.$Message.info('自定义节点：' + goodsName + '不能进行初始化！');
                                return false;
                            }

                            if (!children || children == 'null') {
                                this.$Message.info('自定义节点：' + goodsName + '不能进行初始化！');
                                return false;
                            }
                        }

                        this.$Modal.confirm({
                            title: '',
                            content: '<p>确定要进行税率初始化?</p>',
                            onOk: function onOk() {
                                var data = {};
                                var uri = "/api/taxGoodsCode/checkGoodsTax/".concat(goodsCode);

                                _this6.http.outGet(uri, data, function (resp) {
                                    var url = "/api/taxGoodsCode/initGoodsTax/".concat(goodsCode);

                                    _this6.http.outGet(url, data, function (resp) {
                                        _this6.$Message.info('初始化成功');

                                        _this6.goodsTree(goodsCode).then(function (res) {
                                            if (res != 1) {
                                                res.forEach(function (item, index) {
                                                    item.title = item.goodsName;

                                                    if (item.title.length > 35) {
                                                        item.title = item.title.slice(0, 35) + '....';
                                                    }

                                                    if (res[index].rate || res[index].rate == 0) {
                                                        res[index].render = nodeRender.bind(_this6);
                                                    }
                                                });
                                                e[0].children = res;
                                            }
                                        });
                                    });
                                });
                            },
                            onCancel: function onCancel() {
                                _this6.$Message.info('点击了取消');
                            }
                        });
                    },
                    syncTaxServer: function syncTaxServer() {
                        var _this7 = this;

                        this.$Modal.confirm({
                            title: '',
                            content: '<p>确认同步税控商品编码?</p>',
                            onOk: function onOk() {
                                var params = {};

                                _this7.http.outPost("/api/taxGoodsCode/syncTaxServerGoodsCode", params, function (resp) {
                                    if (resp.success) {
                                        _this7.$Message.info("同步成功!");

                                        _this7.baseData = [{
                                            expand: true,
                                            title: '商品编码',
                                            children: []
                                        }];

                                        _this7.goodsTree();
                                    }
                                });
                            },
                            onCancel: function onCancel() {
                            }
                        });
                    },
                    deleteMsg: function deleteMsg() {
                        var _this8 = this;

                        var e = this.selectItem || this.$refs.tree.getSelectedNodes();
                        var alertMsg = '确认删除该商品编码?';

                        if (!e || e == '') {
                            this.$Message.info('请选择商品进行删除');
                            return false;
                        }

                        var msg = e[0];
                        var goodsCode = msg.goodsCode;

                        if (goodsCode.length < 20) {
                            this.$Message.info('非自定义商品编码不可删除');
                            return false;
                        }

                        if (goodsCode.length > 19) {
                            if (msg.children) {
                                alertMsg = '请确认是否删除?(删除商品编码会级联删除子级)';
                            }

                            this.$Modal.confirm({
                                title: '',
                                content: '<p>' + alertMsg + '</p>',
                                onOk: function onOk() {
                                    var goodsCode = e[0].goodsCode;
                                    var data = {};
                                    var uri = "/api/taxGoodsCode/delete/".concat(goodsCode);

                                    _this8.http.outGet(uri, data, function (resp) {
                                        if (resp.success) {
                                            _this8.selectItem = null;

                                            _this8.$Message.info('商品编码删除成功');

                                            var _e = _this8.selectItem || _this8.$refs.tree.getSelectedNodes();

                                            var parentCode = _e[0].parentCode;

                                            _this8.goodsTree(parentCode).then(function (res) {
                                                if (res != 1) {
                                                    var chooseArr = function chooseArr(arr) {
                                                        arr.forEach(function (item) {
                                                            if (item.goodsCode == parentCode) {
                                                                item.children = res;
                                                                return arr;
                                                            } else {
                                                                var childdrenArr = item.children || [];
                                                                chooseArr(childdrenArr);
                                                            }
                                                        });
                                                    };

                                                    res.forEach(function (item, index) {
                                                        item.title = item.goodsName;
                                                    }); //获取父节点

                                                    var targetObj = chooseArr(_this8.baseData) || [];
                                                    var index = targetObj.findIndex(function (item) {
                                                        if (item.goodsCode === goodsCode) {
                                                            return true;
                                                        }
                                                    });
                                                    targetObj.splice(index, 1);
                                                }
                                            });
                                        }
                                    });
                                },
                                onCancel: function onCancel() {
                                    _this8.$Message.info('点击了取消');
                                }
                            });
                        }
                    },
                    search: function search() {
                        var params = {
                            goodsName: this.goodsName,
                            goodsCode: this.goodsCode
                        };

                        if (params.goodsName == '' && params.goodsCode == '') {
                            this.goodsTree();
                            this.searched = false;
                        } else {
                            this.getBaseTreeList(params);
                        }
                    },
                    filterFn: function filterFn() {
                        var params = {
                            goodsName: this.filterText
                        };

                        if (params.goodsName == '') {
                            this.goodsTree();
                            this.searched = false;
                        } else {
                            this.getBaseTreeList(params);
                        }
                    },
                    getBaseTreeList: function getBaseTreeList(params) {
                        var _this9 = this;

                        this.http.outPost("/api/taxGoodsCode/baseList", params, function (resp) {
                            if (resp.success) {
                                var results = resp.data.results; //递归，给所有的对象添加title值，用于树显示

                                if (!results[0]) {
                                    _this9.formDate = {
                                        goodsCode: '',
                                        //商品编码
                                        goodsName: '',
                                        //商品名称
                                        illustrate: '',
                                        //说明
                                        vatRate: '',
                                        //增值税税率
                                        rate: '',
                                        //税率
                                        keyWorld: '',
                                        //关键字
                                        summarized: '',
                                        //汇总项
                                        version: '',
                                        //版本
                                        goodsPrice: '',
                                        //商品单价
                                        userDefined: '',
                                        //自定义
                                        vatSprcialManage: '',
                                        //增值税特殊管理
                                        vatPolicyBasis: '',
                                        //增值税政策依据
                                        useDiscount: '',
                                        //是否使用优惠政策
                                        discountType: '',
                                        //优惠政策类型
                                        updateTime: '' //启用时间
                                        //更新时间没有字段

                                    };

                                    _this9.$Message.info('未查询出对应商品');

                                    return;
                                }

                                _this9.baseData[0].children = _this9.arrAddTitel(results);
                                _this9.searched = true;
                            }
                        }, function (error) {
                        });
                    },
                    arrAddTitel: function arrAddTitel(arr) {
                        var _this10 = this;

                        arr.forEach(function (item, index) {
                            item.title = item.goodsName;
                            item.expand = true; // if (arr[index].rate) {
                            //   item.render = nodeRender.bind(this)
                            // }

                            var context = _this10;

                            item.render = function (h, _ref2) {
                                var root = _ref2.root,
                                    node = _ref2.node,
                                    data = _ref2.data;
                                return nodeRender.call(context, h, {
                                    root: root,
                                    node: node,
                                    data: data
                                }, Boolean(item.rate));
                            };

                            if (item.children && item.children != '') {
                                _this10.arrAddTitel(item.children);
                            }
                        });
                        return arr;
                    },
                    beforeUpload: function beforeUpload(file) {
                        this.$refs.upload.clearFiles();
                        this.file = file;
                        this.erroInfo = false;
                        this.disabledUpload = false;
                        this.statusUpload = "active";
                        this.percent = 0;
                        return false;
                    },
                    onSuccess: function onSuccess(response, file, fileList) {// console.log(response, file, fileList)
                    },
                    onError: function onError(error, file, fileList) {
                        /* eslint-disable no-console */
                        console.log(error, file, fileList);
                        /* eslint-enable no-console */
                    },
                    //导入execl文件，确认
                    execlOk: function execlOk() {
                        var _this11 = this;

                        if (!this.file) {
                            this.$Message.info('请先选择文件');
                            return;
                        }

                        this.percent = 99;
                        this.disabledUpload = true; // this.execlModal = false
                        // this.spinShow = true

                        this.http.outUploadPost(this.actionUrl, this.file).then(function (resp) {
                            _this11.importServer(resp);
                        }).catch(function (err) {
                            // this.erroInfo = true
                            _this11.execlModal = true;
                            _this11.disabledUpload = true;

                            _this11.$Message.error({
                                content: err.errorMsg || '导入失败',
                                duration: 2
                            });
                        });
                    },
                    // 服务器导入
                    importServer: function importServer(resp) {
                        var reg = /^((https|http)?:\/\/)/; // debugger

                        if (resp.data.success) {
                            var _ref3 = resp.data.data || [],
                                _ref4 = _slicedToArray(_ref3, 1),
                                res = _ref4[0];

                            if (res) {
                                var uid = res.msg;
                                sessionStorage.setItem('goodsUid', uid);
                            } // this.spinShow = false
                            // this.$Message.info({
                            //   title: this.title,
                            //   content: '正在导入，请等待...',
                            //   duration: 3
                            // });
                            // this.generateTimer()


                            this.$Message.info("导入成功");
                            this.execlModal = false; // this.$refs.child.refresh()
                        } else {
                            this.erroInfo = true;
                            this.statusUpload = 'wrong';
                            this.disabledUpload = true;

                            if (reg.test(resp.data.errorMsg)) {
                                // 返回的是错误信息的url
                                this.errorUrl = resp.data.errorMsg;
                                this.erroInfo = true;
                            } else {
                                this.$Message.error(resp.data.errorMsg);
                            } // this.$Message.error({
                            //   content: resp.data.errorMsg || '导入失败',
                            //   duration: 2
                            // })
                            // this.spinShow = false
                            // clearInterval(timer)
                            // timer = null
                            // count = 0

                        }
                    },
                    // 盘导入
                    importDish: function importDish(resp) {
                        clearInterval(timer);
                        timer = null;
                        count = 0;

                        if (resp.data.success) {
                            var _ref5 = resp.data.data || [],
                                _ref6 = _slicedToArray(_ref5, 1),
                                res = _ref6[0];

                            this.$Message.info(res && res.msg || '导入成功');
                            this.spinShow = false;
                        } else {
                            this.$Message.error({
                                content: resp.data.errorMsg || '导入失败',
                                duration: 2
                            });
                            this.spinShow = false;
                        }
                    },
                    getErroUrl: function getErroUrl() {
                        var errorUrl = this.errorUrl;
                        window.open(errorUrl);
                        this.$Message.success('下载成功');
                        this.execlModal = false; // this.execlCancel()
                    },
                    // 构建定时器
                    generateTimer: function generateTimer() {
                        var _this12 = this;

                        timer = setInterval(function () {
                            count++;

                            if (count > 60) {
                                clearInterval(timer);
                                timer = null;
                                count = 0;
                                sessionStorage.setItem('goodsUid', '');

                                _this12.$Modal.confirm({
                                    title: _this12.title,
                                    content: '导入超时，请重新导入'
                                });
                            } else {
                                _this12.getUploadResult();
                            }
                        }, 5000);
                    },
                    getUploadResult: function getUploadResult() {
                        var _this13 = this;

                        var data = sessionStorage.getItem('goodsUid');

                        if (!data) {
                            return;
                        }

                        return new Promise(function (resolve, reject) {
                            _this13.http.outPost('/api//taxGoodsCode/getImportGoodsCodeResult', {
                                data: data
                            }).then(function (resp) {
                                if (resp.success) {
                                    var _ref7 = resp.data && resp.data.results || [],
                                        _ref8 = _slicedToArray(_ref7, 1),
                                        res = _ref8[0];

                                    var msg = res && res.bean && res.bean.returnmsg || '';

                                    if (!msg) {
                                        resolve(false);
                                    } else {
                                        _this13.$Modal.confirm({
                                            title: _this13.title,
                                            content: msg
                                        });

                                        clearInterval(timer);
                                        timer = null;
                                        count = 0;
                                        sessionStorage.setItem('goodsUid', '');
                                        resolve(true);
                                    }
                                }
                            }).catch(function (err) {
                                sessionStorage.setItem('goodsUid', '');
                                reject(err);
                            });
                        });
                    },
                    downloadTemplate: function downloadTemplate() {
                        window.location.href = "https://fp.baiwang.com/DownloadService/PublicDownLoad?filePath=templates/spbm_import.xls";
                    },
                    exportGoods: function exportGoods() {
                        this.http.downloadFile('/api/goodsCode/exportGoodsCodeXmlOfDisk', 'post', {}, '商品导出.xml');
                    },
                    goodsTree: function goodsTree(goodsCode) {
                        var _this14 = this;

                        goodsCode = goodsCode || '';
                        var params = {
                            goodsCode: goodsCode
                        };
                        return new Promise(function (resolve, reject) {
                            _this14.http.outPost("/api/taxGoodsCode/initBaseGoodsTree", params, function (resp) {
                                if (resp.success) {
                                    var results = resp.data.results;
                                    results.forEach(function (item) {
                                        if (item.isparent == 'Y' && !item.children) {
                                            var goodsCodeX = item.goodsCode;
                                            item.children = [{}];
                                        }
                                    });
                                    var children = _this14.baseData[0].children;

                                    if (goodsCode == '') {
                                        children = results;
                                        children.forEach(function (item, index) {
                                            children[index].title = children[index].goodsName;
                                        });
                                        _this14.baseData[0].children = children;
                                        resolve(1);
                                    } else {
                                        resolve(results);
                                    }
                                }
                            }, function (error) {
                            });
                        });
                    },
                    getSelectedNodes: function getSelectedNodes() {// on-toggle-expand(this.$refs.tree.getSelectedNodes())
                        // console.log(this.$refs.tree.getSelectedNodes());
                    },
                    selectChangeModal: function selectChangeModal(e) {
                        var _this15 = this;

                        this.formDate.userDefined = '否';

                        if (e == '') {
                            return false;
                        }

                        if (Array.isArray(e) == false) {
                            var arr = [];
                            arr.push(e);
                            e = arr;
                        }

                        var goodsCode = e[0].goodsCode || '';
                        var isparent = e[0].isparent;
                        var rate = e[0].rate;
                        this.selectItem = e;

                        if (isparent == 'Y' || isparent == '是') {
                            this.goodsTree(goodsCode).then(function (res) {
                                if (res != 1) {
                                    res.forEach(function (item, index) {
                                        item.title = item.goodsName;

                                        if (res[index].rate) {
                                            res[index].render = nodeRender.bind(_this15);
                                        }
                                    });
                                    e[0].children = res;
                                }
                            });
                        }

                        var formDate = e[0];

                        for (var key in formDate) {
                            if (formDate[key] == 'Y') {
                                formDate[key] = '是';
                            }

                            if (formDate[key] == 'N') {
                                formDate[key] = '否';
                            }
                        }

                        this.formDate = formDate;
                        this.selectItem = e;

                        if (e[0].summarized != '否') {
                        }

                        if (e == '' || !e) {
                            this.$Message.info('请选择操作节点！');
                            return false;
                        }

                        var item = e[0]; //税率  rate ， goodsCode商品编码  ，分类编码classificationCode，freeType	免税类型

                        var params = _objectSpread({}, e[0]);

                        if (e == '') {
                            isparent = '是';
                        } else {
                            isparent = e[0].isparent || '是';
                        }

                        if (e[0].summarized == '否' || e[0].summarized == 'N') {
                            setTimeout(function () {
                                var children = e[0].children || []; // 添加商品时 编码多加后两位\

                                var code = '';
                                code = _this15.goodsCodeCange(params.goodsCode, children);
                                params.goodsCode = params.goodsCode + code;
                                _this15.addBussinessParams = _this15.dataFormat(params);
                            }, 500);
                            this.addModalStatus = false;
                        } else {
                            if (this.isAdd) {
                            } else {
                                this.$Message.info('只能在最末级节点增加商品！');
                            }

                            this.addModalStatus = true;
                            this.addBussinessParams = {
                                goodsCode: '',
                                //商品编码
                                goodsName: '',
                                //商品名称
                                illustrateStr: '',
                                //说明
                                vatRate: '',
                                //增值税税率
                                rate: '',
                                //税率
                                keyWorld: '',
                                //关键字
                                summarized: '',
                                //汇总项
                                version: '',
                                //版本
                                goodsPrice: '',
                                //商品单价
                                userDefined: '',
                                //自定义
                                vatSprcialManage: '',
                                //增值税特殊管理
                                vatPolicyBasis: '',
                                //增值税政策依据
                                useDiscount: '',
                                //是否使用优惠政策
                                discountType: '',
                                //优惠政策类型
                                updateTime: '' //启用时间}

                            };
                        } // YDXX-4460


                        if (this.$refs.addBus) {
                            this.$refs.addBus.ifWatch = true;
                            this.$refs.addBus.modalFirstStatus = true;
                        }
                    },
                    selectChange: function selectChange(e) {
                        var _this16 = this;

                        this.formDate.userDefined = '否';

                        if (e == '') {
                            return false;
                        }

                        if (!Array.isArray(e)) {
                            var arr = [];
                            arr.push(e);
                            e = arr;
                        }

                        var goodsCode = e[0].goodsCode || '';
                        var isparent = e[0].isparent;
                        var rate = e[0].rate;
                        this.selectItem = e;

                        if (isparent == 'Y' || isparent == '是') {
                            this.goodsTree(goodsCode).then(function (res) {
                                if (res != 1) {
                                    res.forEach(function (item, index) {
                                        item.title = item.goodsName;

                                        if (item.title.length > 35) {
                                            item.title = item.title.slice(0, 35) + '....';
                                        }

                                        if (res[index].rate || res[index].rate == 0) {
                                            res[index].render = nodeRender.bind(_this16);
                                        }
                                    });
                                    e[0].children = res;
                                }
                            });
                        }

                        var formDate = e[0];

                        for (var key in formDate) {
                            if (formDate[key] == 'Y') {
                                formDate[key] = '是';
                            }

                            if (formDate[key] == 'N') {
                                formDate[key] = '否';
                            }
                        }

                        if (formDate.userDefined && formDate.userDefined != 'false') {
                            formDate.userDefined = '是';
                        }

                        if (!formDate.userDefined || formDate.userDefined == 'false') {
                            formDate.userDefined = '否';
                        }

                        if (formDate.goodsName.length > 35) {
                            formDate.goodsName = formDate.goodsName.slice(0, 35) + '.....';
                        }

                        this.formDate = formDate;
                    },
                    //数据转换
                    dataFormat: function dataFormat(data) {
                        for (var key in data) {
                            if (data[key] == 'N') {
                                data[key] == false;
                            }

                            if (data[key] == 'Y') {
                                data[key] == true;
                            }

                            if (data[key] == 'N') {
                                data[key] == false;
                            }

                            if (data[key] == 'Y') {
                                data[key] == true;
                            }
                        }

                        return data;
                    },
                    addGoods: function addGoods(status) {
                        this.addShow = true; //status=1添加//status=2编辑
                        //先判断，如果isparent是N则添加，否则不予添加=

                        if (status == 1) {
                            this.addStatus = 'add';
                        }

                        if (status == 2) {
                            this.addStatus = 'update';
                        }

                        var e = this.selectItem || this.$refs.tree.getSelectedNodes();

                        if (e == '' || !e) {
                            this.$Message.info('请选择操作节点！');
                            return false;
                        }

                        var item = e[0]; //税率  rate ， goodsCode商品编码  ，分类编码classificationCode，freeType	免税类型

                        var params = _objectSpread({}, e[0]); //获取children 用作计算 商品编码 后面添加的字母获取


                        var children = e[0].children || []; // 添加商品时 编码多加后两位\

                        var code = '';

                        if (status == 2) {
                            params.goodsCode = params.goodsCode;
                        }

                        if (status == 1) {
                            code = this.goodsCodeCange(params.goodsCode, children);

                            if (code) {
                                params.goodsCode = params.goodsCode + code;
                            }

                            if (!code) {
                                this.$Message.info('节点下增加最多可以添加775个子节点，系统中已存在775条');
                                return false;
                            }
                        }

                        var isparent = '是';

                        if (e == '') {
                            isparent = '是';
                        } else {
                            isparent = e[0].isparent || '是';
                        }

                        if (e[0].summarized == '否' || e[0].summarized == 'N') {
                            this.addBussinessParams = this.dataFormat(params);
                        } else {
                            if (status == 1) {
                                this.$Message.info('只能在最末级节点增加商品！');
                            }

                            if (status == 2) {
                                this.$Message.info('该节点不允许编辑！');
                            }
                        }
                    }
                },
                components: {
                    addBussiness: addBussiness["default"],
                    LabelInput: LabelInput["default"],
                    FuncButton: FuncButton["default"]
                }
            });
// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue?vue&type=script&lang=js&
            /* harmony default export */
            var CommodityMgmt_CommodityMgmtvue_type_script_lang_js_ = (CommodityMgmtvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue?vue&type=style&index=0&id=56cf234b&lang=scss&scoped=true&
            var CommodityMgmtvue_type_style_index_0_id_56cf234b_lang_scss_scoped_true_ = __webpack_require__("/3bT");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
            var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue


            /* normalize component */

            var component = Object(componentNormalizer["a" /* default */])(
                CommodityMgmt_CommodityMgmtvue_type_script_lang_js_,
                render,
                staticRenderFns,
                false,
                null,
                "56cf234b",
                null
            )

            /* harmony default export */
            var CommodityMgmt = __webpack_exports__["default"] = (component.exports);

            /***/
        },

    /***/ "+UWE":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_FuncButton_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("x+jC");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_FuncButton_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_FuncButton_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_FuncButton_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "/3bT":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityMgmt_vue_vue_type_style_index_0_id_56cf234b_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("drkD");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityMgmt_vue_vue_type_style_index_0_id_56cf234b_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityMgmt_vue_vue_type_style_index_0_id_56cf234b_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityMgmt_vue_vue_type_style_index_0_id_56cf234b_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "0OwG":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// import { generateComputed } from '@/store/helper'
// const propMixin = {
//     computed: {
//         ...generateComputed(['issuePlace'], state => state.invoiceEdit.currentData)
//     }
// }
        /* harmony default export */
        __webpack_exports__["a"] = ({
            methods: {
                // 查询盘设备
                queryDish: function queryDish(taxNo, orgNo) {
                    var _this = this;

                    var ajaxData = {
                        pageNo: 1,
                        pageSize: 10,
                        taxNo: taxNo + '',
                        orgNo: orgNo + ''
                    };
                    return new Promise(function (resolve, reject) {
                        _this.http.outPost('/api/terminal/getDiskTerminalList', ajaxData).then(function (resp) {
                            if (resp.success) {
                                var res = resp.data && resp.data.results || [];
                                resolve(!!res.length);
                            }
                        }).catch(function (err) {
                            reject(err);
                        });
                    });
                },
                // 查询服务器设备
                querySever: function querySever(taxNo) {
                    var _this2 = this;

                    var ajaxData = {
                        pageNo: 1,
                        pageSize: 10,
                        taxNo: taxNo
                    };
                    return new Promise(function (resolve, reject) {
                        _this2.http.outPost('/api/server/queryServerModeList', ajaxData).then(function (resp) {
                            if (resp.success) {
                                var res = resp.data && resp.data.results || [];
                                resolve(!!res.length);
                            }
                        }).catch(function (err) {
                            reject(err);
                        });
                    });
                },
                queryDefaultDevice: function queryDefaultDevice(taxNo) {
                    var _this3 = this;

                    var ajaxData = {
                        taxNo: taxNo + ''
                    };
                    return new Promise(function (resolve, reject) {
                        _this3.http.outPost('/api/server/defaultDevice', ajaxData).then(function (resp) {
                            if (resp.success) {
                                resolve(resp);
                            }
                        }).catch(function (err) {
                            reject(err);
                        });
                    });
                },
                // 判断当前设备是盘/服务器
                // (0:核心板 1:税控盘 2:SIMKEY 3:税控盒子 4:虚拟UKey 5:税务UKey 6:简易税控盘7:金税盘)
                // 0: "平台托管" 1: "企业自持" 2: "小智自持"
                checkDishOrServer: function checkDishOrServer(deviceType, deposit) {
                    if (deviceType === '0' || deviceType === '1' && deposit !== '1' || deviceType === '5' || deviceType === '4') {
                        // 服务器
                        return 'server';
                    } else if (deviceType === '1' && deposit === '1' || deviceType === '3' || deviceType === '7') {
                        // 盘用户
                        return 'dish';
                    } else {
                        // this.$Message.info('数据异常，不是盘用户也不是服务器用户')
                        console.log("\u6570\u636E\u5F02\u5E38\uFF0C\u4E0D\u662F\u76D8\u4E5F\u4E0D\u662F\u670D\u52A1\u5668,\u8BBE\u5907\u7C7B\u578B:".concat(deviceType, ",\u6258\u7BA1\u65B9\u5F0F:").concat(deposit)); // eslint-disable-line
                    }
                },
                // 检查是否是魔盒设备
                checkIsMagicBox: function checkIsMagicBox(deviceType, deposit) {
                    return deviceType === '1' && deposit === '0';
                }
            },
            computed: {
                // 服务器 或 盘
                // isDishOrServer () {
                //     const organizationInfo = JSON.parse(sessionStorage.getItem('organizationInfo'))
                //     const deposit = organizationInfo.tgType + ''
                //     const deviceType = organizationInfo.deviceType + ''
                //     if ((deviceType === '0') || (deviceType === '1' && deposit === '0') || deviceType === '5') {
                //         // 服务器 用户
                //         return 'server'
                //     } else if ((deviceType === '1' && deposit !== '0') || deviceType === '3') {
                //         // 盘用户
                //         return 'dish'
                //     } else {
                //         // this.$Message.info('数据异常，不是盘用户也不是服务器用户')
                //         console.log(`数据异常，不是盘用户也不是服务器用户,设备类型:${deviceType},托管方式:${deposit}`)// eslint-disable-line
                //     }
                // },
                // // 发票开具选择终端是哪种设备类型的终端
                // isDishOrServer () {
                //     return this.issuePlace.isDishOrServerTerminal
                // },
                // 有盘模式设备
                isDish: function isDish() {
                    var isDish = JSON.parse(sessionStorage.getItem('transDataKeyMap')).invoiceTerminalCode || {};

                    if (Object.keys(isDish).length > 0) {
                        return 'dish';
                    }
                },
                // 是否魔盒
                isMagicBox: function isMagicBox() {
                    var organizationInfo = JSON.parse(sessionStorage.getItem('organizationInfo'));
                    var deposit = organizationInfo.tgType + '';
                    var deviceType = organizationInfo.deviceType + '';

                    if (deviceType === '1' && deposit === '0') {
                        return true;
                    } else {
                        return false;
                    }
                }
            }
        });

        /***/
    }),

    /***/ "1Srz":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/CommodityClassify.vue?vue&type=template&id=15e74de3&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', [_c('SelectTree', {
                attrs: {
                    "inputLabel": "机构名称",
                    "defaultModel": _vm.logQuery.orgIds,
                    "treeData": _vm.organizationTree,
                    "show-checkbox": true,
                    "multiple": true
                }, on: {"check-change": _vm.organizationChange}
            }), _vm._v(" "), _c('LabelInput', {attrs: {"inputLabel": "商品分类名称:"}}), _vm._v(" "), _c('BwButton', {
                attrs: {
                    "type": "first",
                    "margin": "margin",
                    "icon": "chaxun"
                }, on: {"click": _vm.query}
            }, [_vm._v("查询")]), _vm._v(" "), _c('Table', {
                ref: "selection",
                attrs: {"border": true, "columns": _vm.columns, "data": _vm.tableData}
            })], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityClassify.vue?vue&type=template&id=15e74de3&

// EXTERNAL MODULE: ./src/components/page/common/LabelInput.vue + 4 modules
        var LabelInput = __webpack_require__("m7jE");

// EXTERNAL MODULE: ./src/utils/selectUtil.js
        var selectUtil = __webpack_require__("Z1R7");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/CommodityClassify.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        /* harmony default export */
        var CommodityClassifyvue_type_script_lang_js_ = ({
            components: {
                LabelInput: LabelInput["default"]
            },
            data: function data() {
                var _this = this;

                var nowDay = this.common.transDate(Date.now()) + ' ';
                var first = nowDay + '00:00:00';
                var second = nowDay + '23:59:59';
                return {
                    columns: [{
                        title: '序号',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '组织机构',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '商品分类编码',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '商品分类名称',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '税收分类编码',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '税收分类名称',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '税收分类简称',
                        key: 'showIndex',
                        width: 70
                    }, {
                        title: '操作',
                        key: 'action',
                        fixed: 'right',
                        width: 60,
                        render: function render(h, params) {
                            return h('div', [h('BwButton', {
                                props: {
                                    type: 's-first',
                                    margin: 'margin',
                                    opcode: 'view'
                                },
                                on: {
                                    click: function click() {
                                        _this.show(params.index);
                                    }
                                }
                            }, '编辑')]);
                        }
                    }],
                    tableData: [],
                    // 查询
                    logQuery: {
                        optDate: [first, second],
                        optUserName: '',
                        // 操作人
                        modelName: '',
                        // 操作模块
                        success: '全部',
                        // 操作结果
                        ip: '',
                        // 请求方IP
                        orgIds: '' // 组织机构 'parent 1,parent 1-1'

                    },
                    organizationTree: []
                };
            },
            created: function created() {
                var _this2 = this;

                Object(selectUtil["t" /* getOrgTreeOutput */])().then(function (res) {
                    _this2.organizationTree = Object(selectUtil["M" /* transformTreeOutput */])(res);

                    _this2.$nextTick(function () {
                        var organizationInfo = JSON.parse(sessionStorage.getItem('organizationInfo')) || {};

                        if (_this2.organizationTree.length > 0) {
                            _this2.logQuery.orgIds = organizationInfo.orgId + '';

                            _this2.initInvoiceTerminalList(_this2.logQuery.orgIds);
                        }

                        _this2.query();
                    });
                });
            },
            methods: {
                // 组织机构改变
                organizationChange: function organizationChange(arr) {
                    this.logQuery.orgIds = arr;
                    this.initInvoiceTerminalList(arr);
                },
                // 获取开票终端
                initInvoiceTerminalList: function initInvoiceTerminalList(ids) {
                    var _this3 = this;

                    if (!ids) {
                        this.invoiceTerminalList = [];
                        return;
                    }

                    Object(selectUtil["l" /* getInvoiceTerminalListByOrg */])(ids).then(function (res) {
                        _this3.invoiceTerminalList = res;
                    });
                },
                query: function query() {
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityClassify.vue?vue&type=script&lang=js&
        /* harmony default export */
        var CommodityMgmt_CommodityClassifyvue_type_script_lang_js_ = (CommodityClassifyvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityClassify.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            CommodityMgmt_CommodityClassifyvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var CommodityClassify = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "37oL":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/InvoiceEditToolbar.vue?vue&type=template&id=5fc9a5ca&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', [_c('toolbar', {
                ref: "toolbar",
                attrs: {
                    "config": _vm.config,
                    "invoiceTypeCode": _vm.invoiceTypeCode,
                    "terminalCode": _vm.terminalCode,
                    "btnPermission": _vm.btnPermission
                },
                on: {
                    "on-show-difference": _vm.showDifference,
                    "on-switch-invoice": _vm.switchInvoice,
                    "re-load": _vm.reLoad,
                    "on-close": _vm.onClose
                }
            })], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/InvoiceEditToolbar.vue?vue&type=template&id=5fc9a5ca&scoped=true&

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/toolbar.vue + 6 modules
        var toolbar = __webpack_require__("n5aN");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/InvoiceEditToolbar.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// 云端最新版本
        // 向下兼容版本
// import Toolbar from './invoiceEditToolbarCompatible'

        /* harmony default export */
        var InvoiceEditToolbarvue_type_script_lang_js_ = ({
            props: {
                config: {
                    type: Object,
                    required: true
                },
                invoiceTypeCode: {
                    type: String,
                    default: ''
                },
                terminalCode: String,
                btnPermission: Object
            },
            components: {
                Toolbar: toolbar["default"]
            },
            methods: {
                showDifference: function showDifference(flage) {
                    this.$emit('on-show-difference', flage);
                },
                switchInvoice: function switchInvoice(val) {
                    this.$emit('on-switch-invoice', val);
                },
                reLoad: function reLoad(val) {
                    this.$emit('re-load', val);
                },
                onClose: function onClose() {
                    this.$emit('on-close');
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/InvoiceEditToolbar.vue?vue&type=script&lang=js&
        /* harmony default export */
        var invoice_edit_InvoiceEditToolbarvue_type_script_lang_js_ = (InvoiceEditToolbarvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/InvoiceEditToolbar.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            invoice_edit_InvoiceEditToolbarvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "5fc9a5ca",
            null
        )

        /* harmony default export */
        var InvoiceEditToolbar = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "3ehq":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/CommodityModal.vue?vue&type=template&id=1387a735&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('Modal', {
                attrs: {
                    "width": "1160",
                    "mask-closable": false,
                    "title": _vm.isAdd ? '选择分类' : '添加商品',
                    "z-index": 300,
                    "styles": _vm.styles,
                    "class-name": _vm.className
                },
                on: {"on-cancel": _vm.cancle, "on-visible-change": _vm.changeStatus},
                model: {
                    value: (_vm.showX), callback: function ($$v) {
                        _vm.showX = $$v
                    }, expression: "showX"
                }
            }, [_c('div', {class: _vm.contenRbox}, [_c('CommodityMgmt', {
                key: _vm.uniqueKey,
                ref: "CommodityModal",
                staticStyle: {"z-index": "1000"},
                attrs: {"isShowModal": _vm.showX, "height": _vm.height, "status": _vm.modal, "isAdd": _vm.isAdd},
                on: {"modalChange": _vm.modalChange, "add-goods": _vm.addgoods}
            })], 1), _vm._v(" "), _c('div', {
                attrs: {"slot": "footer"},
                slot: "footer"
            }, [_c('Button', {
                attrs: {"size": "large"}, on: {
                    "click": function ($event) {
                        return _vm.cancle(1)
                    }
                }
            }, [_vm._v("取消")]), _vm._v(" "), _c('Button', {
                attrs: {"size": "large", "loading": _vm.modalLoading},
                on: {
                    "click": function ($event) {
                        return _vm.cancle(2)
                    }
                }
            }, [_vm._v("保存")])], 1)])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityModal.vue?vue&type=template&id=1387a735&scoped=true&

// EXTERNAL MODULE: ./src/components/page/_output/CommodityMgmt/CommodityMgmt.vue + 4 modules
        var CommodityMgmt = __webpack_require__("+BMk");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/CommodityModal.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//

        /* eslint-disable */

        /* harmony default export */
        var CommodityModalvue_type_script_lang_js_ = ({
            props: {
                propsParams: {
                    type: Object
                },
                waterSingleAdd: {
                    type: Boolean,
                    default: false
                },
                addShow: {
                    type: Boolean,
                    default: false
                },
                height: {
                    type: [String, Number]
                },
                styles: {
                    type: Object
                },
                visibleChangeCallback: {
                    type: Function,
                    default: function _default() {
                    }
                },
                className: {
                    type: String
                },
                isAdd: {
                    type: Boolean,
                    default: false
                }
            },
            computed: {
                contenRbox: function contenRbox() {
                    return ['conten_rbox', {
                        'no-left-border': this.height
                    }];
                }
            },
            data: function data() {
                return {
                    showX: false,
                    //弹层关闭
                    modal: 'modal',
                    uniqueKey: Date.now() + '',
                    modalLoading: false
                };
            },
            // mounted() {
            //     this.goodsTree();
            //     this.getSelectedNodes()
            // },
            methods: {
                // modalChange为成功的回调
                modalChange: function modalChange() {
                    this.$emit('change', false);
                },
                addgoods: function addgoods(ajaxDate) {
                    this.$emit('add-goods', ajaxDate);
                },
                cancle: function cancle(status) {
                    var _this = this;

                    if (status === 1) {
                        this.$emit('change', false);
                        this.$refs.CommodityModal.addBussinessParams = {
                            goodsCode: '',
                            //商品编码
                            goodsName: '',
                            //商品名称
                            illustrateStr: '',
                            //说明
                            vatRate: '',
                            //增值税税率
                            rate: '',
                            //税率
                            keyWorld: '',
                            //关键字
                            summarized: '',
                            //汇总项
                            version: '',
                            //版本
                            goodsPrice: '',
                            //商品单价
                            userDefined: '',
                            //自定义
                            vatSprcialManage: '',
                            //增值税特殊管理
                            vatPolicyBasis: '',
                            //增值税政策依据
                            useDiscount: '',
                            //是否使用优惠政策
                            discountType: '',
                            //优惠政策类型
                            updateTime: '' //启用时间}

                        };
                    }

                    if (status === 2) {
                        if (this.waterSingleAdd) {
                            this.modalLoading = true;

                            if (this.$refs.CommodityModal.addBussinessParams.requestId) {
                                var params = this.propsParams;
                                params.commodityCode = this.$refs.CommodityModal.addBussinessParams.goodsCode.substr(0, 19);
                                params.taxClassName = this.$refs.CommodityModal.addBussinessParams.goodsName;
                                params.taxClassShortName = this.$refs.CommodityModal.addBussinessParams.goodsSimpleName;
                                this.http.outPost('/api/flowSheet/editFlowSheetIntelligentCommodityCode', params, function (res) {
                                    if (res.success) {
                                        _this.$Message.success(res.message);

                                        _this.$emit('receiveData', false);
                                    } else {
                                        _this.$Message.info(res.message);
                                    }

                                    _this.modalLoading = false;
                                }, function (err) {
                                    _this.modalLoading = false;
                                });
                            } else {
                                this.modalLoading = false;
                                return this.$Message.info('请先选择节点');
                            }

                            return;
                        }

                        if (this.isAdd) {
                            this.$emit('receiveData', this.$refs.CommodityModal.addBussinessParams);

                            if (this.$refs.CommodityModal.addBussinessParams.requestId) {
                                this.$emit('change', false);
                                this.$refs.CommodityModal.addBussinessParams = {
                                    goodsCode: '',
                                    //商品编码
                                    goodsName: '',
                                    //商品名称
                                    illustrateStr: '',
                                    //说明
                                    vatRate: '',
                                    //增值税税率
                                    rate: '',
                                    //税率
                                    keyWorld: '',
                                    //关键字
                                    summarized: '',
                                    //汇总项
                                    version: '',
                                    //版本
                                    goodsPrice: '',
                                    //商品单价
                                    userDefined: '',
                                    //自定义
                                    vatSprcialManage: '',
                                    //增值税特殊管理
                                    vatPolicyBasis: '',
                                    //增值税政策依据
                                    useDiscount: '',
                                    //是否使用优惠政策
                                    discountType: '',
                                    //优惠政策类型
                                    updateTime: '' //启用时间}

                                };
                                return;
                            } else {
                                return this.$Message.info('请先选择节点');
                            }
                        }

                        this.$refs.CommodityModal.$refs.addBus.cancle(2);
                    }
                },
                changeStatus: function changeStatus(params) {
                    this.visibleChangeCallback.call(null, params);

                    if (!params) {
                        this.$emit('change', false);
                        this.$Modal.remove();
                    } else {
                        this.$refs.CommodityModal.goodsTree();
                        this.uniqueKey = Date.now() + '';
                    }
                }
            },
            components: {
                CommodityMgmt: CommodityMgmt["default"]
            },
            watch: {
                addShow: {
                    handler: function handler(val) {
                        this.showX = val;
                    },
                    immediate: true
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityModal.vue?vue&type=script&lang=js&
        /* harmony default export */
        var CommodityMgmt_CommodityModalvue_type_script_lang_js_ = (CommodityModalvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/_output/CommodityMgmt/CommodityModal.vue?vue&type=style&index=0&id=1387a735&lang=scss&scoped=true&
        var CommodityModalvue_type_style_index_0_id_1387a735_lang_scss_scoped_true_ = __webpack_require__("ZvbC");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/CommodityModal.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            CommodityMgmt_CommodityModalvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "1387a735",
            null
        )

        /* harmony default export */
        var CommodityModal = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "4AcG":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/LabelSelect.vue?vue&type=template&id=7d2a1d96&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "selectground"}, [(_vm.inputLabel) ? _c('span', {staticClass: "select-name"}, [_vm._v(_vm._s(_vm.inputLabel))]) : _vm._e(), _vm._v(" "), _c('div', {staticClass: "select-input"}, [(_vm.multiple) ? _c('i-select', {
                ref: "bwLabelSelect",
                attrs: {
                    "multiple": "",
                    "clearable": _vm.clearable,
                    "label-in-value": _vm.labelInValue,
                    "disabled": _vm.disabled,
                    "placeholder": _vm.placeholder
                },
                on: {"on-change": _vm.handleChange},
                model: {
                    value: (_vm.currentValue), callback: function ($$v) {
                        _vm.currentValue = $$v
                    }, expression: "currentValue"
                }
            }, _vm._l((_vm.dataList), function (item, index) {
                return _c('Option', {
                    key: index + item.value,
                    attrs: {"value": item.value}
                }, [_vm._v(_vm._s(item.label))])
            }), 1) : _vm._e(), _vm._v(" "), (!_vm.multiple) ? _c('i-select', {
                ref: "bwLabelSelect",
                attrs: {
                    "clearable": _vm.clearable,
                    "label-in-value": _vm.labelInValue,
                    "disabled": _vm.disabled,
                    "placeholder": _vm.placeholder
                },
                on: {"on-change": _vm.handleChange},
                model: {
                    value: (_vm.currentValue), callback: function ($$v) {
                        _vm.currentValue = $$v
                    }, expression: "currentValue"
                }
            }, _vm._l((_vm.dataList), function (item, index) {
                return _c('Option', {
                    key: index + item.value,
                    attrs: {"value": item.value}
                }, [_vm._v(_vm._s(item.label))])
            }), 1) : _vm._e()], 1)])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/LabelSelect.vue?vue&type=template&id=7d2a1d96&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/LabelSelect.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
        /* harmony default export */
        var LabelSelectvue_type_script_lang_js_ = ({
            name: 'label-select',
            props: {
                inputLabel: {
                    type: String,
                    default: ''
                },
                multiple: {
                    type: Boolean,
                    default: false
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                inputValue: {
                    type: [String, Number, Array],
                    default: ''
                },
                placeholder: {
                    type: String,
                    default: ''
                },
                dataList: {
                    type: Array,
                    default: function _default() {
                        return [];
                    }
                },
                labelInValue: {
                    type: Boolean,
                    default: false
                },
                clearable: {
                    type: Boolean,
                    default: true
                }
            },
            data: function data() {
                return {
                    currentValue: this.inputValue
                };
            },
            created: function created() {// this.currentValue = ''
            },
            watch: {
                inputValue: function inputValue() {
                    this.currentValue = this.inputValue;
                }
            },
            methods: {
                handleChange: function handleChange(event) {
                    this.$emit('change', event, this.currentValue);
                },
                clearSingleSelect: function clearSingleSelect() {
                    this.$refs.bwLabelSelect.clearSingleSelect();
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/LabelSelect.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_LabelSelectvue_type_script_lang_js_ = (LabelSelectvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/LabelSelect.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_LabelSelectvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var LabelSelect = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "6+HR":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceContent.vue?vue&type=template&id=0261dda2&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "grid-list"}, [_c('div', {staticClass: "grid-list-main"}, [_c('div', {staticClass: "grid-list-head"}, [(!_vm.isSingle) ? _c('div', {staticClass: "grid-list-col col-index"}, [_vm._v("行号")]) : _vm._e(), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-a"}, [(_vm.isShowListText) ? _c('span', {staticClass: "red"}, [_vm._v("(清单)")]) : _vm._e(), (!_vm.isSingle) ? _c('span', [_vm._v("货物或应税劳务.服务名称")]) : _vm._e(), (_vm.isSingle) ? _c('span', [_vm._v("商品名称")]) : _vm._e()]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-b"}, [_vm._v("规格型号")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-c"}, [_vm._v("单位")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-d"}, [_vm._v("数 量")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-e"}, [_vm._v("单价"), ((_vm.priceTaxMark == '1')) ? _c('span', {staticClass: "red"}, [_vm._v("(含税)")]) : _c('span', [_vm._v("(不含税)")])]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-f"}, [_vm._v("金额"), ((_vm.priceTaxMark == '1')) ? _c('span', {staticClass: "red"}, [_vm._v("(含税)")]) : _c('span', [_vm._v("(不含税)")])]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-g"}, [_vm._v("税率")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-h tax"}, [_vm._v("税 额")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-i"}, [_vm._v("操作")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-j last"})]), _vm._v(" "), _c('div', {staticClass: "grid-list-body"}, [_c('div', {staticClass: "grid-list-body-outline"}, [(!_vm.isSingle) ? _c('div', {staticClass: "grid-list-col col-index"}) : _vm._e(), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-a"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-b"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-c"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-d"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-e"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-f"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-g"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-h tax"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-i"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-j last"})]), _vm._v(" "), _c('div', {
                staticClass: "grid-list-body-data",
                class: {'scroll-bar': _vm.withScroll}
            }, _vm._l((_vm.detailList), function (item, index) {
                return _c('InvoiceContentItem', {
                    directives: [{
                        name: "show",
                        rawName: "v-show",
                        value: (_vm.isShowNegative),
                        expression: "isShowNegative"
                    }],
                    key: _vm.unique + index,
                    ref: "items",
                    refInFor: true,
                    attrs: {
                        "data-obj": item,
                        "data-index": index,
                        "add-row-callback": _vm.addRow,
                        "isNegative": _vm.isNegative,
                        "isIssue": _vm.isIssue,
                        "remove-row-callback": _vm.removeRow,
                        "toggle-goods-callback": _vm.toggleGoodsSelector,
                        "rates": _vm.taxRates,
                        "showDifference": _vm.taxationMethod === '2',
                        "invoiceListMark": _vm.invoiceListMark,
                        "invoiceTypeCode": _vm.invoiceTypeCode,
                        "toggle-discount-callback": _vm.toggleDiscountSelector,
                        "update-data-callback": _vm.updateObjByIndex,
                        "suggestGoodsList": _vm.suggestGoodsList,
                        "isSpecialInvoice": _vm.isSpecialInvoice,
                        "isSingle": _vm.isSingle
                    },
                    on: {"select-goods": _vm.selectGoods}
                })
            }), 1)]), _vm._v(" "), (!_vm.isSingle) ? _c('div', {staticClass: "grid-list-foot"}, [_c('div', {staticClass: "grid-list-col col-a sum red"}, [_vm._v("\n        合计折扣\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-b"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-c"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-d"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-e"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-f"}, [_vm._v(_vm._s(_vm.discountTotalAmount) + "\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-g"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-h"}, [_vm._v(_vm._s(_vm.discountTotalTax) + "\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-i"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-j last"}, [_vm._v(" \n      ")])]) : _vm._e(), _vm._v(" "), (!_vm.isSingle) ? _c('div', {staticClass: "grid-list-foot"}, [_c('div', {staticClass: "grid-list-col col-a sum"}, [_vm._v("\n        合计\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-b"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-c"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-d"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-e"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-f"}, [_vm._v("￥"), _c('span', [_vm._v(_vm._s(_vm.totalAmountText))])]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-g"}), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-h"}, [_vm._v("￥" + _vm._s(_vm.totalTaxText) + "\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-i"}, [_vm._v(" \n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-j last"}, [_vm._v(" \n      ")])]) : _vm._e(), _vm._v(" "), (!_vm.isSingle) ? _c('div', {staticClass: "grid-list-extra"}, [_c('div', {staticClass: "grid-list-col col-a"}, [_vm._v("\n        价税合计（大写）\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-b"}, [_vm._v("\n        ⓧ\n        "), (_vm.isNegative) ? _c('span', {staticStyle: {"color": "red"}}, [_vm._v("(负数)")]) : _vm._e(), _vm._v(" "), _c('span', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.withTax),
                    expression: "withTax"
                }]
            }, [_vm._v(_vm._s(_vm._f("moneyToCharacter")((_vm.totalAmount))))]), _vm._v(" "), _c('span', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (!_vm.withTax),
                    expression: "!withTax"
                }]
            }, [_vm._v(_vm._s(_vm._f("moneyToCharacter")((_vm.totalAmount + _vm.totalTax))))])]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-c"}, [_vm._v("(小写)\n      ")]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-d last"}, [_vm._v("￥"), _c('span', [_vm._v(_vm._s(_vm.totalLowerText))])])]) : _vm._e()]), _vm._v(" "), _c('goods-selector', {
                attrs: {
                    "selectCallback": _vm.selectGoods,
                    "isSpecialInvoice": _vm.isSpecialInvoice,
                    "invoiceTypeCode": _vm.invoiceTypeCode
                }
            }), _vm._v(" "), _c('discount-selector', {
                attrs: {
                    "goods-price": _vm.currentLineObj.goodsTotalPrice,
                    "max-line": _vm.maxDiscountLines,
                    "change-discount": _vm.changeDiscount,
                    "discount-price-map": _vm.discountPriceMap
                }
            }), _vm._v(" "), _c('AddGoodModal', {
                attrs: {"addShow": _vm.showAddGoods, "height": 500},
                on: {"change": _vm.addGoodsVisibleChange, "add-goods": _vm.addGoods}
            }), _vm._v(" "), _c('list-goods', {
                attrs: {
                    "selectCallback": _vm.selectListGoods,
                    "id": _vm.invoiceId
                }
            })], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContent.vue?vue&type=template&id=0261dda2&

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue + 5 modules
        var InvoiceContentItem = __webpack_require__("DBVP");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/GoodsSelector.vue + 4 modules
        var GoodsSelector = __webpack_require__("VjCF");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/DiscountSelector.vue + 4 modules
        var DiscountSelector = __webpack_require__("MKmH");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/ListGoods.vue + 4 modules
        var ListGoods = __webpack_require__("iQeH");

// EXTERNAL MODULE: ./src/utils/numberUtil.js
        var numberUtil = __webpack_require__("0Jw3");

// EXTERNAL MODULE: ./src/mixins/invoice-issue/serverOrDishTerminal.js
        var serverOrDishTerminal = __webpack_require__("SBbI");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// EXTERNAL MODULE: ./src/mixins/getSelectData/getTaxRates.js
        var getTaxRates = __webpack_require__("sAfE");

// EXTERNAL MODULE: ./src/components/page/_output/CommodityMgmt/CommodityModal.vue + 4 modules
        var CommodityModal = __webpack_require__("3ehq");

// EXTERNAL MODULE: ./src/store/stateHelper.js
        var stateHelper = __webpack_require__("Ly3o");

// EXTERNAL MODULE: ./src/mixins/invoice-issue/validateRollType.js
        var validateRollType = __webpack_require__("Guu2");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceContent.vue?vue&type=script&lang=js&
        function _toConsumableArray(arr) {
            return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
        }

        function _nonIterableSpread() {
            throw new TypeError("Invalid attempt to spread non-iterable instance");
        }

        function _iterableToArray(iter) {
            if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
        }

        function _arrayWithoutHoles(arr) {
            if (Array.isArray(arr)) {
                for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
                    arr2[i] = arr[i];
                }
                return arr2;
            }
        }

        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        // import serverOrDish from '@/mixins/serverOrDish'


        var propMixin = {
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['showGoodsSelector', 'showListGoodsSelector', 'showAddGoods', 'showDiscountSelector', 'isNegative', 'showCommonNeigativeNext', 'showCommonCopyEdit', 'isOpenReComputed'], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['priceTaxMark', 'invoiceListMark', 'detailList', 'taxationMethod', 'remarks', 'invoiceSpecialMark'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        };
        /* harmony default export */
        var InvoiceContentvue_type_script_lang_js_ = ({
            name: 'invoice-content',
            filters: {
                moneyToCharacter: numberUtil["b" /* moneyToCharacter */],
                toMoneyFixedString: numberUtil["f" /* toMoneyFixedString */]
            },
            mixins: [propMixin, getTaxRates["a" /* default */], serverOrDishTerminal["a" /* default */], validateRollType["a" /* default */]],
            components: {
                InvoiceContentItem: InvoiceContentItem["default"],
                GoodsSelector: GoodsSelector["default"],
                DiscountSelector: DiscountSelector["default"],
                ListGoods: ListGoods["default"],
                AddGoodModal: CommodityModal["default"]
            },
            props: {
                isSpecialInvoice: {
                    type: Boolean,
                    default: false
                },
                isIssue: {
                    type: Boolean,
                    default: false
                },
                isEInvoice: {
                    type: Boolean,
                    default: false
                },
                invoiceTypeCode: {
                    type: String,
                    default: ''
                },
                isSingle: {
                    type: Boolean,
                    default: false
                }
            },
            data: function data() {
                return {
                    withScroll: false,
                    // 当前操作的行数据
                    currentLineObj: {},
                    currentLineIndex: -1,
                    // 自动补全的商品列表
                    suggestGoodsList: [],
                    // 折扣行数
                    maxDiscountLines: 1,
                    discountPriceMap: {},
                    taxRates: []
                };
            },
            methods: {
                addRow: function addRow(index) {
                    if (this.taxationMethod === '2') {
                        this.$Message.info('差额征税不能增加行！');
                        return;
                    }

                    this.isAddLine = true;

                    var targetList = _toConsumableArray(this.detailList);

                    if (this.invoiceTypeCode === '025') {
                        if (!this.validateRollAddRow()) {
                            return;
                        }
                    } else {
                        if (this.invoiceSpecialMark === '08') {
                            if (targetList.length === 8) {
                                this.$Message.info('成品油发票不允许开具清单票');
                                return false;
                            }
                        } else {
                            if (this.isNegativeListMark && targetList.length === 8) {
                                this.$Message.info('已到最大行数，无法继续新增费用项目！');
                                return;
                            }
                        }
                    } // if (this.isNegative && !this.isExistOriginalData && targetList.length === 8) {
                    //   this.$Message.info('已到最大行数，无法继续新增费用项目！')
                    //   return
                    // }


                    if (this.invoiceTypeCode !== '025' && targetList.length === 8) {
                        if (this.invoiceListMark !== '1' && !this.isEInvoice) {
                            this.$Message.warning({
                                content: '超过8行明细将必须使用清单打印,票面将只显示（详见销货清单）和折扣!',
                                duration: 10,
                                closable: true
                            });
                            this.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceListMark'), '1');
                        }
                    } // 在当前行的下一行添加
                    // let targetIndex = index;
                    // for(let len = targetList.length;targetIndex < len;){
                    //   let targetObj = targetList[targetIndex];
                    //   if(targetObj.hasDiscountLine || targetObj.isDiscountLine){
                    //     targetIndex++;
                    //   }else{
                    //     break;
                    //   }
                    // }
                    // targetList.splice(targetIndex + 1,0,{
                    //   ...getDefaultDetailTpl()
                    // });
                    // 每次都在最后添加


                    targetList.push(_objectSpread({}, Object(stateHelper["c" /* getDefaultDetailTpl */])(), {
                        noEdit: true,
                        isNewLine: true
                    }));
                    this.detailList = targetList;
                },
                removeRow: function removeRow(index) {
                    var targetList = _toConsumableArray(this.detailList);

                    var notDiscountLines = targetList.filter(function (item) {
                        return !item.isDiscountLine;
                    });
                    var targetLine = targetList[index];

                    if (targetLine.hasDiscountLine) {
                        this.$Message.warning('该行已添加折扣信息，请先删除此行的折扣信息！');
                        return;
                    } else if (!targetLine.isDiscountLine && notDiscountLines.length === 1) {
                        this.$Message.warning('最后一行不能删除!');
                        return;
                    }

                    var targetObj = targetList[index];

                    if (targetObj.hasDiscountLine) {
                        this.$Message.warning('该行已添加折扣信息，请先删除此行的折扣信息！'); // targetList.splice(index, 2);
                    } else if (targetObj.isDiscountLine) {
                        targetList.splice(index, 1);
                        targetList[index - 1] = _objectSpread({}, targetList[index - 1], {
                            isDiscountLine: false,
                            hasDiscountLine: false
                        });
                    } else {
                        targetList.splice(index, 1);
                    }

                    this.detailList = targetList;
                },
                selectGoods: function selectGoods(dataObj) {
                    if (dataObj.dataIndex) {
                        this.currentIndex = +dataObj.dataIndex;
                    }

                    var dataTax = dataObj.priceTaxMark === 'Y';
                    var isTax = Boolean(+this.priceTaxMark);
                    var goodsPrice = +dataObj.goodsPrice;
                    var goodsTaxRate = +dataObj.goodsTaxRate;
                    var price = '';

                    if (goodsPrice) {
                        if (dataTax === isTax) {
                            // 含税
                            price = goodsPrice;
                        } else {
                            if (dataTax && !isTax) {
                                price = goodsPrice.division(goodsTaxRate.add(1));
                            } else if (isTax && !dataTax) {
                                price = goodsPrice.multiply(goodsTaxRate.add(1));
                            }
                        }
                    }

                    var goods = _objectSpread({}, dataObj, {
                        noEdit: false,
                        goodsName: dataObj.goodsSimpleName ? "*".concat(dataObj.goodsSimpleName, "*").concat(dataObj.goodsName) : dataObj.goodsName,
                        goodsPrice: price ? +Object(numberUtil["e" /* toKeepFixed6 */])(price, this.isRoll) : '',
                        goodsQuantity: +dataObj.goodsQuantity ? dataObj.goodsQuantity : '',
                        goodsTotalPrice: '',
                        goodsTotalTax: ''
                    }); // 这里不直接更新数据，而是给子组件
                    // 避免vuex里面更新了 子组件没更新的问题，因为是单向数据，所有从子组件开始更新


                    this.$refs.items[this.currentIndex].updateItemData(goods);
                },
                selectListGoods: function selectListGoods(dataObj) {
                    var goods = _objectSpread({}, dataObj, {
                        noEdit: false,
                        goodsName: dataObj.goodsSimpleName ? "*".concat(dataObj.goodsSimpleName, "*").concat(dataObj.goodsName) : dataObj.goodsName // goodsPrice: (+dataObj.goodsPrice) ? dataObj.goodsPrice : '',
                        // goodsQuantity: (+dataObj.goodsQuantity) ? dataObj.goodsQuantity : '',
                        // goodsTotalPrice: '',
                        // goodsTotalTax: '',

                    });

                    if (dataObj.goodsPrice == null || dataObj.goodsPrice === '') {
                        goods.goodsPrice = '';
                    } else {
                        goods.goodsPrice = +dataObj.goodsPrice + '';
                    }

                    if (dataObj.goodsQuantity == null || dataObj.goodsQuantity === '') {
                        goods.goodsQuantity = '';
                    } else if (+dataObj.goodsQuantity === 0) {
                        goods.goodsQuantity = '0';
                    } else {
                        goods.goodsQuantity = '-' + +dataObj.goodsQuantity;
                    }

                    if (dataObj.goodsTotalPrice == null || dataObj.goodsTotalPrice === '') {
                        goods.goodsTotalPrice = '';
                    } else if (+dataObj.goodsTotalPrice === 0) {
                        goods.goodsTotalPrice = '0.00';
                    } else {
                        goods.goodsTotalPrice = '-' + Object(numberUtil["d" /* toKeepFixed2 */])(dataObj.goodsTotalPrice);
                    }

                    if (dataObj.goodsTotalTax == null || dataObj.goodsTotalTax === '') {
                        goods.goodsTotalTax = '';
                    } else if (+dataObj.goodsTotalTax === 0) {
                        goods.goodsTotalTax = '0.00';
                    } else {
                        goods.goodsTotalTax = '-' + Object(numberUtil["d" /* toKeepFixed2 */])(dataObj.goodsTotalTax);
                    }

                    this.$refs.items[this.currentIndex].updateItemData(goods);
                },
                updateObjByIndex: function updateObjByIndex(dataObj, index) {
                    var targetList = _toConsumableArray(this.detailList);

                    targetList.splice(index, 1, dataObj);
                    this.detailList = targetList;
                },
                toggleGoodsSelector: function toggleGoodsSelector(index) {
                    this.currentIndex = index;

                    if (this.isNegativeListMark && this.invoiceListMark === '1') {
                        this.showListGoodsSelector = true;
                    } else {
                        this.showGoodsSelector = true;
                    }
                },
                addGoodsVisibleChange: function addGoodsVisibleChange(state) {
                    this.showAddGoods = state;
                },
                addGoods: function addGoods(dataobj) {
                    if (this.isSpecialInvoice) {
                        if (dataobj && +dataobj.rate === 0) {
                            this.$Message.warning('专票不能开零税率的票!');
                            return;
                        }
                    }

                    var obj = _objectSpread({}, dataobj, {
                        goodsTaxRate: dataobj.rate
                    });

                    this.selectGoods(obj);
                    this.$store.commit('changeShowGoodsSelector', false);
                },
                toggleDiscountSelector: function toggleDiscountSelector(index, dataObj) {
                    this.currentIndex = index; // 折扣行数为当前行及其之前所有可折扣的（税率相同）行数之和

                    var count = 1;
                    var tmpObj;
                    var infoList = this.detailList.slice(0, index + 1);
                    var discountPriceMap = {
                        1: +dataObj.goodsTotalPrice
                    }; // 便于从折扣行开始计算 折扣总金额

                    infoList.reverse(); // 下标从1开始，0是当前行

                    for (var i = 1; i <= index; i++) {
                        tmpObj = infoList[i];

                        if (tmpObj.isDiscountLine || tmpObj.hasDiscountLine || tmpObj.taxRate !== dataObj.taxRate) {
                            continue;
                        }

                        count++;
                        discountPriceMap[count] = +discountPriceMap[count - 1] + (+tmpObj.goodsTotalPrice || 0);
                    }

                    this.currentLineObj = dataObj;
                    this.currentLineIndex = index;
                    this.maxDiscountLines = count;
                    this.discountPriceMap = discountPriceMap;
                    this.showDiscountSelector = true;
                },
                changeDiscount: function changeDiscount(discountInfo) {
                    var discountLines = discountInfo.discountLines; // 本次会有折扣的行

                    var withDiscountList = this.getDiscountList(discountLines); // 本次新增的折扣行

                    var discountList = this.getComputedDiscount(withDiscountList, discountInfo); // .filter(item => !item.notDiscount);

                    if (!discountList) {
                        return;
                    }

                    var detailList = this.detailList;

                    var newDetailList = _toConsumableArray(detailList);

                    if (this.invoiceTypeCode === '025') {
                        if (!this.validateRollAddRow()) {
                            return;
                        }
                    } else {
                        if (this.invoiceSpecialMark === '08') {
                            if (newDetailList.length >= 8) {
                                this.$Message.info('成品油发票不允许开具清单票');
                                return false;
                            }
                        }
                    }

                    for (var i = withDiscountList.length; i--;) {
                        var index = newDetailList.indexOf(withDiscountList[i]);

                        if (!discountList[i].notDiscount) {
                            newDetailList[index] = _objectSpread({}, withDiscountList[i], {
                                hasDiscountLine: true
                            });
                            newDetailList.splice(index + 1, 0, discountList[i]);
                        }
                    }

                    this.detailList = newDetailList;
                    this.showDiscountSelector = false;
                    this.$store.commit('changeShowDiscountSelector', false);

                    if (this.invoiceTypeCode !== '025' && newDetailList.length > 8) {
                        if (this.invoiceListMark !== '1' && !this.isEInvoice) {
                            this.$Message.warning({
                                content: '超过8行明细将必须使用清单打印,票面将只显示（详见销货清单）和折扣!',
                                duration: 10,
                                closable: true
                            });
                            this.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceListMark'), '1');
                        }
                    }
                },
                getDiscountList: function getDiscountList(discountLines) {
                    var currentLineObj = this.currentLineObj;
                    var detailList = this.detailList; // 先把需要折扣的行 拎出来

                    var withDiscountList = [];
                    var currentIndex = this.currentIndex;
                    var tmpLineObj;
                    var count = 0;

                    for (var i = currentIndex; i >= 0; i--) {
                        // 取所有当前行前面的 折扣等于当前行的能折扣的行，数够行数
                        tmpLineObj = detailList[i];

                        if (!tmpLineObj.isDiscountLine && !tmpLineObj.hasDiscountLine && tmpLineObj.taxRate === currentLineObj.taxRate) {
                            // tmpLineObj.hasDiscountLine = true;
                            withDiscountList.unshift(tmpLineObj);

                            if (++count === discountLines) {
                                break;
                            }
                        }
                    } // console.log(withDiscountList)


                    return withDiscountList;
                },
                getComputedDiscount: function getComputedDiscount(withDiscountList, discountInfo) {
                    var discountLines = discountInfo.discountLines,
                        discountType = discountInfo.discountType,
                        discountValue = discountInfo.discountValue;
                    var discountList = [];
                    var discountNum = Object(numberUtil["d" /* toKeepFixed2 */])(+this.discountPriceMap[discountLines]);

                    for (var i = 0, len = withDiscountList.length; i < len; i++) {
                        discountList.push(_objectSpread({}, withDiscountList[i], {
                            goodsSpecification: '',
                            goodsUnit: '',
                            goodsQuantity: '',
                            goodsPrice: '',
                            isDiscountLine: true,
                            notDiscount: false
                        }));
                    } // 折扣率


                    if (discountType === 'rate') {
                        for (var _i = discountList.length; _i--;) {
                            var tmpObj = discountList[_i];
                            var tp = this.minToPlus(tmpObj.goodsTotalPrice.multiply(discountValue).division(100));
                            var noTaxTotalPrice = void 0;

                            if (+this.priceTaxMark) {
                                noTaxTotalPrice = tp.division(tmpObj.goodsTaxRate.add(1));
                            } else {
                                noTaxTotalPrice = tp;
                            }

                            var tt = this.minToPlus(noTaxTotalPrice.multiply(tmpObj.goodsTaxRate)); // console.log(tp, tt)

                            tmpObj.goodsTotalPrice = +tp ? '-' + tp : '0.00';
                            tmpObj.goodsTotalTax = +tt ? '-' + tt : '0.00';
                        }
                    } else {
                        // 折扣金额
                        for (var _i2 = discountList.length; _i2--;) {
                            var _tmpObj = discountList[_i2]; // 折扣金额/被折扣总金额*当前被折扣行的金额 ，被折扣金额保留两位小数。再用（原始金额-被折扣金额）*税率，计算出税额，税额留两位小数后如果小于0.01，则该行不进行折扣

                            var _tp = (+_tmpObj.goodsTotalPrice).division(discountNum).multiply(discountValue);

                            var _noTaxTotalPrice = void 0;

                            if (+this.priceTaxMark) {
                                _noTaxTotalPrice = _tp.division(_tmpObj.goodsTaxRate.add(1));
                            } else {
                                _noTaxTotalPrice = _tp;
                            }

                            var _tt = this.minToPlus(_noTaxTotalPrice.multiply(+_tmpObj.goodsTaxRate)); // console.log(tt)


                            _tmpObj.goodsTotalPrice = '-' + this.minToPlus(_tp); // console.log(tt, +this.minToPlus(tt))

                            if (+_tt >= 0.01 || +_tmpObj.goodsTaxRate === 0) {
                                if (+_tmpObj.goodsTaxRate === 0) {
                                    _tmpObj.goodsTotalTax = '0.00';
                                } else {
                                    _tmpObj.goodsTotalTax = '-' + this.minToPlus(_tt);
                                }
                            } else {
                                _tmpObj.notDiscount = true; // tmpObj.goodsTotalPrice = '0.00'

                                _tmpObj.goodsTotalTax = '0.00';
                            } // console.log(tmpObj.goodsTotalPrice, tmpObj.goodsTotalTax)

                        } // 折扣税额小于0.01的行


                        var notDis = discountList.filter(function (item) {
                            return item.notDiscount;
                        }); // 折扣税额大于0.01的行

                        var hasDis = discountList.filter(function (item) {
                            return !item.notDiscount;
                        }); // 折扣税额大于0.01的行金额总和

                        var hasDisTP = hasDis.reduce(function (total, item) {
                            var numValue = parseFloat(item.goodsTotalPrice);

                            if (Number.isNaN(numValue)) {
                                return total;
                            }

                            return total.add(numValue);
                        }, 0.00); // 折扣税额小于0.01的行金额总和
                        // const notDisTP = notDis.reduce((total, item) => {
                        //     let numValue = parseFloat(item.goodsTotalPrice)
                        //     if (Number.isNaN(numValue)) {
                        //         return total
                        //     }
                        //     return total + numValue
                        // }, 0.00)

                        if (hasDis.length === 0) {
                            this.$Message.warning('请输入有效的折扣金额');
                            return false;
                        }

                        if (notDis.length > 0) {
                            var hasObj = hasDis[hasDis.length - 1];

                            var _tp2 = this.minToPlus(discountValue.add(hasDisTP).subtract(hasObj.goodsTotalPrice)); // + notDisTP


                            var _noTaxTotalPrice2;

                            hasObj.goodsTotalPrice = +_tp2 ? '-' + _tp2 : '0.00';

                            if (+this.priceTaxMark) {
                                _noTaxTotalPrice2 = _tp2.division(hasObj.goodsTaxRate.add(1));
                            } else {
                                _noTaxTotalPrice2 = _tp2;
                            }

                            var tax = this.minToPlus(_noTaxTotalPrice2.multiply(hasObj.goodsTaxRate));
                            hasObj.goodsTotalTax = +tax ? '-' + tax : '0.00';
                        } else {
                            var _hasObj = hasDis[hasDis.length - 1]; // console.log(hasObj,hasObj.goodsTotalPrice, +hasObj.goodsTotalPrice)

                            var lastPrice = -_hasObj.goodsTotalPrice;

                            var _tp3 = this.minToPlus(discountValue.add(hasDisTP).add(lastPrice));

                            var _noTaxTotalPrice3;

                            _hasObj.goodsTotalPrice = +_tp3 ? '-' + _tp3 : '0.00';

                            if (+this.priceTaxMark) {
                                _noTaxTotalPrice3 = _tp3.division(_hasObj.goodsTaxRate.add(1));
                            } else {
                                _noTaxTotalPrice3 = _tp3;
                            }

                            var _tax = this.minToPlus(_noTaxTotalPrice3.multiply(_hasObj.goodsTaxRate));

                            _hasObj.goodsTotalTax = +_tax ? '-' + _tax : '0.00';
                        }
                    }

                    return discountList;
                },
                updateItemData: function updateItemData(data) {
                    var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.currentIndex;

                    if (index < 0) {
                        index = 0;
                    }

                    var targetRef = this.$refs.items[index]; // TODO 编辑的时候 这里取不到值

                    if (targetRef) {
                        targetRef.updateItemData(data);
                    }
                },
                minToPlus: function minToPlus(val) {
                    val = Number(val);

                    if (val < 0) {
                        return Object(numberUtil["d" /* toKeepFixed2 */])(-val);
                    } else {
                        return Object(numberUtil["d" /* toKeepFixed2 */])(val);
                    }
                },
                // 切换含税不含税 误差解决
                reComputed: function reComputed(item, flag, index) {
                    // 负票 和 负票并且差额 和 复制开票 初次不重新计算
                    var n = this.isNegative;
                    var ce = this.showCommonCopyEdit; // let falge = n && this.taxationMethod === '2'
                    // let copy = this.showCommonCopyEdit && !this.isOpenReComputed

                    var goodsTotalPrice = 0; // 如果 原始数量*不含税单价 和 不含税金额 的误差大于一分 重新 计算 数量=不含税金额/不含税单价

                    var price, // 切换含税 重新计算单价
                        prevTotal; // 原始数量*不含税单价
                    // 负票 和 负票并且差额 和 复制开票 不重新计算

                    if ((n || ce) && !this.isOpenReComputed) {
                        goodsTotalPrice = Object(numberUtil["d" /* toKeepFixed2 */])(item.goodsTotalPrice);
                        price = +item.goodsPrice + '';
                    } else {
                        if (+item.goodsTotalPrice) {
                            // 税率不为零
                            if (+item.goodsTotalTax) {
                                if (flag === '1') {
                                    goodsTotalPrice = Object(numberUtil["d" /* toKeepFixed2 */])(item.goodsTotalPrice.add(item.goodsTotalTax));
                                } else {
                                    goodsTotalPrice = Object(numberUtil["d" /* toKeepFixed2 */])(item.goodsTotalPrice.subtract(item.goodsTotalTax));
                                }
                            } else {
                                // 零税率
                                goodsTotalPrice = Object(numberUtil["d" /* toKeepFixed2 */])(item.goodsTotalPrice);
                            }
                        }

                        if (+item.goodsQuantity) {
                            price = goodsTotalPrice.division(item.goodsQuantity);
                            price = this.reDishServer(price);
                            prevTotal = price.multiply(item.goodsQuantity); // console.log(price, prevTotal, item.goodsTotalPrice);

                            if (Math.abs(prevTotal.subtract(goodsTotalPrice)) > 0.01) {
                                item.goodsQuantity = this.reDishServer(item.goodsTotalPrice.division(price));
                            }
                        } else if (+item.goodsPrice && +item.goodsTaxRate) {
                            if (flag === '1') {
                                price = item.goodsPrice.multiply(item.goodsTaxRate.add(1));
                            } else {
                                price = item.goodsPrice.division(item.goodsTaxRate.add(1));
                            }

                            price = this.reDishServer(price);
                        } else {
                        }
                    }

                    price = this.isOpenReComputed ? price : +item.goodsPrice;
                    this.updateItemData({
                        goodsTotalPrice: goodsTotalPrice || '',
                        goodsPrice: price || '',
                        goodsTotalTax: item.goodsTotalTax,
                        goodsQuantity: item.goodsQuantity ? item.goodsQuantity : ''
                    }, index);
                },
                // 服务器 盘
                reDishServer: function reDishServer(val) {
                    if (+val < 0) {
                        val = -val + '';
                    } else {
                        val = val + '';
                    } // if (this.isDishOrServer === 'server') {


                    return Object(numberUtil["c" /* toKeepFixed13 */])(val, this.isRoll); // } else if (this.isDishOrServer === 'dish') {
                    // return toKeepFixed6(val, this.isRoll)
                    // } else { }
                }
            },
            computed: {
                isShowListText: function isShowListText() {
                    if (this.isDishOrServerTerminal === 'server') {
                        return this.invoiceListMark === '1';
                    } else {
                        return this.invoiceListMark === '1' && !this.isNegative;
                    }
                },
                invoiceId: function invoiceId() {
                    return this.$store.state.invoiceEdit.currentData.id || '';
                },
                unique: function unique() {
                    return '' + Date.now();
                },
                withTax: function withTax() {
                    return !!+this.priceTaxMark;
                },
                totalAmount: function totalAmount() {
                    return this.detailList.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalPrice);

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);
                },
                totalTax: function totalTax() {
                    return this.detailList.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalTax);

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);
                },
                // 合计金额
                totalAmountText: function totalAmountText() {
                    var total = 0;

                    if (this.withTax) {
                        total = this.totalAmount.subtract(this.totalTax);
                    } else {
                        total = this.totalAmount;
                    }

                    if (total) {
                        if (this.isNegative) {
                            total = total.multiply(-1);
                            return '-' + Object(numberUtil["d" /* toKeepFixed2 */])(total);
                        } else {
                            return Object(numberUtil["d" /* toKeepFixed2 */])(total);
                        }
                    } else {
                        return '0.00';
                    }
                },
                // 合计税额
                totalTaxText: function totalTaxText() {
                    var total = this.totalTax;

                    if (total) {
                        if (this.isNegative) {
                            total = total.multiply(-1);
                            return '-' + Object(numberUtil["d" /* toKeepFixed2 */])(total);
                        } else {
                            return Object(numberUtil["d" /* toKeepFixed2 */])(total);
                        }
                    } else {
                        return '0.00';
                    }
                },
                // 小写
                totalLowerText: function totalLowerText() {
                    var total = 0;

                    if (this.withTax) {
                        total = this.totalAmount;
                    } else {
                        total = this.totalAmount.add(this.totalTax);
                    }

                    if (total) {
                        if (this.isNegative) {
                            total = total.multiply(-1);
                            return '-' + Object(numberUtil["d" /* toKeepFixed2 */])(total);
                        } else {
                            return Object(numberUtil["d" /* toKeepFixed2 */])(total);
                        }
                    } else {
                        return '0.00';
                    }
                },
                discountLines: function discountLines() {
                    return this.detailList.filter(function (item) {
                        return item.isDiscountLine;
                    });
                },
                // 折扣金额合计
                discountTotalAmount: function discountTotalAmount() {
                    var total = this.discountLines.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalPrice); // console.log(numValue)

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);

                    if (total) {
                        return '-' + Object(numberUtil["d" /* toKeepFixed2 */])(total.multiply(-1));
                    } else {
                        return '0.00';
                    }
                },
                // 折扣税额合计
                discountTotalTax: function discountTotalTax() {
                    var total = this.discountLines.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalTax);

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);

                    if (total) {
                        return '-' + Object(numberUtil["d" /* toKeepFixed2 */])(total * -1);
                    } else {
                        return '0.00';
                    }
                },
                isShowNegative: function isShowNegative() {
                    return this.isNegative ? !!this.showCommonNeigativeNext : true;
                },
                isNegativeListMark: function isNegativeListMark() {
                    // 清单 负票  回传  非清单  只能添加8行
                    return this.isNegative && this.isDishOrServerTerminal === 'dish'; // return this.isNegative && this.invoiceListMark === '1'
                },
                isRoll: function isRoll() {
                    return this.invoiceTypeCode === '025';
                }
            },
            watch: {
                detailList: {
                    deep: true,
                    handler: function handler(val, oldVal) {
                        if (val.length !== oldVal.length) {
                            this.withScroll = this.detailList.length > 6;
                        }
                    }
                },
                priceTaxMark: function priceTaxMark(newValue, oldValue) {
                    var _this = this;

                    // goodsName,goodsSpecification,goodsUnit,goodsQuantity,goodsPrice,goodsTotalPrice,goodsTotalTax,goodsTaxRate
                    var dataList = this.detailList; // const self = this
                    // 切成含税

                    if (newValue === '1') {
                        // 金额改为原金额和税额的和
                        // 单价改为原单价+原单价*税率
                        // 折扣行的金额列改为原折扣金额和税额的和
                        dataList.forEach(function (item, index) {
                            Object.assign(item, _this.reComputed(item, '1', index));
                        });
                    } else {
                        // 金额改为原金额和税额的差
                        // 单价改为原单价+原单价*税率
                        // 折扣行的金额列改为原折扣金额和税额的和
                        dataList.forEach(function (item, index) {
                            Object.assign(item, _this.reComputed(item, '0', index));
                        });
                    }
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContent.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_InvoiceContentvue_type_script_lang_js_ = (InvoiceContentvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContent.vue?vue&type=style&index=0&lang=scss&
        var InvoiceContentvue_type_style_index_0_lang_scss_ = __webpack_require__("Fwjp");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContent.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_InvoiceContentvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var InvoiceContent = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "7Vz8":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "7hrd":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/addBussiness.vue?vue&type=template&id=45c9daf0&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', [(_vm.modalStatus == 'common') ? _c('Modal', {
                attrs: {
                    "width": "700",
                    "mask-closable": false,
                    "title": "Common Modal dialog box title"
                },
                on: {"on-cancel": _vm.cancle, "on-visible-change": _vm.changeStatus},
                model: {
                    value: (_vm.showX), callback: function ($$v) {
                        _vm.showX = $$v
                    }, expression: "showX"
                }
            }, [_c('p', {
                attrs: {"slot": "header"},
                slot: "header"
            }, [(_vm.addStatus === 'add') ? _c('span', [_vm._v("商品添加")]) : _vm._e(), _vm._v(" "), (!_vm.disabled && _vm.addStatus === 'update') ? _c('span', [_vm._v("商品编辑")]) : _vm._e(), _vm._v(" "), (_vm.disabled && _vm.addStatus === 'update') ? _c('span', [_vm._v("商品查看")]) : _vm._e()]), _vm._v(" "), _c('Form', {
                attrs: {
                    "model": _vm.taxGoodsCode,
                    "label-width": 120
                }
            }, [_c('Row', [_c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "税收商品编码",
                    "prop": "goodsCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": true},
                model: {
                    value: (_vm.taxGoodsCode.goodsCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsCode", $$v)
                    }, expression: "taxGoodsCode.goodsCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品名称",
                    "prop": "goodsName"
                }
            }, [(_vm.addStatus === 'add') ? _c('Input', {
                on: {"on-change": _vm.pinyinchange},
                model: {
                    value: (_vm.taxGoodsCode.goodsName), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsName", $$v)
                    }, expression: "taxGoodsCode.goodsName"
                }
            }) : _vm._e(), _vm._v(" "), (_vm.addStatus === 'update') ? _c('Input', {
                attrs: {"disabled": _vm.disabled || _vm.taxGoodsCode.goodsCode.length == 19},
                on: {"on-change": _vm.pinyinchange},
                model: {
                    value: (_vm.taxGoodsCode.goodsName), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsName", $$v)
                    }, expression: "taxGoodsCode.goodsName"
                }
            }) : _vm._e()], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "税收分类简称",
                    "prop": "goodsSimpleName"
                }
            }, [_c('Input', {
                attrs: {"disabled": true},
                model: {
                    value: (_vm.taxGoodsCode.goodsSimpleName), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsSimpleName", $$v)
                    }, expression: "taxGoodsCode.goodsSimpleName"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "系统编码",
                    "prop": "systemCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": true}, model: {
                    value: (_vm.systemCode), callback: function ($$v) {
                        _vm.systemCode = $$v
                    }, expression: "systemCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品编码",
                    "prop": "customGoodsCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.customGoodsCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "customGoodsCode", $$v)
                    }, expression: "taxGoodsCode.customGoodsCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品分类",
                    "prop": "classificationCode"
                }
            }, [_c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": "", "disabled": _vm.disabled},
                on: {
                    "on-change": function (val) {
                        _vm.taxGoodsCode.classificationCode = val
                    }
                },
                model: {
                    value: (_vm.taxGoodsCode.classificationCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "classificationCode", $$v)
                    }, expression: "taxGoodsCode.classificationCode"
                }
            }, _vm._l((_vm.classificationNameList), function (item) {
                return _c('Option', {key: item.value, attrs: {"value": item.value}}, [_vm._v(_vm._s(item.label))])
            }), 1)], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "说明",
                    "prop": "illustrate"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled, "type": "textarea", "rows": 10},
                model: {
                    value: (_vm.taxGoodsCode.illustrate), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "illustrate", $$v)
                    }, expression: "taxGoodsCode.illustrate"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品简码",
                    "prop": "simpleCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.simpleCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "simpleCode", $$v)
                    }, expression: "taxGoodsCode.simpleCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "规格型号",
                    "prop": "goodsSpecification"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.goodsSpecification), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsSpecification", $$v)
                    }, expression: "taxGoodsCode.goodsSpecification"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "计量单位",
                    "prop": "goodsUnit"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.goodsUnit), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsUnit", $$v)
                    }, expression: "taxGoodsCode.goodsUnit"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "单价",
                    "prop": "goodsPrice"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.goodsPrice), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsPrice", $$v)
                    }, expression: "taxGoodsCode.goodsPrice"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "是否使用优惠政策",
                    "prop": "useDiscount"
                }
            }, [(_vm.addStatus != 'show') ? _c('Checkbox', {
                attrs: {"disabled": _vm.disabled || _vm.sixGoods},
                on: {"on-change": _vm.useDiscountChange},
                model: {
                    value: (_vm.taxGoodsCode.useDiscount), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "useDiscount", $$v)
                    }, expression: "taxGoodsCode.useDiscount"
                }
            }) : _c('Checkbox', {
                attrs: {"disabled": _vm.addStatus == 'show'},
                on: {"on-change": _vm.useDiscountChange},
                model: {
                    value: (_vm.taxGoodsCode.useDiscount), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "useDiscount", $$v)
                    }, expression: "taxGoodsCode.useDiscount"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "优惠政策类型",
                    "prop": "discountType"
                }
            }, [(_vm.taxGoodsCode.useDiscount) ? _c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": false, "disabled": _vm.disabled || _vm.sixGoods},
                on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.discountType = e
                    }
                },
                model: {
                    value: (_vm.taxGoodsCode.discountType), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "discountType", $$v)
                    }, expression: "taxGoodsCode.discountType"
                }
            }, _vm._l((_vm.preferentialWrap), function (item) {
                return _c('Option', {
                    key: item.value,
                    attrs: {"value": item.value}
                }, [_vm._v(_vm._s(item.label) + "\n            ")])
            }), 1) : _vm._e(), _vm._v(" "), (!_vm.taxGoodsCode.useDiscount) ? _c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": false, "disabled": true},
                on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.discountType = e
                    }
                },
                model: {
                    value: (_vm.taxGoodsCode.discountType), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "discountType", $$v)
                    }, expression: "taxGoodsCode.discountType"
                }
            }, _vm._l((_vm.preferentialWrap), function (item) {
                return _c('Option', {
                    key: item.value,
                    attrs: {"value": item.value}
                }, [_vm._v(_vm._s(item.label) + "\n            ")])
            }), 1) : _vm._e()], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "税率",
                    "prop": "rate"
                }
            }, [_c('Select', {
                staticClass: "ivu-select",
                attrs: {
                    "clearable": false,
                    "disabled": _vm.disabled || _vm.rateChange || _vm.sixGoods,
                    "value": _vm.taxGoodsCode.rate
                },
                on: {"on-change": _vm.taxGoodsCodeRateChange},
                model: {
                    value: (_vm.taxGoodsCode.rate), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "rate", $$v)
                    }, expression: "taxGoodsCode.rate"
                }
            }, _vm._l((_vm.rateWrap), function (item) {
                return _c('Option', {key: item.value, attrs: {"value": item.value}}, [_vm._v(_vm._s(item.label))])
            }), 1)], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "免税类型",
                    "prop": "freeType"
                }
            }, [_c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": false, "disabled": _vm.disabled || _vm.sixGoods || _vm.flag},
                on: {"on-change": _vm.changeFreeType},
                model: {
                    value: (_vm.taxGoodsCode.freeType), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "freeType", $$v)
                    }, expression: "taxGoodsCode.freeType"
                }
            }, _vm._l((_vm.freeTypeWrap), function (item) {
                return _c('Option', {key: item.value, attrs: {"value": item.value}}, [_vm._v(_vm._s(item.label))])
            }), 1)], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "含税标志",
                    "prop": "priceTaxMark"
                }
            }, [_c('Checkbox', {
                attrs: {"disabled": _vm.disabled || _vm.flag}, on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.priceTaxMark = e
                    }
                }, model: {
                    value: (_vm.taxGoodsCode.priceTaxMark), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "priceTaxMark", $$v)
                    }, expression: "taxGoodsCode.priceTaxMark"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "云打印商品",
                    "prop": "bwPrintGoods"
                }
            }, [_c('Checkbox', {
                attrs: {"disabled": _vm.disabled}, on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.bwPrintGoods = e
                    }
                }, model: {
                    value: (_vm.taxGoodsCode.bwPrintGoods), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "bwPrintGoods", $$v)
                    }, expression: "taxGoodsCode.bwPrintGoods"
                }
            })], 1)], 1)], 1)], 1), _vm._v(" "), _c('div', {
                attrs: {"slot": "footer"},
                slot: "footer"
            }, [_c('Button', {
                attrs: {"type": "text"}, on: {
                    "click": function ($event) {
                        return _vm.cancle(1)
                    }
                }
            }, [_vm._v("取消")]), _vm._v(" "), _c('Button', {
                attrs: {"type": "primary"}, on: {
                    "click": function ($event) {
                        return _vm.cancle(2)
                    }
                }
            }, [_vm._v("确定")])], 1)], 1) : _vm._e(), _vm._v(" "), (_vm.modalStatus == 'modal') ? _c('div', {staticClass: " clearfix "}, [_c('Form', {
                attrs: {
                    "model": _vm.taxGoodsCode,
                    "label-width": 120
                }
            }, [_c('Row', [_c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "税收商品编码",
                    "prop": "goodsCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": true},
                model: {
                    value: (_vm.taxGoodsCode.goodsCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsCode", $$v)
                    }, expression: "taxGoodsCode.goodsCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品名称",
                    "prop": "goodsName"
                }
            }, [(_vm.addStatus === 'add') ? _c('Input', {
                attrs: {"disabled": _vm.disabled},
                on: {"on-change": _vm.pinyinchange},
                model: {
                    value: (_vm.taxGoodsCode.goodsName), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsName", $$v)
                    }, expression: "taxGoodsCode.goodsName"
                }
            }) : _vm._e(), _vm._v(" "), (_vm.addStatus === 'update') ? _c('Input', {
                attrs: {"disabled": _vm.taxGoodsCode.goodsCode.length == 19},
                on: {"on-change": _vm.pinyinchange},
                model: {
                    value: (_vm.taxGoodsCode.goodsName), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsName", $$v)
                    }, expression: "taxGoodsCode.goodsName"
                }
            }) : _vm._e()], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "税收分类简称",
                    "prop": "goodsSimpleName"
                }
            }, [_c('Input', {
                attrs: {"disabled": true},
                model: {
                    value: (_vm.taxGoodsCode.goodsSimpleName), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsSimpleName", $$v)
                    }, expression: "taxGoodsCode.goodsSimpleName"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "系统编码",
                    "prop": "systemCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": true}, model: {
                    value: (_vm.systemCode), callback: function ($$v) {
                        _vm.systemCode = $$v
                    }, expression: "systemCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品编码",
                    "prop": "customGoodsCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.customGoodsCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "customGoodsCode", $$v)
                    }, expression: "taxGoodsCode.customGoodsCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品分类",
                    "prop": "classificationCode"
                }
            }, [_c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": "", "disabled": _vm.disabled},
                on: {
                    "on-change": function (val) {
                        _vm.taxGoodsCode.classificationCode = val
                    }
                },
                model: {
                    value: (_vm.taxGoodsCode.classificationCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "classificationCode", $$v)
                    }, expression: "taxGoodsCode.classificationCode"
                }
            }, _vm._l((_vm.classificationNameList), function (item) {
                return _c('Option', {key: item.value, attrs: {"value": item.value}}, [_vm._v(_vm._s(item.label))])
            }), 1)], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "说明",
                    "prop": "illustrate"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled, "type": "textarea"},
                model: {
                    value: (_vm.taxGoodsCode.illustrate), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "illustrate", $$v)
                    }, expression: "taxGoodsCode.illustrate"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "商品简码",
                    "prop": "simpleCode"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.simpleCode), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "simpleCode", $$v)
                    }, expression: "taxGoodsCode.simpleCode"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "规格型号",
                    "prop": "goodsSpecification"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.goodsSpecification), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsSpecification", $$v)
                    }, expression: "taxGoodsCode.goodsSpecification"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "计量单位",
                    "prop": "goodsUnit"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.goodsUnit), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsUnit", $$v)
                    }, expression: "taxGoodsCode.goodsUnit"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "单价",
                    "prop": "goodsPrice"
                }
            }, [_c('Input', {
                attrs: {"disabled": _vm.disabled},
                model: {
                    value: (_vm.taxGoodsCode.goodsPrice), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "goodsPrice", $$v)
                    }, expression: "taxGoodsCode.goodsPrice"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "是否使用优惠政策",
                    "prop": "useDiscount"
                }
            }, [(_vm.addStatus != 'show') ? _c('Checkbox', {
                attrs: {"disabled": _vm.disabled || _vm.sixGoods},
                on: {"on-change": _vm.useDiscountChange},
                model: {
                    value: (_vm.taxGoodsCode.useDiscount), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "useDiscount", $$v)
                    }, expression: "taxGoodsCode.useDiscount"
                }
            }) : _c('Checkbox', {
                attrs: {"disabled": _vm.addStatus == 'show'},
                on: {"on-change": _vm.useDiscountChange},
                model: {
                    value: (_vm.taxGoodsCode.useDiscount), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "useDiscount", $$v)
                    }, expression: "taxGoodsCode.useDiscount"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "优惠政策类型",
                    "prop": "discountType"
                }
            }, [(_vm.taxGoodsCode.useDiscount) ? _c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": false, "disabled": _vm.disabled || _vm.sixGoods},
                on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.discountType = e
                    }
                },
                model: {
                    value: (_vm.taxGoodsCode.discountType), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "discountType", $$v)
                    }, expression: "taxGoodsCode.discountType"
                }
            }, _vm._l((_vm.preferentialWrap), function (item) {
                return _c('Option', {
                    key: item.value,
                    attrs: {"value": item.value}
                }, [_vm._v(_vm._s(item.label) + "\n            ")])
            }), 1) : _vm._e(), _vm._v(" "), (!_vm.taxGoodsCode.useDiscount) ? _c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": false, "disabled": true},
                on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.discountType = e
                    }
                },
                model: {
                    value: (_vm.taxGoodsCode.discountType), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "discountType", $$v)
                    }, expression: "taxGoodsCode.discountType"
                }
            }, _vm._l((_vm.preferentialWrap), function (item) {
                return _c('Option', {
                    key: item.value,
                    attrs: {"value": item.value}
                }, [_vm._v(_vm._s(item.label) + "\n            ")])
            }), 1) : _vm._e()], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "税率",
                    "prop": "rate"
                }
            }, [_c('Select', {
                staticClass: "ivu-select",
                attrs: {
                    "clearable": false,
                    "disabled": _vm.disabled || _vm.rateChange || _vm.sixGoods,
                    "value": _vm.taxGoodsCode.rate
                },
                on: {"on-change": _vm.taxGoodsCodeRateChange},
                model: {
                    value: (_vm.taxGoodsCode.rate), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "rate", $$v)
                    }, expression: "taxGoodsCode.rate"
                }
            }, _vm._l((_vm.rateWrap), function (item) {
                return _c('Option', {key: item.value, attrs: {"value": item.value}}, [_vm._v(_vm._s(item.label))])
            }), 1)], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "免税类型",
                    "prop": "freeType"
                }
            }, [_c('Select', {
                staticClass: "ivu-select",
                attrs: {"clearable": false, "disabled": _vm.disabled || _vm.sixGoods || _vm.flag},
                on: {"on-change": _vm.changeFreeType},
                model: {
                    value: (_vm.taxGoodsCode.freeType), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "freeType", $$v)
                    }, expression: "taxGoodsCode.freeType"
                }
            }, _vm._l((_vm.freeTypeWrap), function (item) {
                return _c('Option', {key: item.value, attrs: {"value": item.value}}, [_vm._v(_vm._s(item.label))])
            }), 1)], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "含税标志",
                    "prop": "priceTaxMark"
                }
            }, [_c('Checkbox', {
                attrs: {"disabled": _vm.disabled || _vm.flag}, on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.priceTaxMark = e
                    }
                }, model: {
                    value: (_vm.taxGoodsCode.priceTaxMark), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "priceTaxMark", $$v)
                    }, expression: "taxGoodsCode.priceTaxMark"
                }
            })], 1)], 1), _vm._v(" "), _c('Col', {attrs: {"span": "12"}}, [_c('FormItem', {
                attrs: {
                    "label": "云打印商品",
                    "prop": "bwPrintGoods"
                }
            }, [_c('Checkbox', {
                attrs: {"disabled": _vm.disabled}, on: {
                    "on-change": function (e) {
                        _vm.taxGoodsCode.bwPrintGoods = e
                    }
                }, model: {
                    value: (_vm.taxGoodsCode.bwPrintGoods), callback: function ($$v) {
                        _vm.$set(_vm.taxGoodsCode, "bwPrintGoods", $$v)
                    }, expression: "taxGoodsCode.bwPrintGoods"
                }
            })], 1)], 1)], 1)], 1)], 1) : _vm._e()], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/addBussiness.vue?vue&type=template&id=45c9daf0&

// EXTERNAL MODULE: ./src/utils/typeUtil.js
        var typeUtil = __webpack_require__("v7p+");

// EXTERNAL MODULE: ./src/utils/selectUtil.js
        var selectUtil = __webpack_require__("Z1R7");

// EXTERNAL MODULE: ./src/utils/numberUtil.js
        var numberUtil = __webpack_require__("0Jw3");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/CommodityMgmt/addBussiness.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        /* eslint-disable */

// 数组对象去重

        function arrayUnique(arr, name) {
            var hash = {};
            return arr.reduce(function (item, next) {
                hash[next[name]] ? '' : hash[next[name]] = true && item.push(next);
                return item;
            }, []);
        }

        var pinyin = __webpack_require__("2Vgw");

        //getPinyin();

        /* harmony default export */
        var addBussinessvue_type_script_lang_js_ = ({
            name: "model",
            props: {
                addShow: {
                    type: Boolean,
                    default: false
                },
                modalStatus: {
                    type: String,
                    default: 'common'
                },
                addBussinessParams: {
                    type: Object,
                    default: function _default() {
                    }
                },
                addStatus: {
                    type: String,
                    default: ''
                },
                disabled: {
                    type: Boolean,
                    default: false
                }
            },
            data: function data() {
                return {
                    showX: false,
                    ifWatch: false,
                    modalFirstStatus: false,
                    systemCode: '',
                    ifUpdate: false,
                    watch: false,
                    flag: false,
                    rateChange: false,
                    sixGoods: false,
                    //60商品税率，优惠政策禁止编辑
                    taxGoodsCode: {
                        classificationName: '',
                        useDiscount: false,
                        //是否使用优惠政策
                        priceTaxMark: false,
                        //含税标志
                        bwPrintGoods: false,
                        //云打印商品
                        goodsSimpleName: '',
                        goodsCode: '',
                        goodsName: '',
                        //商品名称
                        illustrate: '',
                        //说明
                        simpleCode: '',
                        //商品简码
                        goodsSpecification: '',
                        //规格型号
                        goodsUnit: '',
                        //	计量单位
                        goodsPrice: '',
                        //单价
                        rate: '',
                        discountType: '',
                        //优惠政策类型
                        freeType: '' //免税类型

                    },
                    preferentialWrap: [],
                    preferentialWrapArr: [],
                    rateWrap: [{
                        value: "0.1",
                        label: "10%"
                    }, {
                        value: "0.03",
                        label: "3%"
                    }, {
                        value: "0",
                        label: "0%"
                    }],
                    freeTypeWrap: [{
                        value: "0",
                        label: "正常税率"
                    }, {
                        value: "1",
                        label: "出口免税或其他免税优惠政策"
                    }, {
                        value: "2",
                        label: "不征增值税"
                    }, {
                        value: "3",
                        label: "普通零税率"
                    }],
                    classificationNameList: []
                };
            },
            methods: {
                changeFreeType: function changeFreeType(e) {
                    console.log('e', e);
                    this.taxGoodsCode.freeType = e;
                },
                getGoodsClassifyList: function getGoodsClassifyList() {
                    var _this = this;

                    this.http.outPost('/api/goodsCode/initGoodsClassiftList', {
                        privateFlag: Object(selectUtil["b" /* generatePrivateFlage */])()
                    }, function (res) {
                        var _data = res.data.results;

                        var data = _data.map(function (item) {
                            return _objectSpread({}, item, {
                                label: item.classificationName,
                                value: item.classificationCode
                            });
                        });

                        _this.classificationNameList = data;
                    });
                },
                pinyinchange: function pinyinchange() {
                    var parms = this.taxGoodsCode.goodsName;

                    if (!/^[\u4e00-\u9fa5]+$/.test(parms)) {
                        if (/^[0-9a-zA-Z\u4e00-\u9fa5]+/.test(parms)) {
                            parms = parms.slice(0, 1);
                        }
                    }

                    var arr = pinyin(parms, {
                        style: pinyin.STYLE_FIRST_LETTER // 设置拼音风格
                        // heteronym: true

                    });
                    var str = arr.join('').toUpperCase();
                    this.taxGoodsCode.simpleCode = str;
                },
                changeStatus: function changeStatus(params) {
                    if (!params) {
                        this.ifWatch = false;
                        this.$emit('close');
                    }
                },
                cancle: function cancle(status) {
                    var _this2 = this;

                    this.ifWatch = false;

                    if (status === 1) {
                        this.ifWatch = false;

                        if (this.disabled) {
                            this.$emit('showChange');
                            return;
                        }

                        this.$emit('close');
                        return false;
                    }

                    if (status === 2) {
                        this.ifWatch = false;

                        if (this.disabled) {
                            this.$emit('showChange');
                            return;
                        }

                        var url = '/api/taxGoodsCode/add';

                        if (this.addStatus == 'add') {
                            url = '/api/taxGoodsCode/add';
                        }

                        if (this.addStatus == 'update') {
                            url = '/api/taxGoodsCode/edit';
                        }

                        var rateWrapFlag = 0;
                        this.rateWrap.forEach(function (item) {
                            if (item.value === _this2.taxGoodsCode.rate) {
                                rateWrapFlag = 1;
                            }
                        });

                        if (rateWrapFlag === 0) {
                            this.taxGoodsCode.rate = '';
                        }

                        if (this.checked()) {
                            var params = _objectSpread({}, this.taxGoodsCode);

                            params.rate = this.taxGoodsCode.rate;

                            for (var key in params) {
                                if (params[key] === true || params[key] === "是") {
                                    params[key] = 'Y';
                                }

                                if (params[key] === false || params[key] === "否") {
                                    params[key] = 'N';
                                }
                            }

                            if (/%/i.test(params.rate)) {
                                var str = params.rate.slice(0, params.rate.length - 1);
                                str = parseFloat(str) / 100;
                                params.rate = JSON.stringify(str);
                            }

                            var ajaxDate = {};
                            ajaxDate.goodsCode = params.goodsCode + this.systemCode;
                            ajaxDate.goodsName = params.goodsName;
                            ajaxDate.classificationCode = params.classificationCode;
                            ajaxDate.illustrate = params.illustrate;
                            ajaxDate.simpleCode = params.simpleCode;
                            ajaxDate.goodsSpecification = params.goodsSpecification;
                            ajaxDate.goodsUnit = params.goodsUnit;
                            ajaxDate.goodsPrice = Object(numberUtil["a" /* convertToNormal */])(params.goodsPrice);
                            ajaxDate.useDiscount = params.useDiscount;
                            ajaxDate.discountType = params.discountType;
                            ajaxDate.rate = params.rate;
                            ajaxDate.freeType = params.freeType;
                            ajaxDate.priceTaxMark = params.priceTaxMark;
                            ajaxDate.bwPrintGoods = params.bwPrintGoods;
                            ajaxDate.customGoodsCode = params.customGoodsCode;

                            if (ajaxDate.freeType == '0') {
                                ajaxDate.freeType = '';
                            }

                            this.http.outPost(url, ajaxDate, function (resp) {
                                if (resp.success) {
                                    _this2.ifWatch = false;

                                    if (_this2.addStatus == 'add') {
                                        _this2.$emit('change', ajaxDate.goodsCode);
                                    }

                                    if (_this2.modalStatus == 'modal') {
                                        _this2.$emit('modalChange', ajaxDate);

                                        _this2.$Message.success('添加成功');
                                    }

                                    if (_this2.addStatus == 'update') {
                                        _this2.$emit('successchange', params.parentCode);
                                    }
                                }
                            }, function (error) {
                                _this2.showX = true; // if (this.addStatus == 'add') {
                                //     this.$Message.info('添加失败')
                                // } else {
                                //     this.$Message.info('编辑失败')
                                // }
                            });
                        }
                    }
                },
                convert: function convert(params) {
                    for (var key in params) {
                        if (params[key] === true) {
                            params[key] = 'Y';
                        }

                        if (params[key] === false) {
                            params[key] = 'N';
                        }

                        if (typeof params[key] === 'string') {
                            params[key] = params[key].replace(/(^\s*)|(\s*$)/g, '');
                        }
                    }

                    return params;
                },
                taxGoodsCodeRateChange: function taxGoodsCodeRateChange(e) {
                    if (e == '0') {
                        this.rateChange = true;
                        this.taxGoodsCode.freeType = "3";
                        this.taxGoodsCode.priceTaxMark = false;
                    }

                    this.taxGoodsCode.rate = e;
                },
                checked: function checked() {
                    var params = _objectSpread({}, this.taxGoodsCode);

                    params = this.convert(params);

                    if (params.customGoodsCode && !/^[0-9a-zA-Z.\-_]{1,30}$/.test(params.customGoodsCode)) {
                        this.$Message.info('商品编码支持字母，数字，字符 . - _ ，长度30个字符');
                        return false;
                    } // http://chandao.51baiwang.com/zentao/bug-view-692.html


                    if (params.goodsName && typeUtil["a" /* default */].getStrLength(params.goodsSpecification) > 90) {
                        this.$Message.info('商品名称不能超过90字符');
                        return false;
                    }

                    if (!params.goodsCode) {
                        this.$Message.info('商品编码不能为空');
                        return false;
                    }

                    if (!params.goodsName) {
                        this.$Message.info('商品名称不能为空');
                        return false;
                    }

                    if (!params.goodsSimpleName) {
                        this.$Message.info('税收分类简称不能为空');
                        return false;
                    }

                    if (!params.useDiscount) {
                        this.$Message.info('使用优惠政策不能为空');
                        return false;
                    }

                    if (!params.rate) {
                        this.$Message.info('税率不能为空');
                        return false;
                    }

                    if (!params.freeType) {
                        this.$Message.info('免税类型不能为空');
                        return false;
                    }

                    if (!params.priceTaxMark) {
                        this.$Message.info('含税标志不能为空');
                        return false;
                    }

                    if (!params.bwPrintGoods) {
                        this.$Message.info('云打印商品不能为空');
                        return false;
                    }

                    if (params.useDiscount != 'N' && params.discountType == '') {
                        this.$Message.info('使用优惠政策不能为空');
                        return false;
                    }

                    if (typeUtil["a" /* default */].validateNoSpaceSpecial(params.goodsSpecification) || typeUtil["a" /* default */].getStrLength(params.goodsSpecification) > 40) {
                        this.$Message.info('规格型号:字段长度介于0-40位之间并且不含特殊字符');
                        return false;
                    }

                    if (params.goodsPrice && params.goodsPrice != 'null') {
                        if (!this.checkJs.numRegCheck(params.goodsPrice)) {
                            this.$Message.info('单价:单价只能输入数字、小数');
                            return false;
                        }

                        if (!this.checkJs.checkNum(Object(numberUtil["a" /* convertToNormal */])(params.goodsPrice), 0, 13)) {
                            this.$Message.info('单价含小数点最多只可输入13位');
                            return false;
                        }
                    }

                    return true;
                },
                getpreferentialPolicies: function getpreferentialPolicies() {
                    var _this3 = this;

                    var params = {};
                    this.preferentialWrap = [];
                    this.preferentialWrapArr = [];
                    return new Promise(function (resolve, reject) {
                        _this3.http.outPost("/api/taxGoodsCode/preferentialPolicies", params, function (resp) {
                            if (resp.success) {
                                var data = resp.data.results;
                                _this3.preferentialWrapArr = data;
                                var arr = [];
                                data.forEach(function (item) {
                                    var obj = {};
                                    obj['value'] = item.preferentialPolicyName;
                                    obj['label'] = item.preferentialPolicyName;

                                    _this3.preferentialWrap.push(obj);
                                });
                                resolve();
                            }
                        }, function (error) {
                        });
                    });
                },
                //是否使用优惠政策
                useDiscountChange: function useDiscountChange(e) {
                    if (e) {
                        this.getpreferentialPolicies();
                    } else {
                        //不使用时清空
                        this.preferentialWrap = [];
                        this.taxGoodsCode.discountType = ''; //  this.taxGoodsCode.preferentialPolicyName = ''
                    }
                },
                deletMsg: function deletMsg() {
                    var taxGoodsCode = _objectSpread({}, this.taxGoodsCode);

                    for (var key in taxGoodsCode) {
                        taxGoodsCode[key] === '';
                    }

                    this.taxGoodsCode = taxGoodsCode;
                }
            },
            watch: {
                'taxGoodsCode.rate': {
                    handler: function handler(data) {
                        var _this4 = this;

                        if (this.ifWatch && !this.sixGoods && !this.ifUpdate) {
                            if (this.watch) {
                                setTimeout(function () {
                                    _this4.taxGoodsCode.freeType = "0";
                                    _this4.taxGoodsCode.rate = '0.1';
                                    _this4.watch = false;
                                }, 700);
                                return false;
                            }

                            if (!this.watch && !this.modalFirstStatus) {
                                if (data == "0.015") {
                                    this.rateChange = true;
                                    this.flag = true;
                                    this.taxGoodsCode.priceTaxMark = true;
                                    this.taxGoodsCode.freeType = "0";
                                }

                                if (data == "0") {
                                    this.rateChange = true;
                                    this.taxGoodsCode.priceTaxMark = false;
                                }

                                if (data != '0' && data != '' && data != '0.015') {
                                    this.taxGoodsCode.priceTaxMark = false;
                                }

                                if (data == '') {
                                    this.rateChange = false;
                                    this.taxGoodsCode.priceTaxMark = false;
                                }
                            }
                        }
                    },
                    deep: true
                },
                'taxGoodsCode.discountType': function taxGoodsCodeDiscountType(newVal, oldVal) {
                    var _this5 = this;

                    var rateSave = this.taxGoodsCode.rate;

                    if (this.ifWatch) {
                        if (!this.ifUpdate) {
                            this.taxGoodsCode.rate = '0';
                        }

                        var newArray = [];
                        var usedRate = this.addBussinessParams.usedRate || "10%、3%、0%"; //可以编辑税率

                        var usedRateValue = '';
                        usedRate = usedRate.split("、");
                        this.rateWrap = [];
                        usedRate.forEach(function (item) {
                            var obj = {
                                label: item,
                                value: item.slice(0, item.length - 1) / 100 + ''
                            };

                            _this5.rateWrap.push(obj);
                        }); //  this.rateChange=false

                        this.flag = false;

                        switch (newVal) {
                            case '按5%简易征收':
                                newArray = [{
                                    value: "0.05",
                                    label: "5%"
                                }];
                                this.rateWrap = this.rateWrap.concat(newArray);
                                this.rateWrap = arrayUnique(this.rateWrap, 'value');
                                this.taxGoodsCode.rate = this.rateWrap[0].value || rateSave;
                                break;

                            case '按5%简易征收减按1.5%计征':
                                newArray = [{
                                    value: "0.015",
                                    label: "1.5%"
                                }];
                                this.rateWrap = this.rateWrap.concat(newArray);
                                this.rateWrap = arrayUnique(this.rateWrap, 'value');
                                this.rateChange = true;
                                this.taxGoodsCode.rate = '0.015';
                                break;

                            case '简易征收':
                                newArray = [{
                                    value: "0.04",
                                    label: "4%"
                                }, {
                                    value: "0.05",
                                    label: "5%"
                                }];
                                this.rateWrap = this.rateWrap.concat(newArray);
                                this.rateWrap = arrayUnique(this.rateWrap, 'value');
                                this.taxGoodsCode.rate = rateSave || this.rateWrap[0].value;
                                break;

                            default:
                                if (rateSave === '0.015') {
                                    this.taxGoodsCode.rate = this.rateWrap[0].value;
                                } else {
                                    this.taxGoodsCode.rate = rateSave;
                                }

                                if (this.taxGoodsCode.useDiscount) {
                                    if (this.freeType === '0') {
                                        this.rateChange = false;
                                    }
                                }

                                this.flag = false;
                        }

                        if (this.taxGoodsCode.rate === '0.00' || this.taxGoodsCode.rate == '0.015' || this.taxGoodsCode.rate === '0') {
                            this.rateChange = true;
                        } else {
                            this.rateChange = false;
                        }
                    }
                },
                'taxGoodsCode.freeType': {
                    handler: function handler(data) {
                        var _this6 = this;

                        console.log('freeType', data);

                        if (this.ifWatch) {
                            if (data == "0") {
                                //按5%简易征收减按1.5%计征
                                if (this.taxGoodsCode.rate == '0.015') {
                                    this.rateChange = true;
                                    this.flag = true;
                                } else {
                                    this.rateChange = false;
                                    this.flag = false;
                                }
                            }

                            if (data != '0' && data != '' && data != null) {
                                this.rateChange = true;
                                this.taxGoodsCode.rate = '0';
                                this.flag = false;

                                if (this.modalFirstStatus) {
                                    setTimeout(function (item) {
                                        _this6.modalFirstStatus = false;
                                    });
                                }
                            }
                        }
                    },
                    deep: true
                },
                addShow: {
                    handler: function handler(data) {
                        this.showX = data;
                        this.ifWatch = true;

                        if (data && this.modalStatus === 'modal' || data && this.modalStatus === 'common') {
                            this.getGoodsClassifyList();
                        }
                    },
                    immediate: true
                },
                'taxGoodsCode.useDiscount': function taxGoodsCodeUseDiscount(newVal) {
                    if (this.ifWatch) {
                        if (!newVal) {
                            this.rateWrap = [{
                                value: "0.1",
                                label: "10%"
                            }, {
                                value: "0.03",
                                label: "3%"
                            }, {
                                value: "0",
                                label: "0%"
                            }];
                        }
                    }
                },
                addStatus: function addStatus() {
                    this.deletMsg();
                },
                addBussinessParams: function addBussinessParams() {
                    var _this7 = this;

                    if (this.ifWatch || this.modalStatus == 'modal') {
                        if (this.addStatus === 'add') {
                            this.ifUpdate = false;
                            this.watch = true;
                            this.taxGoodsCode = {
                                useDiscount: false,
                                //是否使用优惠政策
                                priceTaxMark: false,
                                //含税标志
                                bwPrintGoods: false,
                                //云打印商品
                                goodsSimpleName: '',
                                goodsCode: '',
                                goodsName: '',
                                //商品名称
                                illustrate: '',
                                //说明
                                simpleCode: '',
                                //商品简码
                                goodsSpecification: '',
                                //规格型号
                                goodsUnit: '',
                                //	计量单位
                                goodsPrice: '',
                                //单价
                                discountType: '',
                                //优惠政策类型
                                rate: '',
                                freeType: '' //免税类型

                            };
                            var usedRate = this.addBussinessParams.usedRate || "10%、3%、0%"; //可以编辑税率

                            usedRate = usedRate.split("、");
                            this.rateWrap = [];
                            usedRate.forEach(function (item) {
                                var obj = {
                                    label: item,
                                    value: item.slice(0, item.length - 1) / 100 + ''
                                };

                                _this7.rateWrap.push(obj);
                            }); // this.taxGoodsCode.rate = this.rateWrap[0].value || ''

                            this.taxGoodsCode.bwPrintGoods = this.taxGoodsCode.bwPrintGoods || false;
                            this.taxGoodsCode.goodsSimpleName = this.addBussinessParams.goodsSimpleName;
                            this.taxGoodsCode.goodsCode = this.addBussinessParams.goodsCode;
                            this.taxGoodsCode.usedRate = '0.1';
                            this.taxGoodsCode.freeType = '0';

                            if (this.taxGoodsCode.goodsCode.slice(0, 1) == "6") {
                                this.sixGoods = true;
                                this.taxGoodsCode.rate = '0';
                                this.taxGoodsCode.useDiscount = true;
                                setTimeout(function () {
                                    _this7.taxGoodsCode.freeType = '2';
                                }, 200);
                                this.getpreferentialPolicies().then(function () {
                                    _this7.taxGoodsCode.discountType = '不征税';
                                });
                            } else {
                                this.sixGoods = false;
                            }

                            this.$nextTick(function () {
                                if (_this7.taxGoodsCode.goodsCode.length > 19) {
                                    _this7.systemCode = _this7.taxGoodsCode.goodsCode.substr(19, 20);
                                    _this7.taxGoodsCode.goodsCode = _this7.taxGoodsCode.goodsCode.substr(0, 19);
                                }
                            });
                        }

                        if (this.addStatus === 'update') {
                            this.getpreferentialPolicies().then(function (res) {
                                _this7.ifUpdate = true;
                                _this7.taxGoodsCode = {
                                    useDiscount: false,
                                    //是否使用优惠政策
                                    priceTaxMark: false,
                                    //含税标志
                                    bwPrintGoods: false,
                                    //云打印商品
                                    goodsSimpleName: '',
                                    goodsCode: '',
                                    goodsName: '',
                                    //商品名称
                                    illustrate: '',
                                    //说明
                                    simpleCode: '',
                                    //商品简码
                                    goodsSpecification: '',
                                    //规格型号
                                    goodsUnit: '',
                                    //	计量单位
                                    goodsPrice: '',
                                    //单价
                                    discountType: '',
                                    //优惠政策类型
                                    rate: '',
                                    freeType: '' //免税类型

                                };
                                var obj = _this7.addBussinessParams;

                                for (var key in obj) {
                                    if (obj[key] === "是") {
                                        obj[key] = true;
                                    }

                                    if (obj[key] === "否") {
                                        obj[key] = false;
                                    }

                                    if (obj[key] === "Y") {
                                        obj[key] = true;
                                    }

                                    if (obj[key] === "N") {
                                        obj[key] = false;
                                    } else {
                                        obj[key] = obj[key];
                                    }
                                }

                                _this7.taxGoodsCode = obj;
                                _this7.taxGoodsCode.useDiscount = _this7.taxGoodsCode.useDiscount || false;
                                var discountTypeStr = _this7.taxGoodsCode.discountType;
                                var usedRate = _this7.addBussinessParams.usedRate || "10%、3%、0%"; //可以编辑税率

                                var rateStr = _this7.taxGoodsCode.rate + ''; // 转字符串，不然数字读不出来

                                _this7.taxGoodsCode.bwPrintGoods = _this7.taxGoodsCode.bwPrintGoods || false;
                                _this7.taxGoodsCode.goodsName = _this7.taxGoodsCode.goodsName || '';
                                _this7.taxGoodsCode.priceTaxMark = _this7.taxGoodsCode.priceTaxMark || false;
                                _this7.taxGoodsCode.bwPrintGoods = _this7.taxGoodsCode.bwPrintGoods || false;

                                if (_this7.taxGoodsCode.freeType === '') {
                                    _this7.taxGoodsCode.freeType = '0';
                                }

                                _this7.taxGoodsCode.goodsUnit = _this7.taxGoodsCode.goodsUnit || '';

                                if (rateStr) {
                                    _this7.taxGoodsCode.rate = rateStr;
                                }

                                if (!rateStr || rateStr == 'null') {
                                    _this7.taxGoodsCode.rate = '';
                                }

                                if (_this7.taxGoodsCode.useDiscount) {
                                    _this7.preferentialWrap.forEach(function (item) {
                                        if (item.label === _this7.taxGoodsCode.discountType) {
                                            _this7.preferentialWrapArr.forEach(function (it) {
                                                if (it.preferentialPolicyName == item.label) {
                                                    usedRate = usedRate + '、' + it.rate;
                                                }
                                            });
                                        }
                                    });
                                } else {
                                    _this7.preferentialWrap = [];
                                }

                                usedRate = usedRate.split("、");

                                function removeDuplicatedItem(arr) {
                                    for (var i = 0; i < arr.length - 1; i++) {
                                        for (var j = i + 1; j < arr.length; j++) {
                                            if (arr[i] == arr[j]) {
                                                arr.splice(j, 1);
                                                j--;
                                            }
                                        }
                                    }

                                    return arr;
                                }

                                usedRate = removeDuplicatedItem(usedRate);
                                _this7.rateWrap = usedRate.map(function (item) {
                                    return {
                                        label: item,
                                        value: item.slice(0, item.length - 1) / 100 + ''
                                    };
                                });

                                if (_this7.taxGoodsCode.goodsCode.slice(0, 1) == "6") {
                                    _this7.ifUpdate = false;
                                    _this7.taxGoodsCode.rate = '0';
                                    _this7.taxGoodsCode.useDiscount = true;
                                    setTimeout(function () {
                                        _this7.taxGoodsCode.freeType = '2';
                                    }, 200);
                                    _this7.sixGoods = true;

                                    _this7.getpreferentialPolicies().then(function () {
                                        _this7.taxGoodsCode.discountType = '不征税';
                                    });
                                } else {
                                    _this7.sixGoods = false;
                                }

                                _this7.$nextTick(function () {
                                    if (_this7.taxGoodsCode.goodsCode.length > 19) {
                                        _this7.systemCode = _this7.taxGoodsCode.goodsCode.substr(19, 20);
                                        _this7.taxGoodsCode.goodsCode = _this7.taxGoodsCode.goodsCode.substr(0, 19);
                                    }
                                });
                            });
                        }
                    } // 60 商品 rate  freeType  固定  税率为0，不征税

                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/addBussiness.vue?vue&type=script&lang=js&
        /* harmony default export */
        var CommodityMgmt_addBussinessvue_type_script_lang_js_ = (addBussinessvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/_output/CommodityMgmt/addBussiness.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            CommodityMgmt_addBussinessvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var addBussiness = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "BABD":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "BZhz":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "BdQq":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _common_AutoComplete__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("iMkd");
        /* harmony import */
        var _store_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("lq9z");

        function _slicedToArray(arr, i) {
            return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
        }

        function _nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function _iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function _arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

        /**
         * --------------------------------------------------------------------------- *
         *
         * @Project: BWCloudPrepose-catering
         * @FileName: customerMixin
         * @Dependence: --
         * @Description: --
         * @CreatedBy: zhangliao
         * @CreateDate: 2018/3/7 下午7:40
         * @LastModifiedBy: zhangliao
         * @LastModifiedDate: 2018/3/7 下午7:40
         *
         * --------------------------------------------------------------------------- *
         */


        /* harmony default export */
        __webpack_exports__["a"] = ({
            components: {
                AutoComplete: _common_AutoComplete__WEBPACK_IMPORTED_MODULE_0__["default"]
            },
            props: {
                dataObj: {
                    type: Object,
                    required: true
                }
            },
            data: function data() {
                return {
                    currentDataObj: _objectSpread({
                        name: '',
                        taxSerial: '',
                        address: '',
                        location: '',
                        fixedPhone: '',
                        phone: '',
                        accountBank: '',
                        bank: '',
                        bankAccount: '',
                        addressPhone: '',
                        bankAndAccount: ''
                    }, this.dataObj),
                    suggestDataList: [],
                    // 显示多电话地址/ 多银行账号
                    bankAndAccountShow: false,
                    addressAndPhoneShow: false,
                    bankAccountList: [],
                    addressPhoneList: [],
                    showAccountSelect: false,
                    showAddressSelect: false,
                    lastId: '',
                    selectItemDone: false
                };
            },
            methods: {
                doSuggest: function doSuggest(query) {
                    var self = this;
                    var han = /[a-zA-Z\u4e00-\u9fa5]{1,}/;

                    if (han.test(query)) {
                        this.$store.dispatch('suggestCompany', {
                            companyName: query,
                            callback: function callback(dataList) {
                                self.suggestDataList = dataList;
                            }
                        });
                    } else {
                        self.suggestDataList = [];
                    }
                },
                selectItem: function selectItem(index) {
                    var _this = this;

                    var targetData = this.suggestDataList[index];

                    if (targetData) {
                        this.currentDataObj = Object.assign(this.currentDataObj, targetData);

                        for (var k in this.currentDataObj) {
                            if (this.currentDataObj[k] + '' === 'null') {
                                this.currentDataObj[k] = '';
                            }
                        }

                        this.getBankAccountByName(this.currentDataObj.name); // this.selectItemDone = true
                        // this.getBankAccountAddrPhoneList(ajaxData, '/api/customer/queryCustomerScheduleByCustomerName')
                        // commit(keyUtil.getChangeName('email'), this.currentRow.email)
                        // this.$store.commit(keyUtil.getChangeName('phone'),targetData.phone)
                    } else {
                        // fuck the iview
                        var lastName = this.currentDataObj.name;
                        this.$nextTick(function () {
                            _this.currentDataObj.name = lastName; // this.getBankAccountByName(this.currentDataObj.name)
                        });
                    }

                    this.selectItemDone = true; // this.getBankAccountByName(this.currentDataObj.name)
                },
                handleBlur: function handleBlur(e) {
                    if (this.isRollInvoice || !e.target.value) {
                        this.selectItemDone = false;
                        return;
                    }

                    if (!this.selectItemDone) {
                        // blur
                        var name = this.currentDataObj.name;
                        this.getBankAccountByName(name, 'blur');
                        this.currentDataObj.name = e.target.value;
                    } else {
                        this.selectItemDone = false;
                    }
                },
                getBankAccountByName: function getBankAccountByName(name, flag) {
                    console.log(name, flag);
                    var ajaxData = {
                        customerName: name
                    };
                    this.lastId = '';
                    this.getBankAccountAddrPhoneList(ajaxData, '/api/customer/queryCustomerScheduleByCustomerName', flag);
                },
                getBankAccountById: function getBankAccountById(id) {
                    if (id && id !== this.lastId) {
                        this.lastId = id;
                        var ajaxData = {
                            khXxId: id
                        };
                        this.getBankAccountAddrPhoneList(ajaxData, '/api/customer/queryCustomerSchedule');
                    }
                },
                // 获取多选地址电话/银行账号
                getBankAccountAddrPhoneList: function getBankAccountAddrPhoneList(ajaxData, url, flag) {
                    var _this2 = this;

                    this.http.outPost(url, ajaxData).then(function (resp) {
                        var _resp$data$results = _slicedToArray(resp.data.results, 1),
                            res = _resp$data$results[0];

                        if (res) {
                            var bankAccountList = res.bankAccountName.length > 0 ? res.bankAccountName.map(function (item) {
                                return _objectSpread({}, item, {
                                    label: item.bankName + item.bankAccount,
                                    value: item.bankName + item.bankAccount
                                });
                            }) : [];
                            var addressPhoneList = res.addressPhone.length > 0 ? res.addressPhone.map(function (item) {
                                return _objectSpread({}, item, {
                                    label: item.address + item.phone,
                                    value: item.address + item.phone
                                });
                            }) : []; // blur精确匹配 默认显示第一条地址电话/银行账号

                            if (flag === 'blur') {
                                if (bankAccountList.length > 0) {
                                    _this2.currentDataObj.bankAndAccount = bankAccountList[0].value;
                                }

                                if (addressPhoneList.length > 0) {
                                    _this2.currentDataObj.addressAndPhone = addressPhoneList[0].value;
                                }
                            }

                            var defaultBankAccountList = _this2.currentDataObj.bankAndAccount ? [{
                                label: _this2.currentDataObj.bankAndAccount,
                                value: _this2.currentDataObj.bankAndAccount
                            }] : []; // 判断当前反馈是否有请求中带过来的数据

                            if (bankAccountList.find(function (item) {
                                return item.value === _this2.currentDataObj.bankAndAccount;
                            })) {
                                _this2.bankAccountList = bankAccountList;
                            } else {
                                _this2.bankAccountList = defaultBankAccountList.concat(bankAccountList);
                            }

                            var defaultAddressPhoneList = _this2.currentDataObj.addressAndPhone ? [{
                                label: _this2.currentDataObj.addressAndPhone,
                                value: _this2.currentDataObj.addressAndPhone
                            }] : [];

                            if (addressPhoneList.find(function (e) {
                                return e.value === _this2.currentDataObj.addressAndPhone;
                            })) {
                                _this2.addressPhoneList = addressPhoneList;
                            } else {
                                _this2.addressPhoneList = defaultAddressPhoneList.concat(addressPhoneList);
                            } // 下拉大于两条显示下拉，否则显示输入框


                            if (_this2.addressPhoneList.length > 1) {
                                _this2.showAddressSelect = true;
                            } else {
                                _this2.showAddressSelect = false;
                            } // 下拉大于两条显示下拉，否则显示输入框


                            if (_this2.bankAccountList.length > 1) {
                                _this2.showAccountSelect = true;
                            } else {
                                _this2.showAccountSelect = false;
                            }

                            if (flag === 'blur') {
                                // 失焦点精确匹配
                                _this2.currentDataObj.taxSerial = res.taxNo;
                            }
                        } else {
                            if (flag === 'blur') {
                                _this2.currentDataObj.taxSerial = '';
                                _this2.currentDataObj.addressAndPhone = '';
                                _this2.currentDataObj.bankAndAccount = '';
                            }

                            _this2.showAddressSelect = false;
                            _this2.showAccountSelect = false;
                        }

                        _this2.selectItemDone = false;
                    }).catch(function () {
                        _this2.selectItemDone = false;
                    });
                }
            },
            computed: _objectSpread({}, Object(_store_helper__WEBPACK_IMPORTED_MODULE_1__[/* generateComputed */ "a"])(['showCustomerSelector'], function (state) {
                return state.invoiceEdit;
            }))
        });

        /***/
    }),

    /***/ "CtBD":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "DBVP":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue?vue&type=template&id=b8f5b970&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {
                staticClass: "grid-list-item",
                class: {'discount-line': _vm.currentDataObj.isDiscountLine}
            }, [(!_vm.isSingle) ? _c('div', {staticClass: "grid-list-col col-index"}, [_vm._v(_vm._s(_vm.dataIndex + 1))]) : _vm._e(), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-a"}, [_c('div', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (!_vm.readOnlyFlag),
                    expression: "!readOnlyFlag"
                }], staticStyle: {"display": "inline-block", "width": "85%"}, on: {
                    "dblclick": function ($event) {
                        return _vm.toggleGoodsCallback(_vm.dataIndex)
                    }
                }
            }, [_c('auto-complete', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (!_vm.readOnlyFlag),
                    expression: "!readOnlyFlag"
                }],
                staticClass: "name",
                attrs: {"type": "text"},
                on: {"on-search": _vm.doSuggestGoods, "on-select": _vm.selectItemGoods},
                model: {
                    value: (_vm.currentDataObj.goodsName), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "goodsName", $$v)
                    }, expression: "currentDataObj.goodsName"
                }
            }, _vm._l((_vm.filteredSuggestGoods), function (item, index) {
                return _c('i-option', {
                    key: index,
                    attrs: {"label": item.goodsName, "value": index}
                }, [_vm._v(_vm._s(item.goodsName))])
            }), 1)], 1), _vm._v(" "), _c('span', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (!_vm.readOnlyFlag),
                    expression: "!readOnlyFlag"
                }], staticClass: "selector ellipsis skin-background", on: {
                    "click": function ($event) {
                        return _vm.toggleGoodsCallback(_vm.dataIndex)
                    }
                }
            }, [_vm._v("...")]), _vm._v(" "), (_vm.readOnlyFlag) ? _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.goodsName),
                    expression: "currentDataObj.goodsName"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.readOnlyFlag},
                domProps: {"value": (_vm.currentDataObj.goodsName)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "goodsName", $event.target.value)
                    }
                }
            }) : _vm._e()]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-b"}, [_c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.goodsSpecification),
                    expression: "currentDataObj.goodsSpecification"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.readOnlyFlag || _vm.isList},
                domProps: {"value": (_vm.currentDataObj.goodsSpecification)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "goodsSpecification", $event.target.value)
                    }
                }
            })]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-c"}, [_c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.goodsUnit),
                    expression: "currentDataObj.goodsUnit"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.readOnlyFlag || _vm.isList},
                domProps: {"value": (_vm.currentDataObj.goodsUnit)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "goodsUnit", $event.target.value)
                    }
                }
            })]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-d"}, [_c('number-input', {
                class: [_vm.currentDataObj.isDiscountLine ? 'red' : ''],
                attrs: {"type": "NoneZeroFloat", "readonly": _vm.readOnlyFlag || _vm.isList, "max": 10000000000000},
                on: {"on-blur": _vm.changeQuantity},
                model: {
                    value: (_vm.currentDataObj.goodsQuantity), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "goodsQuantity", $$v)
                    }, expression: "currentDataObj.goodsQuantity"
                }
            })], 1), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-e"}, [_c('number-input', {
                class: [_vm.currentDataObj.isDiscountLine ? 'red' : ''],
                attrs: {
                    "type": "NoneZeroFloat",
                    "readonly": _vm.readOnlyFlag || _vm.isList || _vm.priceNoEdit,
                    "max": 10000000000000
                },
                on: {"on-blur": _vm.changePrice},
                model: {
                    value: (_vm.currentDataObj.goodsPrice), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "goodsPrice", $$v)
                    }, expression: "currentDataObj.goodsPrice"
                }
            })], 1), _vm._v(" "), _c('div', {
                staticClass: "grid-list-col col-f",
                on: {"click": _vm.showDifferenceModal}
            }, [_c('number-input', {
                class: [_vm.currentDataObj.isDiscountLine ? 'red' : ''],
                attrs: {"type": "NoneZeroFloat", "readonly": _vm.editPrice, "max": 10000000000},
                on: {"on-blur": _vm.changeTotalPrice},
                model: {
                    value: (_vm.currentDataObj.goodsTotalPrice), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "goodsTotalPrice", $$v)
                    }, expression: "currentDataObj.goodsTotalPrice"
                }
            })], 1), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-g"}, [_c('select', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.goodsTaxRate),
                    expression: "currentDataObj.goodsTaxRate"
                }],
                class: [_vm.currentDataObj.isDiscountLine ? 'red' : ''],
                staticStyle: {"width": "96%"},
                attrs: {"disabled": _vm.isDisabled || _vm.currentDataObj.noEdit || (_vm.showCommonCopyEdit && _vm.showDifference)},
                on: {
                    "change": [function ($event) {
                        var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {
                            return o.selected
                        }).map(function (o) {
                            var val = "_value" in o ? o._value : o.value;
                            return val
                        });
                        _vm.$set(_vm.currentDataObj, "goodsTaxRate", $event.target.multiple ? $$selectedVal : $$selectedVal[0])
                    }, _vm.changeTaxRate]
                }
            }, _vm._l((_vm.taxRates), function (im) {
                return _c('option', {key: im.value, domProps: {"value": im.value}}, [_vm._v(_vm._s(im.label))])
            }), 0)]), _vm._v(" "), _c('div', {staticClass: "grid-list-col col-h tax"}, [(_vm.specialNegative) ? _c('span', {
                staticClass: "op skin-background",
                on: {
                    "click": function ($event) {
                        return _vm.plusMinusTotalTax(_vm.dataIndex, true)
                    }
                }
            }, [_vm._v("+")]) : _vm._e(), _c('input', {
                class: ['input', {
                    'red': _vm.currentDataObj.isRed,
                    'w58': _vm.specialNegative
                }], attrs: {"type": "text", "readonly": ""}, domProps: {"value": _vm.currentDataObj.goodsTotalTax}
            }), (_vm.specialNegative) ? _c('span', {
                staticClass: "op skin-background", on: {
                    "click": function ($event) {
                        return _vm.plusMinusTotalTax(_vm.dataIndex, false)
                    }
                }
            }, [_vm._v("—")]) : _vm._e()]), _vm._v(" "), (!_vm.isIssue) ? _c('div', {staticClass: "grid-list-col col-i"}, [_c('span', {
                staticClass: "op skin-background",
                on: {
                    "click": function ($event) {
                        return _vm.addRowCallback(_vm.dataIndex)
                    }
                }
            }, [_vm._v("+")]), (!(_vm.relateDiscount || _vm.isNegative || _vm.showDifference)) ? _c('span', {
                staticClass: "op skin-background",
                on: {
                    "click": function ($event) {
                        return _vm.toggleDiscount(_vm.dataIndex, _vm.currentDataObj)
                    }
                }
            }, [_vm._v("折")]) : _vm._e(), _c('span', {
                staticClass: "op skin-background",
                on: {
                    "click": function ($event) {
                        return _vm.removeRowCallback(_vm.dataIndex)
                    }
                }
            }, [_vm._v("—")])]) : _c('div', {staticClass: "grid-list-col col-i"})])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue?vue&type=template&id=b8f5b970&

// EXTERNAL MODULE: ./src/utils/numberUtil.js
        var numberUtil = __webpack_require__("0Jw3");

// EXTERNAL MODULE: ./src/components/page/common/NumberInput.vue + 4 modules
        var NumberInput = __webpack_require__("Ibsr");

// EXTERNAL MODULE: ./src/components/page/common/AutoComplete.vue + 4 modules
        var AutoComplete = __webpack_require__("iMkd");

// EXTERNAL MODULE: ./src/utils/typeUtil.js
        var typeUtil = __webpack_require__("v7p+");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// CONCATENATED MODULE: ./src/mixins/invoice-issue/goodsMixin.js
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

        /**
         * --------------------------------------------------------------------------- *
         *
         * @Project: BWCloudPrepose-catering
         * @FileName: customerMixin
         * @Dependence: --
         * @Description: --
         * @CreatedBy: zhangliao
         * @CreateDate: 2018/3/7 下午7:40
         * @LastModifiedBy: zhangliao
         * @LastModifiedDate: 2018/3/7 下午7:40
         *
         * --------------------------------------------------------------------------- *
         */


        /* harmony default export */
        var goodsMixin = ({
            components: {
                AutoComplete: AutoComplete["default"]
            },
            props: {
                dataObj: {
                    type: Object,
                    required: true
                }
            },
            data: function data() {
                return {
                    currentDataObj: _objectSpread({
                        goodsName: '',
                        goodsSpecification: '',
                        goodsUnit: '',
                        goodsQuantity: '',
                        goodsPrice: '',
                        goodsTotalPrice: '',
                        goodsTaxRate: '',
                        goodsTotalTax: '',
                        hasDiscountLine: false,
                        isDiscountLine: false,
                        noEdit: true
                    }, this.dataObj),
                    filteredSuggestGoods: []
                };
            },
            methods: {
                doSuggestGoods: function doSuggestGoods(query) {
                    var self = this;
                    var han = /[a-zA-Z\u4e00-\u9fa5]{1,}/;

                    if (han.test(query)) {
                        this.$store.dispatch('suggestGoodsList', {
                            goodsName: query,
                            callback: function callback(dataList) {
                                self.filteredSuggestGoods = dataList;
                            }
                        });
                    }
                },
                selectItemGoods: function selectItemGoods(index) {
                    var targetData = this.filteredSuggestGoods[index];

                    if (targetData) {
                        targetData.goodsTaxRate = targetData.rate;
                        targetData.dataIndex = this.dataIndex + '';

                        for (var k in targetData) {
                            if (targetData[k] + '' === 'null') {
                                targetData[k] = '';
                            }
                        } // targetData = Object.assign(targetData,targetData);
                        // commit(keyUtil.getChangeName('email'), this.currentRow.email)
                        // this.$store.commit(keyUtil.getChangeName('phone'),targetData.phone)


                        this.$emit('select-goods', targetData);
                    }
                }
            },
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['showGoodsSelector'], function (state) {
                return state.invoiceEdit;
            }))
        });
// EXTERNAL MODULE: ./src/mixins/serverOrDish.js
        var serverOrDish = __webpack_require__("0OwG");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue?vue&type=script&lang=js&
        function _toConsumableArray(arr) {
            return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
        }

        function _nonIterableSpread() {
            throw new TypeError("Invalid attempt to spread non-iterable instance");
        }

        function _iterableToArray(iter) {
            if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
        }

        function _arrayWithoutHoles(arr) {
            if (Array.isArray(arr)) {
                for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
                    arr2[i] = arr[i];
                }
                return arr2;
            }
        }

        function _slicedToArray(arr, i) {
            return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
        }

        function _nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function _iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function _arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

        function InvoiceContentItemvue_type_script_lang_js_ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function InvoiceContentItemvue_type_script_lang_js_objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    InvoiceContentItemvue_type_script_lang_js_ownKeys(Object(source), true).forEach(function (key) {
                        InvoiceContentItemvue_type_script_lang_js_defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    InvoiceContentItemvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function InvoiceContentItemvue_type_script_lang_js_defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var propMixin = InvoiceContentItemvue_type_script_lang_js_objectSpread({}, goodsMixin, {
            computed: InvoiceContentItemvue_type_script_lang_js_objectSpread({}, goodsMixin.computed, {}, Object(helper["a" /* generateComputed */])(['taxationMethod', 'issuePlace'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        });

        /* harmony default export */
        var InvoiceContentItemvue_type_script_lang_js_ = ({
            components: {
                AutoComplete: AutoComplete["default"],
                NumberInput: NumberInput["default"]
            },
            name: 'invoide-content-item',
            mixins: [propMixin, serverOrDish["a" /* default */]],
            props: {
                dataObj: {
                    type: Object,
                    required: true
                },
                dataIndex: {
                    type: Number,
                    required: true
                },
                addRowCallback: {
                    type: Function,
                    require: true
                },
                removeRowCallback: {
                    type: Function,
                    required: true
                },
                toggleGoodsCallback: {
                    type: Function,
                    required: true
                },
                toggleDiscountCallback: {
                    type: Function,
                    require: true
                },
                suggestGoodsList: {
                    type: Array
                },
                updateDataCallback: {
                    type: Function,
                    required: true
                },
                rates: {
                    type: Array,
                    required: true
                },
                showDifference: {
                    type: Boolean,
                    required: true
                },
                isSpecialInvoice: {
                    type: Boolean,
                    default: false
                },
                invoiceTypeCode: {
                    type: String,
                    required: true
                },
                isNegative: {
                    type: Boolean,
                    default: false
                },
                isIssue: {
                    type: Boolean,
                    default: false
                },
                invoiceListMark: {
                    type: String,
                    default: ''
                },
                isSingle: {
                    type: Boolean,
                    default: false
                }
            },
            data: function data() {
                return {
                    numberKey: Date.now() + '',
                    currentDataObj: InvoiceContentItemvue_type_script_lang_js_objectSpread({}, this.dataObj)
                };
            },
            methods: {
                updateItemData: function updateItemData(newData) {
                    var dataObj = this.currentDataObj;
                    this.currentDataObj = InvoiceContentItemvue_type_script_lang_js_objectSpread({}, dataObj, {}, newData);
                    this.updateData();
                },
                toggleDiscount: function toggleDiscount(index, dataObj) {
                    if (!dataObj.goodsName) {
                        this.$Message.warning('请先填写商品名称');
                    } else {
                        var numPrice = Number(dataObj.goodsTotalPrice); // NaN 和 0 都是 false

                        if (numPrice) {
                            this.toggleDiscountCallback(index, dataObj);
                        } else {
                            this.$Message.warning('请先填写正确的商品金额');
                        }
                    }
                },
                // 服务器 盘
                reDishServer: function reDishServer(val) {
                    if (+val < 0) {
                        val = -val + '';
                    } else {
                        val = val + '';
                    } // if (this.isDishOrServer === 'server') {


                    return Object(numberUtil["c" /* toKeepFixed13 */])(val, this.isRoll); // } else if (this.isDishOrServer === 'dish') {
                    //     return toKeepFixed6(val, this.isRoll)
                    // } else { }
                },
                changeTaxRate: function changeTaxRate(event) {
                    var taxRate = +event.target.value;
                    var dataObj = this.currentDataObj;
                    var sellerPrice = +dataObj.sellerPrice;
                    var deduction = +dataObj.deduction;
                    this.$set(dataObj, 'goodsTaxRate', taxRate);
                    this.$set(dataObj, 'isRed', '');

                    if (this.showDifference) {
                        // let tt = (sellerPrice - deduction) * taxRate / (1 + taxRate)
                        var tt = sellerPrice.subtract(deduction).multiply(taxRate).division(taxRate.add(1));
                        var tp = Object(numberUtil["d" /* toKeepFixed2 */])(sellerPrice.subtract(tt));

                        if (this.isNegative) {
                            tp = '-' + tp;
                        }

                        this.$set(dataObj, 'goodsTotalPrice', tp);
                    }

                    this.changeTotalTax();
                },
                changeQuantity: function changeQuantity(num) {
                    if (this.readOnlyFlag || this.isList) {
                        return;
                    }

                    var dataObj = this.currentDataObj;

                    if (!dataObj.isDiscountLine) {
                        num = (num + '').replace('-', '');
                    }

                    this.$set(dataObj, 'isRed', '');
                    this.numberKey = Date.now() + '';

                    if (+num === 0 || +num === 10000000000000) {
                        this.$set(dataObj, 'goodsQuantity', '');
                        this.updateData();
                        return;
                    } // 判断服务器或盘 用户


                    num = this.reDishServer(num); // let strtp = Number(num) + ''

                    if (num.length > 13) {
                        this.$set(dataObj, 'goodsQuantity', num);
                        this.$Message.warning('数量输入错误，请重新输入'); // price = strtp.slice(0, 13)

                        return;
                    }

                    this.$set(dataObj, 'goodsQuantity', num); // 差额征税

                    if (this.showDifference) {
                        // let diffPrice = (+dataObj.goodsTotalPrice) / (+num)
                        var diffPrice = dataObj.goodsTotalPrice.division(num); // 判断服务器或盘 用户

                        diffPrice = this.reDishServer(diffPrice);
                        this.$set(dataObj, 'goodsPrice', diffPrice);
                    } else {
                        if (+dataObj.goodsPrice) {
                            // let total = (+dataObj.goodsPrice) * (+num)
                            var total = dataObj.goodsPrice.multiply(num);
                            total = Object(numberUtil["d" /* toKeepFixed2 */])(total);

                            if ((total + '').replace('-', '').match(/\d/g).length > 12 || !+total) {
                                this.$Message.warning('数量和单价输入错误，请重新输入');
                                this.$set(dataObj, 'goodsTotalPrice', '');
                                this.$set(dataObj, 'goodsPrice', '');
                                this.$set(dataObj, 'goodsQuantity', '');
                                return;
                            }

                            this.$set(dataObj, 'goodsTotalPrice', total);
                            this.changeTotalTax();
                        } else if (+dataObj.goodsTotalPrice) {
                            // let price = (+dataObj.goodsTotalPrice) / (+num)
                            var price = dataObj.goodsTotalPrice.division(num); // 判断服务器或盘 用户

                            price = this.reDishServer(price);
                            this.$set(dataObj, 'goodsPrice', price);
                        } else {
                        }
                    }

                    this.negativeNumber(); // 折行不加 改变数量不改变金额？
                    // this.updateData();
                },
                // 单价处：含小数点最多只可输入13位；小数点后最多6位 ， 鼠标离开单价后，会计算数量跟单价，如果计算出来金额也超了13位就提示数量和单价输入错误，请重新输入。
                changePrice: function changePrice(price) {
                    if (this.readOnlyFlag || this.isList || this.priceNoEdit) {
                        return;
                    }

                    var dataObj = this.currentDataObj;

                    if (!dataObj.isDiscountLine) {
                        price = (price + '').replace('-', '');
                    }

                    this.$set(dataObj, 'isRed', '');
                    this.numberKey = Date.now() + '';

                    if (+price === 0 || +price === 10000000000000) {
                        this.$set(dataObj, 'goodsPrice', '');
                        this.updateData();
                        return;
                    } // 判断服务器或盘 用户


                    price = this.reDishServer(price);
                    var strtp = Number(price) + '';

                    if (strtp.length > 13) {
                        this.$set(dataObj, 'goodsPrice', price);
                        this.$Message.warning('单价输入错误，请重新输入');
                        return;
                    }

                    this.$set(dataObj, 'goodsPrice', price);

                    if (+dataObj.goodsQuantity) {
                        // let total = (+dataObj.goodsQuantity) * (+price)
                        var total = dataObj.goodsQuantity.multiply(price);
                        total = Object(numberUtil["d" /* toKeepFixed2 */])(total);

                        if ((total + '').replace('-', '').match(/\d/g).length > 12 || !+total) {
                            this.$Message.warning('数量和单价输入错误，请重新输入');
                            this.$set(dataObj, 'goodsTotalPrice', '');
                            this.$set(dataObj, 'goodsPrice', '');
                            this.$set(dataObj, 'goodsQuantity', '');
                            return;
                        }

                        this.$set(dataObj, 'goodsTotalPrice', total);
                        this.changeTotalTax();
                    } else if (+dataObj.goodsTotalPrice) {
                        // let num = (+dataObj.goodsTotalPrice) / (+price)
                        var num = dataObj.goodsTotalPrice.division(price); // 判断服务器或盘 用户

                        num = this.reDishServer(num);
                        this.$set(dataObj, 'goodsQuantity', num);
                    } else {
                    }

                    this.negativeNumber();
                },
                // 金额：小数点前的数字位数大于10位，则提示金额错误，并清空输入内容。如果小于10位，鼠标离开后会截取小数点后两位，不够2位则补0。
                changeTotalPrice: function changeTotalPrice(totalPrice) {
                    if (this.editPrice) {
                        return;
                    }

                    var dataObj = this.currentDataObj;
                    totalPrice = (totalPrice + '').replace('-', '');

                    if (!dataObj.isDiscountLine) {
                        totalPrice = Object(numberUtil["d" /* toKeepFixed2 */])(totalPrice);
                    } else {
                        totalPrice = '-' + Object(numberUtil["d" /* toKeepFixed2 */])(totalPrice);
                    }

                    this.numberKey = Date.now() + '';
                    this.$set(dataObj, 'isRed', '');
                    var strtp = totalPrice + '';

                    var _strtp$match = strtp.match(/^-?(\d{0,12})(\.{0,1})(\d{0,2})/),
                        _strtp$match2 = _slicedToArray(_strtp$match, 4),
                        n = _strtp$match2[0],
                        f = _strtp$match2[1],
                        s = _strtp$match2[2],
                        t = _strtp$match2[3]; // eslint-disable-line


                    var fLen = f.length;

                    if (fLen > 10) {
                        this.$set(dataObj, 'goodsTotalPrice', '');
                        this.$Message.warning('金额错误，请重新输入');
                        return;
                    }

                    if (Number(totalPrice)) {
                        this.$set(dataObj, 'goodsTotalPrice', totalPrice);
                    } else {
                        this.$set(dataObj, 'goodsTotalPrice', '');
                    }

                    if (+dataObj.goodsQuantity) {
                        // let price = (+totalPrice) / (+dataObj.goodsQuantity) + ''
                        var price = totalPrice.division(dataObj.goodsQuantity) + ''; // 判断服务器或盘 用户

                        price = this.reDishServer(price);
                        this.$set(dataObj, 'goodsPrice', price);
                    } else if (+dataObj.goodsPrice) {
                        // let num = (+totalPrice) / (+dataObj.goodsPrice) + ''
                        var num = totalPrice.division(dataObj.goodsPrice) + ''; // 判断服务器或盘 用户

                        num = this.reDishServer(num);
                        this.$set(dataObj, 'goodsQuantity', num);
                    } else {
                    } // nothing
                    // this.updateData();


                    this.changeTotalTax();
                    this.negativeNumber();
                },
                plusMinusTotalTax: function plusMinusTotalTax(index, flag) {
                    var obj = this.currentDataObj;
                    var totalPrice = +obj.goodsTotalPrice;
                    var taxRate = +obj.goodsTaxRate;

                    if (!totalPrice || !taxRate) {
                        return;
                    }

                    var originTax = +Object(numberUtil["d" /* toKeepFixed2 */])(totalPrice.multiply(taxRate));

                    if (this.priceTaxMark === '1') {
                        // 含税
                        originTax = +Object(numberUtil["d" /* toKeepFixed2 */])(totalPrice.subtract(totalPrice.division(taxRate.add(1))));
                    }

                    var computedTotalTax;

                    if (flag) {
                        computedTotalTax = +obj.goodsTotalTax.add(0.01);
                    } else {
                        computedTotalTax = +obj.goodsTotalTax.subtract(0.01);
                    }

                    if (+computedTotalTax >= 0) {
                        this.$Message.info('单行编辑税额为小于0的负数，并且不能为空（0）');
                        return;
                    }

                    var difference = Math.abs(originTax.subtract(computedTotalTax)); // console.log(originTax, computedTotalTax, Math.abs(originTax.subtract(computedTotalTax)))

                    if (difference > 0.011) {
                        this.$Message.info('单行编辑税额不能大于0.1角（1分）');
                    } else {
                        var isRed = difference === 0 ? '' : 'red';
                        this.$set(obj, 'goodsTotalTax', Object(numberUtil["d" /* toKeepFixed2 */])(computedTotalTax));
                        this.$set(obj, 'isRed', isRed);
                    }
                },
                changeTotalTax: function changeTotalTax() {
                    var dataObj = this.currentDataObj;
                    var result = 0;
                    var rate = +dataObj.goodsTaxRate;
                    var noTaxTotalPrice;
                    var goodsTotalPrice = +dataObj.goodsTotalPrice > 0 ? +dataObj.goodsTotalPrice : -dataObj.goodsTotalPrice;

                    if (+this.priceTaxMark && rate) {
                        // noTaxTotalPrice = goodsTotalPrice / (1 + rate)
                        noTaxTotalPrice = goodsTotalPrice.division(rate.add(1));
                    } else {
                        noTaxTotalPrice = goodsTotalPrice;
                    }

                    if (this.showDifference) {
                        // result = dataObj.difference ? ((+dataObj.difference) * rate / (1 + rate)) : dataObj
                        //     .result = +result > 0 ? +result : -result
                        result = dataObj.difference ? dataObj.difference.multiply(rate).division(rate.add(1)) : dataObj.result = +result > 0 ? +result : -result;
                        var quantity = +dataObj.goodsQuantity > 0 ? +dataObj.goodsQuantity : -dataObj.goodsQuantity;

                        if (+dataObj.goodsQuantity) {
                            dataObj.goodsPrice = this.reDishServer(goodsTotalPrice / quantity);
                        }
                    } else if (this.isNegative && this.invoiceListMark === '1') {
                        if (rate) {
                            result = noTaxTotalPrice.multiply(rate);
                        } else {
                            result = dataObj.goodsTotalTax;
                        }
                    } else {
                        result = rate.multiply(noTaxTotalPrice);
                    }

                    if (dataObj.goodsTotalPrice !== '') {
                        var tt = Object(numberUtil["d" /* toKeepFixed2 */])(result);

                        if (this.isNegative || dataObj.isDiscountLine) {
                            dataObj.goodsTotalTax = +tt ? '-' + tt : '0.00';
                        } else {
                            dataObj.goodsTotalTax = +tt ? tt : '0.00';
                        }
                    } else {
                        dataObj.goodsTotalTax = '';
                    }

                    this.updateData();
                },
                // 负数统一转换
                negativeNumber: function negativeNumber() {
                    var dataObj = this.currentDataObj;
                    var quantity = Number(dataObj.goodsQuantity) > 0 ? dataObj.goodsQuantity : -dataObj.goodsQuantity;
                    var price = Number(dataObj.goodsTotalPrice) > 0 ? Object(numberUtil["d" /* toKeepFixed2 */])(dataObj.goodsTotalPrice) : Object(numberUtil["d" /* toKeepFixed2 */])(-dataObj.goodsTotalPrice);
                    var tax = Number(dataObj.goodsTotalTax) > 0 ? Object(numberUtil["d" /* toKeepFixed2 */])(dataObj.goodsTotalTax) : Object(numberUtil["d" /* toKeepFixed2 */])(-dataObj.goodsTotalTax); // console.log(tax, dataObj.goodsTotalTax)

                    if (this.isNegative || this.showCommonCopyEdit && dataObj.invoiceLineNature === '1') {
                        if (+quantity) {
                            this.$set(dataObj, 'goodsQuantity', '-' + Object(numberUtil["a" /* convertToNormal */])(quantity));
                        }

                        if (+price) {
                            this.$set(dataObj, 'goodsTotalPrice', '-' + price);
                        }

                        if (+tax) {
                            this.$set(dataObj, 'goodsTotalTax', '-' + tax);
                        } else {
                            this.$set(dataObj, 'goodsTotalTax', '0.00');
                        }
                    }

                    var pce = Number(dataObj.goodsPrice) > 0 ? dataObj.goodsPrice : -dataObj.goodsPrice;

                    if (Number(pce)) {
                        this.$set(dataObj, 'goodsPrice', Object(numberUtil["a" /* convertToNormal */])(pce));
                    } else {
                        this.$set(dataObj, 'goodsPrice', '');
                    }

                    this.updateData();
                },
                selectGoods: function selectGoods(value) {
                    var targetObj;
                    var hasMatch = this.suggestGoodsList.some(function (item) {
                        return item.goodsName === value && (targetObj = item);
                    });

                    if (hasMatch) {
                        var dataObj = this.currentDataObj;
                        dataObj.goodsName = targetObj.goodsName;
                        this.updateData();
                        this.changeTaxRate(targetObj.taxRate);
                    }
                },
                updateData: function updateData() {
                    if (typeUtil["a" /* default */].isFunction(this.updateDataCallback)) {
                        this.updateDataCallback.call(null, InvoiceContentItemvue_type_script_lang_js_objectSpread({}, this.currentDataObj), this.dataIndex);
                    }
                },
                showDifferenceModal: function showDifferenceModal() {
                    if (!this.isIssue && !this.isNegative && this.showDifference) {
                        this.$store.commit(helper["c" /* keyUtil */].getChangeName('showDifference'), true);
                    }
                }
            },
            computed: {
                showCommonCopyEdit: function showCommonCopyEdit() {
                    return this.$store.state.invoiceEdit.showCommonCopyEdit;
                },
                isExistOriginalData: function isExistOriginalData() {
                    return this.$store.state.invoiceEdit.isExistOriginalData;
                },
                readOnlyFlag: function readOnlyFlag() {
                    var fd = this.isNegative && this.showDifference && this.isExistOriginalData;
                    return this.relateDiscount || this.isIssue || fd;
                },
                // 负票不可以编辑
                isDisabled: function isDisabled() {
                    var a = this.isNegative && this.isExistOriginalData;

                    if (this.currentDataObj.isNewLine && !this.isIssue) {
                        return false;
                    } else {
                        return a || this.readOnlyFlag;
                    }
                },
                editPrice: function editPrice() {
                    if (this.isNegative) {
                        return this.readOnlyFlag || this.invoiceListMark === '1' && this.currentDataObj.goodsTaxRate === '';
                    } else {
                        return this.readOnlyFlag;
                    }
                },
                // 差额征税 单价列不开编辑
                priceNoEdit: function priceNoEdit() {
                    return !this.isNegative && this.showDifference;
                },
                isList: function isList() {
                    if (this.invoiceTypeCode === '004') {
                        return this.isNegative && this.invoiceListMark === '1';
                    } else {
                        // return this.isNegative && this.invoiceListMark === '1' && this.dataIndex === 0
                        return false;
                    }
                },
                taxRates: function taxRates() {
                    var result = _toConsumableArray(this.rates);

                    if (this.isSpecialInvoice) {
                        result = result.filter(function (item) {
                            return item.value !== 0;
                        });
                    }

                    return result;
                },
                priceTaxMark: function priceTaxMark() {
                    return this.$store.state.invoiceEdit.currentData.priceTaxMark;
                },
                taxRateShow: function taxRateShow() {
                    var percent = this.currentDataObj.goodsTaxRate * 100;

                    if (!isNaN(percent)) {
                        return percent + '%';
                    }

                    return '';
                },
                filteredSuggest: function filteredSuggest() {
                    var self = this;
                    return this.suggestGoodsList.filter(function (item) {
                        return item.goodsName.match(new RegExp(self.currentDataObj.goodsName, 'i'));
                    });
                },
                relateDiscount: function relateDiscount() {
                    return this.currentDataObj.isDiscountLine || this.currentDataObj.hasDiscountLine;
                },
                isRoll: function isRoll() {
                    return this.invoiceTypeCode === '025';
                },
                specialNegative: function specialNegative() {
                    return this.invoiceTypeCode === '004' && this.isNegative && this.taxationMethod === '0';
                } // isDishOrServer () {
                //     return this.issuePlace.isDishOrServerTerminal
                // }

            },
            // updated () {
            //     console.log('this.isRoll ', this.invoiceTypeCode, this.isRoll)
            //     console.log(this.isDisabled, this.currentDataObj.noEdit, '---------', this.showCommonCopyEdit, this.showDifference)
            // },
            watch: {
                priceTaxMark: {
                    handler: function handler(val) {
                        var dataObj = this.currentDataObj;

                        if (dataObj.goodsTotalPrice !== '') {// let total = (+dataObj.goodsTotalPrice)
                            // this.changeTotalPrice(total)
                        }
                    },
                    immediate: true
                },
                dataObj: {
                    deep: true,
                    handler: function handler(value) {
                        if (value.isDiscountLine) {
                            value.goodsPrice = '';
                        } // 删掉的时候 index 会变，需要更新内容


                        Object.assign(this.currentDataObj, value); // this.$set(this.currentDataObj,'goodsName',value.goodsName);
                        // this.$set(this.currentDataObj,'goodsQuanlity',value.goodsQuantity);
                        // 只影响组件本身和插入插槽的子组件,而不是所有子组件

                        this.$forceUpdate();
                    }
                },
                currentDataObj: {
                    deep: true,
                    handler: function handler(target) {
                        // this.updateDataCallback.call(null,this.currentDataObj,this.dataIndex)
                        this.updateDataCallback.call(null, InvoiceContentItemvue_type_script_lang_js_objectSpread({}, this.currentDataObj), this.dataIndex);
                    }
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_InvoiceContentItemvue_type_script_lang_js_ = (InvoiceContentItemvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue?vue&type=style&index=0&lang=scss&
        var InvoiceContentItemvue_type_style_index_0_lang_scss_ = __webpack_require__("sw9Q");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContentItem.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_InvoiceContentItemvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var InvoiceContentItem = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "DMbz":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/input-number/special_invoice.vue?vue&type=template&id=39b290a8&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {class: _vm.wrapClasses}, [_c('div', {class: _vm.handlerClasses}, [_c('a', {
                class: _vm.upClasses,
                on: {"click": _vm.up, "mousedown": _vm.preventDefault}
            }, [_c('span', {
                class: _vm.innerUpClasses,
                on: {"click": _vm.preventDefault}
            })]), _vm._v(" "), _c('a', {
                class: _vm.downClasses,
                on: {"click": _vm.down, "mousedown": _vm.preventDefault}
            }, [_c('span', {
                class: _vm.innerDownClasses,
                on: {"click": _vm.preventDefault}
            })])]), _vm._v(" "), _c('div', {class: _vm.inputWrapClasses}, [_c('input', {
                class: _vm.inputClasses,
                attrs: {
                    "id": _vm.elementId,
                    "disabled": _vm.disabled,
                    "autocomplete": "off",
                    "spellcheck": "false",
                    "autofocus": _vm.autofocus,
                    "readonly": _vm.readonly || !_vm.editable,
                    "name": _vm.name,
                    "placeholder": _vm.placeholder
                },
                domProps: {"value": _vm.formatterValue},
                on: {
                    "focus": _vm.focus, "blur": _vm.blur, "keydown": function ($event) {
                        $event.stopPropagation();
                        return _vm.keyDown($event)
                    }, "input": _vm.change, "mouseup": _vm.preventDefault, "change": _vm.change
                }
            })])])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/input-number/special_invoice.vue?vue&type=template&id=39b290a8&

// EXTERNAL MODULE: ./node_modules/iview/src/utils/assist.js
        var assist = __webpack_require__("zVF6");

// EXTERNAL MODULE: ./node_modules/iview/src/mixins/emitter.js
        var emitter = __webpack_require__("NnD1");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/input-number/special_invoice.vue?vue&type=script&lang=js&
        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var prefixCls = 'ivu-input-number';
        var iconPrefixCls = 'ivu-icon';

        function addNum(num1, num2) {
            var sq1, sq2, m;

            try {
                sq1 = num1.toString().split('.')[1].length;
            } catch (e) {
                sq1 = 0;
            }

            try {
                sq2 = num2.toString().split('.')[1].length;
            } catch (e) {
                sq2 = 0;
            } //        if (sq1 === 0 || sq2 === 0) {
            //            return num1 + num2;
            //        } else {
            //            m = Math.pow(10, Math.max(sq1, sq2));
            //            return (num1 * m + num2 * m) / m;
            //        }


            m = Math.pow(10, Math.max(sq1, sq2));
            return (Math.round(num1 * m) + Math.round(num2 * m)) / m;
        }

        /* harmony default export */
        var input_numbervue_type_script_lang_js_ = ({
            name: 'SInputNumber',
            mixins: [emitter["a" /* default */]],
            props: {
                max: {
                    type: Number,
                    default: Infinity
                },
                min: {
                    type: Number,
                    default: -Infinity
                },
                step: {
                    type: Number,
                    default: 1
                },
                value: {
                    type: [Number, String],
                    default: 1
                },
                size: {
                    validator: function validator(value) {
                        return Object(assist["k" /* oneOf */])(value, ['small', 'large', 'default']);
                    }
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                autofocus: {
                    type: Boolean,
                    default: false
                },
                readonly: {
                    type: Boolean,
                    default: false
                },
                editable: {
                    type: Boolean,
                    default: true
                },
                name: {
                    type: String
                },
                precision: {
                    type: Number
                },
                elementId: {
                    type: String
                },
                formatter: {
                    type: Function
                },
                parser: {
                    type: Function
                },
                placeholder: {
                    type: String,
                    default: ''
                }
            },
            data: function data() {
                return {
                    focused: false,
                    upDisabled: false,
                    downDisabled: false,
                    currentValue: this.value
                };
            },
            computed: {
                wrapClasses: function wrapClasses() {
                    var _ref;

                    return ["".concat(prefixCls), (_ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-").concat(this.size), !!this.size), _defineProperty(_ref, "".concat(prefixCls, "-disabled"), this.disabled), _defineProperty(_ref, "".concat(prefixCls, "-focused"), this.focused), _ref)];
                },
                handlerClasses: function handlerClasses() {
                    return "".concat(prefixCls, "-handler-wrap");
                },
                upClasses: function upClasses() {
                    return ["".concat(prefixCls, "-handler"), "".concat(prefixCls, "-handler-up"), _defineProperty({}, "".concat(prefixCls, "-handler-up-disabled"), this.upDisabled)];
                },
                innerUpClasses: function innerUpClasses() {
                    return "".concat(prefixCls, "-handler-up-inner ").concat(iconPrefixCls, " ").concat(iconPrefixCls, "-ios-arrow-up");
                },
                downClasses: function downClasses() {
                    return ["".concat(prefixCls, "-handler"), "".concat(prefixCls, "-handler-down"), _defineProperty({}, "".concat(prefixCls, "-handler-down-disabled"), this.downDisabled)];
                },
                innerDownClasses: function innerDownClasses() {
                    return "".concat(prefixCls, "-handler-down-inner ").concat(iconPrefixCls, " ").concat(iconPrefixCls, "-ios-arrow-down");
                },
                inputWrapClasses: function inputWrapClasses() {
                    return "".concat(prefixCls, "-input-wrap");
                },
                inputClasses: function inputClasses() {
                    return "".concat(prefixCls, "-input");
                },
                precisionValue: function precisionValue() {
                    // can not display 1.0
                    if (!this.currentValue) return this.currentValue;
                    return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
                },
                formatterValue: function formatterValue() {
                    if (this.formatter && this.precisionValue !== null) {
                        return this.formatter(this.precisionValue);
                    } else {
                        return this.precisionValue;
                    }
                }
            },
            methods: {
                preventDefault: function preventDefault(e) {
                    e.preventDefault();
                },
                up: function up(e) {
                    var targetVal = Number(e.target.value);

                    if (this.upDisabled && isNaN(targetVal)) {
                        return false;
                    }

                    this.changeStep('up', e);
                },
                down: function down(e) {
                    var targetVal = Number(e.target.value);

                    if (this.downDisabled && isNaN(targetVal)) {
                        return false;
                    }

                    this.changeStep('down', e);
                },
                changeStep: function changeStep(type, e) {
                    if (this.disabled || this.readonly) {
                        return false;
                    }

                    var targetVal = Number(e.target.value);
                    var val = Number(this.currentValue);
                    var step = Number(this.step);

                    if (isNaN(val)) {
                        return false;
                    } // input a number, and key up or down


                    if (!isNaN(targetVal)) {
                        if (type === 'up') {
                            if (addNum(targetVal, step) <= this.max) {
                                val = targetVal;
                            } else {
                                return false;
                            }
                        } else if (type === 'down') {
                            if (addNum(targetVal, -step) >= this.min) {
                                val = targetVal;
                            } else {
                                return false;
                            }
                        }
                    }

                    if (type === 'up') {
                        val = addNum(val, step);
                    } else if (type === 'down') {
                        val = addNum(val, -step);
                    }

                    this.setValue(val);
                },
                setValue: function setValue(val) {
                    var _this = this;

                    // 如果 step 是小数，且没有设置 precision，是有问题的
                    if (val && !isNaN(this.precision)) val = Number(Number(val).toFixed(this.precision));
                    this.$nextTick(function () {
                        _this.currentValue = val;

                        _this.$emit('input', val);

                        _this.$emit('on-change', val);

                        _this.dispatch('FormItem', 'on-form-change', val);
                    });
                },
                focus: function focus(event) {
                    this.focused = true;
                    this.$emit('on-focus', event);
                },
                blur: function blur() {
                    this.focused = false;
                    this.$emit('on-blur');
                },
                keyDown: function keyDown(e) {
                    if (e.keyCode === 38) {
                        e.preventDefault();
                        this.up(e);
                    } else if (e.keyCode === 40) {
                        e.preventDefault();
                        this.down(e);
                    }
                },
                change: function change(event) {
                    var val = event.target.value.trim();

                    if (this.parser) {
                        val = this.parser(val);
                    }

                    if (event.type === 'input' && val.match(/^-?\.?$|\.$/)) return; // prevent fire early if decimal. If no more input the change event will fire later

                    var min = this.min,
                        max = this.max;
                    var isEmptyString = val.length === 0;
                    val = Number(val);

                    if (isEmptyString) {
                        this.setValue(null);
                        return;
                    }

                    if (event.type === 'change') {
                        if (val === this.currentValue && val > min && val < max) return; // already fired change for input event
                    }

                    if (!isNaN(val) && !isEmptyString) {
                        this.currentValue = val;
                        if (event.type === 'input' && val < min) return; // prevent fire early in case user is typing a bigger number. Change will handle this otherwise.

                        if (val > max) {
                            this.setValue(max);
                        } else if (val < min) {
                            this.setValue(min);
                        } else {
                            this.setValue(val);
                        }
                    } else {
                        event.target.value = this.currentValue;
                    }
                },
                changeVal: function changeVal(val) {
                    val = Number(val);

                    if (!isNaN(val)) {
                        var step = this.step;
                        this.upDisabled = val + step > this.max;
                        this.downDisabled = val - step < this.min;
                    } else {
                        this.upDisabled = true;
                        this.downDisabled = true;
                    }
                }
            },
            mounted: function mounted() {
                this.changeVal(this.currentValue);
            },
            watch: {
                value: function value(val) {
                    this.currentValue = val;
                },
                currentValue: function currentValue(val) {
                    this.changeVal(val);
                },
                min: function min() {
                    this.changeVal(this.currentValue);
                },
                max: function max() {
                    this.changeVal(this.currentValue);
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/input-number/special_invoice.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_input_numbervue_type_script_lang_js_ = (input_numbervue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/input-number/special_invoice.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_input_numbervue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var input_number = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "ESqE":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceFooter_vue_vue_type_style_index_0_id_531e591a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqs9");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceFooter_vue_vue_type_style_index_0_id_531e591a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceFooter_vue_vue_type_style_index_0_id_531e591a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceFooter_vue_vue_type_style_index_0_id_531e591a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "Fwjp":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContent_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BABD");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContent_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContent_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContent_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "GlzX":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Wyyr");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "Guu2":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _utils_typeUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("v7p+");

        function _slicedToArray(arr, i) {
            return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
        }

        function _nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function _iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function _arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

        /**
         * 卷票 校验规则
         * 2018-12-28 zhengshui
         */
// 长度 sum 位，小数点前最多 bef 位，小数点后最多 lst 位


        var REG = function REG(data, sum, bef, lst) {
            if (!data || data === 'null') return false;
            data = data + '';

            var _data$match = data.match(/^-?(\d{1,})(\.{0,1})(\d{0,})/),
                _data$match2 = _slicedToArray(_data$match, 4),
                all = _data$match2[0],
                prev = _data$match2[1],
                point = _data$match2[2],
                next = _data$match2[3]; // eslint-disable-line


            return all.length > sum || prev.length > bef || next.length > lst;
        };

        /* harmony default export */
        __webpack_exports__["a"] = ({
            data: function data() {
                return {
                    isAddLine: true
                };
            },
            methods: {
                // 卷票 增加行的 标准
                validateRollAddRow: function validateRollAddRow() {
                    var rollType = JSON.parse(sessionStorage.getItem('orgConfig')).JSYP || '';

                    if (!rollType) {
                        this.$Message.info('卷票没有设置票样，请先设置票样后再开具');
                        return false;
                    }

                    if (this.invoiceTypeCode === '025') {
                        var method = 'validateRollType' + rollType;
                        var curData = this.generateCurData();

                        if (this[method]) {
                            return this[method](curData);
                        } else {
                            console.log("\u5377\u5F0F\u7968\u6837\u4E3A01\uFF0C02\uFF0C03\uFF0C04\uFF0C05\uFF0C06\uFF0C07\u3002\u673A\u6784\u914D\u7F6E\u63A5\u53E3\u8FD4\u56DE\u7684\u7968\u6837".concat(rollType, "\u4E0D\u5B58\u5728")); // eslint-disable-line

                            return false;
                        }
                    } else {
                        return true;
                    }
                },
                // 创建数据
                generateCurData: function generateCurData() {
                    var _this$detailList$slic = this.detailList.slice(-1),
                        _this$detailList$slic2 = _slicedToArray(_this$detailList$slic, 1),
                        prev = _this$detailList$slic2[0];

                    prev.posiQuantity = (prev.goodsQuantity + '').replace('-', '');
                    prev.posiPrice = (prev.goodsPrice + '').replace('-', '');
                    return prev;
                },
                validateRollType01: function validateRollType01(curData) {
                    if (this.isAddLine && this.detailList.length === 6) {
                        this.$Message.info('卷式票样01最多只能添加6行');
                        return false;
                    }

                    if (curData.posiQuantity && REG(curData.posiQuantity, 6, 4, 3)) {
                        this.$Message.info('卷式票样01数量长度6位，小数点前最多4位，小数点后最多3位');
                        return false;
                    }

                    if (curData.posiPrice && REG(curData.posiPrice, 9, 7, 3)) {
                        this.$Message.info('卷式票样01单价长度9位，小数点前最多7位，小数点后最多3位');
                        return false;
                    }

                    return true;
                },
                validateRollType02: function validateRollType02(curData) {
                    if (this.isAddLine && this.detailList.length === 3) {
                        this.$Message.info('卷式票样02最多只能添加3行');
                        return false;
                    }

                    if (curData.posiQuantity && REG(curData.posiQuantity, 6, 4, 3)) {
                        this.$Message.info('卷式票样02数量长度6位，小数点前最多4位，小数点后最多3位');
                        return false;
                    }

                    if (curData.posiPrice && REG(curData.posiPrice, 9, 7, 3)) {
                        this.$Message.info('卷式票样02单价长度9位，小数点前最多7位，小数点后最多3位');
                        return false;
                    }

                    return true;
                },
                validateRollType03: function validateRollType03(curData) {
                    if (this.isAddLine && this.detailList.length === 6) {
                        this.$Message.info('卷式票样03最多只能添加6行');
                        return false;
                    }

                    if (curData.posiQuantity && REG(curData.posiQuantity, 5, 3, 3)) {
                        this.$Message.info('卷式票样03数量长度5位，小数点前最多3位，小数点后最多3位');
                        return false;
                    }

                    if (curData.posiPrice && REG(curData.posiPrice, 7, 5, 3)) {
                        this.$Message.info('卷式票样03单价长度7位，小数点前最多5位，小数点后最多3位');
                        return false;
                    }

                    return true;
                },
                validateRollType04: function validateRollType04(curData) {
                    if (this.isAddLine && this.detailList.length === 3) {
                        this.$Message.info('卷式票样04最多只能添加3行');
                        return false;
                    }

                    if (curData.posiQuantity && REG(curData.posiQuantity, 5, 3, 3)) {
                        this.$Message.info('卷式票样03数量长度5位，小数点前最多3位，小数点后最多3位');
                        return false;
                    }

                    if (curData.posiPrice && REG(curData.posiPrice, 7, 5, 3)) {
                        this.$Message.info('卷式票样03单价长度7位，小数点前最多5位，小数点后最多3位');
                        return false;
                    }

                    return true;
                },
                validateRollType05: function validateRollType05() {
                    return true;
                },
                validateRollType06: function validateRollType06(curData) {
                    if (this.isAddLine) {
                        var LineTotal = this.detailList.reduce(function (total, item) {
                            var num = _utils_typeUtil__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].getStrLength(item.goodsName);

                            if (Number.isNaN(num)) {
                                return total;
                            }

                            var line = Math.ceil(num / 14);
                            return total + line;
                        }, 0);

                        if (this.remarks && LineTotal >= 20) {
                            this.$Message.info('卷式票样06商品行超限');
                            return false;
                        }

                        if (!this.remarks && LineTotal >= 22) {
                            this.$Message.info('卷式票样06商品行超限');
                            return false;
                        }
                    }

                    if (curData.posiQuantity && REG(curData.posiQuantity, 6, 4, 3)) {
                        this.$Message.info('卷式票样数量06长度6位，小数点前最多4位，小数点后最多3位');
                        return false;
                    }

                    if (curData.posiPrice && REG(curData.posiPrice, 9, 7, 3)) {
                        this.$Message.info('卷式票样06单价长度9位，小数点前最多7位，小数点后最多3位');
                        return false;
                    }

                    return true;
                },
                validateRollType07: function validateRollType07(curData) {
                    if (this.isAddLine) {
                        var LineTotal = this.detailList.reduce(function (total, item) {
                            var num = _utils_typeUtil__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].getStrLength(item.goodsName);

                            if (Number.isNaN(num)) {
                                return total;
                            }

                            var line = Math.ceil(num / 10);
                            return total + line;
                        }, 0);

                        if (this.remarks && LineTotal >= 16) {
                            this.$Message.info('卷式票样07商品行超限');
                            return false;
                        }

                        if (!this.remarks && LineTotal >= 19) {
                            this.$Message.info('卷式票样07商品行超限');
                            return false;
                        }
                    }

                    if (curData.posiQuantity && REG(curData.posiQuantity, 5, 3, 3)) {
                        this.$Message.info('卷式票样07数量长度5位，小数点前最多3位，小数点后最多3位');
                        return false;
                    }

                    if (curData.posiPrice && REG(curData.posiPrice, 7, 5, 3)) {
                        this.$Message.info('卷式票样07单价长度7位，小数点前最多5位，小数点后最多3位');
                        return false;
                    }

                    return true;
                }
            }
        });

        /***/
    }),

    /***/ "Ibsr":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/NumberInput.vue?vue&type=template&id=33b11dca&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', [_c('input', {
                staticClass: "input",
                staticStyle: {"ime-mode": "disabled"},
                attrs: {"type": "text", "disabled": _vm.disabled, "readonly": _vm.readonly, "autocomplete": "off"},
                domProps: {"value": _vm.value},
                on: {
                    "focus": _vm.focus, "blur": _vm.blur, "keydown": function ($event) {
                        $event.stopPropagation();
                        return _vm.keyDown($event)
                    }, "change": _vm.change
                }
            })])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/NumberInput.vue?vue&type=template&id=33b11dca&scoped=true&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/NumberInput.vue?vue&type=script&lang=js&
        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
        var prefixCls = 'ivu-input-number';
        var iconPrefixCls = 'ivu-icon'; // function isValueNumber (value) {
//     return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)|(^-?0{1}$)/).test(value + '')
// }

        function addNum(num1, num2) {
            var sq1, sq2, m;

            try {
                sq1 = num1.toString().split('.')[1].length;
            } catch (e) {
                sq1 = 0;
            }

            try {
                sq2 = num2.toString().split('.')[1].length;
            } catch (e) {
                sq2 = 0;
            } //        if (sq1 === 0 || sq2 === 0) {
            //            return num1 + num2;
            //        } else {
            //            m = Math.pow(10, Math.max(sq1, sq2));
            //            return (num1 * m + num2 * m) / m;
            //        }


            m = Math.pow(10, Math.max(sq1, sq2));
            return (num1 * m + num2 * m) / m;
        }

        /* harmony default export */
        var NumberInputvue_type_script_lang_js_ = ({
            props: {
                withSelector: {
                    type: Boolean,
                    default: false
                },
                type: {
                    validator: function validator(value) {
                        return ['PositiveInteger', 'NegativeInteger', 'Integer', 'PositiveFloat', 'NegativeFloat', 'NoneZeroFloat', 'Float', 'Percent'].indexOf(value) !== -1;
                    }
                },
                max: {
                    type: Number,
                    default: Infinity
                },
                min: {
                    type: Number,
                    default: -Infinity
                },
                step: {
                    type: Number,
                    default: 1
                },
                value: {
                    type: [Number, String],
                    default: ''
                },
                size: {
                    validator: function validator(value) {
                        return ['small', 'large'].indexOf(value) !== -1;
                    }
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                readonly: {
                    type: Boolean,
                    default: false
                }
            },
            data: function data() {
                return {
                    focused: false,
                    upDisabled: false,
                    downDisabled: false,
                    currentValue: this.value
                };
            },
            computed: {
                wrapClasses: function wrapClasses() {
                    var _ref;

                    return ["".concat(prefixCls), (_ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-").concat(this.size), !!this.size), _defineProperty(_ref, "".concat(prefixCls, "-disabled"), this.disabled), _defineProperty(_ref, "".concat(prefixCls, "-focused"), this.focused), _ref)];
                },
                handlerClasses: function handlerClasses() {
                    return "".concat(prefixCls, "-handler-wrap");
                },
                upClasses: function upClasses() {
                    return ["".concat(prefixCls, "-handler"), "".concat(prefixCls, "-handler-up"), _defineProperty({}, "".concat(prefixCls, "-handler-up-disabled"), this.upDisabled)];
                },
                innerUpClasses: function innerUpClasses() {
                    return "".concat(prefixCls, "-handler-up-inner ").concat(iconPrefixCls, " ").concat(iconPrefixCls, "-ios-arrow-up");
                },
                downClasses: function downClasses() {
                    return ["".concat(prefixCls, "-handler"), "".concat(prefixCls, "-handler-down"), _defineProperty({}, "".concat(prefixCls, "-handler-down-disabled"), this.downDisabled)];
                },
                innerDownClasses: function innerDownClasses() {
                    return "".concat(prefixCls, "-handler-down-inner ").concat(iconPrefixCls, " ").concat(iconPrefixCls, "-ios-arrow-down");
                },
                inputWrapClasses: function inputWrapClasses() {
                    return "".concat(prefixCls, "-input-wrap");
                },
                inputClasses: function inputClasses() {
                    return "".concat(prefixCls, "-input");
                }
            },
            methods: {
                preventDefault: function preventDefault(e) {
                    e.preventDefault();
                },
                up: function up(e) {
                    var targetVal = Number(e.target.value);

                    if (this.upDisabled && isNaN(targetVal)) {
                        return false;
                    }

                    this.changeStep('up', e);
                },
                down: function down(e) {
                    var targetVal = Number(e.target.value);

                    if (this.downDisabled && isNaN(targetVal)) {
                        return false;
                    }

                    this.changeStep('down', e);
                },
                changeStep: function changeStep(type, e) {
                    if (this.disabled) {
                        return false;
                    }

                    var targetVal = Number(e.target.value);
                    var val = Number(this.currentValue);
                    var step = Number(this.step);

                    if (isNaN(val)) {
                        return false;
                    } // input a number, and key up or down


                    if (!isNaN(targetVal)) {
                        if (type === 'up') {
                            if (addNum(targetVal, step) <= this.max) {
                                val = targetVal;
                            } else {
                                return false;
                            }
                        } else if (type === 'down') {
                            if (addNum(targetVal, -step) >= this.min) {
                                val = targetVal;
                            } else {
                                return false;
                            }
                        }
                    }

                    if (type === 'up') {
                        val = addNum(val, step);
                    } else if (type === 'down') {
                        val = addNum(val, -step);
                    }

                    this.setValue(val);
                },
                setValue: function setValue(val) {
                    var _this = this;

                    this.$nextTick(function () {
                        _this.currentValue = val;

                        _this.$emit('on-change', val);
                    });
                },
                focus: function focus() {
                    this.focused = true;
                    this.$emit('on-focus');
                },
                blur: function blur(event) {
                    var _this2 = this;

                    // debugger
                    this.focused = false;
                    var val = event.target.value.trim();
                    var max = this.max;
                    var min = this.min;

                    if (this.isValueValid(val) || val === '') {
                        var nVal = Number(val);
                        this.currentValue = val;

                        if (nVal > max) {
                            this.$nextTick(function () {
                                _this2.$emit('on-blur', max);
                            });
                        } else if (nVal < min) {
                            this.$nextTick(function () {
                                _this2.$emit('on-blur', min);
                            });
                        } else {
                            this.$nextTick(function () {
                                // event.target.value = this.currentValue
                                _this2.$emit('on-blur', _this2.currentValue);
                            });
                        }
                    } else {
                        event.target.value = this.currentValue;
                    }
                },
                keyDown: function keyDown(e) {
                    if (e.keyCode === 38) {
                        e.preventDefault();
                        this.up(e);
                    } else if (e.keyCode === 40) {
                        e.preventDefault();
                        this.down(e);
                    }
                },
                change: function change(event) {
                    var val = event.target.value.trim();
                    var max = this.max;
                    var min = this.min;

                    if (this.isValueValid(val) || val === '') {
                        var nVal = Number(val);
                        this.currentValue = val;

                        if (nVal > max) {
                            this.setValue(max);
                        } else if (nVal < min) {
                            this.setValue(min);
                        } else {
                            this.setValue(val);
                        }
                    } else {
                        event.target.value = this.currentValue;
                    }
                },
                changeVal: function changeVal(val) {
                    if (this.isValueValid(val)) {
                        var nVal = Number(val);
                        var step = this.step;
                        this.upDisabled = nVal + step > this.max;
                        this.downDisabled = nVal - step < this.min;
                    } else {
                        this.upDisabled = true;
                        this.downDisabled = true;
                    }
                },
                isValueValid: function isValueValid(val) {
                    return this.typeUtil['is' + this.type](val);
                }
            },
            compiled: function compiled() {
                this.changeVal(this.currentValue);
            },
            watch: {
                value: function value(val) {
                    this.currentValue = val;
                },
                currentValue: function currentValue(val) {
                    this.changeVal(val);
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/NumberInput.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_NumberInputvue_type_script_lang_js_ = (NumberInputvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/NumberInput.vue?vue&type=style&index=0&id=33b11dca&lang=scss&scoped=true&
        var NumberInputvue_type_style_index_0_id_33b11dca_lang_scss_scoped_true_ = __webpack_require__("ircq");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/NumberInput.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_NumberInputvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "33b11dca",
            null
        )

        /* harmony default export */
        var NumberInput = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "JLbz":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/CustomerSelector.vue?vue&type=template&id=bb6b5664&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('Modal', {
                attrs: {"title": "选择客户", "z-index": 200, "width": "60%", "maskClosable": false},
                on: {"on-visible-change": _vm.visibleStateChange, "on-ok": _vm.selectItem},
                model: {
                    value: (_vm.showCustomerSelector), callback: function ($$v) {
                        _vm.showCustomerSelector = $$v
                    }, expression: "showCustomerSelector"
                }
            }, [_c('div', {staticClass: "wrap red-invoice-sell-modal"}, [(_vm.startRender) ? _c('search-com', {
                ref: "searchCom",
                attrs: {"searchFilterData": _vm.searchFilterData},
                on: {"on-query": _vm.query}
            }) : _vm._e(), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "查询",
                    "clickCallback": _vm.queryBtn
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "选择",
                    "clickCallback": _vm.selectItem
                }
            })], 1), _vm._v(" "), _c('BwDataGrid', {
                ref: "customerWrap",
                attrs: {
                    "table-ref": "customerSelector",
                    "columns": _vm.columns,
                    "data": _vm.resultList,
                    "total": _vm.resultTotal,
                    "highlight-row": true,
                    "dynamicallocation": false,
                    "show-sizer": false
                },
                on: {
                    "bw-query": _vm.query,
                    "bw-current-change": _vm.changeCurrentRow,
                    "bw-row-dbl-click": _vm.selectItem
                }
            })], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/CustomerSelector.vue?vue&type=template&id=bb6b5664&

// EXTERNAL MODULE: ./src/components/page/common/FuncButton.vue + 4 modules
        var FuncButton = __webpack_require__("ZPqo");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/searchCom.vue + 4 modules
        var searchCom = __webpack_require__("qvMR");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/CustomerSelector.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var propMixin = {
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['currentCustomerType', 'showCustomerSelector'], function (state) {
                return state.invoiceEdit;
            }))
        };
        /* harmony default export */
        var CustomerSelectorvue_type_script_lang_js_ = ({
            name: 'customer-selector',
            mixins: [propMixin],
            components: {
                SearchCom: searchCom["default"],
                FuncButton: FuncButton["default"]
            },
            props: {
                invoiceTypeCode: {
                    type: String,
                    default: ''
                }
            },
            data: function data() {
                return {
                    // customerCodeAbbr: '',
                    searchFilterData: {},
                    startRender: false,
                    resultTotal: 0,
                    // 查询结果总数
                    resultList: [],
                    // 查询结果,
                    pagination: null,
                    columns: [],
                    $_categoryMap: {}
                };
            },
            created: function created() {// this.init()
            },
            methods: {
                init: function init(res) {
                    var _this = this;

                    var self = this;
                    this.$store.dispatch('getCustomerCategory', {
                        callback: function callback(respData) {
                            var categoryList = respData.results || [];
                            _this.$_categoryMap = categoryList.reduce(function (result, item) {
                                result[item.id] = item;
                                return result;
                            }, {});
                            self.getExtData(categoryList);
                        }
                    });
                },
                getExtData: function getExtData(list) {
                    var _this2 = this;

                    this.common.initExtPage.call(this, 'jcxxkhgl', true).then(function (config) {
                        config.searchFilterData.classifyId.selectList = list;
                        _this2.searchFilterData = config.searchFilterData;
                        _this2.columns = config.columns.filter(function (item) {
                            return !(item.key === 'action' || item.type === 'selection');
                        });
                        _this2.startRender = true;

                        _this2.$nextTick(function () {
                            _this2.query();
                        });
                    });
                },
                queryBtn: function queryBtn() {
                    this.$refs.customerWrap.onChanged(1);
                },
                query: function query() {
                    var _this3 = this;

                    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
                        _ref$pageNo = _ref.pageNo,
                        pageNo = _ref$pageNo === void 0 ? 1 : _ref$pageNo,
                        _ref$pageSize = _ref.pageSize,
                        pageSize = _ref$pageSize === void 0 ? 10 : _ref$pageSize;

                    this.currentRow = null;
                    this.pagination = {
                        pageNo: pageNo,
                        pageSize: pageSize
                    }; // var params = Object.assign({}, args);
                    // this.paramUtil.setWhenNotEmpty(this.$data,params,['customerCategory','customerName','customerCode','customerCodeAbbr']);

                    var cusQuery = this.$refs.searchCom.getSearchData();

                    var params = _objectSpread({}, cusQuery, {}, this.pagination);

                    var categoryMap = this.$_categoryMap || {};
                    this.$store.dispatch('getCustomerList', {
                        params: params,
                        callback: function callback(respData) {
                            var renderData = function renderData() {
                                var dataResults = (respData.results || []).map(function (item) {
                                    var target = categoryMap[item.classifyId];
                                    item.categoryName = target ? target.classifyName : '';
                                    return item;
                                });
                                _this3.resultList = dataResults;
                                _this3.resultTotal = parseInt(respData.total);
                            };

                            if (Object.keys(categoryMap).length === 0) {
                                setTimeout(renderData, 10);
                            } else {
                                renderData();
                            }
                        }
                    });
                },
                riskCustomer: function riskCustomer(fun) {
                    var _this4 = this;

                    var tempCurrentRow = this.currentRow;
                    var params = {
                        customerName: this.currentRow.customerName,
                        customerTaxCode: this.currentRow.taxNo,
                        invoiceType: this.invoiceTypeCode
                    };
                    this.http.outPost('/api/ruleCheck/checkCustomer', _objectSpread({}, params), function (res) {
                        if (res.data.results[0] && res.data.results[0].returncode + '' === '1') {
                            _this4.$Modal.confirm({
                                title: '提示',
                                content: res.data.results[0].returnMsg,
                                onOk: function onOk() {
                                    fun(tempCurrentRow);
                                },
                                onCancel: function onCancel() {
                                }
                            });

                            return;
                        }

                        fun(tempCurrentRow);
                    });
                },
                chooseCustomer: function chooseCustomer(param) {
                    param = this.currentRow ? this.currentRow : param;

                    if (param) {
                        // let status = +this.currentRow.status
                        var status = +param.status;

                        if (!status) {
                            this.$Message.warning('该客户已冻结！');
                        } else {
                            this.showCustomerSelector = false;
                            var currentCustomerInfoKey = this.currentCustomerType + 'Info'; // let { taxNo, customerName, address, phone, bankName, bankAccount, mobile = '', email = '', id } = this.currentRow

                            var _param = param,
                                taxNo = _param.taxNo,
                                customerName = _param.customerName,
                                address = _param.address,
                                phone = _param.phone,
                                bankName = _param.bankName,
                                bankAccount = _param.bankAccount,
                                _param$mobile = _param.mobile,
                                mobile = _param$mobile === void 0 ? '' : _param$mobile,
                                _param$email = _param.email,
                                email = _param$email === void 0 ? '' : _param$email,
                                id = _param.id;
                            var current = {
                                id: id || '',
                                taxSerial: taxNo || '',
                                name: customerName || '',
                                addressAndPhone: (address || '') + (phone || ''),
                                bankAndAccount: (bankName || '') + (bankAccount || '')
                            }; //

                            this.$store.commit(helper["c" /* keyUtil */].getChangeName(currentCustomerInfoKey), current);
                            this.$store.commit(helper["c" /* keyUtil */].getChangeName('email'), email);
                            this.$store.commit(helper["c" /* keyUtil */].getChangeName('phone'), mobile);
                            this.$refs.customerWrap.clearCurrentRow();
                            this.currentRow = null;
                        }
                    } else {
                        this.$Message.warning('没有选中任何数据');
                    }
                },
                selectItem: function selectItem() {
                    this.riskCustomer(this.chooseCustomer);
                },
                visibleStateChange: function visibleStateChange(state) {
                    // if (state) {
                    //     this.$refs.customerWrap.onChanged(1)
                    // }
                    this.showCustomerSelector = state;
                },
                changeCurrentRow: function changeCurrentRow(newRow, oldRow) {
                    this.currentRow = newRow;
                }
            },
            watch: {
                showCustomerSelector: function showCustomerSelector(val) {
                    if (!val) {
                        this.$refs.customerWrap.onChanged(1);
                    } else {
                        this.init();
                    }
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/CustomerSelector.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_CustomerSelectorvue_type_script_lang_js_ = (CustomerSelectorvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/CustomerSelector.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_CustomerSelectorvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var CustomerSelector = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "LpTG":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_GoodsSelector_vue_vue_type_style_index_0_id_b10480f2_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bQzA");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_GoodsSelector_vue_vue_type_style_index_0_id_b10480f2_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_GoodsSelector_vue_vue_type_style_index_0_id_b10480f2_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_GoodsSelector_vue_vue_type_style_index_0_id_b10480f2_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "MKmH":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/DiscountSelector.vue?vue&type=template&id=4ed0fc62&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('Modal', {
                attrs: {
                    "title": "折扣设置",
                    "width": "350",
                    "maskClosable": false,
                    "z-index": 200,
                    "loading": _vm.loading
                },
                on: {"on-visible-change": _vm.visibleStateChange, "on-ok": _vm.selectItem},
                model: {
                    value: (_vm.showDiscountSelector), callback: function ($$v) {
                        _vm.showDiscountSelector = $$v
                    }, expression: "showDiscountSelector"
                }
            }, [_c('div', {staticClass: "discount"}, [_c('div', [_vm._v("商品原金额："), _c('span', {domProps: {"textContent": _vm._s(_vm.discountPrice)}})]), _vm._v(" "), _c('div', [_c('span', {staticClass: "inline-label"}, [_vm._v("折扣行数：")]), _vm._v(" "), _c('div', {staticClass: "addOrLess line-select inline-content"}, [_c('InputNumber', {
                attrs: {
                    "max": _vm.maxLine,
                    "min": 1
                }, model: {
                    value: (_vm.discountLines), callback: function ($$v) {
                        _vm.discountLines = $$v
                    }, expression: "discountLines"
                }
            })], 1)]), _vm._v(" "), _c('div', [_c('RadioGroup', {
                model: {
                    value: (_vm.discountType),
                    callback: function ($$v) {
                        _vm.discountType = $$v
                    },
                    expression: "discountType"
                }
            }, [_c('Radio', {attrs: {"label": "rate"}}, [_vm._v("折扣率")]), _vm._v(" "), _c('Radio', {attrs: {"label": "amount"}}, [_vm._v("金额")])], 1)], 1), _vm._v(" "), _c('SInputNumber', {
                attrs: {
                    "min": 0,
                    "max": _vm.max,
                    "formatter": function (value) {
                        return "" + value + _vm.unit;
                    },
                    "parser": function (value) {
                        return value.replace(_vm.unit, '');
                    }
                }, model: {
                    value: (_vm.discountValue), callback: function ($$v) {
                        _vm.discountValue = $$v
                    }, expression: "discountValue"
                }
            })], 1)])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/DiscountSelector.vue?vue&type=template&id=4ed0fc62&

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// EXTERNAL MODULE: ./src/components/page/common/input-number/special_invoice.vue + 4 modules
        var input_number = __webpack_require__("DMbz");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/DiscountSelector.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var DISCOUNT_TYPE_RATE = 'rate'; // const DISCOUNT_TYPE_AMOUNT = 'amount'

        var propMixin = {
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['showDiscountSelector'], function (state) {
                return state.invoiceEdit;
            }))
        };
        /* harmony default export */
        var DiscountSelectorvue_type_script_lang_js_ = ({
            name: 'discount-selector',
            mixins: [propMixin],
            components: {
                SInputNumber: input_number["default"]
            },
            props: {
                discountPriceMap: {
                    type: Object,
                    required: true
                },
                maxLine: {
                    type: Number,
                    defaut: 1
                },
                changeDiscount: {
                    type: Function,
                    required: true
                } // goodsPrice: {
                //   type: [String, Number],
                //   required: true
                // }

            },
            data: function data() {
                return {
                    discountLines: 1,
                    discountType: 'rate',
                    discountValue: 0,
                    loading: true,
                    max: 100
                };
            },
            watch: {
                discountType: function discountType(val) {
                    this.discountValue = '0';

                    if (val === 'rate') {
                        this.max = 100;
                    } else {
                        this.max = Infinity;
                    }
                }
            },
            methods: {
                visibleStateChange: function visibleStateChange(state) {
                    this.$emit('update:visible', state);

                    if (!state) {
                        this.discountLines = 1;
                        this.discountType = 'rate';
                        this.discountValue = 0;
                    }
                },
                selectItem: function selectItem() {
                    var _this = this;

                    if (this.discountType === DISCOUNT_TYPE_RATE) {
                        if (this.discountValue <= 0 || this.discountValue > 100) {
                            this.$Message.warning('折扣率只能是0-100之间的数值');
                            this.loading = false;
                            this.$nextTick(function () {
                                _this.loading = true;
                            });
                        } else {
                            this.changeDiscount(this.$data, this.discountLines);
                            this.loading = false;
                        }
                    } else {
                        if (this.discountValue <= 0) {
                            this.$Message.warning('折扣金额不能为0和负数');
                            this.loading = false;
                            this.$nextTick(function () {
                                _this.loading = true;
                            });
                        } else if (this.discountValue > this.discountPrice) {
                            this.$Message.warning('折扣金额不能大于原始金额');
                            this.loading = false;
                            this.$nextTick(function () {
                                _this.loading = true;
                            });
                        } else {
                            this.changeDiscount(this.$data, this.discountLines);
                            this.loading = false;
                        }
                    }
                }
            },
            computed: {
                discountPrice: function discountPrice() {
                    var tp = this.discountPriceMap[this.discountLines];
                    return (+tp).toFixed(2);
                },
                unit: function unit() {
                    return this.discountType === 'rate' ? '%' : '圆';
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/DiscountSelector.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_DiscountSelectorvue_type_script_lang_js_ = (DiscountSelectorvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/DiscountSelector.vue?vue&type=style&index=0&lang=scss&
        var DiscountSelectorvue_type_style_index_0_lang_scss_ = __webpack_require__("Z4oc");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/DiscountSelector.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_DiscountSelectorvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var DiscountSelector = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "Q5iz":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _store_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lq9z");

        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

        /**
         * --------------------------------------------------------------------------- *
         *
         * @Project: BWCloudPrepose-catering
         * @FileName: invoiceIssueConfigMixin
         * @Dependence: --
         * @Description: --
         * @CreatedBy: zhangliao
         * @CreateDate: 2018/3/7 下午9:19
         * @LastModifiedBy: zhangliao
         * @LastModifiedDate: 2018/3/7 下午9:19
         *
         * --------------------------------------------------------------------------- *
         */

        /* eslint-disable */

        /* harmony default export */
        __webpack_exports__["a"] = ({
            computed: _objectSpread({}, Object(_store_helper__WEBPACK_IMPORTED_MODULE_0__[/* generateComputed */ "a"])(['place', 'email', 'phone', 'withTax'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        });

        /***/
    }),

    /***/ "R2Dl":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "RDDj":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CheckSwitch_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("R2Dl");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CheckSwitch_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CheckSwitch_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CheckSwitch_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "RnhZ":
    /***/ (function (module, exports, __webpack_require__) {

        var map = {
            "./af": "K/tc",
            "./af.js": "K/tc",
            "./ar": "jnO4",
            "./ar-dz": "o1bE",
            "./ar-dz.js": "o1bE",
            "./ar-kw": "Qj4J",
            "./ar-kw.js": "Qj4J",
            "./ar-ly": "HP3h",
            "./ar-ly.js": "HP3h",
            "./ar-ma": "CoRJ",
            "./ar-ma.js": "CoRJ",
            "./ar-sa": "gjCT",
            "./ar-sa.js": "gjCT",
            "./ar-tn": "bYM6",
            "./ar-tn.js": "bYM6",
            "./ar.js": "jnO4",
            "./az": "SFxW",
            "./az.js": "SFxW",
            "./be": "H8ED",
            "./be.js": "H8ED",
            "./bg": "hKrs",
            "./bg.js": "hKrs",
            "./bm": "p/rL",
            "./bm.js": "p/rL",
            "./bn": "kEOa",
            "./bn.js": "kEOa",
            "./bo": "0mo+",
            "./bo.js": "0mo+",
            "./br": "aIdf",
            "./br.js": "aIdf",
            "./bs": "JVSJ",
            "./bs.js": "JVSJ",
            "./ca": "1xZ4",
            "./ca.js": "1xZ4",
            "./cs": "PA2r",
            "./cs.js": "PA2r",
            "./cv": "A+xa",
            "./cv.js": "A+xa",
            "./cy": "l5ep",
            "./cy.js": "l5ep",
            "./da": "DxQv",
            "./da.js": "DxQv",
            "./de": "tGlX",
            "./de-at": "s+uk",
            "./de-at.js": "s+uk",
            "./de-ch": "u3GI",
            "./de-ch.js": "u3GI",
            "./de.js": "tGlX",
            "./dv": "WYrj",
            "./dv.js": "WYrj",
            "./el": "jUeY",
            "./el.js": "jUeY",
            "./en-SG": "zavE",
            "./en-SG.js": "zavE",
            "./en-au": "Dmvi",
            "./en-au.js": "Dmvi",
            "./en-ca": "OIYi",
            "./en-ca.js": "OIYi",
            "./en-gb": "Oaa7",
            "./en-gb.js": "Oaa7",
            "./en-ie": "4dOw",
            "./en-ie.js": "4dOw",
            "./en-il": "czMo",
            "./en-il.js": "czMo",
            "./en-nz": "b1Dy",
            "./en-nz.js": "b1Dy",
            "./eo": "Zduo",
            "./eo.js": "Zduo",
            "./es": "iYuL",
            "./es-do": "CjzT",
            "./es-do.js": "CjzT",
            "./es-us": "Vclq",
            "./es-us.js": "Vclq",
            "./es.js": "iYuL",
            "./et": "7BjC",
            "./et.js": "7BjC",
            "./eu": "D/JM",
            "./eu.js": "D/JM",
            "./fa": "jfSC",
            "./fa.js": "jfSC",
            "./fi": "gekB",
            "./fi.js": "gekB",
            "./fo": "ByF4",
            "./fo.js": "ByF4",
            "./fr": "nyYc",
            "./fr-ca": "2fjn",
            "./fr-ca.js": "2fjn",
            "./fr-ch": "Dkky",
            "./fr-ch.js": "Dkky",
            "./fr.js": "nyYc",
            "./fy": "cRix",
            "./fy.js": "cRix",
            "./ga": "USCx",
            "./ga.js": "USCx",
            "./gd": "9rRi",
            "./gd.js": "9rRi",
            "./gl": "iEDd",
            "./gl.js": "iEDd",
            "./gom-latn": "DKr+",
            "./gom-latn.js": "DKr+",
            "./gu": "4MV3",
            "./gu.js": "4MV3",
            "./he": "x6pH",
            "./he.js": "x6pH",
            "./hi": "3E1r",
            "./hi.js": "3E1r",
            "./hr": "S6ln",
            "./hr.js": "S6ln",
            "./hu": "WxRl",
            "./hu.js": "WxRl",
            "./hy-am": "1rYy",
            "./hy-am.js": "1rYy",
            "./id": "UDhR",
            "./id.js": "UDhR",
            "./is": "BVg3",
            "./is.js": "BVg3",
            "./it": "bpih",
            "./it-ch": "bxKX",
            "./it-ch.js": "bxKX",
            "./it.js": "bpih",
            "./ja": "B55N",
            "./ja.js": "B55N",
            "./jv": "tUCv",
            "./jv.js": "tUCv",
            "./ka": "IBtZ",
            "./ka.js": "IBtZ",
            "./kk": "bXm7",
            "./kk.js": "bXm7",
            "./km": "6B0Y",
            "./km.js": "6B0Y",
            "./kn": "PpIw",
            "./kn.js": "PpIw",
            "./ko": "Ivi+",
            "./ko.js": "Ivi+",
            "./ku": "JCF/",
            "./ku.js": "JCF/",
            "./ky": "lgnt",
            "./ky.js": "lgnt",
            "./lb": "RAwQ",
            "./lb.js": "RAwQ",
            "./lo": "sp3z",
            "./lo.js": "sp3z",
            "./lt": "JvlW",
            "./lt.js": "JvlW",
            "./lv": "uXwI",
            "./lv.js": "uXwI",
            "./me": "KTz0",
            "./me.js": "KTz0",
            "./mi": "aIsn",
            "./mi.js": "aIsn",
            "./mk": "aQkU",
            "./mk.js": "aQkU",
            "./ml": "AvvY",
            "./ml.js": "AvvY",
            "./mn": "lYtQ",
            "./mn.js": "lYtQ",
            "./mr": "Ob0Z",
            "./mr.js": "Ob0Z",
            "./ms": "6+QB",
            "./ms-my": "ZAMP",
            "./ms-my.js": "ZAMP",
            "./ms.js": "6+QB",
            "./mt": "G0Uy",
            "./mt.js": "G0Uy",
            "./my": "honF",
            "./my.js": "honF",
            "./nb": "bOMt",
            "./nb.js": "bOMt",
            "./ne": "OjkT",
            "./ne.js": "OjkT",
            "./nl": "+s0g",
            "./nl-be": "2ykv",
            "./nl-be.js": "2ykv",
            "./nl.js": "+s0g",
            "./nn": "uEye",
            "./nn.js": "uEye",
            "./pa-in": "8/+R",
            "./pa-in.js": "8/+R",
            "./pl": "jVdC",
            "./pl.js": "jVdC",
            "./pt": "8mBD",
            "./pt-br": "0tRk",
            "./pt-br.js": "0tRk",
            "./pt.js": "8mBD",
            "./ro": "lyxo",
            "./ro.js": "lyxo",
            "./ru": "lXzo",
            "./ru.js": "lXzo",
            "./sd": "Z4QM",
            "./sd.js": "Z4QM",
            "./se": "//9w",
            "./se.js": "//9w",
            "./si": "7aV9",
            "./si.js": "7aV9",
            "./sk": "e+ae",
            "./sk.js": "e+ae",
            "./sl": "gVVK",
            "./sl.js": "gVVK",
            "./sq": "yPMs",
            "./sq.js": "yPMs",
            "./sr": "zx6S",
            "./sr-cyrl": "E+lV",
            "./sr-cyrl.js": "E+lV",
            "./sr.js": "zx6S",
            "./ss": "Ur1D",
            "./ss.js": "Ur1D",
            "./sv": "X709",
            "./sv.js": "X709",
            "./sw": "dNwA",
            "./sw.js": "dNwA",
            "./ta": "PeUW",
            "./ta.js": "PeUW",
            "./te": "XLvN",
            "./te.js": "XLvN",
            "./tet": "V2x9",
            "./tet.js": "V2x9",
            "./tg": "Oxv6",
            "./tg.js": "Oxv6",
            "./th": "EOgW",
            "./th.js": "EOgW",
            "./tl-ph": "Dzi0",
            "./tl-ph.js": "Dzi0",
            "./tlh": "z3Vd",
            "./tlh.js": "z3Vd",
            "./tr": "DoHr",
            "./tr.js": "DoHr",
            "./tzl": "z1FC",
            "./tzl.js": "z1FC",
            "./tzm": "wQk9",
            "./tzm-latn": "tT3J",
            "./tzm-latn.js": "tT3J",
            "./tzm.js": "wQk9",
            "./ug-cn": "YRex",
            "./ug-cn.js": "YRex",
            "./uk": "raLr",
            "./uk.js": "raLr",
            "./ur": "UpQW",
            "./ur.js": "UpQW",
            "./uz": "Loxo",
            "./uz-latn": "AQ68",
            "./uz-latn.js": "AQ68",
            "./uz.js": "Loxo",
            "./vi": "KSF8",
            "./vi.js": "KSF8",
            "./x-pseudo": "/X5v",
            "./x-pseudo.js": "/X5v",
            "./yo": "fzPg",
            "./yo.js": "fzPg",
            "./zh-cn": "XDpg",
            "./zh-cn.js": "XDpg",
            "./zh-hk": "SatO",
            "./zh-hk.js": "SatO",
            "./zh-tw": "kOpN",
            "./zh-tw.js": "kOpN"
        };


        function webpackContext(req) {
            var id = webpackContextResolve(req);
            return __webpack_require__(id);
        }

        function webpackContextResolve(req) {
            if (!__webpack_require__.o(map, req)) {
                var e = new Error("Cannot find module '" + req + "'");
                e.code = 'MODULE_NOT_FOUND';
                throw e;
            }
            return map[req];
        }

        webpackContext.keys = function webpackContextKeys() {
            return Object.keys(map);
        };
        webpackContext.resolve = webpackContextResolve;
        module.exports = webpackContext;
        webpackContext.id = "RnhZ";

        /***/
    }),

    /***/ "S1xf":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/invoiceIssue/special/special_invoice.vue?vue&type=template&id=2bb78a5e&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', [_c('InvoiceEditToolbar', {
                attrs: {
                    "config": _vm.toolbarConfig,
                    "invoiceTypeCode": _vm.invoiceTypeCode
                }, on: {"on-show-difference": _vm.showDifference, "on-switch-invoice": _vm.switchInvoice}
            }), _vm._v(" "), _c('InvoiceEdit', {
                ref: "invoice",
                attrs: {"invoiceTypeCode": _vm.invoiceTypeCode, "isRed": _vm.toolbarConfig.enableSpecialNagative}
            })], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/_output/invoiceIssue/special/special_invoice.vue?vue&type=template&id=2bb78a5e&

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/InvoiceEditToolbar.vue + 4 modules
        var InvoiceEditToolbar = __webpack_require__("37oL");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/InvoiceEdit.vue + 4 modules
        var InvoiceEdit = __webpack_require__("qYCb");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/_output/invoiceIssue/special/special_invoice.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        /* harmony default export */
        var specialvue_type_script_lang_js_ = ({
            components: {
                InvoiceEditToolbar: InvoiceEditToolbar["default"],
                InvoiceEdit: InvoiceEdit["default"]
            },
            data: function data() {
                return {
                    showCurrentNumbers: false,
                    // 发票类型 发票种类编码，004专票 007普票 026电票 005机动车 025卷票
                    invoiceTypeCode: '004',
                    toolbarConfig: {
                        enableTaxSwitch: true,
                        // 含税 不含税
                        enableDetailSwitch: true,
                        // 明细 清单(红字专票 负数没有)
                        enableTaxTypeSwitch: true,
                        // 差额征税 普通征税
                        enableSpecialNagative: true,
                        // 红字专票（专票负票）特有
                        enableCommonPositive: true,
                        // 正数按钮
                        enableCommonNagative: false,
                        // 负数按钮
                        enableIssuePlace: true,
                        // 开票终端
                        enableCurrentNumber: true,
                        // 当前票号
                        enableMarginSetting: true // 页边距设置

                    }
                };
            },
            mounted: function mounted() {
                this.$store.commit('reset');
                this.$store.commit('changeIsNegative', false);
            },
            methods: {
                showDifference: function showDifference(flage) {
                    this.toolbarConfig.enableTaxSwitch = flage;
                    this.toolbarConfig.enableDetailSwitch = flage;
                },
                switchInvoice: function switchInvoice(val) {
                    // this.$store.commit('reset')
                    this.$store.commit('changeIsNegative', val);
                    this.toolbarConfig.enableDetailSwitch = !val;
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/_output/invoiceIssue/special/special_invoice.vue?vue&type=script&lang=js&
        /* harmony default export */
        var invoiceIssue_specialvue_type_script_lang_js_ = (specialvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/_output/invoiceIssue/special/special_invoice.vue?vue&type=style&index=0&lang=scss&
        var specialvue_type_style_index_0_lang_scss_ = __webpack_require__("GlzX");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/_output/invoiceIssue/special/special_invoice.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            invoiceIssue_specialvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var special = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "SBbI":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _store_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lq9z");

        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }


        var propMixin = {
            computed: _objectSpread({}, Object(_store_helper__WEBPACK_IMPORTED_MODULE_0__[/* generateComputed */ "a"])(['dishOrServer'], function (state) {
                return state.invoiceEdit;
            }))
        };
        /* harmony default export */
        __webpack_exports__["a"] = ({
            mixins: [propMixin],
            // 发票开具选择终端是哪种设备类型的终端
            computed: {
                // ...generateComputed(['issuePlace'], state => state.invoiceEdit.currentData),
                isDishOrServerTerminal: function isDishOrServerTerminal() {
                    return this.dishOrServer;
                }
            }
        });

        /***/
    }),

    /***/ "TDd8":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/LabelDatePicker.vue?vue&type=template&id=a3d33496&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {
                staticClass: "daterangeground",
                style: ({width: _vm.isLarge ? '350px' : '200px'})
            }, [(_vm.inputLabel) ? _c('span', {staticClass: "daterange-name"}, [_vm._v(_vm._s(_vm.inputLabel))]) : _vm._e(), _vm._v(" "), _c('div', {staticClass: "daterange-input"}, [_c('DatePicker', {
                ref: "datePicker",
                attrs: {
                    "type": _vm.type,
                    "value": _vm.currentValue,
                    "clearable": _vm.clearable,
                    "options": _vm.forbidden,
                    "placeholder": _vm.placeholder,
                    "disabled": _vm.disabled,
                    "format": _vm.format,
                    "editable": false,
                    "placement": "bottom-start"
                },
                on: {"on-change": _vm.handleChange},
                model: {
                    value: (_vm.currentValue), callback: function ($$v) {
                        _vm.currentValue = $$v
                    }, expression: "currentValue"
                }
            })], 1)])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/LabelDatePicker.vue?vue&type=template&id=a3d33496&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/LabelDatePicker.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
        /* harmony default export */
        var LabelDatePickervue_type_script_lang_js_ = ({
            name: 'label-date-picker',
            props: {
                isLarge: {
                    type: Boolean,
                    default: false
                },
                type: {
                    type: String,
                    default: 'date'
                },
                clearable: {
                    type: Boolean,
                    default: true
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                inputLabel: {
                    type: String,
                    default: ''
                },
                inputValue: {
                    type: [Array, String, Number, Date]
                },
                format: {
                    type: String,
                    default: 'yyyy-MM-dd'
                },
                placeholder: {
                    type: String,
                    default: ''
                },
                options: {
                    type: Object,
                    dafault: {}
                }
            },
            watch: {
                inputValue: function inputValue(data) {
                    this.currentValue = data;
                }
            },
            data: function data() {
                // let nowDate = new Date();
                return {
                    // currentValue: this.inputValue || nowDate,
                    currentValue: this.inputValue,
                    forbidden: this.options
                };
            },
            methods: {
                handleChange: function handleChange(value) {
                    this.currentValue = value;
                    this.$emit('change', value);
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/LabelDatePicker.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_LabelDatePickervue_type_script_lang_js_ = (LabelDatePickervue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/LabelDatePicker.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_LabelDatePickervue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var LabelDatePicker = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "VjCF":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/GoodsSelector.vue?vue&type=template&id=b10480f2&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('Modal', {
                attrs: {"title": "选择税收编码", "width": "980", "z-index": 200, "maskClosable": false},
                on: {"on-visible-change": _vm.visibleStateChange},
                model: {
                    value: (_vm.showGoodsSelector), callback: function ($$v) {
                        _vm.showGoodsSelector = $$v
                    }, expression: "showGoodsSelector"
                }
            }, [_c('Row', [_c('Col', {
                staticStyle: {"border-right": "1px solid #ccc", "padding-right": "20px"},
                attrs: {"span": "19"}
            }, [_c('div', {staticClass: "wrap red-invoice-sell-modal"}, [_c('LabelSelect', {
                attrs: {
                    "inputLabel": "商品分类",
                    "dataList": _vm.categoryList,
                    "inputValue": _vm.goodsQuery.goodsCategory
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.goodsCategory = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('LabelInput', {
                attrs: {
                    "inputLabel": "商品名称",
                    "placeholder": "商品名称",
                    "inputValue": _vm.goodsQuery.goodsName
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.goodsName = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('LabelInput', {
                attrs: {
                    "inputLabel": "税收编码",
                    "placeholder": "税收编码",
                    "inputValue": _vm.goodsQuery.goodsCode
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.goodsCode = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('LabelInput', {
                attrs: {
                    "inputLabel": "商品编码",
                    "placeholder": "商品编码",
                    "inputValue": _vm.goodsQuery.customGoodsCode
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.customGoodsCode = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "查询",
                    "clickCallback": _vm.query
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "选择",
                    "clickCallback": _vm.selectItem
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "新增",
                    "clickCallback": _vm.addItem
                }
            })], 1), _vm._v(" "), _c('BwDataGrid', {
                ref: "goodsWrap",
                attrs: {
                    "table-ref": "goodsSelector",
                    "columns": _vm.columns,
                    "data": _vm.resultList,
                    "total": _vm.resultTotal,
                    "highlight-row": true,
                    "dynamicallocation": false,
                    "show-sizer": false
                },
                on: {
                    "bw-query": _vm.query,
                    "bw-current-change": _vm.changeCurrentRow,
                    "bw-row-dbl-click": _vm.selectItem
                }
            })], 1), _vm._v(" "), _c('Col', {attrs: {"span": "5"}}, [_c('div', {staticClass: "border-left"}, [_c('p', {staticClass: "goods-title"}, [_vm._v("常用商品")]), _vm._v(" "), _c('ul', _vm._l((_vm.commonUseGoods), function (item, index) {
                return _c('li', {
                    key: index, staticClass: "goods-li", on: {
                        "click": function ($event) {
                            return _vm.selectItem(item)
                        }
                    }
                }, [_vm._v(_vm._s(item.goodsName))])
            }), 0)])])], 1), _vm._v(" "), _c('div', {
                attrs: {"slot": "footer"},
                slot: "footer"
            }, [_c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "确定",
                    "clickCallback": _vm.selectItem
                }
            })], 1)], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/GoodsSelector.vue?vue&type=template&id=b10480f2&scoped=true&

// EXTERNAL MODULE: ./src/components/page/common/LabelSelect.vue + 4 modules
        var LabelSelect = __webpack_require__("4AcG");

// EXTERNAL MODULE: ./src/components/page/common/LabelInput.vue + 4 modules
        var LabelInput = __webpack_require__("m7jE");

// EXTERNAL MODULE: ./src/components/page/common/FuncButton.vue + 4 modules
        var FuncButton = __webpack_require__("ZPqo");

// EXTERNAL MODULE: ./src/utils/typeUtil.js
        var typeUtil = __webpack_require__("v7p+");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/GoodsSelector.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var propMixin = {
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['showGoodsSelector', 'showDifference', 'showAddGoods'], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['taxationMethod'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        };
        var defaultQuery = {
            goodsCategory: '',
            goodsName: '',
            goodsCode: '',
            customGoodsCode: ''
        };
        /* harmony default export */
        var GoodsSelectorvue_type_script_lang_js_ = ({
            name: 'goods-selector',
            mixins: [propMixin],
            components: {
                LabelSelect: LabelSelect["default"],
                LabelInput: LabelInput["default"],
                FuncButton: FuncButton["default"] // DataGrid,

            },
            props: {
                isSpecialInvoice: {
                    type: Boolean,
                    default: false
                },
                // 选择商品后的回调
                selectCallback: {
                    type: Function,
                    required: true
                },
                invoiceTypeCode: {
                    type: String,
                    default: ''
                }
            },
            data: function data() {
                return {
                    categoryList: [],
                    categoryMap: {},
                    goodsQuery: _objectSpread({}, defaultQuery),
                    resultTotal: 0,
                    // 查询结果总数
                    resultList: [],
                    // 查询结果,
                    pagination: {
                        pageNo: 1,
                        pageSize: 10
                    },
                    columns: [// {
                        //     key: 'showIndex',
                        //     title: '序号',
                        //     width: 45
                        // },
                        {
                            title: '商品分类',
                            key: 'classificationName',
                            minWidth: 150
                        }, {
                            title: '商品名称',
                            key: 'goodsName',
                            minWidth: 150
                        }, {
                            title: '税收编码',
                            key: 'goodsCode',
                            minWidth: 200
                        }, {
                            title: '商品编码',
                            key: 'customGoodsCode',
                            minWidth: 150
                        }, {
                            title: '单价',
                            minWidth: 90,
                            key: 'goodsPrice'
                        }, {
                            title: '税率',
                            width: 70,
                            key: 'goodsTaxRate'
                        }, {
                            title: '可用税率',
                            minWidth: 150,
                            key: 'usedRate'
                        }],
                    commonUseGoods: [],
                    currentRow: null
                };
            },
            created: function created() {// this.init()
            },
            methods: {
                init: function init() {
                    var _this = this;

                    this.$store.dispatch('getGoodsCategory', {
                        callback: function callback(respData) {
                            _this.categoryList = respData.results.map(function (item) {
                                return {
                                    label: item.classificationName,
                                    value: item.classificationCode
                                };
                            });

                            _this.categoryList.forEach(function (item) {
                                _this.categoryMap[item.id] = item;
                            });
                        }
                    });
                    this.getCommonUseGoods();
                    this.query(); // if (firstLoad) {
                    //     this.query()
                    // } else {
                    //     this.$refs.goodsWrap.onChanged(1)
                    // }
                },
                getCommonUseGoods: function getCommonUseGoods() {
                    var _this2 = this;

                    this.http.outPost('/api/taxGoodsCode/selectOftenGoods', {}).then(function (resp) {
                        var res = resp.data && resp.data.results || [];
                        _this2.commonUseGoods = res.filter(function (item) {
                            return item !== null;
                        });
                    });
                },
                query: function query() {
                    var _this3 = this;

                    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
                        _ref$pageNo = _ref.pageNo,
                        pageNo = _ref$pageNo === void 0 ? 1 : _ref$pageNo,
                        _ref$pageSize = _ref.pageSize,
                        pageSize = _ref$pageSize === void 0 ? 10 : _ref$pageSize;

                    this.currentRow = null;
                    this.pagination = {
                        pageNo: pageNo,
                        pageSize: pageSize
                    };

                    var params = _objectSpread({}, this.goodsQuery, {}, this.pagination);

                    params.classificationCode = params.goodsCategory;
                    delete params.goodsCategory; // params.customGoodsCode = params.goodsCode;delete params.goodsCode;
                    // console.log(args)
                    // this.paramUtil.setWhenNotEmpty(this.$data,params,['goodsCategory','goodsName','goodsCode','customGoodsCode','goodsPrice','goodsTaxRate','usedRate'])

                    var categoryMap = this.categoryMap;
                    this.$store.dispatch('getGoodsList', {
                        params: params,
                        callback: function callback(respData) {
                            _this3.resultList = respData.results;
                            _this3.resultList = respData.results.map(function (item) {
                                item.goodsTaxRate = item.rate ? +item.rate : 0;

                                if (item.classifyId in categoryMap) {
                                    item.goodsCategory = categoryMap[item.classifyId].categoryName;
                                }

                                return item;
                            });
                            _this3.resultTotal = respData.total;
                        }
                    });
                },
                selectItem: function selectItem(customer) {
                    if (!customer && !this.currentRow) {
                        this.$Message.warning('没有选中任何数据');
                        return;
                    }

                    if (!customer) customer = this.currentRow;
                    this.riskGoods(this.chooseCustomer, customer);
                },
                riskGoods: function riskGoods(fun, funParams) {
                    var _this4 = this;

                    var params = {
                        goods: funParams ? funParams.goodsName : this.currentRow.goodsName,
                        goodsClass: funParams ? funParams.classificationCode : this.currentRow.classificationCode,
                        invoiceType: this.invoiceTypeCode
                    };
                    this.http.outPost('/api/ruleCheck/checkGoods', _objectSpread({}, params), function (res) {
                        // this.$Message.success(res.message);
                        if (res.data.results[0] && res.data.results[0].returncode + '' === '1') {
                            _this4.$Modal.confirm({
                                title: '提示',
                                content: res.data.results[0].returnMsg,
                                onOk: function onOk() {
                                    fun(funParams);
                                },
                                onCancel: function onCancel() {
                                }
                            });

                            return;
                        }

                        fun(funParams);
                    });
                },
                chooseCustomer: function chooseCustomer(customer) {
                    this.currentRow = _objectSpread({}, customer, {
                        goodsTaxRate: customer.rate ? +customer.rate : 0,
                        // 编辑的时候 由于上条数据 问题， 导致 重新选择商品后，保留上次的数据，
                        // ps 商品的数据字段不一致 hack
                        vatSpecialManagement: customer.vatSpecialManagement || '',
                        freeTaxMark: customer.freeTaxMark || '',
                        preferentialMarkFlag: customer.preferentialMarkFlag || ''
                    });

                    if (this.isSpecialInvoice) {
                        if (this.currentRow && +this.currentRow.rate === 0) {
                            this.$Message.warning('专票不能开零税率的票!');
                            return;
                        }
                    }

                    this.showGoodsSelector = false;

                    if (typeUtil["a" /* default */].isFunction(this.selectCallback)) {
                        for (var k in this.currentRow) {
                            if (this.currentRow[k] + '' === 'null') {
                                this.currentRow[k] = '';
                            }
                        }

                        this.selectCallback(this.currentRow);
                        this.$refs.goodsWrap.clearCurrentRow();
                    }

                    if (this.taxationMethod === '2') {
                        this.showDifference = true;
                        this.$store.commit(helper["c" /* keyUtil */].getChangeName('showDifference'), true);
                    } else {
                        this.showDifference = false;
                        this.$store.commit(helper["c" /* keyUtil */].getChangeName('showDifference'), false);
                    }

                    this.$refs.goodsWrap.clearCurrentRow();
                    this.currentRow = null;
                    this.$emit('update:visible', false);
                },
                addItem: function addItem() {
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('showAddGoods'), true);
                },
                visibleStateChange: function visibleStateChange(state) {
                    this.goodsQuery = _objectSpread({}, defaultQuery);

                    if (state) {
                        this.init(); // this.getCommonUseGoods()
                    }

                    this.showGoodsSelector = state;

                    if (!state) {
                        this.$refs.goodsWrap.onChanged(1);
                    }
                },
                changeCurrentRow: function changeCurrentRow(newRow, oldRow) {
                    this.currentRow = newRow;
                }
            },
            watch: {// showAddGoods (val) {
                //     if (!val) {
                //         this.$refs.goodsWrap.onChanged(1)
                //         this.getCommonUseGoods()
                //     }
                // }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/GoodsSelector.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_GoodsSelectorvue_type_script_lang_js_ = (GoodsSelectorvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/GoodsSelector.vue?vue&type=style&index=0&id=b10480f2&lang=scss&scoped=true&
        var GoodsSelectorvue_type_style_index_0_id_b10480f2_lang_scss_scoped_true_ = __webpack_require__("LpTG");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/GoodsSelector.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_GoodsSelectorvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "b10480f2",
            null
        )

        /* harmony default export */
        var GoodsSelector = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "Wyyr":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "Xqs9":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "Z4oc":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_DiscountSelector_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7Vz8");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_DiscountSelector_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_DiscountSelector_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_DiscountSelector_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "ZPqo":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/FuncButton.vue?vue&type=template&id=3845808f&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "BwButton_wrap"}, [_c('BwButton', {
                attrs: {
                    "type": _vm.buttonType,
                    "opcode": _vm.opcode,
                    "disabled": _vm.disabled,
                    "inputLabel": _vm.inputLabel,
                    "icon": _vm.funcType
                }, on: {"click": _vm.doClick}
            }, [_vm._v(_vm._s(_vm.inputLabel))])], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/FuncButton.vue?vue&type=template&id=3845808f&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/FuncButton.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
        /* harmony default export */
        var FuncButtonvue_type_script_lang_js_ = ({
            name: 'func-button',
            props: {
                disabled: {
                    type: Boolean,
                    default: false
                },
                buttonType: {
                    type: String,
                    default: 'first'
                },
                clickCallback: {
                    type: Function
                },
                inputLabel: {
                    type: String,
                    default: ''
                },
                funcType: {
                    type: String,
                    default: ''
                },
                opcode: {
                    type: String,
                    default: ''
                }
            },
            // created(){
            //   console.log("funcType:"+this.funcType)
            // },
            methods: {
                doClick: function doClick() {
                    var callback = this.clickCallback;
                    callback.call();
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/FuncButton.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_FuncButtonvue_type_script_lang_js_ = (FuncButtonvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/FuncButton.vue?vue&type=style&index=0&lang=scss&
        var FuncButtonvue_type_style_index_0_lang_scss_ = __webpack_require__("+UWE");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/FuncButton.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_FuncButtonvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var FuncButton = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "ZvbC":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityModal_vue_vue_type_style_index_0_id_1387a735_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("jvb8");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityModal_vue_vue_type_style_index_0_id_1387a735_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityModal_vue_vue_type_style_index_0_id_1387a735_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_CommodityModal_vue_vue_type_style_index_0_id_1387a735_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "bQzA":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "blrr":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue?vue&type=template&id=ab32345e&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "grid-hf"}, [_c('div', {staticClass: "grid-hf-col col-a"}, [_vm._v(_vm._s(_vm.buy))]), _vm._v(" "), _c('div', {staticClass: "grid-hf-col col-b roll-height"}, [_c('ul', {staticClass: "trader"}, [_c('li', [_c('span', {staticClass: "label"}, [_vm._v("名称")]), _vm._v("：\n        "), _c('div', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (!_vm.isIssue),
                    expression: "!isIssue"
                }],
                staticStyle: {"display": "inline-block", "width": "72.5%", "margin-left": "1px"},
                on: {"dblclick": _vm.showSelectTrader}
            }, [_c('auto-complete', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (!_vm.isIssue),
                    expression: "!isIssue"
                }],
                staticClass: "input name",
                attrs: {"type": "text"},
                on: {"on-change": _vm.doSuggest, "on-select": _vm.selectItem, "on-blur": _vm.handleBlur},
                model: {
                    value: (_vm.currentDataObj.name), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "name", $$v)
                    }, expression: "currentDataObj.name"
                }
            }, _vm._l((_vm.suggestDataList), function (item, index) {
                return _c('i-option', {key: index, attrs: {"value": index}}, [_vm._v(_vm._s(item.name))])
            }), 1)], 1), _vm._v(" "), (_vm.hasTrader && !_vm.isIssue) ? _c('span', {
                staticClass: "selector ellipsis2 skin-background",
                on: {"click": _vm.showSelectTrader}
            }, [_vm._v("···")]) : _vm._e(), _vm._v(" "), (_vm.isIssue) ? _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.name),
                    expression: "currentDataObj.name"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.name)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "name", $event.target.value)
                    }
                }
            }) : _vm._e()]), _vm._v(" "), (_vm.isRollInvoice) ? _c('li', [_c('span', {staticClass: "label"}), _c('input', {
                staticClass: "input",
                staticStyle: {"display": "none"},
                attrs: {"type": "text"}
            })]) : _vm._e(), _vm._v(" "), _c('li', [_c('span', {staticClass: "label"}, [_vm._v("纳税人识别号")]), _vm._v("："), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.taxSerial),
                    expression: "currentDataObj.taxSerial"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.taxSerial)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "taxSerial", $event.target.value)
                    }
                }
            })]), _vm._v(" "), (!_vm.isRollInvoice && !_vm.showAddressSelect) ? _c('li', [_c('span', {staticClass: "label"}, [_vm._v("地址、电话")]), _vm._v("："), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.addressAndPhone),
                    expression: "currentDataObj.addressAndPhone"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.addressAndPhone)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "addressAndPhone", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (!_vm.isRollInvoice && _vm.showAddressSelect) ? _c('li', {staticStyle: {"position": "relative"}}, [_c('span', {staticClass: "label"}, [_vm._v("地址、电话")]), _vm._v("：\n        "), (!_vm.isIssue) ? _c('span', {
                staticClass: "selector skin-background",
                staticStyle: {"position": "absolute", "right": "8px"},
                on: {"click": _vm.addressPhoneModalShow}
            }, [_vm._v("···")]) : _vm._e(), _vm._v(" "), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.addressAndPhone),
                    expression: "currentDataObj.addressAndPhone"
                }],
                staticClass: "input modify-input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.addressAndPhone)},
                on: {
                    "change": _vm.AddressPhoneChange, "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "addressAndPhone", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (!_vm.isRollInvoice && !_vm.showAccountSelect) ? _c('li', [_c('span', {staticClass: "label"}, [_vm._v("开户行及账号")]), _vm._v("："), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.bankAndAccount),
                    expression: "currentDataObj.bankAndAccount"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.bankAndAccount)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "bankAndAccount", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (!_vm.isRollInvoice && _vm.showAccountSelect) ? _c('li', {staticStyle: {"position": "relative"}}, [_c('span', {staticClass: "label"}, [_vm._v("开户行及账号")]), _vm._v("：\n        "), (!_vm.isIssue) ? _c('span', {
                staticClass: "selector skin-background",
                staticStyle: {"position": "absolute", "right": "8px"},
                on: {"click": _vm.bankAndAccountModalShow}
            }, [_vm._v("···")]) : _vm._e(), _vm._v(" "), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.bankAndAccount),
                    expression: "currentDataObj.bankAndAccount"
                }],
                staticClass: "input modify-input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.bankAndAccount)},
                on: {
                    "change": _vm.bankAccountChange, "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "bankAndAccount", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (_vm.isRollInvoice) ? _c('li', [_c('span', {staticClass: "label"}), _c('input', {
                staticClass: "input",
                staticStyle: {"display": "none"},
                attrs: {"type": "text"}
            })]) : _vm._e()])]), _vm._v(" "), _c('div', {staticClass: "grid-hf-col col-c"}, [_vm._v("密码区")]), _vm._v(" "), _c('div', {staticClass: "grid-hf-col col-d last"}, [_c('p', {
                staticClass: "password-area",
                domProps: {"textContent": _vm._s(_vm.taxCode1)}
            }), _vm._v(" "), _c('p', {
                staticClass: "password-area",
                domProps: {"textContent": _vm._s(_vm.taxCode2)}
            }), _vm._v(" "), _c('p', {
                staticClass: "password-area",
                domProps: {"textContent": _vm._s(_vm.taxCode3)}
            }), _vm._v(" "), _c('p', {
                staticClass: "password-area",
                domProps: {"textContent": _vm._s(_vm.taxCode4)}
            })]), _vm._v(" "), _c('Modal', {
                attrs: {
                    "width": "460",
                    "mask-closable": false,
                    "class-name": "layer2018",
                    "title": "开户行及账号"
                }, model: {
                    value: (_vm.bankAndAccountShow), callback: function ($$v) {
                        _vm.bankAndAccountShow = $$v
                    }, expression: "bankAndAccountShow"
                }
            }, [_c('Radio-group', {
                attrs: {"vertical": true, "size": "large"}, on: {
                    "on-change": function () {
                        _vm.bankAndAccountShow = false
                    }
                }, model: {
                    value: (_vm.currentDataObj.bankAndAccount), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "bankAndAccount", $$v)
                    }, expression: "currentDataObj.bankAndAccount"
                }
            }, _vm._l((_vm.bankAccountList), function (item) {
                return _c('radio', {key: item.value, attrs: {"label": item.value}})
            }), 1)], 1), _vm._v(" "), _c('Modal', {
                attrs: {
                    "width": "460",
                    "mask-closable": false,
                    "class-name": "layer2018",
                    "title": "地址电话"
                }, model: {
                    value: (_vm.addressAndPhoneShow), callback: function ($$v) {
                        _vm.addressAndPhoneShow = $$v
                    }, expression: "addressAndPhoneShow"
                }
            }, [_c('Radio-group', {
                attrs: {"vertical": true, "size": "large"}, on: {
                    "on-change": function () {
                        _vm.addressAndPhoneShow = false
                    }
                }, model: {
                    value: (_vm.currentDataObj.addressAndPhone), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "addressAndPhone", $$v)
                    }, expression: "currentDataObj.addressAndPhone"
                }
            }, _vm._l((_vm.addressPhoneList), function (item) {
                return _c('radio', {key: item.value, attrs: {"label": item.value}})
            }), 1)], 1)], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue?vue&type=template&id=ab32345e&scoped=true&

// EXTERNAL MODULE: ./src/mixins/invoice-issue/customerMixin.js
        var customerMixin = __webpack_require__("BdQq");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// EXTERNAL MODULE: ./src/components/page/common/AutoComplete.vue + 4 modules
        var AutoComplete = __webpack_require__("iMkd");

// EXTERNAL MODULE: ./src/utils/common.js + 13 modules
        var common = __webpack_require__("z0WU");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var propMixin = _objectSpread({}, customerMixin["a" /* default */], {
            computed: _objectSpread({}, customerMixin["a" /* default */].computed, {}, Object(helper["a" /* generateComputed */])([{
                propName: 'currentCustomerType',
                fixedValue: 'buyer'
            }], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['taxControlCode', 'invoiceSpecialMark'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        });

        /* harmony default export */
        var InvoiceHeadervue_type_script_lang_js_ = ({
            components: {
                AutoComplete: AutoComplete["default"]
            },
            name: 'invoice-header',
            mixins: [propMixin],
            props: {
                dataObj: {
                    type: Object,
                    required: true
                },
                invoiceTypeCode: {
                    type: String,
                    required: true
                },
                isIssue: {
                    type: Boolean,
                    default: false
                }
            },
            data: function data() {
                var _this = this;

                return {
                    currentDataObj: _objectSpread({}, this.dataObj),
                    debounce: common["a" /* default */].debounce(function () {
                        _this.$store.commit(helper["c" /* keyUtil */].getChangeName('buyerInfo'), _objectSpread({}, _this.currentDataObj));
                    }, 300)
                };
            },
            methods: {
                showSelectTrader: function showSelectTrader() {
                    this.currentCustomerType = 'buyer';
                    this.showCustomerSelector = true;
                },
                updateStore: function updateStore() {
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('buyerInfo'), _objectSpread({}, this.currentDataObj));
                },
                bankAccountChange: function bankAccountChange(e) {
                    this.currentDataObj.bankAndAccount = e.target.value || '';
                    this.updateStore();
                    this.bankAndAccountShow = false;
                },
                AddressPhoneChange: function AddressPhoneChange(e) {
                    // let inputNewValue = e.target.value || ''
                    // let found = this.bankAccountList.find(item => item.value === inputNewValue)
                    // this.currentDataObj.bankAndAccount = found ? inputNewValue : this.currentDataObj.bankAndAccount
                    this.currentDataObj.addressAndPhone = e.target.value || '';
                    this.updateStore();
                    this.addressAndphoneShow = false;
                },
                bankAndAccountModalShow: function bankAndAccountModalShow() {
                    this.bankAndAccountShow = true;
                },
                addressPhoneModalShow: function addressPhoneModalShow() {
                    this.addressAndPhoneShow = true;
                }
            },
            computed: {
                hasTrader: function hasTrader() {
                    // console.log(this.currentDataObj, this.$store.state.invoiceEdit.currentData.buyerInfo)
                    return true;
                },
                isRollInvoice: function isRollInvoice() {
                    return this.invoiceTypeCode === '025';
                },
                buy: function buy() {
                    var invoiceSpecialMark = this.invoiceSpecialMark;
                    var isRollInvoice = this.isRollInvoice;

                    if (invoiceSpecialMark === '02') {
                        return '销售方';
                    } else if (invoiceSpecialMark === '08' || isRollInvoice || invoiceSpecialMark === '01') {
                        return '购买方';
                    } else {
                        return '购买单位';
                    }
                },
                taxCode1: function taxCode1() {
                    if (this.taxControlCode) {
                        return this.taxControlCode.slice(0, 28);
                    } else {
                        return '';
                    }
                },
                taxCode2: function taxCode2() {
                    if (this.taxControlCode) {
                        return this.taxControlCode.slice(28, 56);
                    } else {
                        return '';
                    }
                },
                taxCode3: function taxCode3() {
                    if (this.taxControlCode) {
                        return this.taxControlCode.slice(56, 84);
                    } else {
                        return '';
                    }
                },
                taxCode4: function taxCode4() {
                    if (this.taxControlCode) {
                        return this.taxControlCode.slice(84, 112);
                    } else {
                        return '';
                    }
                } // currentCustomerType:{
                //   get(){
                //     return this.$store.state.invoiceEdit.currentCustomerType;
                //   },
                //   set(value){
                //     return this.$store.commit(keyUtil.getChangeName('currentCustomerType'),'buyer');
                //   }
                // },
                // showCustomerSelector:{
                //   get(){
                //     return this.$store.state.invoiceEdit.showCustomerSelector;
                //   },
                //   set(value){
                //     return this.$store.commit(keyUtil.getChangeName('showCustomerSelector'),value);
                //   }
                // }

            },
            watch: {
                dataObj: {
                    deep: true,
                    handler: function handler(dataObj) {
                        // console.log(this.currentDataObj,dataObj)
                        Object.assign(this.currentDataObj, dataObj);
                    } // immediate: true

                },
                currentDataObj: {
                    deep: true,
                    handler: function handler(val) {
                        this.currentDataObj.taxSerial = this.currentDataObj.taxSerial ? this.currentDataObj.taxSerial.toUpperCase() : '';
                        this.debounce(); // this.$store.commit('changeBuyerInfo',{...val});
                    }
                },
                showCustomerSelector: function showCustomerSelector(nowVisible, oldValue) {
                    // 窗口关闭的时候去查一下
                    if (!nowVisible) {
                        this.getBankAccountById(this.currentDataObj.id);
                    }
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_InvoiceHeadervue_type_script_lang_js_ = (InvoiceHeadervue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue?vue&type=style&index=0&id=ab32345e&lang=scss&scoped=true&
        var InvoiceHeadervue_type_style_index_0_id_ab32345e_lang_scss_scoped_true_ = __webpack_require__("hkiq");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_InvoiceHeadervue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "ab32345e",
            null
        )

        /* harmony default export */
        var InvoiceHeader = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "drkD":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "evYU":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceEdit_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("jWCY");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceEdit_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceEdit_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceEdit_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "fIKp":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue?vue&type=template&id=531e591a&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "grid-hf"}, [_c('div', {staticClass: "grid-hf-col col-a"}, [_vm._v(_vm._s(_vm.sell))]), _vm._v(" "), _c('div', {staticClass: "grid-hf-col col-b"}, [_c('ul', {staticClass: "trader"}, [_c('li', [_c('span', {staticClass: "label"}, [_vm._v("名称")]), _vm._v("："), _c('span', {
                staticClass: "info",
                domProps: {"textContent": _vm._s(_vm.currentDataObj.name)}
            })]), _vm._v(" "), (_vm.isRollInvoice) ? _c('li', [_c('span', {staticClass: "label"}), _c('input', {
                staticClass: "input",
                staticStyle: {"display": "none"},
                attrs: {"type": "text"}
            })]) : _vm._e(), _vm._v(" "), _c('li', [_c('span', {staticClass: "label"}, [_vm._v("纳税人识别号")]), _vm._v("："), _c('span', {
                staticClass: "info",
                domProps: {"textContent": _vm._s(_vm.currentDataObj.taxSerial)}
            })]), _vm._v(" "), (!_vm.isRollInvoice) ? _c('li', [_c('span', {staticClass: "label"}, [_vm._v("地址、电话")]), _vm._v("："), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.addressAndPhone),
                    expression: "currentDataObj.addressAndPhone"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.addressAndPhone)},
                on: {
                    "change": _vm.updateStore, "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "addressAndPhone", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (!_vm.isRollInvoice && !_vm.showSelect) ? _c('li', [_c('span', {staticClass: "label"}, [_vm._v("开户行及账号")]), _vm._v("："), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.bankAndAccount),
                    expression: "currentDataObj.bankAndAccount"
                }],
                staticClass: "input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.bankAndAccount)},
                on: {
                    "change": _vm.updateStore, "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "bankAndAccount", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (!_vm.isRollInvoice && _vm.showSelect) ? _c('li', {staticStyle: {"position": "relative"}}, [_c('span', {staticClass: "label"}, [_vm._v("开户行及账号")]), _vm._v("：\n          "), _c('span', {
                staticClass: "selector skin-background",
                staticStyle: {"position": "absolute", "right": "8px"},
                on: {"click": _vm.bankAndAccountModalShow}
            }, [_vm._v("···")]), _vm._v(" "), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.currentDataObj.bankAndAccount),
                    expression: "currentDataObj.bankAndAccount"
                }],
                staticClass: "input modify-input",
                attrs: {"type": "text", "readonly": _vm.isIssue},
                domProps: {"value": (_vm.currentDataObj.bankAndAccount)},
                on: {
                    "change": _vm.bankAccountChange, "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.currentDataObj, "bankAndAccount", $event.target.value)
                    }
                }
            })]) : _vm._e(), _vm._v(" "), (_vm.isRollInvoice) ? _c('li', [_c('span', {staticClass: "label"}), _c('input', {
                staticClass: "input",
                staticStyle: {"display": "none"},
                attrs: {"type": "text"}
            })]) : _vm._e()])]), _vm._v(" "), _c('div', {staticClass: "grid-hf-col col-c"}, [_vm._v("备注")]), _vm._v(" "), _c('div', {staticClass: "grid-hf-col col-d last"}, [(_vm.isNegative) ? _c('div', {staticClass: "red"}, [_vm._v("\n      对应正数发票代码:"), _c('span', {domProps: {"textContent": _vm._s(_vm.originalInvoiceCode)}}), _vm._v("\n      号码:"), _c('span', {domProps: {"textContent": _vm._s(_vm.originalInvoiceNo)}})]) : _vm._e(), _vm._v(" "), (_vm.isIssue && (_vm.invoiceTypeCode === '007')) ? _c('p', {staticClass: "red"}, [_vm._v("\n      校验码:"), _c('span', {domProps: {"textContent": _vm._s(_vm.verifyCode)}})]) : _vm._e(), _vm._v(" "), (_vm.showDifference && _vm.isIssue) ? _c('div', {
                staticClass: "red",
                staticStyle: {"text-align": "left"}
            }, [_vm._v("\n      差额征税"), (!_vm.isNegative) ? _c('span', [_vm._v("：" + _vm._s(_vm.deductibleAmount))]) : _vm._e()]) : _vm._e(), _vm._v(" "), _c('textarea', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.remarks),
                    expression: "remarks"
                }],
                class: ['remark', (_vm.isNegative || _vm.isIssue) ? 'active-remark' : '', (_vm.showDifference && _vm.isIssue) ? 'min-remark' : ''],
                attrs: {"readonly": _vm.isIssue},
                domProps: {"value": (_vm.remarks)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.remarks = $event.target.value
                    }
                }
            })]), _vm._v(" "), _c('Modal', {
                attrs: {
                    "width": "460",
                    "mask-closable": false,
                    "class-name": "layer2018",
                    "title": "开户行及账号"
                }, model: {
                    value: (_vm.bankAndAccountShow), callback: function ($$v) {
                        _vm.bankAndAccountShow = $$v
                    }, expression: "bankAndAccountShow"
                }
            }, [_c('Radio-group', {
                attrs: {"vertical": true, "size": "large"},
                on: {"on-change": _vm.selectBank},
                model: {
                    value: (_vm.currentDataObj.bankAndAccount), callback: function ($$v) {
                        _vm.$set(_vm.currentDataObj, "bankAndAccount", $$v)
                    }, expression: "currentDataObj.bankAndAccount"
                }
            }, _vm._l((_vm.bankAccountList), function (item) {
                return _c('radio', {key: item.value, attrs: {"label": item.value}})
            }), 1), _vm._v(" "), _c('div', {attrs: {"slot": "footer"}, slot: "footer"})], 1)], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue?vue&type=template&id=531e591a&scoped=true&

// EXTERNAL MODULE: ./src/mixins/invoice-issue/customerMixin.js
        var customerMixin = __webpack_require__("BdQq");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// import AutoComplete from 'iview/src/components/auto-complete/auto-complete'


        var propMixin = _objectSpread({}, customerMixin["a" /* default */], {
            computed: _objectSpread({}, customerMixin["a" /* default */].computed, {}, Object(helper["a" /* generateComputed */])([{
                propName: 'currentCustomerType',
                fixedValue: 'seller'
            }], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['isNegative'], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['remarks', 'originalInvoiceCode', 'originalInvoiceNo', 'issuePlace', 'verifyCode', 'taxationMethod', 'invoiceSpecialMark'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        });

        /* harmony default export */
        var InvoiceFootervue_type_script_lang_js_ = ({
            // components: { AutoComplete },
            name: 'invoice-footer',
            mixins: [propMixin],
            props: {
                dataObj: {
                    type: Object,
                    required: true
                },
                isIssue: {
                    type: Boolean,
                    default: false
                },
                invoiceTypeCode: {
                    type: String,
                    required: true
                },
                isRed: {
                    type: Boolean,
                    default: false
                }
            },
            data: function data() {
                return {
                    bankAndAccountShow: false,
                    currentDataObj: _objectSpread({}, this.dataObj),
                    bankAccountList: [],
                    showSelect: false,
                    columns: [{
                        title: '开户银行及账号',
                        width: 180,
                        key: 'classifyName'
                    }]
                };
            },
            computed: {
                hasTrader: function hasTrader() {
                    return false;
                },
                isRollInvoice: function isRollInvoice() {
                    return this.invoiceTypeCode === '025';
                },
                sell: function sell() {
                    var invoiceSpecialMark = this.invoiceSpecialMark;
                    var isRollInvoice = this.isRollInvoice;

                    if (invoiceSpecialMark === '02') {
                        return '购买方';
                    } else if (invoiceSpecialMark === '08' || isRollInvoice) {
                        return '销售方';
                    } else {
                        return '销货单位';
                    }
                },
                showDifference: function showDifference() {
                    return this.taxationMethod === '2';
                },
                deductibleAmount: function deductibleAmount() {
                    if (this.showDifference && this.isIssue) {
                        var ded = this.$store.state.invoiceEdit.currentData.detailList[0].deduction;
                        return (+ded).toFixed(2);
                    } else {
                        return '';
                    }
                },
                isSpecialInvoice: function isSpecialInvoice() {
                    return this.invoiceTypeCode === '004';
                }
            },
            mounted: function mounted() {
                this.getBankAccountList();
            },
            watch: {
                dataObj: {
                    deep: true,
                    handler: function handler(dataObj) {
                        // console.log('dataibj',dataObj)
                        Object.assign(this.currentDataObj, dataObj);
                    }
                },
                issuePlace: {
                    deep: true,
                    handler: function handler(e, old) {
                        var zp = ['004', '007'];

                        if (zp.includes(this.invoiceTypeCode) && e.invoiceTerminalName && e.invoiceTerminalName !== old.invoiceTerminalName) {
                            this.getBankAccountList();
                        }
                    }
                }
            },
            methods: {
                bankAndAccountModalShow: function bankAndAccountModalShow() {
                    this.bankAndAccountShow = true;
                },
                showSelectTrader: function showSelectTrader() {
                    this.currentCustomerType = 'seller';
                    this.showCustomerSelector = true;
                },
                updateStore: function updateStore() {
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('sellerInfo'), _objectSpread({}, this.currentDataObj));
                },
                getBankAccountList: function getBankAccountList() {
                    var _this = this;

                    var ajaxData = {
                        taxNo: this.currentDataObj.taxSerial,
                        invoiceTerminalCode: this.issuePlace.invoiceTerminalCode
                    };
                    this.http.outPost('/api/termBankAddr/queryBankAddrByCondition', ajaxData).then(function (resp) {
                        var res = resp.data.results;
                        var list = res.map(function (item) {
                            return _objectSpread({}, item, {
                                label: item.bankAddr + item.bankAccount,
                                value: item.bankAddr + item.bankAccount
                            });
                        });
                        var defaultList = [{
                            label: _this.currentDataObj.bankAndAccount,
                            value: _this.currentDataObj.bankAndAccount
                        }];
                        _this.bankAccountList = defaultList.concat(list.filter(function (item) {
                            return item.value !== defaultList[0].value;
                        })); // 下拉大于两条显示下拉，否则显示输入框

                        if (_this.bankAccountList.length > 1) {
                            _this.showSelect = true;
                        }
                    });
                },
                bankAccountChange: function bankAccountChange(val) {
                    this.currentDataObj.bankAndAccount = val.target.value || '';
                    this.updateStore();
                    this.bankAndAccountShow = false;
                },
                selectBank: function selectBank() {
                    this.updateStore();
                    this.bankAndAccountShow = false;
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_InvoiceFootervue_type_script_lang_js_ = (InvoiceFootervue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue?vue&type=style&index=0&id=531e591a&lang=scss&scoped=true&
        var InvoiceFootervue_type_style_index_0_id_531e591a_lang_scss_scoped_true_ = __webpack_require__("ESqE");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_InvoiceFootervue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "531e591a",
            null
        )

        /* harmony default export */
        var InvoiceFooter = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "fJ3f":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony default export */
        __webpack_exports__["a"] = ({
            mounted: function mounted() {
                // this.bindAction()
                this.dynamicBindAction();
            },
            methods: {
                dynamicBindAction: function dynamicBindAction() {
                    var _this = this;

                    document.addEventListener('keyup', function (event) {
                        if (event.target.tagName === 'INPUT') {
                            var inputs = document.getElementById('invoice-container').getElementsByTagName('INPUT');
                            inputs = Array.from(inputs).filter(function (item) {
                                return item.style.display !== 'none';
                            });
                            var index = inputs.indexOf(event.target);

                            _this.keyDown(event, index, inputs);
                        }
                    }, false);
                },
                bindAction: function bindAction() {
                    var _this2 = this;

                    var inputs = document.getElementById('invoice-container').getElementsByTagName('INPUT'); // console.log(Array.from(inputs))

                    var _loop = function _loop(i) {
                        var input = inputs[i];

                        input.onkeydown = function (event) {
                            _this2.keyDown(event, i, inputs);
                        };
                    };

                    for (var i = 0; i < inputs.length; i++) {
                        _loop(i);
                    } // let d = Array.from(inputs).map(itm => itm.onkeydown.toString())
                    // console.log(d)

                },
                keyDown: function keyDown(event, index, inputs) {
                    var focus = document.activeElement; // var cur = inputs[index]

                    var focusIndex = Array.from(inputs).indexOf(focus);
                    if (!document.getElementById('invoice-container').contains(focus)) return;
                    event = window.event || event;
                    var key = event.keyCode;
                    var i = 0;

                    if (index === focusIndex) {
                        i = index; // console.log(key, i, index, inputs)

                        switch (key) {
                            case 37:
                                // 左
                                // if (i > 0) inputs[i - 1].focus()
                                break;

                            case 38:
                                // 上
                                if (i - 1 >= 0) inputs[i - 1].focus();
                                break;

                            case 39:
                                // 右
                                // if (i < inputs.length - 1) inputs[i + 1].focus()
                                break;

                            case 40:
                                // 下
                                if (i + 1 < inputs.length) inputs[i + 1].focus();
                                break;
                        }
                    }
                }
            }
        });

        /***/
    }),

    /***/ "gQ2A":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/iview/src/components/input/input.vue?vue&type=template&id=6610301e&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {class: _vm.wrapClasses}, [(_vm.type !== 'textarea') ? [(_vm.prepend) ? _c('div', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.slotReady),
                    expression: "slotReady"
                }], class: [_vm.prefixCls + '-group-prepend']
            }, [_vm._t("prepend")], 2) : _vm._e(), _vm._v(" "), (_vm.clearable && _vm.currentValue && !_vm.disabled) ? _c('i', {
                staticClass: "ivu-icon",
                class: ['ivu-icon-ios-close-circle', _vm.prefixCls + '-icon', _vm.prefixCls + '-icon-clear', _vm.prefixCls + '-icon-normal'],
                on: {"click": _vm.handleClear}
            }) : (_vm.icon) ? _c('i', {
                staticClass: "ivu-icon",
                class: ['ivu-icon-' + _vm.icon, _vm.prefixCls + '-icon', _vm.prefixCls + '-icon-normal'],
                on: {"click": _vm.handleIconClick}
            }) : (_vm.search && _vm.enterButton === false) ? _c('i', {
                staticClass: "ivu-icon ivu-icon-ios-search",
                class: [_vm.prefixCls + '-icon', _vm.prefixCls + '-icon-normal', _vm.prefixCls + '-search-icon'],
                on: {"click": _vm.handleSearch}
            }) : (_vm.showSuffix) ? _c('span', {staticClass: "ivu-input-suffix"}, [_vm._t("suffix", [(_vm.suffix) ? _c('i', {
                staticClass: "ivu-icon",
                class: ['ivu-icon-' + _vm.suffix]
            }) : _vm._e()])], 2) : _vm._e(), _vm._v(" "), _c('transition', {attrs: {"name": "fade"}}, [(!_vm.icon) ? _c('i', {
                staticClass: "ivu-icon ivu-icon-ios-loading ivu-load-loop",
                class: [_vm.prefixCls + '-icon', _vm.prefixCls + '-icon-validate']
            }) : _vm._e()]), _vm._v(" "), _c('input', {
                ref: "input",
                class: _vm.inputClasses,
                attrs: {
                    "id": _vm.elementId,
                    "autocomplete": _vm.autocomplete,
                    "spellcheck": _vm.spellcheck,
                    "type": _vm.type,
                    "placeholder": _vm.placeholder,
                    "disabled": _vm.disabled,
                    "maxlength": _vm.maxlength,
                    "readonly": _vm.readonly,
                    "name": _vm.name,
                    "number": _vm.number,
                    "autofocus": _vm.autofocus
                },
                domProps: {"value": _vm.currentValue},
                on: {
                    "keyup": [function ($event) {
                        if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
                            return null;
                        }
                        return _vm.handleEnter($event)
                    }, _vm.handleKeyup],
                    "keypress": _vm.handleKeypress,
                    "keydown": _vm.handleKeydown,
                    "focus": _vm.handleFocus,
                    "blur": _vm.handleBlur,
                    "compositionstart": _vm.handleComposition,
                    "compositionupdate": _vm.handleComposition,
                    "compositionend": _vm.handleComposition,
                    "input": _vm.handleInput,
                    "change": _vm.handleChange
                }
            }), _vm._v(" "), (_vm.append) ? _c('div', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.slotReady),
                    expression: "slotReady"
                }], class: [_vm.prefixCls + '-group-append']
            }, [_vm._t("append")], 2) : (_vm.search && _vm.enterButton) ? _c('div', {
                class: [_vm.prefixCls + '-group-append', _vm.prefixCls + '-search'],
                on: {"click": _vm.handleSearch}
            }, [(_vm.enterButton === true) ? _c('i', {staticClass: "ivu-icon ivu-icon-ios-search"}) : [_vm._v(_vm._s(_vm.enterButton))]], 2) : (_vm.showPrefix) ? _c('span', {staticClass: "ivu-input-prefix"}, [_vm._t("prefix", [(_vm.prefix) ? _c('i', {
                staticClass: "ivu-icon",
                class: ['ivu-icon-' + _vm.prefix]
            }) : _vm._e()])], 2) : _vm._e()] : _c('textarea', {
                ref: "textarea",
                class: _vm.textareaClasses,
                style: (_vm.textareaStyles),
                attrs: {
                    "id": _vm.elementId,
                    "wrap": _vm.wrap,
                    "autocomplete": _vm.autocomplete,
                    "spellcheck": _vm.spellcheck,
                    "placeholder": _vm.placeholder,
                    "disabled": _vm.disabled,
                    "rows": _vm.rows,
                    "maxlength": _vm.maxlength,
                    "readonly": _vm.readonly,
                    "name": _vm.name,
                    "autofocus": _vm.autofocus
                },
                domProps: {"value": _vm.currentValue},
                on: {
                    "keyup": [function ($event) {
                        if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
                            return null;
                        }
                        return _vm.handleEnter($event)
                    }, _vm.handleKeyup],
                    "keypress": _vm.handleKeypress,
                    "keydown": _vm.handleKeydown,
                    "focus": _vm.handleFocus,
                    "blur": _vm.handleBlur,
                    "compositionstart": _vm.handleComposition,
                    "compositionupdate": _vm.handleComposition,
                    "compositionend": _vm.handleComposition,
                    "input": _vm.handleInput
                }
            })], 2)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./node_modules/iview/src/components/input/input.vue?vue&type=template&id=6610301e&

// EXTERNAL MODULE: ./node_modules/iview/src/utils/assist.js
        var assist = __webpack_require__("zVF6");

// CONCATENATED MODULE: ./node_modules/iview/src/utils/calcTextareaHeight.js
// Thanks to
// https://github.com/andreypopp/react-textarea-autosize/
// let hiddenTextarea;
//
// const HIDDEN_STYLE = `
//     height:0 !important;
//     min-height:0 !important;
//     max-height:none !important;
//     visibility:hidden !important;
//     overflow:hidden !important;
//     position:absolute !important;
//     z-index:-1000 !important;
//     top:0 !important;
//     right:0 !important
// `;
//
// const CONTEXT_STYLE = [
//     'letter-spacing',
//     'line-height',
//     'padding-top',
//     'padding-bottom',
//     'font-family',
//     'font-weight',
//     'font-size',
//     'text-rendering',
//     'text-transform',
//     'width',
//     'text-indent',
//     'padding-left',
//     'padding-right',
//     'border-width',
//     'box-sizing'
// ];
//
// function calculateNodeStyling(node) {
//     const style = window.getComputedStyle(node);
//
//     const boxSizing = style.getPropertyValue('box-sizing');
//
//     const paddingSize = (
//         parseFloat(style.getPropertyValue('padding-bottom')) +
//         parseFloat(style.getPropertyValue('padding-top'))
//     );
//
//     const borderSize = (
//         parseFloat(style.getPropertyValue('border-bottom-width')) +
//         parseFloat(style.getPropertyValue('border-top-width'))
//     );
//
//     const contextStyle = CONTEXT_STYLE
//         .map(name => `${name}:${style.getPropertyValue(name)}`)
//         .join(';');
//
//     return {contextStyle, paddingSize, borderSize, boxSizing};
// }
//
// export default function calcTextareaHeight(targetNode, minRows = null, maxRows = null) {
//     if (!hiddenTextarea) {
//         hiddenTextarea = document.createElement('textarea');
//         document.body.appendChild(hiddenTextarea);
//     }
//
//     let {
//         paddingSize,
//         borderSize,
//         boxSizing,
//         contextStyle
//     } = calculateNodeStyling(targetNode);
//
//     hiddenTextarea.setAttribute('style', `${contextStyle};${HIDDEN_STYLE}`);
//     hiddenTextarea.value = targetNode.value || targetNode.placeholder || '';
//
//     let height = hiddenTextarea.scrollHeight;
//     let minHeight = -Infinity;
//     let maxHeight = Infinity;
//     let overflowY;
//
//     if (boxSizing === 'border-box') {
//         height = height + borderSize;
//     } else if (boxSizing === 'content-box') {
//         height = height - paddingSize;
//     }
//
//     hiddenTextarea.value = '';
//     let singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
//
//     if (minRows !== null) {
//         minHeight = singleRowHeight * minRows;
//         if (boxSizing === 'border-box') {
//             minHeight = minHeight + paddingSize + borderSize;
//         }
//         height = Math.max(minHeight, height);
//     }
//     if (maxRows !== null) {
//         maxHeight = singleRowHeight * maxRows;
//         if (boxSizing === 'border-box') {
//             maxHeight = maxHeight + paddingSize + borderSize;
//         }
//         overflowY = height > maxHeight ? '' : 'hidden';
//         height = Math.min(maxHeight, height);
//     }
//
//     if (!maxRows) {
//         overflowY = 'hidden';
//     }
//
//     return {
//         height: `${height}px`,
//         minHeight: `${minHeight}px`,
//         maxHeight: `${maxHeight}px`,
//         overflowY
//     };
// }
        var HIDDEN_TEXTAREA_STYLE = "\n  min-height:0 !important;\n  max-height:none !important;\n  height:0 !important;\n  visibility:hidden !important;\n  overflow:hidden !important;\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important\n";
        var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
        var computedStyleCache = {};
        var hiddenTextarea;

        function calculateNodeStyling(node) {
            var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');

            if (useCache && computedStyleCache[nodeRef]) {
                return computedStyleCache[nodeRef];
            }

            var style = window.getComputedStyle(node);
            var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
            var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
            var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
            var sizingStyle = SIZING_STYLE.map(function (name) {
                return "".concat(name, ":").concat(style.getPropertyValue(name));
            }).join(';');
            var nodeInfo = {
                sizingStyle: sizingStyle,
                paddingSize: paddingSize,
                borderSize: borderSize,
                boxSizing: boxSizing
            };

            if (useCache && nodeRef) {
                computedStyleCache[nodeRef] = nodeInfo;
            }

            return nodeInfo;
        }

        function calcTextareaHeight(uiTextNode) {
            var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
            var useCache = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

            if (!hiddenTextarea) {
                hiddenTextarea = document.createElement('textarea');
                document.body.appendChild(hiddenTextarea);
            } // Fix wrap="off" issue
            // https://github.com/ant-design/ant-design/issues/6577


            if (uiTextNode.getAttribute('wrap')) {
                hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
            } else {
                hiddenTextarea.removeAttribute('wrap');
            } // Copy all CSS properties that have an impact on the height of the content in
            // the textbox


            var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
                paddingSize = _calculateNodeStyling.paddingSize,
                borderSize = _calculateNodeStyling.borderSize,
                boxSizing = _calculateNodeStyling.boxSizing,
                sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise
            // text-lines will not calculated properly as the shadow will technically be
            // narrower for content


            hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
            hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
            var minHeight = Number.MIN_SAFE_INTEGER;
            var maxHeight = Number.MAX_SAFE_INTEGER;
            var height = hiddenTextarea.scrollHeight;
            var overflowY;

            if (boxSizing === 'border-box') {
                // border-box: add border, since height = content + padding + border
                height = height + borderSize;
            } else if (boxSizing === 'content-box') {
                // remove padding, since height = content
                height = height - paddingSize;
            }

            if (minRows !== null || maxRows !== null) {
                // measure height of a textarea with a single row
                hiddenTextarea.value = ' ';
                var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;

                if (minRows !== null) {
                    minHeight = singleRowHeight * minRows;

                    if (boxSizing === 'border-box') {
                        minHeight = minHeight + paddingSize + borderSize;
                    }

                    height = Math.max(minHeight, height);
                }

                if (maxRows !== null) {
                    maxHeight = singleRowHeight * maxRows;

                    if (boxSizing === 'border-box') {
                        maxHeight = maxHeight + paddingSize + borderSize;
                    }

                    overflowY = height > maxHeight ? '' : 'hidden';
                    height = Math.min(maxHeight, height);
                }
            } // Remove scroll bar flash when autosize without maxRows


            if (!maxRows) {
                overflowY = 'hidden';
            }

            return {
                height: "".concat(height, "px"),
                minHeight: "".concat(minHeight, "px"),
                maxHeight: "".concat(maxHeight, "px"),
                overflowY: overflowY
            };
        }

// EXTERNAL MODULE: ./node_modules/iview/src/mixins/emitter.js
        var emitter = __webpack_require__("NnD1");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/iview/src/components/input/input.vue?vue&type=script&lang=js&
        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var prefixCls = 'ivu-input';
        /* harmony default export */
        var inputvue_type_script_lang_js_ = ({
            name: 'Input',
            mixins: [emitter["a" /* default */]],
            props: {
                type: {
                    validator: function validator(value) {
                        return Object(assist["k" /* oneOf */])(value, ['text', 'textarea', 'password', 'url', 'email', 'date', 'number', 'tel']);
                    },
                    default: 'text'
                },
                value: {
                    type: [String, Number],
                    default: ''
                },
                size: {
                    validator: function validator(value) {
                        return Object(assist["k" /* oneOf */])(value, ['small', 'large', 'default']);
                    },
                    default: function _default() {
                        return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
                    }
                },
                placeholder: {
                    type: String,
                    default: ''
                },
                maxlength: {
                    type: Number
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                icon: String,
                autosize: {
                    type: [Boolean, Object],
                    default: false
                },
                rows: {
                    type: Number,
                    default: 2
                },
                readonly: {
                    type: Boolean,
                    default: false
                },
                name: {
                    type: String
                },
                number: {
                    type: Boolean,
                    default: false
                },
                autofocus: {
                    type: Boolean,
                    default: false
                },
                spellcheck: {
                    type: Boolean,
                    default: false
                },
                autocomplete: {
                    type: String,
                    default: 'off'
                },
                clearable: {
                    type: Boolean,
                    default: false
                },
                elementId: {
                    type: String
                },
                wrap: {
                    validator: function validator(value) {
                        return Object(assist["k" /* oneOf */])(value, ['hard', 'soft']);
                    },
                    default: 'soft'
                },
                prefix: {
                    type: String,
                    default: ''
                },
                suffix: {
                    type: String,
                    default: ''
                },
                search: {
                    type: Boolean,
                    default: false
                },
                enterButton: {
                    type: [Boolean, String],
                    default: false
                }
            },
            data: function data() {
                return {
                    currentValue: this.value,
                    prefixCls: prefixCls,
                    prepend: true,
                    append: true,
                    slotReady: false,
                    textareaStyles: {},
                    showPrefix: false,
                    showSuffix: false,
                    isOnComposition: false
                };
            },
            computed: {
                wrapClasses: function wrapClasses() {
                    var _ref;

                    return ["".concat(prefixCls, "-wrapper"), (_ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-wrapper-").concat(this.size), !!this.size), _defineProperty(_ref, "".concat(prefixCls, "-type"), this.type), _defineProperty(_ref, "".concat(prefixCls, "-group"), this.prepend || this.append || this.search && this.enterButton), _defineProperty(_ref, "".concat(prefixCls, "-group-").concat(this.size), (this.prepend || this.append || this.search && this.enterButton) && !!this.size), _defineProperty(_ref, "".concat(prefixCls, "-group-with-prepend"), this.prepend), _defineProperty(_ref, "".concat(prefixCls, "-group-with-append"), this.append || this.search && this.enterButton), _defineProperty(_ref, "".concat(prefixCls, "-hide-icon"), this.append), _defineProperty(_ref, "".concat(prefixCls, "-with-search"), this.search && this.enterButton), _ref)];
                },
                inputClasses: function inputClasses() {
                    var _ref2;

                    return ["".concat(prefixCls), (_ref2 = {}, _defineProperty(_ref2, "".concat(prefixCls, "-").concat(this.size), !!this.size), _defineProperty(_ref2, "".concat(prefixCls, "-disabled"), this.disabled), _defineProperty(_ref2, "".concat(prefixCls, "-with-prefix"), this.showPrefix), _defineProperty(_ref2, "".concat(prefixCls, "-with-suffix"), this.showSuffix || this.search && this.enterButton === false), _ref2)];
                },
                textareaClasses: function textareaClasses() {
                    return ["".concat(prefixCls), _defineProperty({}, "".concat(prefixCls, "-disabled"), this.disabled)];
                }
            },
            methods: {
                handleEnter: function handleEnter(event) {
                    this.$emit('on-enter', event);
                    if (this.search) this.$emit('on-search', this.currentValue);
                },
                handleKeydown: function handleKeydown(event) {
                    this.$emit('on-keydown', event);
                },
                handleKeypress: function handleKeypress(event) {
                    this.$emit('on-keypress', event);
                },
                handleKeyup: function handleKeyup(event) {
                    this.$emit('on-keyup', event);
                },
                handleIconClick: function handleIconClick(event) {
                    this.$emit('on-click', event);
                },
                handleFocus: function handleFocus(event) {
                    this.$emit('on-focus', event);
                },
                handleBlur: function handleBlur(event) {
                    this.$emit('on-blur', event);

                    if (!Object(assist["e" /* findComponentUpward */])(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
                        this.dispatch('FormItem', 'on-form-blur', this.currentValue);
                    }
                },
                handleComposition: function handleComposition(event) {
                    if (event.type === 'compositionstart') {
                        this.isOnComposition = true;
                    }

                    if (event.type === 'compositionend') {
                        this.isOnComposition = false;
                        this.handleInput(event);
                    }
                },
                handleInput: function handleInput(event) {
                    if (this.isOnComposition) return;
                    var value = event.target.value;
                    if (this.number && value !== '') value = Number.isNaN(Number(value)) ? value : Number(value);
                    this.$emit('input', value);
                    this.setCurrentValue(value);
                    this.$emit('on-change', event);
                },
                handleChange: function handleChange(event) {
                    this.$emit('on-input-change', event);
                },
                setCurrentValue: function setCurrentValue(value) {
                    var _this = this;

                    if (value === this.currentValue) return;
                    this.$nextTick(function () {
                        _this.resizeTextarea();
                    });
                    this.currentValue = value;

                    if (!Object(assist["e" /* findComponentUpward */])(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
                        this.dispatch('FormItem', 'on-form-change', value);
                    }
                },
                resizeTextarea: function resizeTextarea() {
                    var autosize = this.autosize;

                    if (!autosize || this.type !== 'textarea') {
                        return false;
                    }

                    var minRows = autosize.minRows;
                    var maxRows = autosize.maxRows;
                    this.textareaStyles = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
                },
                focus: function focus() {
                    if (this.type === 'textarea') {
                        this.$refs.textarea.focus();
                    } else {
                        this.$refs.input.focus();
                    }
                },
                blur: function blur() {
                    if (this.type === 'textarea') {
                        this.$refs.textarea.blur();
                    } else {
                        this.$refs.input.blur();
                    }
                },
                handleClear: function handleClear() {
                    var e = {
                        target: {
                            value: ''
                        }
                    };
                    this.$emit('input', '');
                    this.setCurrentValue('');
                    this.$emit('on-change', e);
                    this.$emit('on-clear');
                },
                handleSearch: function handleSearch() {
                    if (this.disabled) return false;
                    this.$refs.input.focus();
                    this.$emit('on-search', this.currentValue);
                }
            },
            watch: {
                value: function value(val) {
                    this.setCurrentValue(val);
                }
            },
            mounted: function mounted() {
                if (this.type !== 'textarea') {
                    this.prepend = this.$slots.prepend !== undefined;
                    this.append = this.$slots.append !== undefined;
                    this.showPrefix = this.prefix !== '' || this.$slots.prefix !== undefined;
                    this.showSuffix = this.suffix !== '' || this.$slots.suffix !== undefined;
                } else {
                    this.prepend = false;
                    this.append = false;
                }

                this.slotReady = true;
                this.resizeTextarea();
            }
        });
// CONCATENATED MODULE: ./node_modules/iview/src/components/input/input.vue?vue&type=script&lang=js&
        /* harmony default export */
        var input_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./node_modules/iview/src/components/input/input.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            input_inputvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var input = __webpack_exports__["a"] = (component.exports);

        /***/
    }),

    /***/ "hkiq":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceHeader_vue_vue_type_style_index_0_id_ab32345e_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("CtBD");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceHeader_vue_vue_type_style_index_0_id_ab32345e_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceHeader_vue_vue_type_style_index_0_id_ab32345e_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceHeader_vue_vue_type_style_index_0_id_ab32345e_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "iMkd":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/AutoComplete.vue?vue&type=template&id=1e5c878c&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('i-select', {
                ref: "select",
                staticClass: "ivu-auto-complete",
                attrs: {
                    "label": _vm.label,
                    "disabled": _vm.disabled,
                    "clearable": _vm.clearable,
                    "placeholder": _vm.placeholder,
                    "size": _vm.size,
                    "placement": _vm.placement,
                    "value": _vm.currentValue,
                    "filterable": "",
                    "remote": "",
                    "auto-complete": "",
                    "remote-method": _vm.remoteMethod,
                    "transfer": _vm.transfer
                },
                on: {"on-change": _vm.handleChange}
            }, [_vm._t("input", [_c('i-input', {
                ref: "input",
                attrs: {
                    "slot": "input",
                    "element-id": _vm.elementId,
                    "name": _vm.name,
                    "placeholder": _vm.placeholder,
                    "disabled": _vm.disabled,
                    "size": _vm.size,
                    "icon": _vm.inputIcon
                },
                on: {"on-click": _vm.handleClear, "on-focus": _vm.handleFocus, "on-blur": _vm.handleBlur},
                slot: "input",
                model: {
                    value: (_vm.currentValue), callback: function ($$v) {
                        _vm.currentValue = $$v
                    }, expression: "currentValue"
                }
            })]), _vm._v(" "), _vm._t("default", _vm._l((_vm.filteredData), function (item) {
                return _c('i-option', {key: item, attrs: {"value": item}}, [_vm._v(_vm._s(item))])
            }))], 2)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/AutoComplete.vue?vue&type=template&id=1e5c878c&

// EXTERNAL MODULE: ./node_modules/iview/src/components/select/select.vue + 9 modules
        var select_select = __webpack_require__("MUga");

// EXTERNAL MODULE: ./node_modules/iview/src/components/select/option.vue + 4 modules
        var select_option = __webpack_require__("smeC");

// EXTERNAL MODULE: ./node_modules/iview/src/components/input/input.vue + 5 modules
        var input = __webpack_require__("gQ2A");

// EXTERNAL MODULE: ./node_modules/iview/src/utils/assist.js
        var assist = __webpack_require__("zVF6");

// EXTERNAL MODULE: ./node_modules/iview/src/mixins/emitter.js
        var emitter = __webpack_require__("NnD1");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/AutoComplete.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        /* harmony default export */
        var AutoCompletevue_type_script_lang_js_ = ({
            name: 'MAutoComplete',
            mixins: [emitter["a" /* default */]],
            components: {
                iSelect: select_select["a" /* default */],
                iOption: select_option["a" /* default */],
                iInput: input["a" /* default */]
            },
            props: {
                value: {
                    type: [String, Number],
                    default: ''
                },
                label: {
                    type: [String, Number],
                    default: ''
                },
                data: {
                    type: Array,
                    default: function _default() {
                        return [];
                    }
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                clearable: {
                    type: Boolean,
                    default: false
                },
                placeholder: {
                    type: String
                },
                size: {
                    validator: function validator(value) {
                        return Object(assist["k" /* oneOf */])(value, ['small', 'large', 'default']);
                    }
                },
                icon: {
                    type: String
                },
                filterMethod: {
                    type: [Function, Boolean],
                    default: false
                },
                placement: {
                    validator: function validator(value) {
                        return Object(assist["k" /* oneOf */])(value, ['top', 'bottom']);
                    },
                    default: 'bottom'
                },
                transfer: {
                    type: Boolean,
                    default: false
                },
                name: {
                    type: String
                },
                elementId: {
                    type: String
                }
            },
            data: function data() {
                return {
                    currentValue: this.value,
                    disableEmitChange: false // for Form reset

                };
            },
            computed: {
                inputIcon: function inputIcon() {
                    var icon = '';

                    if (this.clearable && this.currentValue) {
                        icon = 'ios-close';
                    } else if (this.icon) {
                        icon = this.icon;
                    }

                    return icon;
                },
                filteredData: function filteredData() {
                    var _this = this;

                    if (this.filterMethod) {
                        return this.data.filter(function (item) {
                            return _this.filterMethod(_this.currentValue, item);
                        });
                    } else {
                        return this.data;
                    }
                }
            },
            watch: {
                value: function value(val) {
                    if (this.currentValue !== val) {
                        this.disableEmitChange = true;
                    }

                    this.currentValue = val;
                },
                currentValue: function currentValue(val) {
                    this.$refs.select.query = val;
                    this.$emit('input', val);

                    if (this.disableEmitChange) {
                        this.disableEmitChange = false;
                        return;
                    }

                    this.$emit('on-change', val);
                    this.dispatch('FormItem', 'on-form-change', val);
                }
            },
            methods: {
                remoteMethod: function remoteMethod(query) {
                    this.$emit('on-search', query);
                },
                handleChange: function handleChange(val) {
                    if (val && typeof val !== 'number') {
                        this.currentValue = val;
                    } // this.$refs.input.blur()


                    this.$emit('on-select', val);
                    this.$refs.input.blur();
                },
                handleFocus: function handleFocus(event) {
                    this.$emit('on-focus', event);
                },
                handleBlur: function handleBlur(event) {
                    this.$emit('on-blur', event);
                },
                handleClear: function handleClear() {
                    if (!this.clearable) return;
                    this.currentValue = '';
                    this.$refs.select.reset();
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/AutoComplete.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_AutoCompletevue_type_script_lang_js_ = (AutoCompletevue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/AutoComplete.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_AutoCompletevue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var AutoComplete = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "iQeH":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/ListGoods.vue?vue&type=template&id=153d38f0&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('Modal', {
                attrs: {"title": "选择清单商品", "width": "980", "z-index": 200},
                on: {"on-visible-change": _vm.visibleStateChange, "on-ok": _vm.selectItem},
                model: {
                    value: (_vm.showListGoodsSelector), callback: function ($$v) {
                        _vm.showListGoodsSelector = $$v
                    }, expression: "showListGoodsSelector"
                }
            }, [_c('div', {staticClass: "wrap"}, [_c('LabelInput', {
                attrs: {
                    "inputLabel": "商品名称",
                    "placeholder": "商品名称",
                    "inputValue": _vm.goodsQuery.goodsName
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.goodsName = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('LabelInput', {
                attrs: {
                    "inputLabel": "商品编码",
                    "placeholder": "商品编码",
                    "inputValue": _vm.goodsQuery.goodsCode
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.goodsCode = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('LabelInput', {
                attrs: {
                    "inputLabel": "商品规格",
                    "placeholder": "商品规格",
                    "inputValue": _vm.goodsQuery.goodsSpecification
                }, on: {
                    "change": function ($event) {
                        _vm.goodsQuery.goodsSpecification = arguments[1]
                    }
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "查询",
                    "clickCallback": _vm.query
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "inputLabel": "选择",
                    "clickCallback": _vm.selectItem
                }
            })], 1), _vm._v(" "), _c('BwDataGrid', {
                ref: "listsWrap",
                attrs: {
                    "table-ref": "listsSelector",
                    "columns": _vm.columns,
                    "data": _vm.resultList,
                    "total": _vm.resultTotal,
                    "highlight-row": true,
                    "dynamicallocation": false,
                    "show-sizer": false
                },
                on: {
                    "bw-query": _vm.query,
                    "bw-current-change": _vm.changeCurrentRow,
                    "bw-row-dbl-click": _vm.selectItem
                }
            })], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/ListGoods.vue?vue&type=template&id=153d38f0&scoped=true&

// EXTERNAL MODULE: ./src/components/page/common/LabelInput.vue + 4 modules
        var LabelInput = __webpack_require__("m7jE");

// EXTERNAL MODULE: ./src/components/page/common/FuncButton.vue + 4 modules
        var FuncButton = __webpack_require__("ZPqo");

// EXTERNAL MODULE: ./src/utils/typeUtil.js
        var typeUtil = __webpack_require__("v7p+");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/ListGoods.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        var propMixin = {
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['showListGoodsSelector'], function (state) {
                return state.invoiceEdit;
            }))
        };
        var defaultQuery = {
            goodsName: '',
            goodsCode: '',
            goodsSpecification: ''
        };
        /* harmony default export */
        var ListGoodsvue_type_script_lang_js_ = ({
            name: 'goods-selector',
            mixins: [propMixin],
            components: {
                LabelInput: LabelInput["default"],
                FuncButton: FuncButton["default"] // DataGrid,

            },
            props: {
                // 选择商品后的回调
                selectCallback: {
                    type: Function,
                    required: true
                },
                id: {
                    type: String,
                    required: true
                }
            },
            data: function data() {
                return {
                    goodsQuery: _objectSpread({}, defaultQuery),
                    resultTotal: 0,
                    // 查询结果总数
                    resultList: [],
                    // 查询结果,
                    pagination: null,
                    columns: [// {
                        //     key: 'showIndex',
                        //     title: '序号',
                        //     width: 45
                        // },
                        {
                            title: '商品名称',
                            key: 'goodsName',
                            minWidth: 150
                        }, {
                            title: '商品编码',
                            key: 'goodsCode',
                            minWidth: 150
                        }, {
                            title: '规格型号',
                            key: 'goodsSpecification',
                            minWidth: 150
                        }, {
                            title: '单位',
                            width: 108,
                            key: 'goodsUnit'
                        }, {
                            title: '单价',
                            minWidth: 90,
                            key: 'goodsPrice'
                        }, {
                            title: '商品数量',
                            minWidth: 90,
                            key: 'goodsQuantity'
                        }, {
                            title: '税率',
                            width: 70,
                            key: 'goodsTaxRate'
                        }, {
                            title: '金额',
                            minWidth: 90,
                            key: 'goodsTotalPrice'
                        }, {
                            title: '税额',
                            minWidth: 90,
                            key: 'goodsTotalTax'
                        }, {
                            title: '可用税率',
                            minWidth: 90,
                            key: 'usedRate'
                        }]
                };
            },
            created: function created() {// this.query()
            },
            methods: {
                init: function init() {
                    this.query(); // if (firstLoad) {
                    //     this.query()
                    // } else {
                    //     this.$refs.listsWrap.onChanged(1)
                    // }
                },
                query: function query(args) {
                    var _this = this;

                    var params = _objectSpread({}, this.goodsQuery, {}, args, {
                        id: this.id
                    });

                    this.$store.dispatch('getNegativeList', {
                        params: params,
                        callback: function callback(respData) {
                            _this.resultList = respData.results;
                            _this.resultTotal = respData.total;
                        }
                    });
                },
                selectItem: function selectItem() {
                    if (this.currentRow) {
                        // this.showListGoodsSelector = false;
                        this.$store.commit('changeShowListGoodsSelector', false);

                        if (typeUtil["a" /* default */].isFunction(this.selectCallback)) {
                            this.selectCallback(this.currentRow);
                            this.$refs.listsWrap.clearCurrentRow();
                        }

                        this.$emit('update:visible', false);
                    } else {
                        this.$Message.warning('没有选中任何数据');
                    }
                },
                visibleStateChange: function visibleStateChange(state) {
                    this.goodsQuery = _objectSpread({}, defaultQuery);

                    if (state) {
                        this.init();
                    }

                    this.showListGoodsSelector = state;
                    this.$store.commit('changeShowListGoodsSelector', state);
                },
                changeCurrentRow: function changeCurrentRow(newRow, oldRow) {
                    this.currentRow = _objectSpread({}, newRow, {
                        // 编辑的时候 由于上条数据 问题， 导致 重新选择商品后，保留上次的数据，
                        // ps 商品的数据字段不一致 hack
                        vatSpecialManagement: newRow.vatSpecialManagement || '',
                        freeTaxMark: newRow.freeTaxMark || '',
                        preferentialMarkFlag: newRow.preferentialMarkFlag || ''
                    });
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/ListGoods.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_ListGoodsvue_type_script_lang_js_ = (ListGoodsvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/ListGoods.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_ListGoodsvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "153d38f0",
            null
        )

        /* harmony default export */
        var ListGoods = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "ircq":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_NumberInput_vue_vue_type_style_index_0_id_33b11dca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("vAae");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_NumberInput_vue_vue_type_style_index_0_id_33b11dca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_NumberInput_vue_vue_type_style_index_0_id_33b11dca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_NumberInput_vue_vue_type_style_index_0_id_33b11dca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "jWCY":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "jvb8":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "m7jE":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/LabelInput.vue?vue&type=template&id=34467a3d&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "inputground"}, [_c('Input', {
                attrs: {
                    "clearable": _vm.clearable,
                    "type": _vm.inputType,
                    "placeholder": _vm.placeholder,
                    "disabled": _vm.disabled
                },
                on: {"on-input-change": _vm.handleChange, "on-change": _vm.handleChange},
                model: {
                    value: (_vm.currentValue), callback: function ($$v) {
                        _vm.currentValue = $$v
                    }, expression: "currentValue"
                }
            }, [(_vm.inputLabel) ? _c('span', {
                attrs: {"slot": "prepend"},
                slot: "prepend"
            }, [_vm._v(_vm._s(_vm.inputLabel))]) : _vm._e()])], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/LabelInput.vue?vue&type=template&id=34467a3d&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/LabelInput.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
        /* harmony default export */
        var LabelInputvue_type_script_lang_js_ = ({
            name: 'label-input',
            props: {
                inputType: {
                    type: String,
                    default: 'text'
                },
                inputLabel: {
                    type: String,
                    default: ''
                },
                inputValue: {
                    type: [String, Number],
                    default: ''
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                placeholder: {
                    type: String,
                    default: ''
                },
                validateType: {
                    type: String,
                    default: ''
                },
                clearable: {
                    type: Boolean,
                    default: true
                }
            },
            data: function data() {
                return {
                    currentValue: this.inputValue
                };
            },
            watch: {
                inputValue: function inputValue(data) {
                    this.currentValue = this.inputValue;
                },
                currentValue: function currentValue(newVal, oldVal) {
                    var _this = this;

                    if (this.validateType) {
                        if (newVal === '') {
                            this.$nextTick(function () {
                                _this.value = '';
                            });
                        } else {
                            var valid = null;

                            if (this.validateType === 'taxRefundPassword') {
                                valid = /^[a-zA-Z0-9]{0,8}$/g.test(newVal);
                            }

                            if (!valid) {
                                this.$nextTick(function () {
                                    _this.currentValue = oldVal === '' ? '' : oldVal;
                                });
                            }
                        }
                    }
                }
            },
            methods: {
                handleChange: function handleChange(event) {
                    this.$emit('change', event, this.currentValue);
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/LabelInput.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_LabelInputvue_type_script_lang_js_ = (LabelInputvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/LabelInput.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_LabelInputvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var LabelInput = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "n5aN":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/toolbar.vue?vue&type=template&id=03780d2e&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {staticClass: "toolbar-wrapper"}, [(!_vm.isIssue) ? _c('div', {staticClass: "unissue"}, [_c('div', [(!_vm.showCommonCopyEdit) ? _c('CheckSwitch', {
                attrs: {
                    "selectedValue": _vm.ispositive,
                    "dataList": _vm.posiNegaList
                }, on: {"change": _vm.changePosiNegaSwitch}
            }) : _vm._e(), _vm._v(" "), _c('CheckSwitch', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableTaxTypeSwitch),
                    expression: "config.enableTaxTypeSwitch"
                }],
                attrs: {"selectedValue": _vm.taxationMethod, "dataList": _vm.taxTypeSwitchList},
                on: {"change": _vm.changeTaxTypeSwitch}
            }), _vm._v(" "), _c('CheckSwitch', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableTaxSwitch),
                    expression: "config.enableTaxSwitch"
                }],
                attrs: {"selectedValue": _vm.priceTaxMark, "dataList": _vm.taxSwitchList},
                on: {"change": _vm.changeTaxSwitch}
            }), _vm._v(" "), _c('CheckSwitch', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.isShowListMark),
                    expression: "isShowListMark"
                }],
                attrs: {"selectedValue": _vm.invoiceListMark, "dataList": _vm.detailSwitchList},
                on: {"change": _vm.changeDetailSwitch}
            }), _vm._v(" "), _c('LabelSelect', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableIssuePlace),
                    expression: "config.enableIssuePlace"
                }],
                attrs: {
                    "inputValue": _vm.invoiceTerminalCode,
                    "inputLabel": "开票终端",
                    "clearable": false,
                    "dataList": _vm.invoiceTerminalList
                },
                on: {"change": _vm.changeInvoiceTerminalCode}
            })], 1), _vm._v(" "), _c('div', [_c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "funcType": "search",
                    "opcode": _vm.btnShow('tempSave'),
                    "inputLabel": "暂存",
                    "clickCallback": _vm.saveInvoice
                }
            }), _vm._v(" "), _c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "funcType": "search",
                    "opcode": _vm.btnShow('makeInvoice'),
                    "inputLabel": "开具",
                    "disabled": _vm.isDisabledIssue,
                    "clickCallback": _vm.issueInvoice
                }
            }), _vm._v(" "), _c('FuncButton', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableCurrentNumber),
                    expression: "config.enableCurrentNumber"
                }],
                attrs: {
                    "opcode": _vm.btnShow('currentInvoiceNo'),
                    "buttonType": "first",
                    "funcType": "search",
                    "inputLabel": "当前票号",
                    "clickCallback": _vm.openCurrentNumberModal
                }
            }), _vm._v(" "), _c('FuncButton', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableOrderSerial === undefined ? true : _vm.config.enableOrderSerial),
                    expression: "config.enableOrderSerial === undefined ? true : config.enableOrderSerial"
                }],
                attrs: {
                    "buttonType": "first",
                    "funcType": "search",
                    "opcode": _vm.btnShow('bindOrderSerial'),
                    "inputLabel": "绑定订单流水",
                    "clickCallback": _vm.openOrderSerialModal
                }
            }), _vm._v(" "), _c('FuncButton', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableInvoiceTitle === undefined ? true : _vm.config.enableInvoiceTitle),
                    expression: "config.enableInvoiceTitle === undefined ? true : config.enableInvoiceTitle"
                }],
                attrs: {
                    "buttonType": "first",
                    "funcType": "search",
                    "opcode": _vm.btnShow('InvoiceTitle'),
                    "inputLabel": "发票抬头",
                    "clickCallback": _vm.openInvoiceTitleModal
                }
            }), _vm._v(" "), _c('FuncButton', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableMarginSetting),
                    expression: "config.enableMarginSetting"
                }],
                attrs: {
                    "opcode": _vm.btnShow('pageConfig'),
                    "buttonType": "first",
                    "funcType": "search",
                    "inputLabel": "页边距设置",
                    "clickCallback": _vm.openPageMarginSetModal
                }
            })], 1)]) : _vm._e(), _vm._v(" "), (_vm.isIssue) ? _c('div', {staticClass: "unissue"}, [_c('FuncButton', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.invoiceTypeCode !== '026'),
                    expression: "invoiceTypeCode!=='026'"
                }],
                attrs: {
                    "buttonType": "first",
                    "opcode": _vm.btnShow('print'),
                    "funcType": "search",
                    "inputLabel": "打印",
                    "clickCallback": _vm.printInvoice
                }
            }), _vm._v(" "), (!_vm.showCommonCopyEdit) ? _c('span', [_c('FuncButton', {
                attrs: {
                    "buttonType": "first",
                    "opcode": _vm.btnShow('nextInvoice'),
                    "funcType": "search",
                    "inputLabel": "下一张",
                    "clickCallback": _vm.nextInvoice
                }
            }), _vm._v(" "), _c('FuncButton', {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: (_vm.config.enableMarginSetting),
                    expression: "config.enableMarginSetting"
                }],
                attrs: {
                    "opcode": _vm.btnShow('pageConfig'),
                    "buttonType": "first",
                    "funcType": "search",
                    "inputLabel": "页边距设置",
                    "clickCallback": _vm.openPageMarginSetModal
                }
            })], 1) : _vm._e()], 1) : _vm._e(), _vm._v(" "), _c('difference-modal'), _vm._v(" "), _c('negative-modal', {
                ref: "negativeModal",
                attrs: {
                    "config": _vm.config,
                    "invoiceTypeCode": _vm.invoiceTypeCode,
                    "getCodeNo": _vm.getCodeNo,
                    "getDefaultConfig": _vm.getDefaultConfig
                },
                on: {"change-redInfoNo": _vm.changeRedInfoNo, "re-load-used-car": _vm.reLoadUsedCar}
            }), _vm._v(" "), (_vm.spinShow) ? _c('Spin', {attrs: {"fix": ""}}, [_c('Icon', {
                staticClass: "demo-spin-icon-load",
                attrs: {"type": "load-c", "size": "25"}
            }), _vm._v(" "), _c('div', [_vm._v(_vm._s(_vm.spinText))])], 1) : _vm._e()], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/toolbar.vue?vue&type=template&id=03780d2e&scoped=true&

// EXTERNAL MODULE: ./src/components/page/common/CheckSwitch.vue + 4 modules
        var CheckSwitch = __webpack_require__("p/cP");

// EXTERNAL MODULE: ./src/components/page/common/LabelSelect.vue + 4 modules
        var LabelSelect = __webpack_require__("4AcG");

// EXTERNAL MODULE: ./src/components/page/common/FuncButton.vue + 4 modules
        var FuncButton = __webpack_require__("ZPqo");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// EXTERNAL MODULE: ./src/store/stateHelper.js
        var stateHelper = __webpack_require__("Ly3o");

// EXTERNAL MODULE: ./src/mixins/serverOrDish.js
        var serverOrDish = __webpack_require__("0OwG");

// CONCATENATED MODULE: ./src/mixins/invoice-issue/invoiceTerminal.js
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

        function _slicedToArray(arr, i) {
            return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
        }

        function _nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function _iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function _arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

        /**
         * 开票终端相关
         * 开票终端list获取
         * 开票终端改变后的联动，发票号 收款人复核人
         * @author by alex
         */
        /* harmony default export */
        var invoiceTerminal = ({
            data: function data() {
                return {
                    // 设备类型字典表
                    deviceTypeTran: JSON.parse(sessionStorage.getItem('transDataKeyMap')).deviceType
                };
            },
            methods: {
                // 获取当前用户绑定开票终端
                getInvoiceTerminalList: function getInvoiceTerminalList() {
                    var _this = this;

                    var organizationInfo = JSON.parse(sessionStorage.getItem('organizationInfo'));
                    var data = {
                        taxNo: organizationInfo.taxNo || '',
                        machineNo: this.userBindTerminal.machineNo || '',
                        invoiceTypeCode: this.invoiceTypeCode
                    }; // let orgId = organizationInfo.orgId || ''

                    if (this.showCommonCopyEdit) {
                        data.taxNo = this.sellerInfo.taxSerial;
                        data.machineNo = this.currentData.machineNo;
                    } // if (this.isDishOrServer === 'server' && !data.machineNo) {
                    //     console.log('服务器用户，用户绑定的机器编号，machineNo字段为空') // eslint-disable-line
                    //     return
                    // } else if (this.isDishOrServer === 'dish') {
                    //     delete data.machineNo
                    // }


                    this.http.outPost('/api/terminal/queryMultUserTermList', data).then(function (resp) {
                        if (resp.success) {
                            var res = resp.data && resp.data.results || [];

                            if (res.length === 0) {
                                // 没有终端
                                if (_this.invoiceTypeCode !== '026') {
                                    _this.$Modal.info({
                                        title: '信息',
                                        content: '当前用户没有可用终端，请绑定终端后再进行开票业务！'
                                    });

                                    return;
                                }

                                var taxNo = JSON.parse(sessionStorage.getItem('organizationInfo')).taxNo || '';

                                _this.queryDefaultDevice(taxNo).then(function (resp) {
                                    if (resp.success === true) {
                                        var _data = resp.data && resp.data.results || []; // 机构的默认设备，有且只有一个


                                        var defaultDevice = _data.find(function (e) {
                                            return e.defaultDevice + '' === '0';
                                        });

                                        _this.dishOrServerTerminal = _this.checkDishOrServer(defaultDevice.deviceType, defaultDevice.deposit);

                                        _this.$store.commit('changeDishOrServer', _this.dishOrServerTerminal);

                                        _this.checkEleInvoiceTermList(res);
                                    }
                                });
                            } else {
                                _this.checkEleInvoiceTermList(res);
                            }
                        }
                    }).catch(function () {
                    }); // if (this.isDishOrServer === 'server') {
                    //     if (!data.machineNo) return
                    //     this.http.outPost('/api/terminal/queryMultUserTermList', data).then(res => {
                    //         this.fillInvoiceTerminalList({
                    //             results: res.data.results
                    //         })
                    //     })
                    // } else if (this.isDishOrServer === 'dish') {
                    //     this.http.outPost('/api/server/queryServerListByOrg', { orgId }).then(res => {
                    //         this.fillInvoiceTerminalList({
                    //             results: res.data.results
                    //         })
                    //     })
                    // }
                },
                checkEleInvoiceTermList: function checkEleInvoiceTermList(res) {
                    var _this2 = this;

                    var organizationInfo = JSON.parse(sessionStorage.getItem('organizationInfo'));

                    if (this.invoiceTypeCode === '026') {
                        this.queryDish(organizationInfo.taxNo, organizationInfo.orgId).then(function (isDishFlag) {
                            _this2.fillInvoiceTerminalList({
                                results: res
                            }, isDishFlag);
                        }).catch(function () {
                        });
                    } else {
                        this.fillInvoiceTerminalList({
                            results: res
                        });
                    }
                },
                // 成功获取开票终端list后
                fillInvoiceTerminalList: function fillInvoiceTerminalList(data, isDishFlag) {
                    var _this3 = this;

                    this.invoiceTerminalList = data.results.map(function (item) {
                        item.name = _this3.deviceTypeTran[item.deviceType] + '-' + item.invoiceTerminalName;
                        item.label = item.name;
                        item.value = item.invoiceTerminalCode;
                        return item;
                    });

                    var _this$invoiceTerminal = this.invoiceTerminalList.filter(function (item) {
                            return item.value === _this3.userBindTerminal.invoiceTerminalCode;
                        }),
                        _this$invoiceTerminal2 = _slicedToArray(_this$invoiceTerminal, 1),
                        curTerminal = _this$invoiceTerminal2[0]; // 判断当前终端是哪种设备类型


                    if (curTerminal) {
                        this.dishOrServerTerminal = this.checkDishOrServer(curTerminal.deviceType, curTerminal.deposit);
                    } else {
                        curTerminal = this.invoiceTerminalList[0];
                    } // 页面加载进来之后，要搜索是否有盘模式的设备


                    this.$store.commit('changeMachineNo', curTerminal && curTerminal.machineNo); // if (this.isDishOrServer === 'dish' || this.config.enableIssuePlace) {

                    if (this.config.enableIssuePlace) {
                        var place = this.$store.state.invoiceEdit.currentData.place || '';

                        if (this.showCommonCopyEdit) {
                            this.invoiceTerminalCode = this.terminalCode || place;
                        } else {
                            this.invoiceTerminalCode = this.userBindTerminal.invoiceTerminalCode || '';

                            if (this.invoiceTypeCode !== '026' || isDishFlag) {
                                this.invoiceTerminalCode = curTerminal.value;
                            } else {
                            }
                        }
                    } // 判断当前是否有盘设备，如果有盘设备，就按照盘逻辑走，如果没有盘设备，就按照服务器电票新增开票终端的逻辑走


                    if (this.invoiceTypeCode === '026' && !isDishFlag) {
                        this.invoiceTerminalList.push({
                            label: '不指定终端',
                            value: '不指定终端',
                            invoiceTerminalCode: '不指定终端'
                        });
                        this.invoiceTerminalCode = '不指定终端';
                        this.dishOrServerTerminal = 'server';
                    } // 二手车要先拿到开票方类型 否则后面一系列的赋值操作有问题


                    if (this.invoiceTypeCode === '006') {
                        this.getDrawerType(curTerminal.machineNo).then(function () {
                            _this3.changeInvoiceTerminalCode(_this3.invoiceTerminalCode);
                        });
                    } else {
                        this.changeInvoiceTerminalCode(this.invoiceTerminalCode);
                    }
                },
                // 开票终端改变后 重新获取 发票号 收款人复核人
                changeInvoiceTerminalCode: function changeInvoiceTerminalCode(val, e) {
                    var _this4 = this;

                    var _this$invoiceTerminal3 = this.invoiceTerminalList.filter(function (item) {
                            return item.value === val;
                        }),
                        _this$invoiceTerminal4 = _slicedToArray(_this$invoiceTerminal3, 1),
                        invoiceTerminal = _this$invoiceTerminal4[0];

                    if (invoiceTerminal && val !== '不指定终端') {
                        var curDishOrServerTerminal = this.checkDishOrServer(invoiceTerminal.deviceType, invoiceTerminal.deposit); // 服务器终端切换至盘终端，明细不能超过8行

                        if (this.isNegative && this.detailList.length >= 8 && this.dishOrServerTerminal === 'server' && curDishOrServerTerminal === 'dish') {
                            this.$Message.info({
                                content: '超过盘模式最大行数，无法切换该终端！',
                                duration: 4
                            });
                            var lastVal = this.invoiceTerminalCode;
                            this.invoiceTerminalCode = val;
                            this.$nextTick(function () {
                                _this4.invoiceTerminalCode = lastVal;
                            });
                            return;
                        }
                    } // if (this.invoiceTerminalCode === val) return


                    this.invoiceTerminalCode = val;
                    var data = {
                        invoiceTerminalCode: val === '不指定终端' ? '' : val,
                        invoiceTypeCode: this.invoiceTypeCode
                    };
                    var userInfo = JSON.parse(sessionStorage.getItem('userInfo'));
                    var orgConfig = JSON.parse(sessionStorage.getItem('orgConfig'));
                    var userName = userInfo.userName;
                    var _iteratorNormalCompletion = true;
                    var _didIteratorError = false;
                    var _iteratorError = undefined;

                    try {
                        for (var _iterator = this.invoiceTerminalList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                            var item = _step.value;

                            if (item.invoiceTerminalCode + '' === val) {
                                var payee = item.payee || orgConfig.SKR || userName;
                                var checker = item.checker || orgConfig.FHR || userName;
                                var drawer = item.drawer || orgConfig.KPR || userName;
                                this.$store.commit('changePayee', payee);
                                this.$store.commit('changeChecker', checker);
                                this.$store.commit('changeDrawer', drawer);
                            }
                        } // let [invoiceTerminal] = this.invoiceTerminalList.filter(item => (item.value === val))
                        // let invoiceTerminalName = invoiceTerminal ? invoiceTerminal.invoiceTerminalName : ''
                        // 同步提示信息展示设备类型-开票终端（在线/离线）
                        // let invoiceTerminalName = invoiceTerminal ? invoiceTerminal.label : ''

                    } catch (err) {
                        _didIteratorError = true;
                        _iteratorError = err;
                    } finally {
                        try {
                            if (!_iteratorNormalCompletion && _iterator.return != null) {
                                _iterator.return();
                            }
                        } finally {
                            if (_didIteratorError) {
                                throw _iteratorError;
                            }
                        }
                    }

                    var machineNo = invoiceTerminal ? invoiceTerminal.machineNo : '';

                    if (val === '不指定终端' && this.invoiceTypeCode === '026') {
                        this.$store.commit('changeDishOrServer', 'server'); // val = ''
                        // return
                    } // this.$store.commit('changeIssuePlace', { invoiceTerminalName, invoiceTerminalCode: val, terminalId: invoiceTerminal.terminalId })


                    this.$store.commit('changeMachineNo', machineNo); // 服务器电票不可以选择开票终端
                    // if (this.isDishOrServer === 'server' && this.invoiceTypeCode !== '026') {
                    //     this.$store.dispatch('getCurrentNoCode', data)
                    // }
                    // // 盘用户电票可以选择开票终端
                    // if (this.isDishOrServer === 'dish') {
                    //     this.$store.dispatch('getCurrentNoCode', data)
                    // }
                    // 一税号多设备统一开放开票终端

                    if (val && val !== '不指定终端') {
                        // 电票不指定终端不请求发票号码，发票代码
                        this.$store.dispatch('getCurrentNoCode', data);
                    } // 发票开具界面选择不同的终端，销方信息联动 (专普) BWP-5035


                    var specialGene = ['004', '007', '005', '006', '026']; // if (this.isDishOrServer === 'dish') {
                    //     specialGene.push('026')
                    // }

                    var isSelected;

                    if (val) {
                        var _this$invoiceTerminal5 = this.invoiceTerminalList.filter(function (item) {
                            return item.value === val;
                        });

                        var _this$invoiceTerminal6 = _slicedToArray(_this$invoiceTerminal5, 1);

                        isSelected = _this$invoiceTerminal6[0];
                    }

                    if (!isSelected) return;

                    if (specialGene.includes(this.invoiceTypeCode) && isSelected) {
                        var terminalAddressPhone = (isSelected.sellerAddress || '') + (isSelected.sellerPhone || '');
                        var terminalBankAccount = (isSelected.sellerBankName || '') + (isSelected.sellerBankAccount || '');

                        var sellerInfo = _objectSpread({}, this.currentData.sellerInfo, {
                            addressAndPhone: terminalAddressPhone,
                            bankAndAccount: terminalBankAccount
                        });

                        var otherData = {
                            isSwichTerminal: true,
                            invoiceTypeCode: this.invoiceTypeCode
                        };
                        var carData = {
                            address: isSelected.sellerAddress || '',
                            phone: isSelected.sellerPhone || '',
                            bank: isSelected.sellerBankName || '',
                            account: isSelected.sellerBankAccount || ''
                        }; // 二手车要先拿到开票方类型 否则后面一系列的赋值操作有问题

                        this.$store.dispatch('getIssueFooterInfo', {
                            sellerInfo: _objectSpread({}, sellerInfo),
                            otherData: _objectSpread({}, otherData),
                            carData: _objectSpread({}, carData)
                        });
                    }

                    this.checkTerminalIsConnect(isSelected.value, e);
                },
                // 判断设备终端是否在线
                checkTerminalIsConnect: function checkTerminalIsConnect(val, e) {
                    var _this5 = this;

                    var isSelected;
                    if (!val.trim()) return;

                    if (val) {
                        var _this$invoiceTerminal7 = this.invoiceTerminalList.filter(function (item) {
                            return item.value === val;
                        });

                        var _this$invoiceTerminal8 = _slicedToArray(_this$invoiceTerminal7, 1);

                        isSelected = _this$invoiceTerminal8[0];
                    } // 电票 负票 切换终端是虚拟Ukey


                    if (this.invoiceTypeCode === '026' && this.isNegative && isSelected.deviceType + '' === '4' && !this.issuePlace.invoiceTerminalName.includes('虚拟UKey') && !this.originalInvoiceDate) {
                        this.$nextTick(function () {
                            _this5.$refs.negativeModal && _this5.$refs.negativeModal.changeModel(true);
                        });
                    }

                    if (val !== '不指定终端') {
                        this.dishOrServerTerminal = this.checkDishOrServer(isSelected.deviceType, isSelected.deposit);
                    } else {
                        this.dishOrServerTerminal = 'server';
                    } // let ajaxData = isSelected ? {
                    //     sellerTaxNo: isSelected.taxNo || '',
                    //     machineNo: isSelected.machineNo || ''
                    // } : {}


                    this.$store.commit('changeDishOrServer', this.dishOrServerTerminal);

                    if (this.dishOrServerTerminal) {
                        // 机动车，二手车初始化必须要拿到终端赋值成功以后，否则拿不到信息
                        if (!e) {
                            this.$store.commit('changeIssuePlace', {
                                invoiceTerminalName: isSelected.label,
                                invoiceTerminalCode: val,
                                terminalId: isSelected.terminalId,
                                curTerminal: _objectSpread({}, isSelected)
                            });
                        } else {
                            this.$store.commit('changeIssuePlace', {
                                invoiceTerminalName: isSelected.label,
                                invoiceTerminalCode: val,
                                terminalId: isSelected.terminalId
                            });
                        }

                        var userInfo = JSON.parse(sessionStorage.getItem('userInfo'));
                        this.$store.dispatch('setSyncHelperData', {
                            orgId: userInfo.orgId,
                            invoiceTerminalCode: isSelected ? isSelected.invoiceTerminalCode || '' : '',
                            isVirtualUkey: isSelected ? isSelected.deviceType === '4' : false
                        });
                    } // this.http.outPost('/api/terminal/isDeviceOnline', ajaxData).then(resp => {
                    //     if (resp.success) {
                    //         if (resp.errorCode + '' === '0') { // errorCode  0:不在线 1:在线
                    //             isSelected.label = isSelected.name + `（离线）`
                    //         }
                    //         if (this.dishOrServerTerminal) {
                    //             this.$store.commit('changeIssuePlace', { invoiceTerminalName: isSelected.label, invoiceTerminalCode: val, terminalId: isSelected.terminalId })
                    //             let userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
                    //             this.$store.dispatch('setSyncHelperData', {
                    //                 orgId: userInfo.orgId,
                    //                 invoiceTerminalCode: isSelected ? (isSelected.invoiceTerminalCode || '') : '',
                    //                 isVirtualUkey: isSelected ? isSelected.deviceType === '4' : false
                    //             })
                    //         }
                    //     }
                    // })

                },
                getDrawerType: function getDrawerType(val) {
                    var _this6 = this;

                    var machineNo = this.userBindTerminal.machineNo || val;
                    return new Promise(function (resolve, reject) {
                        _this6.http.outPost('/api/invoiceManage/getDrawerType', {
                            machineNo: machineNo
                        }).then(function (resp) {
                            var _ref = resp.data && resp.data.results || [{}],
                                _ref2 = _slicedToArray(_ref, 1),
                                res = _ref2[0];

                            var drawerType = res ? res.drawerType : '';

                            _this6.$store.commit('changeDrawerType', drawerType);

                            resolve(drawerType);
                        }).catch(function (err) {
                            reject(err);
                        });
                    });
                }
            }
        });
// EXTERNAL MODULE: ./src/utils/typeUtil.js
        var typeUtil = __webpack_require__("v7p+");

// EXTERNAL MODULE: ./src/utils/common.js + 13 modules
        var common = __webpack_require__("z0WU");

// EXTERNAL MODULE: ./src/utils/numberUtil.js
        var numberUtil = __webpack_require__("0Jw3");

// EXTERNAL MODULE: ./src/utils/changeTime.js
        var changeTime = __webpack_require__("szKx");

// CONCATENATED MODULE: ./src/mixins/invoice-issue/invoiceInfo.js
        function invoiceInfo_ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function invoiceInfo_objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    invoiceInfo_ownKeys(Object(source), true).forEach(function (key) {
                        invoiceInfo_defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    invoiceInfo_ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function invoiceInfo_defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

        function invoiceInfo_slicedToArray(arr, i) {
            return invoiceInfo_arrayWithHoles(arr) || invoiceInfo_iterableToArrayLimit(arr, i) || invoiceInfo_nonIterableRest();
        }

        function invoiceInfo_nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function invoiceInfo_iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function invoiceInfo_arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

        /**
         * 发票开具票面信息构建和校验
         * 缓冲暂存一些必要数据，包括机动车二手车的发票数据
         * 情况所有发票数据
         * @author by alex
         */


        /* harmony default export */
        var invoiceInfo = ({
            mounted: function mounted() {
                console.log('this.$route.name', this.$route.name);
            },
            methods: {
                // 获取 专普电 的数据，成品油, 农产品收购（普电）
                generateZpdData: function generateZpdData() {
                    var invoiceData = this.currentData;
                    var buyerInfo = invoiceData.buyerInfo;
                    var sellerInfo = invoiceData.sellerInfo;
                    var detailList = invoiceData.detailList;
                    var totalPrice = detailList.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalPrice);

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);
                    var totalTax = detailList.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalTax);

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);

                    var _invoiceData$detailLi = invoiceInfo_slicedToArray(invoiceData.detailList, 1),
                        storeDedu = _invoiceData$detailLi[0];

                    var deductibleAmount = this.taxationMethod === '2' ? storeDedu.deduction : '';

                    if (this.isNegative) {
                        // 服务器，并且是负数票，扣除额就传空
                        if (this.isDishOrServerTerminal === 'server') {
                            deductibleAmount = '';
                        } else if (this.isDishOrServerTerminal === 'dish') {
                            // 盘的负数差额票，扣除额传负数值
                            deductibleAmount = +deductibleAmount > 0 ? -deductibleAmount : deductibleAmount;
                        }
                    }

                    var generateDetailList = detailList.map(function (item, index) {
                        var newItem = {}; // invoiceID = item.invoiceID || ''

                        newItem.goodsLineNo = index + 1; // 明细行号

                        newItem.goodsCode = item.goodsCode; // ? item.goodsCode.slice(0, 19) : '' // 商品编码

                        newItem.goodsPersonalCode = item.goodsPersonalCode; // item.goodsCode ? item.goodsCode.slice(19) : '' // 自行编码

                        newItem.goodsName = item.goodsName || ''; // 商品名称

                        newItem.goodsTaxItem = item.goodsTaxItem || ''; // 商品税目

                        newItem.goodsSpecification = item.goodsSpecification || ''; // 规格型号

                        newItem.goodsUnit = item.goodsUnit || ''; // 计量单位

                        newItem.goodsQuantity = item.goodsQuantity || ''; // 商品数量

                        newItem.goodsPrice = item.goodsPrice || ''; // 商品单价

                        newItem.goodsTotalPrice = item.goodsTotalPrice; // 金额

                        newItem.goodsTotalTax = item.goodsTotalTax; // 税额

                        newItem.goodsTaxRate = item.goodsTaxRate; // 税率

                        newItem.priceTaxMark = invoiceData.priceTaxMark; // 含税标志0：不含税 1：含税

                        if (item.vatSpecialManagement) {
                            newItem.vatSpecialManagement = item.vatSpecialManagement; // 增值税特殊管理
                        } else {
                            newItem.vatSpecialManagement = item.useDiscount === 'Y' ? item.discountType : ''; // 增值税特殊管理
                        }

                        if (item.freeTaxMark) {
                            newItem.freeTaxMark = item.freeTaxMark; // 零税率标识 空代表无
                        } else {
                            newItem.freeTaxMark = +item.goodsTaxRate ? '' : item.freeType; // 零税率标识 空代表无
                        }

                        if (item.preferentialMarkFlag) {
                            newItem.preferentialMarkFlag = item.preferentialMarkFlag;
                        } else {
                            newItem.preferentialMarkFlag = item.useDiscount === 'Y' ? '1' : '0'; // 是否使用优惠政策 0:未使用，1:使用
                        }

                        newItem.invoiceLineNature = item.isDiscountLine ? '1' : item.hasDiscountLine ? '2' : '0'; // 发票行性质       明细

                        newItem.goodsDiscountLineNo = item.isDiscountLine ? index : ''; // item.isDiscountLine ? '1' : (item.hasDiscountLine ? '2' : '0'); //折行对应行号

                        return newItem;
                    });
                    var params = {
                        id: this.isNegative ? '' : invoiceData.id,
                        ext: {},
                        serialNo: invoiceData.serialNo,
                        // 开票流水号
                        sourceMark: this.isNegative ? '' : invoiceData.sourceMark || '',
                        // 来源标示
                        // 负数开票 原发票信息
                        originalInvoiceCode: invoiceData.originalInvoiceCode,
                        originalInvoiceNo: invoiceData.originalInvoiceNo,
                        // 销方信息
                        sellerTaxNo: sellerInfo.taxSerial,
                        sellerName: sellerInfo.name,
                        sellerAddressPhone: sellerInfo.addressAndPhone,
                        sellerBankAccount: sellerInfo.bankAndAccount,
                        // 购方信息
                        buyerTaxNo: buyerInfo.taxSerial,
                        buyerName: buyerInfo.name,
                        buyerAddressPhone: buyerInfo.addressAndPhone,
                        buyerBankAccount: buyerInfo.bankAndAccount,
                        buyerEmail: invoiceData.email,
                        buyerPhone: invoiceData.phone,
                        invoiceTypeCode: this.invoiceTypeCode,
                        // 发票种类编码，004专票 007普票 026电票 005机动车 025卷票
                        // invoiceTerminalCode: ((this.isDishOrServerTerminal === 'server' && this.invoiceTypeCode === '026' && (this.invoiceTerminalList.length <= 2)) || this.invoiceTerminalCode === '不指定终端') ? '' : this.invoiceTerminalCode, // 开票终端编码
                        invoiceTerminalCode: this.invoiceTerminalCode === '不指定终端' ? '' : this.invoiceTerminalCode,
                        // 开票终端编码
                        invoiceSpecialMark: invoiceData.invoiceSpecialMark,
                        // 特殊票种标记，00：普通发票 02：农业发票 06：抵扣通行费 07：其他通行费 01 农产品销售   02 农产品收购    08 成品油  默认：00
                        invoiceType: this.isNegative ? '1' : '0',
                        // 开票类型0:正数发票（蓝票） 1：负数发票（红票）
                        drawer: invoiceData.drawer,
                        payee: invoiceData.payee,
                        checker: invoiceData.checker,
                        invoiceListMark: this.invoiceTypeCode === '026' || this.isNegativeListMark ? '0' : invoiceData.invoiceListMark,
                        // 清单标志： 0：无清单 1：带清单 （发票明细大于等于8行必须带清单
                        taxationMethod: invoiceData.taxationMethod,
                        // 征税方式 0：普通征税，2：差额征税
                        deductibleAmount: deductibleAmount,
                        // .replace(/^(\d+?\.\d{2})+(\d*)$/g, '$1'), // 扣除额
                        invoiceTotalPrice: +invoiceData.priceTaxMark ? totalPrice.subtract(totalTax) : totalPrice,
                        invoiceTotalTax: totalTax,
                        invoiceTotalPriceTax: +invoiceData.priceTaxMark ? totalPrice : totalPrice.add(totalTax),
                        remarks: invoiceData.remarks,
                        invoiceDetailsList: generateDetailList
                    };
                    var invoiceTerminalName = this.issuePlace && this.issuePlace.invoiceTerminalName || ''; // 电票 负票 开票终端是虚拟Ukey 传原蓝票开票时间

                    if (this.isNegative && this.invoiceTypeCode === '026' && invoiceTerminalName.includes('虚拟UKey')) {
                        params.originalInvoiceDate = changeTime["a" /* default */].getyyyyMMdd(this.originalInvoiceDate);
                    }

                    if (this.config.enableSpecialNagative && this.isNegative) {
                        params.redInfoNo = this.redInfoNo;
                        params.notificationNo = this.redInfoNo;
                    } // orderNo参数规则： 如果当前开具操作，是在待开发票管理中进行的，则传入 orderNo ；而手工开具以及发票复制则不行
                    // ext 参数规则：手工开具操作，需要过滤掉这个参数，置为{};而在待开发票管理、发票复制处，仍保留此参数；


                    if (this.$route && this.$route.name) {
                        // 传递 ext 的页面路由
                        var haveExtRouteList = ['INVOICETOISSUE', 'INVOICEQUERY'];

                        if (this.$route.name.toLocaleUpperCase() === 'INVOICETOISSUE') {
                            params.orderNo = invoiceData.orderNo || '';
                        }

                        if (~haveExtRouteList.indexOf(this.$route.name.toLocaleUpperCase())) {
                            params.ext = invoiceData.ext || {};
                        }
                    }

                    return params;
                },
                // 获取 机动车、二手车 的数据
                generateCarData: function generateCarData() {
                    var invoiceData = this.currentData; // const detailList = invoiceData.detailList

                    var buyerInfo;
                    var sellerInfo;
                    var totalPrice;
                    var totalTax;
                    var val = this.carData;

                    if (this.invoiceTypeCode === '005') {
                        buyerInfo = {
                            taxSerial: val.buyertaxSerial,
                            name: val.buyername,
                            addressAndPhone: '',
                            bankAndAccount: ''
                        };
                        sellerInfo = {
                            taxSerial: val.taxSerial,
                            name: val.name,
                            addressAndPhone: (val.address || '') + '※' + (val.phone || ''),
                            bankAndAccount: (val.bank || '') + '※' + (val.account || '')
                        };
                        totalTax = +this.carData.goodsTotalTax;
                        totalPrice = this.carData.goodsTotalPrice.subtract(totalTax);
                    } else {
                        var address = common["a" /* default */].trim(val.buyeraddress) ? common["a" /* default */].trim(val.buyeraddress) : '';
                        var phone = common["a" /* default */].trim(val.buyerphone) ? common["a" /* default */].trim(val.buyerphone) : '';
                        buyerInfo = {
                            taxSerial: val.buyertaxSerial,
                            name: val.buyername,
                            addressAndPhone: address + '※' + phone,
                            bankAndAccount: ''
                        }; // 二手车的地址、电话、银行、账号和机动车的保持一致

                        sellerInfo = invoiceInfo_objectSpread({}, invoiceData.sellerInfo, {
                            addressAndPhone: (val.address || '') + '※' + (val.phone || ''),
                            bankAndAccount: (val.bank || '') + '※' + (val.account || '')
                        });
                        totalPrice = +this.carData.goodsTotalPrice;
                        totalTax = 0; // +this.carData.goodsTotalTax
                    }

                    var params = {
                        id: invoiceData.id,
                        serialNo: invoiceData.serialNo,
                        // 开票流水号
                        sourceMark: this.isNegative ? '' : invoiceData.sourceMark || '',
                        // 来源标示
                        // 负数开票 原发票信息
                        originalInvoiceCode: invoiceData.originalInvoiceCode,
                        originalInvoiceNo: invoiceData.originalInvoiceNo,
                        // 销方信息
                        sellerTaxNo: sellerInfo.taxSerial,
                        // 单位代码/身份证号码  税号
                        sellerName: sellerInfo.name,
                        // 卖方单位/个人
                        sellerAddressPhone: sellerInfo.addressAndPhone,
                        // 卖方单位/个人住址 电话
                        sellerBankAccount: sellerInfo.bankAndAccount,
                        // 购方信息
                        buyerTaxNo: buyerInfo.taxSerial,
                        // 单位代码/身份证号码
                        buyerName: buyerInfo.name,
                        // 买方单位/个人
                        buyerAddressPhone: buyerInfo.addressAndPhone,
                        // 买方单位/个人住址电话
                        buyerBankAccount: buyerInfo.bankAndAccount,
                        buyerEmail: '',
                        buyerPhone: invoiceData.phone,
                        // 电话
                        credentialsNo: invoiceData.credentialsNo,
                        taxAuthorityNo: invoiceData.taxAuthorityNo,
                        taxAuthorityName: invoiceData.taxAuthorityName,
                        invoiceTypeCode: this.invoiceTypeCode,
                        // 发票种类编码，004专票 007普票 026电票 005机动车 025卷票
                        invoiceTerminalCode: this.invoiceTerminalCode,
                        // 开票终端编码
                        invoiceSpecialMark: '00',
                        // 特殊票种标记，00：普通发票 02：农业发票 06：抵扣通行费 07：其他通行费  默认：00
                        invoiceType: this.isNegative ? '1' : '0',
                        // 开票类型0:正数发票（蓝票） 1：负数发票（红票）
                        drawer: invoiceData.drawer,
                        payee: invoiceData.payee,
                        checker: invoiceData.checker,
                        invoiceListMark: invoiceData.invoiceListMark,
                        // 清单标志： 0：无清单 1：带清单 （发票明细大于等于8行必须带清单
                        taxationMethod: invoiceData.taxationMethod,
                        // 征税方式 0：普通征税，2：差额征税
                        deductibleAmount: '',
                        // 扣除额
                        invoiceTotalPrice: totalPrice.toFixed(2),
                        invoiceTotalTax: totalTax.toFixed(2),
                        invoiceTotalPriceTax: totalPrice.add(totalTax).toFixed(2),
                        remarks: invoiceData.remarks,
                        invoiceDetailsList: null,
                        consolidatedTaxRate: this.carData.goodsTaxRate,
                        invoiceVehicleInfo: invoiceInfo_objectSpread({}, this.carData)
                    }; // 机动车 辅助

                    delete params.invoiceVehicleInfo.taxSerial;
                    delete params.invoiceVehicleInfo.name;
                    delete params.invoiceVehicleInfo.address;
                    delete params.invoiceVehicleInfo.phone;
                    delete params.invoiceVehicleInfo.bank;
                    delete params.invoiceVehicleInfo.account;
                    delete params.invoiceVehicleInfo.goodsTaxRate; // 二手车 辅助数据

                    delete params.invoiceVehicleInfo.buyeraddress;
                    delete params.invoiceVehicleInfo.buyerphone;
                    delete params.invoiceVehicleInfo.buyertaxSerial;
                    delete params.invoiceVehicleInfo.buyername;
                    delete params.invoiceVehicleInfo.goodsTotalPrice;
                    delete params.invoiceVehicleInfo.goodsTotalTax;
                    return params;
                },
                generateData: function generateData() {
                    var params;

                    if (this.invoiceTypeCode === '005' || this.invoiceTypeCode === '006') {
                        params = this.generateCarData();
                    } else {
                        params = this.generateZpdData();
                    }

                    return params;
                },
                computedOriginTotalTax: function computedOriginTotalTax(detailList) {
                    var _this = this;

                    var totalPrice = detailList.reduce(function (total, item) {
                        var goodsTotalPrice = +item.goodsTotalPrice;
                        var goodsTaxRate = +item.goodsTaxRate;
                        var originTax = +Object(numberUtil["d" /* toKeepFixed2 */])(goodsTotalPrice.multiply(goodsTaxRate));

                        if (_this.priceTaxMark === '1') {
                            // 含税
                            originTax = +Object(numberUtil["d" /* toKeepFixed2 */])(goodsTotalPrice.subtract(goodsTotalPrice.division(goodsTaxRate.add(1))));
                        }

                        if (Number.isNaN(originTax)) {
                            return total;
                        }

                        return total.add(originTax);
                    }, 0.00);
                    return totalPrice;
                },
                computedTotalTax: function computedTotalTax(detailList) {
                    return detailList.reduce(function (total, item) {
                        var numValue = parseFloat(item.goodsTotalTax);

                        if (Number.isNaN(numValue)) {
                            return total;
                        }

                        return total.add(numValue);
                    }, 0.00);
                },
                // 校验 专普电 的数据
                validateZpdInvoice: function validateZpdInvoice() {
                    if (!this.isShowNegative) {
                        this.$Message.info('请添加费用项目');
                        return false;
                    }

                    var buyerInfo = this.buyerInfo;

                    if (!buyerInfo.name) {
                        this.$Message.info('购方名称不能为空');
                        return false;
                    }

                    if (typeUtil["a" /* default */].validateNoSpaceSpecial(buyerInfo.name)) {
                        this.$Message.info('购方名称不能含有特殊字符');
                        return false;
                    }

                    if (this.invoiceTypeCode === '004') {
                        if (!buyerInfo.taxSerial) {
                            this.$Message.info('纳税人识别号不能为空');
                            return false;
                        }

                        if (buyerInfo.taxSerial && !typeUtil["a" /* default */].validateTaxNo7(buyerInfo.taxSerial)) {
                            this.$Message.info('纳税人识别号应为7-20位字母或数字！');
                            return false;
                        }
                    } else if (this.invoiceTypeCode === '007') {
                        if (buyerInfo.taxSerial && !typeUtil["a" /* default */].validateTaxNo7(buyerInfo.taxSerial)) {
                            this.$Message.info('纳税人识别号应为7-20位字母或数字！');
                            return false;
                        }
                    } else {
                        if (buyerInfo.taxSerial && !typeUtil["a" /* default */].validateTaxNo7(buyerInfo.taxSerial)) {
                            this.$Message.info('纳税人识别号应为7-20位字母或数字！');
                            return false;
                        }
                    } // if (this.invoiceTypeCode === '026') {
                    //     let { email, phone } = this.currentData
                    //     if (email || phone) {
                    //       if (email && !typeUtil.validateEmail(email)) {
                    //         this.$Message.info('邮箱格式不正确！')
                    //         return false
                    //       }
                    //       if (phone && !typeUtil.validatePhone(phone)) {
                    //         this.$Message.info('手机号格式不正确！')
                    //         return false
                    //       }
                    //     } else {
                    //       this.$Message.info('邮箱和手机号至少填写一个！')
                    //       return false
                    //     }
                    // }


                    var params = this.generateData();
                    var _params$invoiceDetail = params.invoiceDetailsList,
                        invoiceDetailsList = _params$invoiceDetail === void 0 ? [] : _params$invoiceDetail;

                    if (invoiceDetailsList.some(function (item) {
                        return !item.goodsName;
                    })) {
                        this.$Message.info('货物或应税劳务名称不能为空！');
                        return false;
                    } // const computedOriginTotalTax = this.computedOriginTotalTax(invoiceDetailsList)
                    // const totalAmountTax = this.computedTotalTax(invoiceDetailsList)
                    // if (params.invoiceTypeCode === '004' && this.isNegative && this.taxationMethod === '0') {
                    //     if (Math.abs(computedOriginTotalTax.subtract(totalAmountTax)) > 0.06) {
                    //         this.$Message.info(`税额总计不能大于0.6角（6分）,原始税额为${toKeepFixed2(computedOriginTotalTax)}`)
                    //         return false
                    //     }
                    // }


                    if (this.invoiceTypeCode === '025') {
                        if (!this.validateRollAddRow()) {
                            return;
                        }
                    }

                    if (invoiceDetailsList.some(function (item) {
                        return !item.goodsTotalPrice;
                    })) {
                        this.$Message.info('金额不能为空！');
                        return false;
                    }

                    if (typeUtil["a" /* default */].validateSpecial(params.payee) || typeUtil["a" /* default */].validateSpecial(params.checker)) {
                        this.$Message.info('收款人或复核不能包含特殊字符！');
                        return false;
                    }

                    if (this.invoiceTypeCode === '004') {
                        if (this.taxationMethod === '2') {
                            if (typeUtil["a" /* default */].getStrLength(params.remarks) > 160) {
                                this.$Message.info('备注长度最长为160个字符！');
                                return false;
                            }
                        } else {
                            if (typeUtil["a" /* default */].getStrLength(params.remarks) > 184) {
                                this.$Message.info('备注长度最长为184个字符！');
                                return false;
                            }
                        }
                    } else {
                        if (this.invoiceTypeCode === '025') {
                            if (typeUtil["a" /* default */].getStrLength(params.remarks) > 80) {
                                this.$Message.info('备注长度最长为80个字符！');
                                return false;
                            }
                        } else {
                            if (this.taxationMethod === '2') {
                                if (typeUtil["a" /* default */].getStrLength(params.remarks) > 114) {
                                    this.$Message.info('备注长度最长为114个字符！');
                                    return false;
                                }
                            } else {
                                if (typeUtil["a" /* default */].getStrLength(params.remarks) > 138) {
                                    this.$Message.info('备注长度最长为138个字符！');
                                    return false;
                                }
                            }
                        }
                    }

                    return true;
                },
                // 校验机动车
                validateMotorInvoice: function validateMotorInvoice(params) {
                    var buyerNameLength = 80;
                    var manufacturingEnterpriseLength = 80;

                    if (this.isDishOrServerTerminal === 'dish') {
                        buyerNameLength = 72;
                        manufacturingEnterpriseLength = 40;
                    }

                    if (!params.buyerName) {
                        this.$Message.info("\u8D2D\u4E70\u65B9\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateNoSpaceSpecial(params.buyerName)) {
                            this.$Message.info("\u8D2D\u4E70\u65B9\u540D\u79F0\u4E0D\u80FD\u542B\u6709\u7279\u6B8A\u5B57\u7B26");
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.buyerName) > buyerNameLength) {
                            this.$Message.info("\u8D2D\u4E70\u65B9\u540D\u79F0\u6700\u591A\u4E3A".concat(buyerNameLength, "\u4E2A\u5B57\u7B26"));
                            return false;
                        }
                    }

                    if (!params.credentialsNo) {
                        this.$Message.info("\u8EAB\u4EFD\u8BC1\u53F7\u7801\uFF0F\u7EC4\u7EC7\u673A\u6784\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].getStrLength(params.credentialsNo) > 22) {
                            this.$Message.info("\u8EAB\u4EFD\u8BC1\u53F7\u7801\uFF0F\u7EC4\u7EC7\u673A\u6784\u4EE3\u7801\u4E3A1-22\u4F4D");
                            return false;
                        }
                    } // if (!params.buyerTaxNo) {
                    //     this.$Message.info(`购方纳税人识别号不能为空`)
                    //     return false
                    // } else {


                    if (params.buyerTaxNo && !/^[0-9a-zA-Z]{15,20}$/.test(params.buyerTaxNo)) {
                        this.$Message.info("\u8D2D\u65B9\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7\u4E3A15-20\u4F4D\u6570\u5B57\u52A0\u5B57\u6BCD");
                        return false;
                    } // }


                    if (!params.invoiceVehicleInfo.vehicleType) {
                        this.$Message.info("\u8F66\u8F86\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    }

                    if (!params.invoiceVehicleInfo.brandModel) {
                        this.$Message.info("\u5382\u724C\u578B\u53F7\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.brandModel) > 60) {
                            this.$Message.info("\u5382\u724C\u578B\u53F7\u6700\u5927\u957F\u5EA660\u4E2A\u5B57\u7B26");
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.originPlace) {
                        this.$Message.info("\u4EA7\u5730\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.originPlace) > 32) {
                            this.$Message.info("\u4EA7\u5730\u6700\u5927\u957F\u5EA632\u4E2A\u5B57\u7B26");
                            return false;
                        }
                    }

                    if (params.invoiceVehicleInfo.certificateNo && !/^[0-9a-zA-Z]{0,50}$/.test(params.invoiceVehicleInfo.certificateNo)) {
                        this.$Message.info("\u5408\u683C\u8BC1\u53F7\u6700\u5927\u957F\u5EA650\u4E2A\u6570\u5B57\u52A0\u5B57\u6BCD");
                        return false;
                    }

                    if (params.invoiceVehicleInfo.importCertificateNo && !/^[0-9a-zA-Z-]{0,36}$/.test(params.invoiceVehicleInfo.importCertificateNo)) {
                        this.$Message.info("\u8FDB\u53E3\u8BC1\u4E66\u53F7\u6700\u5927\u957F\u5EA636\u4E2A\u6570\u5B57\u6216\u5B57\u6BCD\u6216-");
                        return false;
                    }

                    if (params.invoiceVehicleInfo.inspectionListNo && !/^[0-9a-zA-Z-]{0,32}$/.test(params.invoiceVehicleInfo.inspectionListNo)) {
                        this.$Message.info("\u5546\u68C0\u5355\u53F7\u6700\u5927\u957F\u5EA632\u4E2A\u6570\u5B57\u52A0\u5B57\u6BCD\u6216-");
                        return false;
                    } // if (params.invoiceVehicleInfo.engineNo && !/^[0-9a-zA-Z]{0,60}$/.test(params.invoiceVehicleInfo.engineNo)) {


                    if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.engineNo) > 60) {
                        this.$Message.info("\u53D1\u52A8\u673A\u53F7\u7801\u6700\u592760\u4E2A\u5B57\u7B26");
                        return false;
                    }

                    if (!params.invoiceVehicleInfo.vehicleNo) {
                        this.$Message.info("\u8F66\u8F86\u8BC6\u522B\u53F7/\u8F66\u67B6\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    } else {
                        if (!/^[0-9a-zA-Z*]{0,23}$/.test(params.invoiceVehicleInfo.vehicleNo)) {
                            this.$Message.info("\u8F66\u8F86\u8BC6\u522B\u53F7/\u8F66\u67B6\u53F7\u7801\u6700\u5927\u957F\u5EA623\u4F4D\u7684\u6570\u5B57\uFF0C\u5B57\u6BCD\u52A0\u661F\u53F7");
                            return false;
                        }
                    }

                    if (!params.invoiceTotalPrice) {
                        this.$Message.info("\u4EF7\u683C\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    }

                    if (this.carData.phone && !(typeUtil["a" /* default */].validatePhone(this.carData.phone) || typeUtil["a" /* default */].validateTelephone(this.carData.phone))) {
                        this.$Message.info('销方电话格式不正确');
                        return false;
                    }

                    if (this.carData.account && (typeUtil["a" /* default */].validateAccount(this.carData.account) || typeUtil["a" /* default */].getStrLength(this.carData.account) > 50)) {
                        this.$Message.info('销方银行账号为数字，字母 下划线，小横线，最大50字符');
                        return false;
                    }

                    if (this.carData.address && typeUtil["a" /* default */].getStrLength(this.carData.address) > 80) {
                        this.$Message.info('销方地址最大80个字符');
                        return false;
                    }

                    if (this.carData.bank && typeUtil["a" /* default */].getStrLength(this.carData.bank) > 80) {
                        this.$Message.info('销方开户银行为最大80个字符');
                        return false;
                    }

                    if (params.invoiceVehicleInfo.tonnage && (!/^([1-9]+(\.\d+)?|0\.\d+|-)$/.test(params.invoiceVehicleInfo.tonnage) || params.invoiceVehicleInfo.tonnage.length > 8)) {
                        this.$Message.info('吨位为大于0的数字或者带有-的字符且最大为8位');
                        return false;
                    }

                    if (params.invoiceVehicleInfo.passengersLimited && !/^[1-9]\d{0,12}$/.test(params.invoiceVehicleInfo.passengersLimited)) {
                        this.$Message.info('限乘人数为最大12位数字');
                        return false;
                    }

                    if (!params.invoiceVehicleInfo.manufacturingEnterprise) {
                        this.$Message.info('生产企业名称不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.manufacturingEnterprise) > manufacturingEnterpriseLength) {
                            this.$Message.info("\u751F\u4EA7\u4F01\u4E1A\u540D\u79F0\u4E3A\u6C49\u5B57\u548C\u5B57\u6BCD\u4E14\u6700\u5927".concat(manufacturingEnterpriseLength, "\u4E2A\u5B57\u7B26"));
                            return false;
                        }
                    }

                    return true;
                },
                // 校验二手车
                validateUsedInvoice: function validateUsedInvoice(params) {
                    if (!params.buyerName) {
                        this.$Message.info("\u4E70\u65B9\u5355\u4F4D/\u4E2A\u4EBA\u4E0D\u80FD\u4E3A\u7A7A");
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateNoSpaceSpecial(params.buyerName)) {
                            this.$Message.info("\u4E70\u65B9\u5355\u4F4D/\u4E2A\u4EBA\u4E0D\u80FD\u542B\u6709\u7279\u6B8A\u5B57\u7B26");
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.buyerName) > 72) {
                            this.$Message.info("\u4E70\u65B9\u5355\u4F4D/\u4E2A\u4EBA\u6700\u591A\u4E3A72\u4E2A\u5B57\u7B26");
                            return false;
                        }
                    } // 买方单位代码/身份证号, 前端界面添加正则检验,只能输入数字和字母,,后端同步加个二层校验


                    if (!params.buyerTaxNo) {
                        this.$Message.info('买方单位代码/身份证号码不能为空');
                        return false;
                    } else {
                        if (!/^[A-Za-z0-9]{15,22}$/.test(params.buyerTaxNo)) {
                            this.$Message.info('买方单位代码/身份证号码只能输入数字和字母并且15-22个字符');
                            return false;
                        }
                    }

                    var _params$buyerAddressP = params.buyerAddressPhone.split('※'),
                        _params$buyerAddressP2 = invoiceInfo_slicedToArray(_params$buyerAddressP, 2),
                        buyeraddress = _params$buyerAddressP2[0],
                        buyerphone = _params$buyerAddressP2[1];

                    if (buyeraddress) {
                        if (typeUtil["a" /* default */].validateSpecial(buyeraddress)) {
                            this.$Message.info('买方单位/个人住址不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(buyeraddress) > 80) {
                            this.$Message.info('买方单位/个人住址最多为80个字符');
                            return false;
                        }
                    }

                    if (buyerphone && !(typeUtil["a" /* default */].validatePhone(buyerphone) || typeUtil["a" /* default */].validateTelephone(buyerphone))) {
                        this.$Message.info('买方单位/个人电话格式不正确');
                        return false;
                    }

                    if (!params.invoiceVehicleInfo.sellerName) {
                        this.$Message.info('卖方单位/个人不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateSpecial(params.invoiceVehicleInfo.sellerName)) {
                            this.$Message.info('卖方单位/个人不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.sellerName) > 72) {
                            this.$Message.info('卖方单位/个人最多为72个字符');
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.sellerTaxNo) {
                        this.$Message.info('卖方单位代码/身份证号码不能为空');
                        return false;
                    } else {
                        if (!/^[A-Za-z0-9]{15,22}$/.test(params.invoiceVehicleInfo.sellerTaxNo)) {
                            this.$Message.info('卖方单位代码/身份证号码只能输入数字和字母并且15-22个字符');
                            return false;
                        }
                    }

                    if (params.invoiceVehicleInfo.sellerAddress) {
                        if (typeUtil["a" /* default */].validateSpecial(params.invoiceVehicleInfo.sellerAddress)) {
                            this.$Message.info('卖方单位/个人住址不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.sellerAddress) > 80) {
                            this.$Message.info('卖方单位/个人住址最多为80个字符');
                            return false;
                        }
                    }

                    if (params.invoiceVehicleInfo.sellerPhone && !(typeUtil["a" /* default */].validatePhone(params.invoiceVehicleInfo.sellerPhone) || typeUtil["a" /* default */].validateTelephone(params.invoiceVehicleInfo.sellerPhone))) {
                        this.$Message.info('卖方单位/个人电话格式不正确');
                        return false;
                    }

                    if (!params.invoiceVehicleInfo.licensePlate) {
                        this.$Message.info('车牌照号不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateSpecial(params.invoiceVehicleInfo.licensePlate)) {
                            this.$Message.info('车牌照号不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.licensePlate) > 20) {
                            this.$Message.info('车牌照号最多为20个字符');
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.registryNo) {
                        this.$Message.info('登记证号不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateSpecial(params.invoiceVehicleInfo.registryNo)) {
                            this.$Message.info('登记证号不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.registryNo) > 20) {
                            this.$Message.info('登记证号最多为20个字符');
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.vehicleType) {
                        this.$Message.info('车辆类型不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.vehicleType) > 40) {
                            this.$Message.info('车辆类型最多为40个字符');
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.vehicleNo) {
                        this.$Message.info('车架号/车辆识别代码不能为空');
                        return false;
                    } else {
                        if (!/^[A-Za-z0-9*]{1,23}$/.test(params.invoiceVehicleInfo.vehicleNo)) {
                            this.$Message.info('车架号/车辆识别代码只能为字母、数字或*号并且最大23位');
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.brandModel) {
                        this.$Message.info('厂牌型号不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateSpecial(params.invoiceVehicleInfo.brandModel)) {
                            this.$Message.info('厂牌型号不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.brandModel) > 60) {
                            this.$Message.info('厂牌型号最多为60个字符或空格');
                            return false;
                        }
                    }

                    if (!params.invoiceVehicleInfo.vehicleAdministration) {
                        this.$Message.info('转入地车辆管理所名称不能为空');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateSpecial(params.invoiceVehicleInfo.vehicleAdministration)) {
                            this.$Message.info('转入地车辆管理所名称不能含有特殊字符或空格');
                            return false;
                        }

                        if (typeUtil["a" /* default */].getStrLength(params.invoiceVehicleInfo.vehicleAdministration) > 80) {
                            this.$Message.info('转入地车辆管理所名称最多为80个字符');
                            return false;
                        }
                    }

                    if (!params.invoiceTotalPrice) {
                        this.$Message.info('车价合计不能为空或不能为0');
                        return false;
                    }

                    if (params.remarks && typeUtil["a" /* default */].getStrLength(params.remarks) > 230) {
                        this.$Message.info('备注最多为230个字符');
                        return false;
                    } else {
                        if (typeUtil["a" /* default */].validateNoSpaceSpecial(params.remarks)) {
                            this.$Message.info('备注不能含有特殊字符');
                            return false;
                        }
                    }

                    return true;
                },
                // 校验 机动车、二手车 的数据
                validateCarInvoice: function validateCarInvoice() {
                    var params = this.generateCarData();

                    if (this.invoiceTypeCode === '005') {
                        // 机动车专用
                        return this.validateMotorInvoice(params);
                    } else {
                        // 二手车专用
                        return this.validateUsedInvoice(params);
                    }
                },
                validateInvoice: function validateInvoice() {
                    var flag;

                    if (this.invoiceTypeCode === '005' || this.invoiceTypeCode === '006') {
                        flag = this.validateCarInvoice();
                    } else {
                        flag = this.validateZpdInvoice();
                    }

                    return flag;
                },
                // 暂存清空数据
                tsClearData: function tsClearData() {
                    var _this2 = this;

                    this.changeValue('changeSerialNo', '');
                    this.$store.commit('partReset');
                    this.getDefaultConfig();
                    this.$emit('on-show-difference', true);

                    if (this.invoiceTerminalCode) {
                        this.getCodeNo();
                    }

                    this.$nextTick(function () {
                        _this2.$store.commit('changeDetailList', [invoiceInfo_objectSpread({}, Object(stateHelper["c" /* getDefaultDetailTpl */])())]);
                    });
                },
                // 二手车 保存 买方 信息
                bufferBuyerInfo: function bufferBuyerInfo() {
                    var carData = this.carData;
                    var buyer = {
                        buyertaxSerial: carData.buyertaxSerial,
                        buyername: carData.buyername,
                        buyeraddress: carData.buyeraddress,
                        buyerphone: carData.buyerphone
                    };
                    return buyer;
                },
                // 二手车 保存 卖方 信息
                bufferSellerInfo: function bufferSellerInfo() {
                    var carData = this.carData;
                    var seller = {
                        auctionName: carData.auctionName,
                        auctionAddress: carData.auctionAddress,
                        auctionTaxNo: carData.auctionTaxNo,
                        auctionBankAccount: carData.auctionBankAccount,
                        auctionPhone: carData.auctionPhone,
                        marketName: carData.marketName,
                        marketTaxNo: carData.marketTaxNo,
                        marketAddress: carData.marketAddress,
                        marketBankAccount: carData.marketBankAccount,
                        marketPhone: carData.marketPhone,
                        sellerTaxNo: carData.sellerTaxNo,
                        sellerName: carData.sellerName,
                        sellerAddress: carData.sellerAddress,
                        sellerPhone: carData.sellerPhone,
                        taxSerial: carData.taxSerial,
                        name: carData.name,
                        address: carData.address,
                        phone: carData.phone,
                        bank: carData.bank,
                        account: carData.account
                    };
                    return seller;
                },
                // 机动车 保存 身份证 和 主管税务机关
                bufferMontorInfo: function bufferMontorInfo() {
                    var invoiceData = this.currentData;
                    var montor = {
                        credentialsNo: invoiceData.credentialsNo,
                        taxAuthorityNo: invoiceData.taxAuthorityNo,
                        taxAuthorityName: invoiceData.taxAuthorityName
                    };
                    return montor;
                },
                // 暂存一些必要信息
                stageInfo: function stageInfo() {
                    return {
                        email: this.email,
                        phone: this.phone,
                        buyerInfo: invoiceInfo_objectSpread({}, this.buyerInfo),
                        carBuyer: invoiceInfo_objectSpread({}, this.bufferBuyerInfo()),
                        carSeller: invoiceInfo_objectSpread({}, this.bufferSellerInfo()),
                        montor: invoiceInfo_objectSpread({}, this.bufferMontorInfo()),
                        invoiceSpecialMark: this.invoiceSpecialMark,
                        drawerType: this.carData.drawerType,
                        machineNo: this.machineNo,
                        payee: this.payee,
                        checker: this.checker,
                        drawer: this.drawer
                    };
                },
                // 回显发票相关信息
                reShowData: function reShowData(ts) {
                    if (ts.drawerType === '03') {
                        this.$store.commit('changeCarData', invoiceInfo_objectSpread({}, this.carData, {}, ts.carSeller, {
                            drawerType: ts.drawerType,
                            sellerTaxNo: '',
                            sellerName: '',
                            sellerAddress: '',
                            sellerPhone: ''
                        }));
                    } else {
                        this.$store.commit('changeCarData', invoiceInfo_objectSpread({}, this.carData, {}, ts.carSeller, {
                            drawerType: ts.drawerType
                        }));
                    }

                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceSpecialMark'), ts.invoiceSpecialMark);
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('taxAuthorityNo'), ts.montor.taxAuthorityNo);
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('taxAuthorityName'), ts.montor.taxAuthorityName); // 回显机器编号

                    this.$store.commit('changeMachineNo', ts.machineNo); // 回显收款人，复核人，开票人

                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('payee'), ts.payee);
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('checker'), ts.checker);
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('drawer'), ts.drawer);
                }
            }
        });
// EXTERNAL MODULE: ./src/mixins/invoice-issue/validateRollType.js
        var validateRollType = __webpack_require__("Guu2");

// EXTERNAL MODULE: ./src/common-ui/button/permision.js
        var permision = __webpack_require__("0ERG");

// EXTERNAL MODULE: ./src/mixins/invoice-issue/serverOrDishTerminal.js
        var serverOrDishTerminal = __webpack_require__("SBbI");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/toolbar.vue?vue&type=script&lang=js&
        function toolbarvue_type_script_lang_js_slicedToArray(arr, i) {
            return toolbarvue_type_script_lang_js_arrayWithHoles(arr) || toolbarvue_type_script_lang_js_iterableToArrayLimit(arr, i) || toolbarvue_type_script_lang_js_nonIterableRest();
        }

        function toolbarvue_type_script_lang_js_nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function toolbarvue_type_script_lang_js_iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function toolbarvue_type_script_lang_js_arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

        function toolbarvue_type_script_lang_js_ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function toolbarvue_type_script_lang_js_objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    toolbarvue_type_script_lang_js_ownKeys(Object(source), true).forEach(function (key) {
                        toolbarvue_type_script_lang_js_defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    toolbarvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function toolbarvue_type_script_lang_js_defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// 基础组件


        // 公共方法


        // 开具需要的mixins


        var propMixin = {
            computed: toolbarvue_type_script_lang_js_objectSpread({}, Object(helper["a" /* generateComputed */])(['isIssue', 'isNegative', 'showCommonNeigativeNext', 'currentData', 'showCommonCopyEdit', 'isAutoStage', 'isExistOriginalData'], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['serialNo', 'invoiceCode', 'invoiceNo', 'detailList', 'issuePlace', 'taxationMethod', 'priceTaxMark', 'remarks', 'invoiceListMark', 'buyerInfo', 'sellerInfo', 'phone', 'email', 'invoiceSpecialMark', 'carData', 'drawer', 'checker', 'payee', 'originalInvoiceDate', 'machineNo'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        };
        var prefix = 'common/invoice-edit/modules/';
        /* harmony default export */
        var toolbarvue_type_script_lang_js_ = ({
            name: 'InvoiceEditToolbar',
            mixins: [propMixin, serverOrDish["a" /* default */], serverOrDishTerminal["a" /* default */], invoiceTerminal, invoiceInfo, validateRollType["a" /* default */], permision["a" /* default */]],
            components: {
                CheckSwitch: CheckSwitch["default"],
                LabelSelect: LabelSelect["default"],
                FuncButton: FuncButton["default"],
                DifferenceModal: function DifferenceModal() {
                    return __webpack_require__.e(/* import() */ 12).then(__webpack_require__.bind(null, "65UG"));
                },
                NegativeModal: function NegativeModal() {
                    return __webpack_require__.e(/* import() */ 725).then(__webpack_require__.bind(null, "C9TP"));
                }
            },
            props: {
                config: {
                    type: Object,
                    required: true
                },
                invoiceTypeCode: {
                    type: String,
                    default: ''
                },
                terminalCode: String,
                btnPermission: Object
            },
            data: function data() {
                var userBindTerminal = JSON.parse(sessionStorage.getItem('userBindTerminal'));
                return {
                    // 开具中 遮罩层
                    spinShow: false,
                    spinText: '开具中,请稍候',
                    // 打印所需数据
                    printData: null,
                    userBindTerminal: userBindTerminal,
                    // 开票终端
                    invoiceTerminalCode: '',
                    // 开票终端
                    invoiceTerminalList: [],
                    // 开票终端id
                    terminalId: '',
                    // 征税方式
                    taxTypeSwitchList: [{
                        text: '普通征税',
                        value: '0'
                    }, {
                        text: '差额征税',
                        value: '2'
                    }],
                    // 含税不含税
                    taxSwitchList: [{
                        text: '含税',
                        value: '1'
                    }, {
                        text: '不含税',
                        value: '0'
                    }],
                    // 清单明细
                    detailSwitchList: [{
                        text: '明细',
                        value: '0'
                    }, {
                        text: '清单',
                        value: '1'
                    }],
                    ispositive: '1',
                    posiNegaList: [],
                    redInfoNo: '',
                    // 保存红字信息,
                    dishOrServerTerminal: '' // 选择终端是那种模式的（盘/服务器）

                };
            },
            computed: {
                isShowNegative: function isShowNegative() {
                    return this.isNegative ? !!this.showCommonNeigativeNext : true;
                },
                isDisabledIssue: function isDisabledIssue() {
                    if (this.isDishOrServerTerminal === 'server' && this.invoiceTypeCode === '026') {
                        return false;
                    } else {
                        // return !this.userBindTerminal.invoiceTerminalCode
                        return this.invoiceTerminalList.length === 0; // 没有可用终端
                    }
                },
                isNegativeListMark: function isNegativeListMark() {
                    // 清单 负票  回传  非清单  只能添加8行
                    return this.isNegative && this.isDishOrServerTerminal === 'dish'; // return this.isNegative && this.invoiceListMark === '1'
                },
                isShowListMark: function isShowListMark() {
                    var e = this.isDishOrServerTerminal === 'server' && this.invoiceTypeCode !== '026' ? true : this.config.enableDetailSwitch; // 电票 不显示

                    var n = this.isNegative && this.isDishOrServerTerminal === 'dish';
                    var c = this.taxationMethod === '2'; // 差额征税不显示

                    if (c || n) {
                        return false;
                    } else {
                        return e;
                    }
                }
            },
            watch: {
                taxationMethod: function taxationMethod(val) {
                    var _this = this;

                    if (this.taxationMethod !== val) {
                        this.changeTaxTypeSwitch(val);
                    } else {
                        if (val === '2') {
                            setTimeout(function () {
                                _this.changeValue('changePriceTaxMark', '0');
                            }, 500);

                            if (this.invoiceTypeCode !== '026') {
                                this.changeValue('changeInvoiceListMark', '0');
                            }

                            this.$emit('on-show-difference', false);
                        }
                    }
                },
                priceTaxMark: function priceTaxMark(val) {
                    if (this.priceTaxMark !== val) {
                        this.changeTaxSwitch(val);
                    }
                },
                invoiceListMark: function invoiceListMark(val) {
                    this.changeDetailSwitch(val);
                },
                'sellerInfo.taxSerial': {
                    handler: function handler(val, newVal) {
                        if (this.showCommonCopyEdit && val !== newVal) {
                            this.getInvoiceTerminalList();
                        }
                    },
                    deep: true
                },
                pagePathMap: {
                    handler: function handler() {
                        this.showPosiNega();
                    },
                    deep: true,
                    immediate: true
                }
            },
            methods: {
                // 正负数显示
                showPosiNega: function showPosiNega() {
                    var _this2 = this;

                    var posicode = this.btnShow('positive');
                    var negacode = this.btnShow('negative'); // console.log(posicode, negacode)

                    var showPosi = this.permisionControlFn(true, posicode);
                    var showNega = this.permisionControlFn(true, negacode);

                    if (showPosi) {
                        this.posiNegaList.push({
                            text: '正数',
                            value: '1'
                        });
                    }

                    if (showNega) {
                        this.posiNegaList.push({
                            text: '负数',
                            value: '0'
                        });
                    }

                    if (showNega && !showPosi) {
                        this.$nextTick(function () {
                            _this2.ispositive = '0';
                        });
                    } else {
                        this.ispositive = '1';
                    }
                },
                // 发票复制 编辑 按钮的显示与否
                btnShow: function btnShow(opcode) {
                    var path = this.$route.path;

                    if (path === '/output/issue/invoiceQuery' || path === '/output/bills/invoiceToIssue') {
                        var cd = this.btnPermission ? this.btnPermission[opcode] ? '' : opcode : opcode;
                        return cd;
                    } else {
                        return opcode;
                    }
                },
                changeTaxSwitch: function changeTaxSwitch(value) {
                    this.changeValue('changePriceTaxMark', value);
                },
                changeDetailSwitch: function changeDetailSwitch(value) {
                    this.changeValue('changeInvoiceListMark', value);
                },
                changeTaxTypeSwitch: function changeTaxTypeSwitch(value) {
                    var _this3 = this;

                    var flage = true;

                    if (this.taxationMethod !== value) {
                        this.changeValue('changeTaxationMethod', value);
                        this.$nextTick(function () {
                            _this3.changeValue('changeDetailList', [toolbarvue_type_script_lang_js_objectSpread({}, Object(stateHelper["c" /* getDefaultDetailTpl */])())]);
                        });

                        if (value === '2') {
                            flage = false;
                            this.changeValue('changePriceTaxMark', '0');

                            if (this.invoiceTypeCode !== '026') {
                                this.changeValue('changeInvoiceListMark', '0');
                            }

                            if (this.isNegative && this.isExistOriginalData) {
                                this.$nextTick(function () {
                                    _this3.changeValue('changeDetailList', []);
                                });
                            }
                        } else {
                            // 开具 和 复制 和 编辑页面  切换 征收方式后， 切换回 普通征税，含税不含税 默认取 机构配置的
                            // if (!this.showCommonCopyEdit) { // 判断是否为 复制 编辑页面
                            this.getDefaultConfig(); // }
                        }

                        this.$emit('on-show-difference', flage);
                    }
                },
                changeValue: function changeValue(action, value) {
                    this.$store.commit(action, value);
                },
                changePosiNegaSwitch: function changePosiNegaSwitch(value) {
                    var _this4 = this;

                    var val;

                    if (value === '1') {
                        val = false;
                    } else {
                        val = true;
                    }

                    this.redInfoNo = '';
                    this.$nextTick(function () {
                        _this4.$refs.negativeModal && _this4.$refs.negativeModal.changeModel(val);
                    });
                    this.reLoadIssuepage(false);
                    this.$emit('on-switch-invoice', val);
                },
                // 打开当前票号弹层
                openCurrentNumberModal: function openCurrentNumberModal() {
                    this.registerComponent("".concat(prefix, "currentNumber")); // this.componentId = () => import('./currentNumber')
                    // this.$refs.currentNumberModal.open()
                },
                // 打开填写流水单弹层
                openOrderSerialModal: function openOrderSerialModal() {
                    var opts = {
                        props: {
                            changeValue: this.changeValue
                        } // handles: {
                        //     'on-test': () => { alert(1234568) }
                        // }

                    };
                    this.registerComponent("".concat(prefix, "orderSerial"), opts); // this.$refs.orderSerialModal.open()
                },
                // 打开发票抬头弹层
                openInvoiceTitleModal: function openInvoiceTitleModal() {
                    // this.$refs.invoiceTitleModal.open()
                    var opts = {
                        props: {
                            invoiceTypeCode: this.invoiceTypeCode,
                            invoiceTerminalCode: this.invoiceTerminalCode,
                            changeValue: this.changeValue
                        }
                    };
                    this.registerComponent("".concat(prefix, "invoiceTitle"), opts);
                },
                // 打开页边距设置弹层
                openPageMarginSetModal: function openPageMarginSetModal() {
                    // this.$refs.pageMarginSetModal.open()
                    var opts = {
                        props: {
                            isDishOrServerTerminal: this.isDishOrServerTerminal,
                            invoiceTypeCode: this.invoiceTypeCode,
                            invoiceTerminalCode: this.invoiceTerminalCode,
                            invoiceTerminalList: this.invoiceTerminalList
                        }
                    };
                    this.registerComponent("".concat(prefix, "pageMarginSet"), opts);
                },
                // 保存红字信息表编号
                changeRedInfoNo: function changeRedInfoNo(val) {
                    this.redInfoNo = val;
                },
                // 二手车页面reload
                reLoadUsedCar: function reLoadUsedCar() {
                    this.$emit('re-load');
                },
                // 暂存
                saveInvoice: function saveInvoice(isReload) {
                    var _this5 = this;

                    this.isAddLine = false;
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('isAutoStage'), false);
                    return new Promise(function (resolve, reject) {
                        // let serverPaper = this.isDishOrServerTerminal === 'server' && this.invoiceTypeCode !== '026' && !this.userBindTerminal.invoiceTerminalCode // 服务器用户电票不需要校验绑定终端
                        // let dishPaper = this.isDishOrServerTerminal === 'dish' && !this.userBindTerminal.invoiceTerminalCode
                        if (_this5.invoiceTerminalList.length === 0 || !_this5.isDishOrServerTerminal) {
                            _this5.$Modal.info({
                                title: '信息',
                                // content: '当前用户没有绑定终端，请绑定终端后在进行开票业务！'
                                content: '当前用户没有可用终端，请绑定终端后再进行开票业务！'
                            });

                            setTimeout(resolve, 100, false);
                            return false;
                        }

                        if (!_this5.validateInvoice()) {
                            setTimeout(resolve, 100, false);
                            return false;
                        }

                        _this5.spinShow = true;
                        _this5.spinText = '暂存中,请稍候';

                        var params = _this5.generateData(); // let { invoiceDetailsList = [] } = params
                        // const isInvoiceCopyPage = this.$store.state.invoiceEdit.currentData.isInvoiceCopyPage


                        _this5.http.outPost('/api/invoiceManage/saveInvoice', params).then(function (resp) {
                            _this5.spinShow = false;

                            if (resp.success) {
                                _this5.changeValue('changeSerialNo', ''); // if (!this.isAutoStage) {}


                                _this5.$Message.success('暂存成功'); // 关于发票查询复制和待开编辑，暂存成功后，直接关闭弹层


                                _this5.$emit('on-close'); // 暂存成功后清除数据


                                _this5.reLoadIssuepage(false); // // 代开编辑
                                // let isWait = this.showCommonCopyEdit && !isInvoiceCopyPage
                                // if (!isWait) {
                                //     this.reLoadIssuepage(false)
                                // }


                                var _ref = resp.data.results || [],
                                    _ref2 = toolbarvue_type_script_lang_js_slicedToArray(_ref, 1),
                                    res = _ref2[0];

                                if (isReload !== 'noReload') {
                                    _this5.$emit('re-load', {
                                        flag: 'save',
                                        data: res
                                    });
                                }

                                resolve({
                                    flag: true,
                                    data: res
                                });
                            }
                        }).catch(function () {
                            _this5.spinShow = false;
                            resolve({
                                flag: false
                            });
                        });
                    });
                },
                // 重新加载当前页面
                reLoadIssuepage: function reLoadIssuepage(delayed) {
                    var _this6 = this;

                    var ts = toolbarvue_type_script_lang_js_objectSpread({}, this.stageInfo());

                    this.tsClearData();

                    if (delayed) {
                        this.$nextTick(function () {
                            _this6.reShowData(ts);
                        });
                    } else {
                        this.reShowData(ts);
                    }
                },
                issueInvoice: function issueInvoice() {
                    var _this7 = this;

                    this.isAddLine = false;

                    if (this.isIssuing) {
                        return;
                    }

                    if (!this.validateInvoice()) {
                        return;
                    }

                    this.spinShow = true;
                    this.spinText = '开具中,请稍候';
                    var params = this.generateData(); // let {invoiceDetailsList = []} = params;

                    this.isIssuing = true;
                    this.http.outPost('/api/invoiceManage/issueInvoice', params).then(function (resp) {
                        _this7.spinShow = false;
                        _this7.isIssuing = false;

                        if (resp.success) {
                            var _ref3 = resp.data && resp.data.results || [],
                                _ref4 = toolbarvue_type_script_lang_js_slicedToArray(_ref3, 1),
                                res = _ref4[0]; // this.$Message.success(resp.message || '开具成功')


                            _this7.isIssue = true;

                            _this7.$store.commit('changeIsIssue', true);

                            res.taxControlCode && _this7.$store.commit('changeTaxControlCode', res.taxControlCode);
                            res.remarks && _this7.$store.commit('changeRemarks', res.remarks);
                            res.machineNo && _this7.$store.commit('changeMachineNo', res.machineNo);
                            res.invoiceCheckCode && _this7.$store.commit('changeVerifyCode', res.invoiceCheckCode);

                            if (_this7.invoiceTypeCode === '026' && res.invoiceTerminalCode) {
                                var transDataKeyMap = JSON.parse(sessionStorage.getItem('transDataKeyMap'));
                                var invoiceTerminalName = transDataKeyMap.invoiceTerminalCode[res.invoiceTerminalCode];
                                var deviceType = transDataKeyMap.deviceType[res.deviceType];

                                _this7.$store.commit('changeIssuePlace', {
                                    invoiceTerminalName: "".concat(deviceType, "-").concat(invoiceTerminalName),
                                    invoiceTerminalCode: res.invoiceTerminalCode
                                });
                            }

                            _this7.printData = toolbarvue_type_script_lang_js_objectSpread({}, res);

                            if (res.invoiceNo) {
                                _this7.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceNo'), res.invoiceNo);
                            }

                            if (res.invoiceCode) {
                                _this7.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceCode'), res.invoiceCode);
                            }

                            _this7.$emit('re-load', {
                                flag: 'issue',
                                data: res
                            });

                            _this7.$Modal.info({
                                title: '开具成功',
                                content: '发票代码: ' + (res.invoiceCode || '') + ', 发票号码: ' + (res.invoiceNo || '')
                            }); // 关于发票查询复制和待开编辑，开具和暂存成功后，直接关闭弹层
                            // this.$emit('on-close')

                        }
                    }).catch(function (resp) {
                        _this7.isIssuing = false;
                        _this7.spinShow = false;
                    });
                },
                // 负数下一张 重现正数输入框
                reShowNegative: function reShowNegative() {
                    // if (this.config.enableCommonNagative) {
                    this.$refs.negativeModal.changeModel(true); // }
                },
                // 打印
                printInvoice: function printInvoice() {
                    var _this8 = this;

                    var ajaxData = {
                        printMode: '0',
                        taxPanel: this.printData.machineNo || '',
                        invoiceNo: this.printData.invoiceNo,
                        invoiceTypeCode: this.printData.invoiceTypeCode,
                        taxNo: this.printData.sellerTaxNo,
                        printType: '0',
                        invoiceCode: this.printData.invoiceCode,
                        invoiceTerminalCode: this.printData.invoiceTerminalCode,
                        numSegment: "".concat(this.printData.invoiceNo, "-").concat(this.printData.invoiceNo)
                    };
                    this.http.outPost('/api/invoiceManage/invoicePrint', ajaxData).then(function (res) {
                        _this8.$Message.info('打印成功');
                    }).catch(function () {// this.$Message.error({
                        //   content: '数据打印失败',
                        //   duration: 5
                        // })
                    });
                },
                // 下一张
                nextInvoice: function nextInvoice() {
                    var _this9 = this;

                    var ts = toolbarvue_type_script_lang_js_objectSpread({}, this.stageInfo()); // 负数开票直接清空


                    if (this.isNegative) {
                        // this.tsClearData()
                        this.reLoadIssuepage();
                        this.reShowNegative();
                        this.$nextTick(function () {
                            _this9.$store.commit('changeIsNegative', true);

                            _this9.$store.commit('changeDetailList', []);

                            _this9.ispositive = '0';
                        });
                        return;
                    }

                    this.ispositive = '1'; // 正数开票 用户选择是否清空 购方信息

                    this.$Modal.confirm({
                        title: '提示',
                        content: this.invoiceSpecialMark === '02' ? '是否清除销方信息' : '是否清除购方信息',
                        onOk: function onOk() {
                            _this9.reLoadIssuepage(false);
                        },
                        onCancel: function onCancel() {
                            _this9.tsClearData();

                            setTimeout(function () {
                                _this9.$store.commit('changeEmail', ts.email);

                                _this9.$store.commit('changePhone', ts.phone);

                                _this9.$store.commit('changeBuyerInfo', ts.buyerInfo);

                                _this9.$store.commit('changeCarData', toolbarvue_type_script_lang_js_objectSpread({}, _this9.carData, {}, ts.carBuyer));

                                _this9.$store.commit('changeCredentialsNo', ts.montor.credentialsNo);
                            }, 500);

                            _this9.reShowData(ts);
                        }
                    });
                },
                // 获取发票号码代码
                getCodeNo: function getCodeNo() {
                    var invoiceTerminalCode, invoiceTerminalName;

                    if (this.userBindTerminal && this.userBindTerminal.invoiceTerminalCode) {
                        // 取默认开票终端
                        invoiceTerminalCode = this.userBindTerminal.invoiceTerminalCode;
                        invoiceTerminalName = this.userBindTerminal.invoiceTerminalName;
                    } // 取选择的 开票终端


                    if (this.invoiceTerminalCode) {
                        invoiceTerminalCode = this.invoiceTerminalCode;

                        var _this$invoiceTerminal = this.invoiceTerminalList.filter(function (item) {
                                return item.value === invoiceTerminalCode;
                            }),
                            _this$invoiceTerminal2 = toolbarvue_type_script_lang_js_slicedToArray(_this$invoiceTerminal, 1),
                            curTerminal = _this$invoiceTerminal2[0];

                        invoiceTerminalName = curTerminal ? curTerminal.label : '';
                    } // if (!(invoiceTerminalCode || invoiceTerminalName)) {
                    //     return
                    // }


                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('issuePlace'), {
                        invoiceTerminalName: invoiceTerminalName,
                        invoiceTerminalCode: invoiceTerminalCode
                    });
                    this.$store.commit(helper["c" /* keyUtil */].getChangeName('verifyCode'), '');

                    if (this.isDishOrServerTerminal === 'server') {
                        if (this.invoiceTypeCode !== '026') {
                            this.$store.dispatch('getCurrentNoCode', {
                                invoiceTerminalCode: invoiceTerminalCode,
                                invoiceTypeCode: this.invoiceTypeCode
                            });
                        } else {
                            this.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceNo'), '');
                            this.$store.commit(helper["c" /* keyUtil */].getChangeName('invoiceCode'), '');
                        }
                    } else {
                        this.$store.dispatch('getCurrentNoCode', {
                            invoiceTerminalCode: invoiceTerminalCode,
                            invoiceTypeCode: this.invoiceTypeCode
                        });
                    }
                },
                // 获取默认配置
                getDefaultConfig: function getDefaultConfig() {
                    var orgConfig = JSON.parse(sessionStorage.getItem('orgConfig'));
                    var priceTaxMark = orgConfig.HSBZ === 'Y' ? '1' : '0';

                    if (this.invoiceTypeCode === '025') {
                        this.changeValue('changePriceTaxMark', '1');
                    } else {
                        this.changeValue('changePriceTaxMark', priceTaxMark);
                    }

                    this.changeValue('changeInvoiceListMark', '0');
                    this.changeValue('changeTaxationMethod', '0');
                }
            },
            mounted: function mounted() {
                var _this10 = this;

                this.$nextTick(function () {
                    if (!_this10.showCommonCopyEdit) {
                        _this10.getInvoiceTerminalList();
                    }
                });
                this.$nextTick(function () {
                    // let notExistOriginalData = this.isNegative && !this.isExistOriginalData
                    setTimeout(function () {
                        var terminalName;

                        _this10.invoiceTerminalList.map(function (item) {
                            if (item.invoiceTerminalCode === _this10.invoiceTerminalCode) {
                                // terminalId = item.terminalId
                                terminalName = item.invoiceTerminalName;
                            }
                        });

                        if (!(!_this10.userBindTerminal.invoiceTerminalCode && _this10.invoiceTypeCode !== '026')) {
                            _this10.http.outPost('/api/ruleCheck/checkKpdXe', {
                                terminalCode: _this10.invoiceTerminalCode,
                                terminalName: terminalName,
                                invoiceType: _this10.invoiceTypeCode
                            }, function (res) {// this.$Message.success(res.message || '');
                            });
                        }

                        if (_this10.isDishOrServer === 'dish') {
                            if (!_this10.isNegative && !_this10.showCommonCopyEdit) {
                                // this.getCodeNo()
                                _this10.getDefaultConfig();
                            }
                        } else {
                            if (!_this10.isNegative) {
                                if (!_this10.showCommonCopyEdit) {
                                    // this.getCodeNo()
                                    _this10.getDefaultConfig();
                                }
                            }
                        }
                    }, 100);
                });
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/toolbar.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_toolbarvue_type_script_lang_js_ = (toolbarvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/toolbar.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_toolbarvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "03780d2e",
            null
        )

        /* harmony default export */
        var toolbar = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "p/cP":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/CheckSwitch.vue?vue&type=template&id=b776bf3c&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {class: [_vm.visible ? '' : 'hide', 'switch-wrapper']}, [_c('ul', {staticClass: "switch-container"}, _vm._l((_vm.dataList), function (item, index) {
                return _c('li', {
                    key: item.value,
                    class: ['switch-item', _vm.currentValue == item.value ? 'selected' : ''],
                    attrs: {"data-index": index},
                    on: {
                        "click": function ($event) {
                            return _vm.changeValue(item.value)
                        }
                    }
                }, [_vm._v(_vm._s(item.text))])
            }), 0)])
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/CheckSwitch.vue?vue&type=template&id=b776bf3c&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/CheckSwitch.vue?vue&type=script&lang=js&
        function _slicedToArray(arr, i) {
            return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
        }

        function _nonIterableRest() {
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
        }

        function _iterableToArrayLimit(arr, i) {
            if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
                return;
            }
            var _arr = [];
            var _n = true;
            var _d = false;
            var _e = undefined;
            try {
                for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                    _arr.push(_s.value);
                    if (i && _arr.length === i) break;
                }
            } catch (err) {
                _d = true;
                _e = err;
            } finally {
                try {
                    if (!_n && _i["return"] != null) _i["return"]();
                } finally {
                    if (_d) throw _e;
                }
            }
            return _arr;
        }

        function _arrayWithHoles(arr) {
            if (Array.isArray(arr)) return arr;
        }

//
//
//
//
//
//
//
//
        /* harmony default export */
        var CheckSwitchvue_type_script_lang_js_ = ({
            name: 'check-switch',
            props: {
                visible: {
                    type: Boolean,
                    default: true
                },
                disabled: {
                    type: Boolean,
                    default: false
                },
                dataList: {
                    type: Array,
                    required: true
                },
                selectedValue: {
                    type: [String, Number],
                    default: ''
                },
                value: {
                    type: [String, Number],
                    default: ''
                },
                onChange: {
                    type: Function
                },
                styleConfig: {
                    type: Object,
                    default: function _default() {
                    }
                },
                labelKey: {
                    type: String,
                    default: 'label'
                },
                valueKey: {
                    type: String,
                    default: 'value'
                }
            },
            data: function data() {
                return {
                    currentValue: this.selectedValue,
                    currentData: {}
                };
            },
            mounted: function mounted() {
                this.setCurrentIndex(this.currentValue);
            },
            methods: {
                changeValue: function changeValue(value) {
                    this.$store.commit('changeIsOpenReComputed', true);
                    this.setCurrentIndex(value);
                },
                setCurrentIndex: function setCurrentIndex(value) {
                    var _this = this;

                    var dataList = this.dataList || [];
                    var index = dataList.findIndex(function (item, index, arr) {
                        return item[_this.valueKey] === value;
                    });

                    if (index < 0) {
                        return;
                    }

                    this.currentValue = value;
                    this.currentData = dataList[index] || {};
                    this.$emit('update:value', this.currentData.value);
                    this.$emit('change', this.currentData.value, this.currentData, index);
                }
            },
            watch: {
                selectedValue: function selectedValue(newValue) {
                    var dataList = this.dataList || [];

                    var _dataList$filter = dataList.filter(function (item) {
                            return item.value === newValue;
                        }),
                        _dataList$filter2 = _slicedToArray(_dataList$filter, 1),
                        filterData = _dataList$filter2[0];

                    this.currentData = filterData || {};
                    this.currentValue = newValue;
                    this.setCurrentIndex(this.currentValue);
                },
                value: function value(newValue) {
                    // const dataList = this.dataList || []
                    // const index = dataList.findIndex((item,index,arr) => {
                    //   return item[this.valueKey] === newValue;
                    // });
                    this.setCurrentIndex(newValue);
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/CheckSwitch.vue?vue&type=script&lang=js&
        /* harmony default export */
        var common_CheckSwitchvue_type_script_lang_js_ = (CheckSwitchvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/CheckSwitch.vue?vue&type=style&index=0&lang=scss&
        var CheckSwitchvue_type_style_index_0_lang_scss_ = __webpack_require__("RDDj");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/CheckSwitch.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            common_CheckSwitchvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var CheckSwitch = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "qYCb":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/InvoiceEdit.vue?vue&type=template&id=cdc8eb52&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', {
                staticClass: "invoice",
                attrs: {"id": "invoice-container"}
            }, [_c('ul', {staticClass: "pointGroup"}, _vm._l((_vm.pointGroup), function (item, index) {
                return _c('li', {key: index})
            }), 0), _vm._v(" "), _c('div', {staticClass: "invoiceMain"}, [_c('div', {staticClass: "invoiceType electric"}, [_c('i', {class: _vm.ticketTypeIcon})]), _vm._v(" "), _c('div', {staticClass: "ticket-type"}, [_c('span', [_vm._v(_vm._s(_vm.specialTicketName))])]), _vm._v(" "), _c('div', {staticClass: "region"}, [_c('span', {domProps: {"textContent": _vm._s(_vm.ticketTitle)}}), _vm._v(" "), _c('p', {staticClass: "hr"})]), _vm._v(" "), _c('div', {staticClass: "invoice-head"}, [_c('p', {staticClass: "fontColor fl"}, [_vm._v(_vm._s(_vm.numberName) + "："), _c('span', {staticClass: "elecColor"}, [_vm._v(_vm._s(_vm.machineNo))])])]), _vm._v(" "), _c('div', {staticClass: "invoice-right-header"}, [_c('p', {staticClass: "fontColor"}, [_vm._v("发票代码："), _c('span', {staticClass: "date"}, [_vm._v(_vm._s(_vm.invoiceCode))])]), _vm._v(" "), _c('p', {staticClass: "fontColor"}, [_vm._v("发票号码："), _c('span', {staticClass: "date"}, [_vm._v(_vm._s(_vm.invoiceNo))])]), _vm._v(" "), _c('p', {staticClass: "fontColor"}, [_vm._v("开票日期："), _c('span', {staticClass: "date"}, [_vm._v(_vm._s(_vm.today))])]), _vm._v(" "), _c('p', {staticClass: "fontColor"}, [_vm._v("校验码："), _c('span', {staticClass: "date"}, [_vm._v(_vm._s(_vm.verifyCode))])])]), _vm._v(" "), _c('div', {staticClass: "invoice-body"}, [_c('InvoiceHeader', {
                attrs: {
                    "data-obj": _vm.buyerInfo,
                    "invoiceTypeCode": _vm.invoiceTypeCode,
                    "isIssue": _vm.isIssue
                }
            }), _vm._v(" "), _c('InvoiceContent', {
                attrs: {
                    "isSpecialInvoice": _vm.isSpecialInvoice,
                    "isIssue": _vm.isIssue,
                    "isEInvoice": _vm.isEInvoice,
                    "invoiceTypeCode": _vm.invoiceTypeCode
                }, on: {"change": _vm.syncGoodListInfo}
            }), _vm._v(" "), _c('InvoiceFooter', {
                attrs: {
                    "data-obj": _vm.sellerInfo,
                    "isIssue": _vm.isIssue,
                    "isRed": _vm.isRed,
                    "invoiceTypeCode": _vm.invoiceTypeCode
                }
            })], 1), _vm._v(" "), _c('div', {staticClass: "invoice-foot"}, [_c('div', {staticClass: "skxx"}, [_c('span', [_vm._v("收款人：")]), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.otherInfo.payee),
                    expression: "otherInfo.payee"
                }],
                attrs: {"type": "text", "maxlength": 16, "disabled": _vm.isIssue},
                domProps: {"value": (_vm.otherInfo.payee)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.otherInfo, "payee", $event.target.value)
                    }
                }
            }), _vm._v(" "), _c('span', [_vm._v("复核人：")]), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.otherInfo.checker),
                    expression: "otherInfo.checker"
                }],
                attrs: {"type": "text", "maxlength": 16, "disabled": _vm.isIssue},
                domProps: {"value": (_vm.otherInfo.checker)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.otherInfo, "checker", $event.target.value)
                    }
                }
            }), _vm._v(" "), _c('span', [_vm._v("开票人：")]), _c('input', {
                directives: [{
                    name: "model",
                    rawName: "v-model",
                    value: (_vm.otherInfo.drawer),
                    expression: "otherInfo.drawer"
                }],
                attrs: {"type": "text", "maxlength": 20, "disabled": _vm.isIssue},
                domProps: {"value": (_vm.otherInfo.drawer)},
                on: {
                    "input": function ($event) {
                        if ($event.target.composing) {
                            return;
                        }
                        _vm.$set(_vm.otherInfo, "drawer", $event.target.value)
                    }
                }
            }), _vm._v(" "), _c('span', [_vm._v("销货单位（章）")])]), _vm._v(" "), _c('div', {staticClass: "tishi"}, [_vm._v("\n                " + _vm._s(_vm.extraInfo) + "\n            ")])])]), _vm._v(" "), _c('ul', {staticClass: "pointGroup"}, _vm._l((_vm.pointGroup), function (item, index) {
                return _c('li', {key: index})
            }), 0), _vm._v(" "), _c('customer-selector', {attrs: {"invoiceTypeCode": _vm.invoiceTypeCode}})], 1)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/InvoiceEdit.vue?vue&type=template&id=cdc8eb52&

// EXTERNAL MODULE: ./node_modules/moment/moment.js
        var moment = __webpack_require__("wd/R");
        var moment_default = /*#__PURE__*/__webpack_require__.n(moment);

// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
        var vuex_esm = __webpack_require__("L2JU");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceHeader.vue + 4 modules
        var InvoiceHeader = __webpack_require__("blrr");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceFooter.vue + 4 modules
        var InvoiceFooter = __webpack_require__("fIKp");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/InvoiceContent.vue + 4 modules
        var InvoiceContent = __webpack_require__("6+HR");

// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/modules/CustomerSelector.vue + 4 modules
        var CustomerSelector = __webpack_require__("JLbz");

// EXTERNAL MODULE: ./src/store/helper.js
        var helper = __webpack_require__("lq9z");

// EXTERNAL MODULE: ./src/mixins/invoice-issue/invoiceIssueConfigMixin.js
        var invoiceIssueConfigMixin = __webpack_require__("Q5iz");

// EXTERNAL MODULE: ./src/mixins/invoice-issue/serverOrDishTerminal.js
        var serverOrDishTerminal = __webpack_require__("SBbI");

// EXTERNAL MODULE: ./src/mixins/invoice-issue/move.js
        var move = __webpack_require__("fJ3f");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/InvoiceEdit.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


        // import serverOrDish from '@/mixins/serverOrDish'


        var propMixin = {
            computed: _objectSpread({}, Object(helper["a" /* generateComputed */])(['isIssue', 'showCommonCopyEdit', 'isNegative'], function (state) {
                return state.invoiceEdit;
            }), {}, Object(helper["a" /* generateComputed */])(['invoiceCode', 'invoiceNo', 'issuePlace', 'machineNo', 'drawer', 'checker', 'payee', 'verifyCode', 'buyerInfo', 'invoiceSpecialMark'], function (state) {
                return state.invoiceEdit.currentData;
            }))
        }; // 004专票 007普票 026电票 005机动车 025卷票

        var ticketType = {
            '004': '增值税专用发票',
            '007': '增值税普通发票',
            '025': '增值税卷式发票',
            '026': '增值税电子发票'
        };
        var specialTicketNameTrans = {
            '01': '销售',
            '02': '收购',
            '08': '成品油'
        };
        /* harmony default export */
        var InvoiceEditvue_type_script_lang_js_ = ({
            mixins: [propMixin, invoiceIssueConfigMixin["a" /* default */], serverOrDishTerminal["a" /* default */], move["a" /* default */]],
            components: {
                CustomerSelector: CustomerSelector["default"],
                InvoiceHeader: InvoiceHeader["default"],
                InvoiceContent: InvoiceContent["default"],
                InvoiceFooter: InvoiceFooter["default"]
            },
            props: {
                invoiceTypeCode: {
                    type: String,
                    default: ''
                },
                isRed: {
                    type: Boolean,
                    default: false
                }
            },
            watch: {
                issuePlace: function issuePlace(cur, old) {
                    // if (cur && cur.invoiceTerminalName && old && old.invoiceTerminalName) {
                    if (cur && cur.invoiceTerminalName) {
                        var payee = this.payee;
                        var checker = this.checker;

                        if (this.invoiceSpecialMark !== '02') {
                            this.otherInfo.payee = payee;
                        }

                        this.otherInfo.checker = checker;
                        this.otherInfo.drawer = this.drawer;
                    }
                },
                otherInfo: {
                    deep: true,
                    handler: function handler(newValue, oldValue) {
                        // 716 产品王擎宇确认  修改相关需求  收款人/复核人 允许置空（原业务逻辑为置空后取默认值）
                        this.$store.commit(helper["c" /* keyUtil */].getChangeName('payee'), newValue.payee);
                        this.$store.commit(helper["c" /* keyUtil */].getChangeName('checker'), newValue.checker);
                        this.$store.commit(helper["c" /* keyUtil */].getChangeName('drawer'), newValue.drawer);
                    }
                },
                'buyerInfo.name': {
                    deep: true,
                    handler: function handler(val) {
                        if (this.invoiceSpecialMark === '02') {
                            this.otherInfo.payee = val;
                        }
                    }
                },
                isDishOrServerTerminal: function isDishOrServerTerminal(val) {
                    if (val === 'server') {
                        this.numberName = '机器编号';
                    } else if (val === 'dish') {
                        this.numberName = '税控盘编号';
                    }
                },
                'issuePlace.curTerminal': function issuePlaceCurTerminal(cur, old) {
                    // 初始化必须在有终端信息的基础上，否则没有绑定终端会有问题
                    if (cur) {
                        this.initEdit(cur);
                    }
                }
            },
            data: function data() {
                return {
                    today: moment_default()().format('YYYY年MM月DD日'),
                    ticketNo: 71746303,
                    pointGroup: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
                    otherInfo: {
                        payee: this.payee,
                        checker: this.checker,
                        drawer: this.drawer
                    },
                    numberName: '机器编号'
                };
            },
            methods: {
                handleChange: function handleChange(event) {
                    this.$emit('change', event, this.currentValue);
                },
                toggleTax: function toggleTax(hasTax) {// console.log('invoice edit:toggletax:', hasTax)
                },
                doSearch: function doSearch(args) {
                    var _this = this;

                    var params = Object.assign({}, args);
                    this.paramUtil.setWhenNotEmpty(this.$data, params, ['orgCode', 'ticketState', 'ticketNo']);
                    this.ticketDateRange[0] && (params.startTime = this.ticketDateRange[0]);
                    this.ticketDateRange[1] && (params.endTime = this.ticketDateRange[1]);
                    this.http.post({
                        url: '/api/ticket/list'
                    }, params, function (resp) {
                        if (resp.success) {
                            var respData = resp.data || {};
                            _this.resultList = respData.results || [];
                            _this.resultTotal = respData.total || 0;
                            _this.resultTotal = parseInt(_this.resultTotal);
                        }
                    });
                },
                syncGoodListInfo: function syncGoodListInfo(infoList) {
                    this.invoiceData.goodsInfoList = infoList;
                },
                initEdit: function initEdit(curTerminal) {
                    var userInfo = JSON.parse(sessionStorage.getItem('userInfo'));
                    var userBindTerminal = JSON.parse(sessionStorage.getItem('userBindTerminal'));
                    userBindTerminal = userBindTerminal.invoiceTerminalCode ? userBindTerminal : curTerminal;
                    var orgConfig = JSON.parse(sessionStorage.getItem('orgConfig'));

                    if (this.isDishOrServerTerminal === 'dish') {
                        this.numberName = '税控盘编号';
                    } // if (!userBindTerminal.invoiceTerminalCode && this.invoiceTypeCode !== '026') {
                    //     this.$Modal.info({
                    //         title: '信息',
                    //         content: '当前用户没有绑定终端，请绑定终端后在进行开票业务！'
                    //     })
                    //     return
                    // }
                    // 编辑的时候带过来的 信息


                    var editOtherInfo = this.editOtherInfo;
                    var drawer = editOtherInfo.drawer || userBindTerminal.drawer || orgConfig.KPR || userInfo.userName;
                    var payee = editOtherInfo.payee || userBindTerminal.payee || orgConfig.SKR || drawer;
                    var checker = editOtherInfo.checker || userBindTerminal.checker || orgConfig.FHR || drawer; // let drawer = editOtherInfo.drawer || this.drawer || orgConfig.KPR || userInfo.userName
                    // let payee = editOtherInfo.payee || this.payee || orgConfig.SKR || drawer
                    // let checker = editOtherInfo.checker || this.payee || orgConfig.FHR || drawer

                    if (this.invoiceSpecialMark === '02') {
                        payee = '';
                    }

                    Object.assign(this.otherInfo, {
                        payee: payee,
                        drawer: drawer,
                        checker: checker
                    });
                    this.$store.dispatch('getIssueFooterInfo', {
                        otherInfo: _objectSpread({}, this.otherInfo)
                    });
                }
            },
            mounted: function mounted() {// 复制和编辑的时候 不做信息更改
                // if (!this.showCommonCopyEdit) {
                // this.$nextTick(() => {
                // this.initEdit()
                // })
                // }
            },
            computed: _objectSpread({}, Object(vuex_esm["b" /* mapState */])({
                buyerInfo: function buyerInfo(state) {
                    return state.invoiceEdit.currentData.buyerInfo;
                },
                sellerInfo: function sellerInfo(state) {
                    return state.invoiceEdit.currentData.sellerInfo;
                },
                editOtherInfo: function editOtherInfo(state) {
                    return state.invoiceEdit.editOtherInfo;
                } // checker: state => state.invoiceEdit.currentData.checker,

            }), {
                isEInvoice: function isEInvoice() {
                    return this.invoiceTypeCode === '026';
                },
                isSpecialInvoice: function isSpecialInvoice() {
                    return this.invoiceTypeCode === '004';
                },
                extraInfo: function extraInfo() {
                    var els = ['温馨提示:']; // 电票开具成功后显示开票终端

                    var eInvoiceIssued = this.isEInvoice && this.isIssue;

                    if (!this.isEInvoice || eInvoiceIssued || this.isEInvoice) {
                        if (this.issuePlace.invoiceTerminalName && this.issuePlace.invoiceTerminalName !== '不指定终端') {
                            els.push('您目前的开票终端为:', this.issuePlace.invoiceTerminalName + ' ');
                        }
                    }

                    if (this.email) {
                        els.push('电子票信息邮箱为:', this.email + ' ');
                    }

                    if (this.phone) {
                        els.push('电话为:', this.phone + ' ');
                    }

                    return els.join('');
                },
                ticketTitle: function ticketTitle() {
                    return ticketType[this.invoiceTypeCode];
                },
                // 004专票 007普票 026电票 005机动车 025卷票
                ticketTypeIcon: function ticketTypeIcon() {
                    var code = this.invoiceTypeCode;
                    return ['iconfont', {
                        'bw-zhuanpiao': code === '004',
                        'bw-pupiao': code === '007',
                        'bw-dianpiao': code === '026',
                        'bw-juanshi': code === '025',
                        // ['bw-huoyun']: (code === '005'),
                        'bw-jidongche': code === '005'
                    }];
                },
                specialTicketName: function specialTicketName() {
                    var invoiceSpecialMark = this.invoiceSpecialMark;
                    return specialTicketNameTrans[invoiceSpecialMark];
                }
            })
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/InvoiceEdit.vue?vue&type=script&lang=js&
        /* harmony default export */
        var invoice_edit_InvoiceEditvue_type_script_lang_js_ = (InvoiceEditvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/page/common/invoice-edit/InvoiceEdit.vue?vue&type=style&index=0&lang=scss&
        var InvoiceEditvue_type_style_index_0_lang_scss_ = __webpack_require__("evYU");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/InvoiceEdit.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            invoice_edit_InvoiceEditvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            null,
            null
        )

        /* harmony default export */
        var InvoiceEdit = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "qvMR":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
// ESM COMPAT FLAG
        __webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/searchCom.vue?vue&type=template&id=c41ea1e0&scoped=true&
        var render = function () {
            var _vm = this;
            var _h = _vm.$createElement;
            var _c = _vm._self._c || _h;
            return _c('div', _vm._l((_vm.currentSearchData), function (searchItem, index) {
                return _c('div', {
                    key: index,
                    staticStyle: {"display": "inline-block"}
                }, [(searchItem.type == 'select') ? _c('LabelSelect', {
                    attrs: {
                        "inputValue": searchItem.value,
                        "inputLabel": searchItem.name,
                        "dataList": searchItem.selectList || _vm.dic[searchItem.key] || [],
                        "placeholder": searchItem.placeholder,
                        "multiple": searchItem.multiple
                    }, on: {
                        "change": function (data) {
                            return _vm.setValue(index, data, searchItem);
                        }
                    }
                }) : (searchItem.type == 'input') ? _c('LabelInput', {
                    attrs: {
                        "inputValue": searchItem.value,
                        "inputLabel": searchItem.name,
                        "placeholder": searchItem.placeholder
                    }, on: {
                        "change": function (e, data) {
                            return _vm.setValue(index, data, searchItem);
                        }
                    }
                }) : (searchItem.type == 'datepicker') ? _c('LabelDatePicker', {
                    attrs: {
                        "inputValue": searchItem.value,
                        "placeholder": searchItem.placeholder,
                        "type": searchItem.datapickType,
                        "inputLabel": searchItem.name,
                        "format": "yyyy-MM-dd"
                    }, on: {
                        "change": function (data) {
                            return _vm.setValue(index, data, searchItem);
                        }
                    }
                }) : _c('div')], 1)
            }), 0)
        }
        var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/searchCom.vue?vue&type=template&id=c41ea1e0&scoped=true&

// EXTERNAL MODULE: ./src/components/page/common/LabelSelect.vue + 4 modules
        var LabelSelect = __webpack_require__("4AcG");

// EXTERNAL MODULE: ./src/components/page/common/LabelInput.vue + 4 modules
        var LabelInput = __webpack_require__("m7jE");

// EXTERNAL MODULE: ./src/components/page/common/LabelDatePicker.vue + 4 modules
        var LabelDatePicker = __webpack_require__("TDd8");

// CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory!./node_modules/vue-loader/lib??vue-loader-options!./src/components/page/common/invoice-edit/modules/searchCom.vue?vue&type=script&lang=js&
        function ownKeys(object, enumerableOnly) {
            var keys = Object.keys(object);
            if (Object.getOwnPropertySymbols) {
                var symbols = Object.getOwnPropertySymbols(object);
                if (enumerableOnly) symbols = symbols.filter(function (sym) {
                    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
                });
                keys.push.apply(keys, symbols);
            }
            return keys;
        }

        function _objectSpread(target) {
            for (var i = 1; i < arguments.length; i++) {
                var source = arguments[i] != null ? arguments[i] : {};
                if (i % 2) {
                    ownKeys(Object(source), true).forEach(function (key) {
                        _defineProperty(target, key, source[key]);
                    });
                } else if (Object.getOwnPropertyDescriptors) {
                    Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
                } else {
                    ownKeys(Object(source)).forEach(function (key) {
                        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
                    });
                }
            }
            return target;
        }

        function _defineProperty(obj, key, value) {
            if (key in obj) {
                Object.defineProperty(obj, key, {value: value, enumerable: true, configurable: true, writable: true});
            } else {
                obj[key] = value;
            }
            return obj;
        }

        /* harmony default export */
        var searchComvue_type_script_lang_js_ = ({
            components: {
                LabelSelect: LabelSelect["default"],
                LabelInput: LabelInput["default"],
                LabelDatePicker: LabelDatePicker["default"]
            },
            props: {
                searchFilterData: {
                    type: Object,
                    default: function _default() {
                        return {};
                    }
                }
            },
            data: function data() {
                return {
                    currentSearchData: []
                };
            },
            mounted: function mounted() {
                var _this = this;

                this.currentSearchData = Object.values(this.searchFilterData); // 必须先去渲染树组件，然后再去获取树数据

                this.$nextTick(function () {
                    _this.$emit('on-query');
                });
                console.log(this.currentSearchData);
            },
            methods: {
                setValue: function setValue(index, data, searchItem) {
                    this.currentSearchData = this.currentSearchData.map(function (item, idx) {
                        if (index === idx) {
                            return _objectSpread({}, item, {
                                value: data
                            });
                        } else {
                            return _objectSpread({}, item);
                        }
                    });
                },
                // 向外部暴露搜索条件要传给后端的值searchdata
                getSearchData: function getSearchData() {
                    return this.changeParams(this.currentSearchData);
                },
                changeParams: function changeParams(currentSearchData) {
                    var params = {};
                    currentSearchData.map(function (item) {
                        if (item.key === 'list_organizationId' || item.key === 'organizationIdList') {
                            params[item.key] = item.value ? item.value.split(',') : [];
                        } else {
                            if (item.value != null) {
                                // 时间选择器选择时间段分为两个key值传给后端
                                if (item.ext && item.ext === '1') {
                                    params.ext = _objectSpread({}, params.ext ? params.ext : {}, _defineProperty({}, item.key, item.value));
                                } else {
                                    if (item.key.indexOf(',') >= 0) {
                                        item.key.split(',').map(function (sonItem, index) {
                                            if (item.addSecond) {
                                                var time = index === 0 ? ' 00:00:00' : ' 23:59:59';
                                                params[sonItem] = item.value[index] + (item.value[index] ? time : '');
                                            } else {
                                                params[sonItem] = item.value[index];
                                            }
                                        });
                                    } else {
                                        params[item.key] = item.value;
                                    }
                                } // if (Object.prototype.toString.call(item.key) == '[object Array]') {
                                //     item.key.map((sonItem, index) => {
                                //         params[item.key[index]] = item.value[index]
                                //     })
                                // } else {
                                //     params[item.key] = item.value
                                // }

                            }
                        }
                    });
                    return params;
                }
            }
        });
// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/searchCom.vue?vue&type=script&lang=js&
        /* harmony default export */
        var modules_searchComvue_type_script_lang_js_ = (searchComvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
        var componentNormalizer = __webpack_require__("KHd+");

// CONCATENATED MODULE: ./src/components/page/common/invoice-edit/modules/searchCom.vue


        /* normalize component */

        var component = Object(componentNormalizer["a" /* default */])(
            modules_searchComvue_type_script_lang_js_,
            render,
            staticRenderFns,
            false,
            null,
            "c41ea1e0",
            null
        )

        /* harmony default export */
        var searchCom = __webpack_exports__["default"] = (component.exports);

        /***/
    }),

    /***/ "sAfE":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _utils_selectUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Z1R7");
        /* eslint-disable */
// 获取开票 时 可用税率

        /* harmony default export */
        __webpack_exports__["a"] = ({
            data: function data() {
                return {
                    taxRates: []
                };
            },
            created: function created() {
                this.getTaxRates();
            },
            methods: {
                getTaxRates: function getTaxRates() {
                    var _this = this;

                    var data = {
                        dictType: 'KYSL',
                        privateFlag: Object(_utils_selectUtil__WEBPACK_IMPORTED_MODULE_0__[/* generatePrivateFlage */ "b"])()
                    };
                    this.http.userPost('/sys/getSysDict', data).then(function (resp) {
                        var res = resp.data && resp.data.results || [];
                        _this.taxRates = res.map(function (item) {
                            return {
                                label: item.dictName,
                                value: +item.dictCode
                            };
                        });
                    });
                }
            }
        });

        /***/
    }),

    /***/ "sw9Q":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContentItem_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BZhz");
        /* harmony import */
        var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContentItem_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContentItem_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
        /* unused harmony reexport * */
        /* unused harmony default export */
        var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_data_import_assets_libs_scss_baiwang_ui_scss_node_modules_vue_loader_lib_index_js_vue_loader_options_InvoiceContentItem_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);

        /***/
    }),

    /***/ "szKx":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";
        /* harmony default export */
        __webpack_exports__["a"] = ({
            timestampToTime: function timestampToTime(timestamp, type) {
                var date = new Date(timestamp);
                var Y = date.getFullYear();
                var M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
                var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
                var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
                var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
                var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();

                if (type === 'second') {
                    return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
                }

                return Y + '-' + M + '-' + D;
            },
            getyyyyMMdd: function getyyyyMMdd(timestamp) {
                var d = timestamp ? new Date(timestamp) : new Date();
                var date = d.getDate();
                var month = d.getMonth() + 1;
                var year = d.getFullYear();

                if (String(month).length < 2) {
                    month = '0' + month;
                }

                if (String(date).length < 2) {
                    date = '0' + date;
                }

                var yyyyMMdd = year + '' + month + '' + date;
                return yyyyMMdd;
            }
        });

        /***/
    }),

    /***/ "vAae":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    }),

    /***/ "wYmx":
    /***/ (function (module, __webpack_exports__, __webpack_require__) {

        "use strict";

// CONCATENATED MODULE: ./src/mixins/goodsCode/zbm.js
        var zbm = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', 'AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AG', 'AK', 'AL', 'AM', 'AN', 'AO', 'AP', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AV', 'AW', 'AX', 'AY', 'AZ', 'BA', 'BB', 'BC', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BG', 'BK', 'BL', 'BM', 'BN', 'BO', 'BP', 'BQ', 'BR', 'BS', 'BT', 'BU', 'BV', 'BW', 'BX', 'BY', 'BZ', 'CA', 'CB', 'CC', 'CD', 'CE', 'CF', 'CG', 'CH', 'CI', 'CG', 'CK', 'CL', 'CM', 'CN', 'CO', 'CP', 'CQ', 'CR', 'CS', 'CT', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DA', 'DB', 'DC', 'DD', 'DE', 'DF', 'DG', 'DH', 'DI', 'DG', 'DK', 'DL', 'DM', 'DN', 'DO', 'DP', 'DQ', 'DR', 'DS', 'DT', 'DU', 'DV', 'DW', 'DX', 'DY', 'DZ', 'EA', 'EB', 'EC', 'ED', 'EE', 'EF', 'EG', 'EH', 'EI', 'EG', 'EK', 'EL', 'EM', 'EN', 'EO', 'EP', 'EQ', 'ER', 'ES', 'ET', 'EU', 'EV', 'EW', 'EX', 'EY', 'EZ', 'FA', 'FB', 'FC', 'FD', 'FE', 'FF', 'FG', 'FH', 'FI', 'FG', 'FK', 'FL', 'FM', 'FN', 'FO', 'FP', 'FQ', 'FR', 'FS', 'FT', 'FU', 'FV', 'FW', 'FX', 'FY', 'FZ', 'GA', 'GB', 'GC', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GG', 'GK', 'GL', 'GM', 'GN', 'GO', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GV', 'GW', 'GX', 'GY', 'GZ', 'HA', 'HB', 'HC', 'HD', 'HE', 'HF', 'HG', 'HH', 'HI', 'HG', 'HK', 'HL', 'HM', 'HN', 'HO', 'HP', 'HQ', 'HR', 'HS', 'HT', 'HU', 'HV', 'HW', 'HX', 'HY', 'HZ', 'IA', 'IB', 'IC', 'ID', 'IE', 'IF', 'IG', 'IH', 'II', 'IG', 'IK', 'IL', 'IM', 'IN', 'IO', 'IP', 'IQ', 'IR', 'IS', 'IT', 'IU', 'IV', 'IW', 'IX', 'IY', 'IZ', 'GA', 'GB', 'GC', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GG', 'GK', 'GL', 'GM', 'GN', 'GO', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GV', 'GW', 'GX', 'GY', 'GZ', 'KA', 'KB', 'KC', 'KD', 'KE', 'KF', 'KG', 'KH', 'KI', 'KG', 'KK', 'KL', 'KM', 'KN', 'KO', 'KP', 'KQ', 'KR', 'KS', 'KT', 'KU', 'KV', 'KW', 'KX', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LD', 'LE', 'LF', 'LG', 'LH', 'LI', 'LG', 'LK', 'LL', 'LM', 'LN', 'LO', 'LP', 'LQ', 'LR', 'LS', 'LT', 'LU', 'LV', 'LW', 'LX', 'LY', 'LZ', 'MA', 'MB', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MI', 'MG', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NB', 'NC', 'ND', 'NE', 'NF', 'NG', 'NH', 'NI', 'NG', 'NK', 'NL', 'NM', 'NN', 'NO', 'NP', 'NQ', 'NR', 'NS', 'NT', 'NU', 'NV', 'NW', 'NX', 'NY', 'NZ', 'OA', 'OB', 'OC', 'OD', 'OE', 'OF', 'OG', 'OH', 'OI', 'OG', 'OK', 'OL', 'OM', 'ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT', 'OU', 'OV', 'OW', 'OX', 'OY', 'OZ', 'PA', 'PB', 'PC', 'PD', 'PE', 'PF', 'PG', 'PH', 'PI', 'PG', 'PK', 'PL', 'PM', 'PN', 'PO', 'PP', 'PQ', 'PR', 'PS', 'PT', 'PU', 'PV', 'PW', 'PX', 'PY', 'PZ', 'QA', 'QB', 'QC', 'QD', 'QE', 'QF', 'QG', 'QH', 'QI', 'QG', 'QK', 'QL', 'QM', 'QN', 'QO', 'QP', 'QQ', 'QR', 'QS', 'QT', 'QU', 'QV', 'QW', 'QX', 'QY', 'QZ', 'RA', 'RB', 'RC', 'RD', 'RE', 'RF', 'RG', 'RH', 'RI', 'RG', 'RK', 'RL', 'RM', 'RN', 'RO', 'RP', 'RQ', 'RR', 'RS', 'RT', 'RU', 'RV', 'RW', 'RX', 'RY', 'RZ', 'SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SG', 'SK', 'SL', 'SM', 'SN', 'SO', 'SP', 'SQ', 'SR', 'SS', 'ST', 'SU', 'SV', 'SW', 'SX', 'SY', 'SZ', 'TA', 'TB', 'TC', 'TD', 'TE', 'TF', 'TG', 'TH', 'TI', 'TG', 'TK', 'TL', 'TM', 'TN', 'TO', 'TP', 'TQ', 'TR', 'TS', 'TT', 'TU', 'TV', 'TW', 'TX', 'TY', 'TZ', 'UA', 'UB', 'UC', 'UD', 'UE', 'UF', 'UG', 'UH', 'UI', 'UG', 'UK', 'UL', 'UM', 'UN', 'UO', 'UP', 'UQ', 'UR', 'US', 'UT', 'UU', 'UV', 'UW', 'UX', 'UY', 'UZ', 'VA', 'VB', 'VC', 'VD', 'VE', 'VF', 'VG', 'VH', 'VI', 'VG', 'VK', 'VL', 'VM', 'VN', 'VO', 'VP', 'VQ', 'VR', 'VS', 'VT', 'VU', 'VV', 'VW', 'VX', 'VY', 'VZ', 'WA', 'WB', 'WC', 'WD', 'WE', 'WF', 'WG', 'WH', 'WI', 'WG', 'WK', 'WL', 'WM', 'WN', 'WO', 'WP', 'WQ', 'WR', 'WS', 'WT', 'WU', 'WV', 'WW', 'WX', 'WY', 'WZ', 'XA', 'XB', 'XC', 'XD', 'XE', 'XF', 'XG', 'XH', 'XI', 'XG', 'XK', 'XL', 'XM', 'XN', 'XO', 'XP', 'XQ', 'XR', 'XS', 'XT', 'XU', 'XV', 'XW', 'XX', 'XY', 'XZ', 'YA', 'YB', 'YC', 'YD', 'YE', 'YF', 'YG', 'YH', 'YI', 'YG', 'YK', 'YL', 'YM', 'YN', 'YO', 'YP', 'YQ', 'YR', 'YS', 'YT', 'YU', 'YV', 'YW', 'YX', 'YY', 'YZ', 'ZA', 'ZB', 'ZC', 'ZD', 'ZE', 'ZF', 'ZG', 'ZH', 'ZI', 'ZG', 'ZK', 'ZL', 'ZM', 'ZN', 'ZO', 'ZP', 'ZQ', 'ZR', 'ZS', 'ZT', 'ZU', 'ZV', 'ZW', 'ZX', 'ZY', 'ZZ'];

// CONCATENATED MODULE: ./src/mixins/goodsCode/index.js
        function _toConsumableArray(arr) {
            return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
        }

        function _nonIterableSpread() {
            throw new TypeError("Invalid attempt to spread non-iterable instance");
        }

        function _iterableToArray(iter) {
            if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
        }

        function _arrayWithoutHoles(arr) {
            if (Array.isArray(arr)) {
                for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
                    arr2[i] = arr[i];
                }
                return arr2;
            }
        }

        /**
         * 商品编辑计算规则
         * @author by Alex
         */

        /* harmony default export */
        var goodsCode = __webpack_exports__["a"] = ({
            methods: {
                // 计算商品编码:
                goodsCodeCange: function goodsCodeCange(pCode, arr) {
                    var usedCode = arr.map(function (item, index) {
                        if (!item.goodsCode) {
                            item.goodsCode = '';
                            /* eslint-disable no-console */

                            console.log("\u8BE5\u5546\u54C1\u4E0B\u7684\u7B2C".concat(index, "\u4E2A\u5546\u54C1\u7684\u5546\u54C1\u7F16\u7801\u8FD4\u56DE\u503C\u4E3A\u7A7A"));
                            /* eslint-enable no-console */
                        } else {
                            item.goodsCode += '';
                        }

                        return (item.goodsCode + '').replace(pCode, '');
                    });
                    var unUsedCode = this.getUnUseCodeArr(usedCode);
                    var code = unUsedCode[0];
                    return code;
                },
                // 取未用商品编码数组，去重
                getUnUseCodeArr: function getUnUseCodeArr(usedCode) {
                    var usedCodeArr = usedCode || [];
                    var unUsedCodeArr = [];

                    if (usedCodeArr.length === 0) {
                        unUsedCodeArr = _toConsumableArray(zbm);
                    } else {
                        zbm.forEach(function (item) {
                            if (!usedCodeArr.includes(item)) {
                                unUsedCodeArr.push(item);
                            }
                        });
                    }

                    return unUsedCodeArr;
                }
            }
        });

        /***/
    }),

    /***/ "x+jC":
    /***/ (function (module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

        /***/
    })
}]);
