123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- const columns = [
- {
- type: "index",
- fixed: "left",
- label: "序号",
- width: "50"
- },
- {
- label: '业务编号',
- prop: 'invoiceCode',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '类型',
- prop: 'type',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label:'订单来源',
- prop: 'source',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '销售方公司纳税识别号',
- prop: 'seller_code',
- minWidth: '160px',
- defaultData: '',
- required: true
- },
- {
- label: '销售方公司',
- prop: 'seller_name',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '订单编号',
- prop: 'orderCode',
- minWidth: '120px',
- defaultData: '',
- required: true
- },
- {
- label: '订单主单号',
- prop: 'cxCode',
- minWidth: '120px',
- defaultData: '',
- required: true
- },
- {
- label: '商品编号',
- prop: 'goodNo',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '商品名称',
- prop: 'goodName',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '单位',
- prop: 'unit',
- minWidth: '80px',
- defaultData: '',
- required: true
- },
- {
- label: '商品数量',
- prop: 'num',
- minWidth: '110px',
- defaultData: '',
- required: true
- },
- {
- label:'商品单价',
- prop: 'goodPrice',
- minWidth: '110px',
- defaultData: '',
- required: true
- },
- {
- label: '订单总金额',
- prop: 'totalPrice',
- minWidth: '110px',
- defaultData: '',
- required: true
- },
- {
- label: '税目',
- prop: 'cat_code',
- minWidth: '80px',
- defaultData: '',
- required: true
- },
- {
- label: '税目名称',
- prop: 'cat_name',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '税率',
- prop: 'tax',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '关联金额',
- prop: 'inv_fee',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '购买方公司名称',
- prop: 'inv_buyer_name',
- minWidth: '130px',
- defaultData: '',
- required: true
- },
- {
- label: '购买方公司纳税识别号',
- prop: 'inv_buyer_code',
- minWidth: '170px',
- defaultData: '',
- required: true
- },
- {
- label: '发票号码',
- prop: 'inv_number',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '发票类型',
- prop: 'inv_type',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '发票销售方公司',
- prop: 'inv_seller_name',
- minWidth: '130px',
- defaultData: '',
- required: true
- },
- {
- label: '发票销售方公司纳税号',
- prop: 'inv_seller_code',
- minWidth: '170px',
- defaultData: '',
- required: true
- },
- {
- label: '发票明细ID',
- prop: 'inv_item_id',
- minWidth: '110px',
- defaultData: '',
- required: true
- },
- {
- label: '货物或应税劳务、服务名称',
- prop: 'inv_good_name',
- minWidth: '200px',
- defaultData: '',
- required: true
- },
- {
- label: '类目编号',
- prop: 'inv_cat_code',
- minWidth: '90px',
- defaultData: '',
- required: true
- },
- {
- label: '规格型号',
- prop: 'inv_spec',
- minWidth: '110px',
- defaultData: '',
- required: true
- },
- {
- label: '发票商品单位',
- prop: 'inv_unit',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '发票商品数量',
- prop: 'inv_num',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '税前单价',
- prop: 'inv_subprice',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '税前总价',
- prop: 'inv_subtotal',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '发票税率',
- prop: 'inv_tax',
- minWidth: '80px',
- defaultData: '',
- required: true
- },
- {
- label: '税后单价',
- prop: 'inv_price',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '税后总额',
- prop: 'inv_total',
- minWidth: '100px',
- defaultData: '',
- required: true
- },
- {
- label: '类目编号状态',
- prop: 'TODO34',
- minWidth: '100px',
- defaultData: '',
- required: false
- },
- {
- label: '税率状态',
- prop: 'TODO35',
- minWidth: '100px',
- defaultData: '',
- required: false
- },
- {
- label: '备注',
- prop: 'remark',
- minWidth: '80px',
- defaultData: '',
- required: true
- },
- {
- label: '入账月份',
- prop: 'TODO37',
- minWidth: '80px',
- defaultData: '',
- required: true
- }
- ]
- const orderTemplate = [columns.slice(1).reduce((prev, current) => {
- return { ...prev, [current.label]: current.defaultData ? current.defaultData : '' }
- }, {})]
- export const mapLabelToProp = columns.reduce((prev, current) => ({
- ...prev,
- [current.label]: current.prop
- }), {})
- export const mapPropertyToLabel = columns.reduce((prev, current) => ({
- ...prev,
- [current.prop]: current.label
- }), {})
- export const requiredProps = columns.filter(column => !!column.required).map(item => item.prop)
- export { columns, orderTemplate };
|