|  |  |  | 
|---|
|  |  |  | {field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide: true} | 
|---|
|  |  |  | ,{field: 'templateName', align: 'center',title: '报销类型',hide: false} | 
|---|
|  |  |  | ,{field: 'checkData', align: 'center',title: '是否冲账',hide: false} | 
|---|
|  |  |  | ,{field: 'orderNum', align: 'center',title: '报销单号',width: 320, style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} | 
|---|
|  |  |  | ,{field: 'planId$', align: 'center',title: '项目号',hide: false} | 
|---|
|  |  |  | ,{field: 'settle', align: 'center',title: '进度',hide: false} | 
|---|
|  |  |  | ,{field: 'createTime$', align: 'center',title: '创建时间',hide: false} | 
|---|
|  |  |  | ,{field: 'updateTime$', align: 'center',title: '更新时间',hide: false} | 
|---|
|  |  |  | ,{field: 'orderNum', align: 'center',title: '报销单号',width: 320,hide: false} | 
|---|
|  |  |  | ,{field: 'orderId$', align: 'center',title: '项目号',hide: false} | 
|---|
|  |  |  | ,{field: 'name$', align: 'center',title: '客户信息',hide: false} | 
|---|
|  |  |  | ,{field: 'status$', align: 'center',title: '状态',hide: false} | 
|---|
|  |  |  | ,{field: 'memberId$', align: 'center',title: '业务员',hide: false} | 
|---|
|  |  |  | ,{field: 'user$', align: 'center',title: '创建人员',hide: false} | 
|---|
|  |  |  | ,{field: 'memberId$', align: 'center',title: '审核节点',hide: true} | 
|---|
|  |  |  | ,{field: 'settle$', align: 'center',title: '进度', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} | 
|---|
|  |  |  | ,{align: 'center', title: '报销明细', toolbar: '#tbLook', minWidth: 160, width: 160} | 
|---|
|  |  |  | ,{field: 'user$', align: 'center',title: '创建人员',hide: true} | 
|---|
|  |  |  | ,{field: 'updateUserId$', align: 'center',title: '更新人员',hide: false} | 
|---|
|  |  |  | // // ,{field: 'checkDataStatus$', align: 'center',title: '报价数据'} | 
|---|
|  |  |  | ,{align: 'center', title: '报销明细', toolbar: '#tbLook', minWidth: 160, width: 160} | 
|---|
|  |  |  | ,{field: 'createTime$', align: 'center',title: '创建时间',hide: true} | 
|---|
|  |  |  | ,{field: 'updateTime$', align: 'center',title: '更新时间',hide: false} | 
|---|
|  |  |  | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:350} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | request: { | 
|---|
|  |  |  | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | title: false, | 
|---|
|  |  |  | area: '2100px', | 
|---|
|  |  |  | offset: [top2 + 'px', (left - 1730 + $a.outerWidth()) + 'px'], | 
|---|
|  |  |  | offset: [top2 + 'px', (left - 1430 + $a.outerWidth()) + 'px'], | 
|---|
|  |  |  | shade: .01, | 
|---|
|  |  |  | shadeClose: true, | 
|---|
|  |  |  | fixed: false, | 
|---|
|  |  |  | 
|---|
|  |  |  | cellMinWidth: 100, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | // {type: 'numbers'}, | 
|---|
|  |  |  | {field: 'occupation', title: '事由', width: 100}, | 
|---|
|  |  |  | {field: 'occupation', title: '事由', width: 200}, | 
|---|
|  |  |  | // {field: 'expenseType', title: '费用类型', width: 100}, | 
|---|
|  |  |  | {field: 'expenseType$', title: '费用类型', width: 100}, | 
|---|
|  |  |  | {field: 'taxRate', title: '税率', width: 60}, | 
|---|
|  |  |  | 
|---|
|  |  |  | {field: 'deptId', title: '列支部门', width: 120}, | 
|---|
|  |  |  | {field: 'updateTime', title: '更新日期', width: 100}, | 
|---|
|  |  |  | // {field: 'updateUserId', title: '更新人员ID', width: 160}, | 
|---|
|  |  |  | {field: 'updateUserName', title: '更新人员名字'}, | 
|---|
|  |  |  | {field: 'updateUserName', title: '更新人员名字', width: 80}, | 
|---|
|  |  |  | // {field: 'creationTime', title: '创建日期', width: 160} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | request: { | 
|---|
|  |  |  | 
|---|
|  |  |  | var isExpAdd = !expTpe; | 
|---|
|  |  |  | // 回显数据 | 
|---|
|  |  |  | form.val('editForm', expTpe); | 
|---|
|  |  |  | console.log(expTpe) | 
|---|
|  |  |  | if (expTpe) { | 
|---|
|  |  |  | // $('#orderNo').attr("disabled", "disabled"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | data: JSON.stringify({ | 
|---|
|  |  |  | reimburseId: Number(data.field.id), | 
|---|
|  |  |  | docType: Number(data.field.docType), | 
|---|
|  |  |  | orderNo: data.field.planId, | 
|---|
|  |  |  | orderId: data.field.orderId, | 
|---|
|  |  |  | templateName: data.field.templateName, | 
|---|
|  |  |  | checkData: data.field.checkData, | 
|---|
|  |  |  | reimburseOnlineDetls: nList | 
|---|
|  |  |  | 
|---|
|  |  |  | cellMinWidth: 100, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {type: 'numbers', title: '#'}, | 
|---|
|  |  |  | {field: 'occupation', title: '事由', width: 100}, | 
|---|
|  |  |  | {field: 'occupation', title: '事由', width: 100, style: 'color: blue;font-weight: bold', edit:true}, | 
|---|
|  |  |  | // {field: 'expenseType', title: '费用类型', width: 100}, | 
|---|
|  |  |  | {field: 'expenseType$', title: '费用类型', width: 100}, | 
|---|
|  |  |  | {field: 'taxRate', title: '税率', width: 60}, | 
|---|
|  |  |  | {field: 'untaxedAmountInLocalCurrency', title: '未税本币金额', width: 120}, | 
|---|
|  |  |  | {field: 'untaxedAmount', title: '未税金额', width: 100}, | 
|---|
|  |  |  | {field: 'taxAmount', title: '税额', width: 60}, | 
|---|
|  |  |  | {field: 'invoiceValue', title: '发票金额', width: 100}, | 
|---|
|  |  |  | {field: 'invoiceAmountInLocalCurrency', title: '发票本币金额', width: 120}, | 
|---|
|  |  |  | {field: 'reimbursementRatio', title: '报销比例', width: 100}, | 
|---|
|  |  |  | {field: 'reimbursementAmount', title: '报销金额', width: 100}, | 
|---|
|  |  |  | {field: 'reimbursementAmountInLocalCurrency', title: '报销本币金额', width: 120}, | 
|---|
|  |  |  | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120}, | 
|---|
|  |  |  | {field: 'cashierCurrency', title: '出纳币种', width: 100}, | 
|---|
|  |  |  | {field: 'taxRate', title: '税率', width: 60, edit: true}, | 
|---|
|  |  |  | {field: 'untaxedAmountInLocalCurrency', title: '未税本币金额', width: 120, edit: true}, | 
|---|
|  |  |  | {field: 'untaxedAmount', title: '未税金额', width: 100, edit: true}, | 
|---|
|  |  |  | {field: 'taxAmount', title: '税额', width: 60, edit: true}, | 
|---|
|  |  |  | {field: 'invoiceValue', title: '发票金额', width: 100, edit: true}, | 
|---|
|  |  |  | {field: 'invoiceAmountInLocalCurrency', title: '发票本币金额', width: 120, edit: true}, | 
|---|
|  |  |  | {field: 'reimbursementRatio', title: '报销比例', width: 100, edit: true}, | 
|---|
|  |  |  | {field: 'reimbursementAmount', title: '报销金额', width: 100, edit: true}, | 
|---|
|  |  |  | {field: 'reimbursementAmountInLocalCurrency', title: '报销本币金额', width: 120, edit: true}, | 
|---|
|  |  |  | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120, edit: true}, | 
|---|
|  |  |  | {field: 'cashierCurrency', title: '出纳币种', width: 100, edit: true}, | 
|---|
|  |  |  | {field: 'departureTime', title: '出发日期', width: 100}, | 
|---|
|  |  |  | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120}, | 
|---|
|  |  |  | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120, edit: true}, | 
|---|
|  |  |  | {field: 'userId', title: '列支人员', width: 120}, | 
|---|
|  |  |  | {field: 'deptId', title: '列支部门', width: 120}, | 
|---|
|  |  |  | {field: 'updateTime', title: '更新日期', width: 100}, | 
|---|
|  |  |  | 
|---|
|  |  |  | // {field: 'creationTime', title: '创建日期', width: 160} | 
|---|
|  |  |  | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | done: function (res) { | 
|---|
|  |  |  | done: function (res, curr, count) { | 
|---|
|  |  |  | $(layero).find('.layui-table-view').css('margin', '0'); | 
|---|
|  |  |  | var options = this; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 获取当前行数据 | 
|---|
|  |  |  | table.getRowData = function(elem){ | 
|---|
|  |  |  | var index = $(elem).closest('tr').data('index'); | 
|---|
|  |  |  | return table.cache[options.id][index] || {}; | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $('.input-occupation').on('text', function(){ | 
|---|
|  |  |  | var value = this.value; // 获取选中项 value | 
|---|
|  |  |  | var data = table.getRowData(this); | 
|---|
|  |  |  | console.log(value); | 
|---|
|  |  |  | console.log("value------==="); | 
|---|
|  |  |  | xxDataList.forEach(res => { | 
|---|
|  |  |  | if (data.id === res.id){ | 
|---|
|  |  |  | console.log(res) | 
|---|
|  |  |  | res.occupation = value; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | size: '' | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | 
|---|
|  |  |  | // 表单提交事件 | 
|---|
|  |  |  | form.on('submit(matEditSubmit)', function (data) { | 
|---|
|  |  |  | let selectList = matXmSelect.getValue(); | 
|---|
|  |  |  | console.log(selectList) | 
|---|
|  |  |  | for (let i = 0; i<selectList.length; i++) { | 
|---|
|  |  |  | let item = selectList[i]; | 
|---|
|  |  |  | // 查询物料详情 | 
|---|
|  |  |  | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | var bige=true; | 
|---|
|  |  |  | for (var j = 0; j < xxDataList.length; j++) { | 
|---|
|  |  |  | if (xxDataList[j].matnr === res.data.matnr && xxDataList[j].batch === res.data.batch) { | 
|---|
|  |  |  | bige=false; | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // console.log("-------2.1-------") | 
|---|
|  |  |  | // for (var j = 0; j < xxDataList.length; j++) { | 
|---|
|  |  |  | //     if (xxDataList[j].expenseType === res.data.expenseType && xxDataList[j].batch === res.data.batch) { | 
|---|
|  |  |  | //         bige=false; | 
|---|
|  |  |  | //         console.log("-------2.2-------") | 
|---|
|  |  |  | //         break; | 
|---|
|  |  |  | //     } | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | if (bige){ | 
|---|
|  |  |  | // console.log("-------2.3-------") | 
|---|
|  |  |  | xxDataList.push(res.data); | 
|---|
|  |  |  | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); | 
|---|
|  |  |  | } | 
|---|