1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600 |
- <template>
- <div class="app-container">
- <div class="title-container">
- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
- </div>
- <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
- <template slot="left">
- <MoreSearchBar business="MAJOR_BUSINESS" @fliterSearch="fliterSearch" @resetParams="resetParams"
- :listQuery="listQuery" :nodeCode="false" :financial="false" :delivery="true" :hasRealAmount="true"
- :clientManagerX="false" :businessObjectType="false" :department="false" :orderId="true"
- :productionNo="true" :productionType="true" >
- <template v-slot:otherButton>
- <PermissionButton menu-code="_views_major_order" class-name="filter-item" type="danger"
- icon="el-icon-circle-plus-outline" :page-jump="true" round
- :page-query="{ 'couldEdit': true, 'couldBack': true }" />
- <el-button class="filter-item" round type="success" @click="exportMyOrder()"
- :disabled="!listQuery.startDate && !listQuery.endDate">导出
- </el-button>
- <el-button class="filter-item" round @click="showAllLabel()">显示全部列</el-button>
- </template>
- </MoreSearchBar>
- </template>
- <parentTable :data="pageData.records" slot="table" style="width: 100%;" @headerClick="switchHeader">
- <el-table-column label="订单名称" align="center" show-overflow-tooltip width='300'
- prop="orderName" v-if="!hiddenLabels.includes('orderName')">
- <template slot-scope="{row}">
- <span>{{ row.orderName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="订单号" align="center" width='150'
- prop="orderId" v-if="!hiddenLabels.includes('orderId')">
- <template slot-scope="{row}">
- <span>{{ row.orderId }}</span>
- </template>
- </el-table-column>
- <el-table-column label="产品号" align="center" width='200'
- prop="productionNo" v-if="!hiddenLabels.includes('productionNo')">
- <template slot-scope="{row}">
- <span>{{ row.productionNo ? row.productionNo : '--' }}</span>
- </template>
- </el-table-column>
- <el-table-column label="产品类型" align="center" width='120'
- prop="production" v-if="!hiddenLabels.includes('production')">
- <template slot-scope="{row}">
- <span>{{ row.production ? (row.production === 'REPORT' ? '报告' : (row.production === 'STATEMENT' ? '意见书' :
- '复评函'
- )) : '订单' }}</span>
- </template>
- </el-table-column>
- <el-table-column label="当前节点" align="center" width='200'
- prop="currentNodeName" v-if="!hiddenLabels.includes('currentNodeName')">
- <template slot-scope="{row}">
- <span>{{ row.currentNodeName == null ? (row.ifSaveFile === true ? '已归档' : '--') : row.currentNodeName
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="负责人" align="center" width='120'
- prop="principal" v-if="!hiddenLabels.includes('principal')">
- <template slot-scope="{row}">
- <span>{{ row.principal }}</span>
- </template>
- </el-table-column>
- <el-table-column label="客户经理" align="center" width='120'
- prop="clientManager" v-if="!hiddenLabels.includes('clientManager')">
- <template slot-scope="{row}">
- <span>{{ row.clientManager }}</span>
- </template>
- </el-table-column>
- <el-table-column label="实收款(元)" align="center" width='120'
- prop="realAmount" v-if="!hiddenLabels.includes('realAmount')">
- <template slot-scope="{row}">
- <span style="color:red;font-weight:bold">{{ row.realAmount ? row.realAmount : '--' }}</span>
- </template>
- </el-table-column>
- <el-table-column label="应收款(元)" align="center" width='120'
- prop="shouldAmount" v-if="!hiddenLabels.includes('shouldAmount')">
- <template slot-scope="{row}">
- <span>{{ row.shouldAmount!=null ? row.shouldAmount : '--'}}</span>
- </template>
- </el-table-column>
- <el-table-column label="开票金额(元)" align="center" width='120'
- prop="invoiceAmount" v-if="!hiddenLabels.includes('invoiceAmount')">
- <template slot-scope="{row}">
- <span style="color:red;font-weight:bold">{{ row.invoiceAmount ? row.invoiceAmount : '--' }}</span>
- </template>
- </el-table-column>
- <el-table-column label="客户名称" align="center" width='120'
- prop="clienteleName" v-if="!hiddenLabels.includes('clienteleName')" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.clienteleName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="业务来源" align="center" width='120'
- prop="clienteleSubName" v-if="!hiddenLabels.includes('clienteleSubName')" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.clienteleSubName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="客户联系人" align="center" width='120'
- prop="clienteleContactName" v-if="!hiddenLabels.includes('clienteleContactName')" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.clienteleContactName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="委托人" align="center"
- prop="bailor" v-if="!hiddenLabels.includes('bailor')" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.bailor }}</span>
- </template>
- </el-table-column>
- <el-table-column label="产权人" align="center"
- prop="owner" v-if="!hiddenLabels.includes('owner')" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.owner }}</span>
- </template>
- </el-table-column>
- <el-table-column label="库存状态" align="center"
- prop="owner" v-if="!hiddenLabels.includes('repertoryState')">
- <template slot-scope="{row}">
- <span>{{ row.repertoryState }}</span>
- </template>
- </el-table-column>
- <el-table-column label="送达状态" align="center"
- prop="delivery" v-if="!hiddenLabels.includes('delivery')" width='120'>
- <template slot-scope="{row}">
- <span v-if="row.delivery">{{ row.delivery ? '已送达' : '--' }}</span>
- <el-button v-else-if="row.repertoryState=='已出库' && !row.delivery && row.production" type="text" @click="noTaskConfirmDelivery(row.id)">标记送达</el-button>
- <el-tooltip v-else-if="row.repertoryState!='已出库' && !row.delivery && row.production" class="item" effect="light" content="产品未出库无法标记送达" placement="top-start">
- <el-button type="text" @click="noTaskConfirmDelivery(row.id)" disabled>标记送达</el-button>
- </el-tooltip>
- <span v-else>--</span>
- </template>
- </el-table-column>
- <el-table-column label="标记送达日期" align="center" prop="deliveryDate" v-if="!hiddenLabels.includes('deliveryDate')" width='120'>
- <template slot-scope="{row}">
- <span v-if="row.deliveryDate">{{ row.deliveryDate }}</span>
- <span v-else>--</span>
- </template>
- </el-table-column>
- <el-table-column label="客户经理申报提成" align="center"
- prop="created" v-if="!hiddenLabels.includes('mdeclareResult')">
- <template slot-scope="{row}">
- <el-tooltip class="item" effect="light" :content="(row.production || row.mdeclareResult!=null)?'点击跳转申报页面':'未出产品'" placement="top-start">
- <el-button type="text" @click="toCommission(row.productionNo,row.orderId,row.businessId,row.id,row.orderName)" :disabled="!row.production || row.mdeclareResult!=null">{{ row.mdeclareResult==null?'未申报': row.mdeclareResult}}</el-button>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column label="评估人员申报提成" align="center"
- prop="created" v-if="!hiddenLabels.includes('edeclareResult')">
- <template slot-scope="{row}">
- <span>{{ row.edeclareResult==null?'未申报':row.edeclareResult }}</span>
- </template>
- </el-table-column>
- <el-table-column label="下单时间" align="center"
- prop="created" v-if="!hiddenLabels.includes('created')" width='180'>
- <template slot-scope="{row}">
- <span>{{ row.created }}</span>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="250" align="center">
- <template slot-scope="{row}">
- <PermissionButton menu-code="_views_myOrder_detail" class-name="filter-item" type="text" :page-jump="true"
- size="mini"
- :page-query="{ 'couldEdit': false, 'id': row.businessId, 'back': '/major/my/order', 'recall': true, 'couldBack': true, 'orderId': row.orderId,'productionNo':row.productionNo,'production':row.production}" />
- <el-button type="text" size="small" @click="openShouldAmountDialog(row)">应收款</el-button>
- <!-- <el-button type="text" size="small" @click="openAllotProductionDialog(row)">实收款分配</el-button> -->
- <el-button type="text" size="small"
- @click="openFinanceInvoiceDialog(row.orderFundId, row.realAmount, row.clienteleName, row.clienteleSubName, row.productionFundId)">申请开票</el-button>
- <el-button type="text" size="small" @click="productionList(row.businessId)">产品包</el-button>
- <el-button type="text" size="mini" @click="openProductionReturnDialog(row)">申请产品退回</el-button>
- </template>
- </el-table-column>
- </parentTable>
- </y-page-list-layout>
- <el-dialog :visible.sync="shouldAmountDialog" width="35%" center top="35vh" custom-class="doWarehouseClass"
- @closed="cleanData">
- <el-form ref="fund" :model="fund" style="margin-left:40px">
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="12">
- <el-form-item label="应收款金额(元):" prop="shouldAmount" label-width="160px" class="postInfo-container-item"
- :rules="{ required: true, message: '应收款金额不能为空', trigger: 'blur' }">
- <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="fund.shouldAmount" :default="0"
- type="number" style="width:300px" class="filter-item" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="12">
- <el-form-item label="备注:" prop="remark" label-width="160px" class="postInfo-container-item">
- <el-input style="width:300px" type="textarea" v-model="fund.remark"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="12">
- <el-form-item label="提醒:" label-width="160px" class="postInfo-container-item">
- <span style="color: red; font-weight: bold;">若不收款请填0,大于0将进入财务收款预警。</span>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="shouldAmountDialog = false">取 消</el-button>
- <el-button type="primary" @click="saveShouldAmount()">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog :visible.sync="makeInvoiceListDialog" width="90%" center custom-class="doWarehouseClass">
- <el-button type="danger" round @click="openNewInvoiceDialog">新增开票</el-button>
- <div style="margin-top:30px;">
- <el-table :data="invoiceData" stripe :header-row-style="{ color: '#333333', 'font-size': '14px' }" border
- style="width: 100%; margin-top:20px;font-size: 14px;">
- <el-table-column align="center" prop="title" label="发票抬头" width="180">
- </el-table-column>
- <el-table-column align="center" prop="taxNo" label="税号" width="180">
- </el-table-column>
- <el-table-column align="center" prop="type" label="发票类型">
- </el-table-column>
- <el-table-column align="center" prop="state" label="开票状态">
- <template slot-scope="{row}">
- <span :style="stateStyle(row.state)">{{ row.state }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="planAmount" label="计划开票金额">
- </el-table-column>
- <el-table-column align="center" prop="planMakeDate" label="计划开票日期">
- </el-table-column>
- <el-table-column align="center" prop="realAmount" label="实际开票金额">
- </el-table-column>
- <el-table-column align="center" prop="realMakeDate" label="实际开票日期">
- </el-table-column>
- <el-table-column align="center" prop="reason" label="驳回/作废原因">
- </el-table-column>
- <el-table-column align="center" prop="remark" label="备注">
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="200" align="center">
- <template slot-scope="{row}">
- <el-button :disabled="row.state != '审核中'" @click="invoiceDetail(row.id)" type="text"
- size="small">修改</el-button>
- <el-button :disabled="row.state != '已开票'" @click="cancellation(row.id)" type="text"
- size="small">申请作废</el-button>
- <el-button @click="copyInvoice(row)" type="text" size="small">复制</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-dialog>
- <el-dialog :visible.sync="newInvoiceDialog" width="55%" top="10vh" center custom-class="doWarehouseClass"
- @closed="cleanFinanceInvoiceForm">
- <el-form ref="invoice" :model="invoice">
- <el-divider content-position="left">开票信息</el-divider>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="发票抬头:" :rules="{ required: true, message: '发票抬头不能为空', trigger: 'blur' }" prop="title"
- label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="invoice.title" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="发票类型:" :rules="{ required: true, message: '发票类型不能为空', trigger: 'blur' }" prop="type"
- label-width="140px" class="postInfo-container-item">
- <el-select v-model="invoice.type" style="width:100%">
- <el-option label="普票" value="普票"></el-option>
- <el-option label="专票" value="专票"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="税号:" :rules="{ required: true, message: '税号不能为空', trigger: 'blur' }" prop="taxNo"
- label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="invoice.taxNo" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="计划开票日期:" prop="planMakeDate"
- :rules="{ required: true, message: '计划开票日期不能为空', trigger: 'blur' }" label-width="140px"
- class="postInfo-container-item">
- <el-date-picker v-model="invoice.planMakeDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"
- style="width:100%">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="待开金额(元):" prop="planAmount"
- :rules="{ required: true, message: '待开金额不能为空', trigger: 'blur' }" label-width="140px"
- class="postInfo-container-item">
- <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.planAmount"
- type="number" style="width:100%" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="是否收款:" label-width="140px" class="postInfo-container-item">
- <el-radio-group :value="invoice.realPayAmount ? '已收款' : '未收款'">
- <el-radio label="已收款"></el-radio>
- <el-radio label="未收款"></el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="开票项目:" prop="makeItem" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="invoice.makeItem" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="项目数量:" prop="itemQuantity" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="invoice.itemQuantity" class="filter-item" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="计量单位:" prop="itemUnit" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="invoice.itemUnit" class="filter-item" placeholder="个/套/箱/次/斤/公斤/..." />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="6">
- <el-form-item label="备注:" prop="remark" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="invoice.remark" type="textarea" :autosize="{ minRows: 5, maxRows: 8 }"
- class="filter-item" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="newInvoiceDialog = false">取 消</el-button>
- <el-button type="primary" @click="saveInvoice()">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog :visible.sync="outWarehouseListDialog" width="90%" center custom-class="doWarehouseClass">
- <el-button type="danger" round @click="openOutWarehouseDialog()">新增出库申请</el-button>
- <div style="margin-top:30px;">
- <el-table :data="outApllyList" stripe :header-row-style="{ color: '#333333', 'font-size': '14px' }" border
- style="width: 100%; margin-top:20px;font-size: 14px;">
- <el-table-column align="center" prop="realAmount" label="申请时实收款金额(元)" width="180">
- <template slot-scope="{row}">
- <span style="color:red;font-weight:bold">{{ row.realAmount == null ? '0' : row.realAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="applyName" label="申请人">
- <template slot-scope="{row}">
- <span>{{ row.applyName }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="remark" label="申请原因" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.remark == null ? '-' : row.remark }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="created" label="申请日期" width="200">
- <template slot-scope="{row}">
- <span>{{ row.created }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="departmentCheckState" label="部门审核状态">
- <template slot-scope="{row}">
- <span>{{ row.departmentCheckState == null ? '-' : row.departmentCheckState }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="departmentChecker" label="部门审核人">
- <template slot-scope="{row}">
- <span>{{ row.departmentChecker == null ? '-' : row.departmentChecker }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="departmentCheckTime" label="部门审核时间" width="200">
- <template slot-scope="{row}">
- <span>{{ row.departmentCheckTime == null ? '-' : row.departmentCheckTime }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="departmentReply" label="部门审核回复" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.departmentReply == null ? '-' : row.departmentReply }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="financeCheckState" label="财务审核状态">
- <template slot-scope="{row}">
- <span>{{ row.financeCheckState == null ? '-' : row.financeCheckState }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="financeChecker" label="财务审核人">
- <template slot-scope="{row}">
- <span>{{ row.financeChecker == null ? '-' : row.financeChecker }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="financeCheckTime" label="财务审核时间" width="200">
- <template slot-scope="{row}">
- <span>{{ row.financeCheckTime == null ? '-' : row.financeCheckTime }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="financeReply" label="财务审核回复" show-overflow-tooltip>
- <template slot-scope="{row}">
- <span>{{ row.financeReply == null ? '-' : row.financeReply }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column fixed="right" label="操作" width="100" align = "center">
- <template slot-scope="{row}">
- <el-button @click="outApplyCancel(row.id,row.productionId,row.financeCheckState)" type="text" size="small">撤销</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- </el-dialog>
- <el-dialog :visible.sync="outWarehouseDialog" width="35%" center top="35vh" custom-class="doWarehouseClass">
- <el-form ref="outWarehouse" :model="outWarehouse">
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="12">
- <el-form-item prop="remark" class="postInfo-container-item">
- <el-input placeholder="请输入出库原因" type="textarea" v-model="outWarehouse.remark"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="outWarehouseDialog = false">取 消</el-button>
- <el-button type="primary" @click="doApplyOut()">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog :visible.sync="productionListDialog" width="55%" center custom-class="doWarehouseClass">
- <el-collapse v-model="activeName" accordion v-if="bag.productions.length > 0">
- <el-collapse-item v-for="(r, index) in bag.productions" :name="r.productionNo">
- <template slot="title">
- <i class="el-icon-document"></i>
- <span style="font-weight:bold;margin-left:10px;margin-right:10px">{{ aliasProductionType(r.production)
- }}</span>
- {{ r.productionNo }}
- </template>
- <el-card style="margin-top:20px" shadow="hover">
- <div slot="header" class="clearfix">
- <!-- <span style="font-size:16px;font-weight:bold;">{{aliasProductionType(r.production)}}</span> -->
- <span style="margin-left:30px;font-size:16px;font-weight:bold; color:red">实收款金额:{{ r.realAmount != null ?
- r.realAmount : 0 }}¥</span>
- <span style="margin-left:30px;font-size:16px;">应收款金额:{{ r.shouldAmount != null ?
- r.shouldAmount : 0 }}¥</span>
- <el-button style="margin-left:30px;" type="text" size="small"
- @click="openShouldAmountDialog(r)">填写应收款</el-button>
- <!-- <el-button
- v-if="(r.productionNo === reportNo && r.production != 'STATEMENT' && r.repertoryState != null && !r.repertoryState)"
- style="float: right; padding: 3px 0;margin-left:10px" type="text"
- @click="openApplyOutWarehouseList(r)">出库申请</el-button> -->
- <el-button
- v-if="(r.productionNo === reportNo && r.production != 'STATEMENT' && r.repertoryState != null && !r.repertoryState)"
- style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="doApplyOut(r)">出库申请</el-button>
- <el-button v-if="r.productionNo === statementNo && r.production === 'STATEMENT'"
- style="float: right; padding: 3px 0;" type="text" @click="confirmDelivery(r.id)">确认送达</el-button>
- <el-button v-if="r.production != 'STATEMENT' && r.repertoryState"
- style="float: right; padding: 3px 0;" type="text" @click="noTaskConfirmDelivery(r.id)">确认送达</el-button>
- </div>
- <el-form :model="r">
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="12">
- <el-form-item label="项目名称:" prop="name" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.name" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="12">
- <el-form-item label="委托方:" prop="clientName" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.clientName" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="12">
- <el-form-item label="产权人:" prop="owner" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.owner" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="评估总价:" prop="evaluateAmount" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.evaluateAmount / 10000" type="text" class="filter-item" disabled readonly>
- <template slot="append">万元</template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="评估面积:" prop="evaluateAcreage" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.evaluateAcreage" type="text" class="filter-item" disabled readonly>
- <template slot="append">平方</template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="评估单价:" prop="evaluatePrice" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.evaluatePrice / 10000" type="text" class="filter-item" disabled readonly>
- <template slot="append">万元</template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="库存状态:" prop="repertoryState" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.repertoryState == null ? '未入库' : (r.repertoryState ? '已出库' : '已入库')" type="text"
- class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="入库时间:" prop="repertoryInTime" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.repertoryInTime" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="出库时间:" prop="repertoryOutTime" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.repertoryOutTime" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="送达状态:" prop="delivery" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.delivery ? '已送达' : '未送达'" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="归档状态:" prop="ifSaveFile" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.ifSaveFile ? '已归档' : '未归档'" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="8" :span="12">
- <el-form-item label="归档时间:" prop="saveFileDate" label-width="120px" class="postInfo-container-item">
- <el-input :value="r.saveFileDate" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-card>
- </el-collapse-item>
- </el-collapse>
- <el-empty v-else description="暂无产品"></el-empty>
- </el-dialog>
- <el-dialog :visible.sync="allotAmountDialog" width="65%" center custom-class="doWarehouseClass">
- <el-form v-model="orderProduction" ref="orderProduction">
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="6">
- <el-button style="float:right" type="success" @click="allotProduction()">确认分配</el-button>
- </el-col>
- </el-row>
- <el-card style="margin-top:20px" shadow="hover">
- <div slot="header" class="clearfix">
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="订单名称:" prop="orderName" label-width="140px" class="postInfo-container-item">
- <el-input :value="orderProduction.orderName" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="订单号:" prop="orderId" label-width="140px" class="postInfo-container-item">
- <el-input :value="orderProduction.orderId" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="订单已认领金额:" prop="realAmount" label-width="160px"
- :class="['postInfo-container-item', 'real-amount']">
- <el-input :value="orderProduction.realAmount" type="text" class="filter-item" disabled readonly>
- <template slot="append">元</template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="未分配金额:" prop="notAllotAmount" label-width="160px"
- :class="['postInfo-container-item', 'real-amount']">
- <el-input :value="notAllotAmount" type="text" class="filter-item" disabled readonly>
- <template slot="append">元</template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="产品列表:" prop="orderName" label-width="140px" class="postInfo-container-item" />
- </el-col>
- </el-row>
- <div v-if="orderProduction.reports != null && orderProduction.reports.length > 0">
- <el-row v-for="(r, index) in orderProduction.reports">
- <div>
- <el-col :xs="24" :sm="12" :lg="5" :span="6">
- <el-form-item :label="productionLabel + (index + 1) + ':'" prop="productionType" label-width="90px"
- class="postInfo-container-item">
- <el-input :value="r.productionType" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="7" :span="6">
- <el-form-item label="报告号:" prop="businessSubId" label-width="90px" class="postInfo-container-item">
- <el-input :value="r.businessSubId" type="text" class="filter-item" disabled readonly />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6" :span="6">
- <el-form-item label="已分配金额:" prop="claimedAmount" label-width="120px" class="postInfo-container-item">
- <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="r.claimedAmount"
- type="number" style="width:100%" class="filter-item" readonly disabled />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6" :span="6">
- <el-form-item label="本次分配:" prop="thisTimeAmount" label-width="100px" class="postInfo-container-item">
- <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="r.thisTimeAmount"
- type="number" style="width:100%" class="filter-item" />
- </el-form-item>
- </el-col>
- </div>
- </el-row>
- </div>
- <span v-else style="margin-left:140px;color:RGB(153,153,153)">暂无产品</span>
- </el-card>
- </el-form>
- </el-dialog>
- <el-dialog :visible.sync="productionReturnDialog" width="55%" center @closed="resetProductionReturnForm()">
- <el-form ref="productionReturnForm" :model="productionReturnForm" :rules="productionReturnFormRules">
- <el-divider content-position="left">申请产品退回</el-divider>
- <el-row>
- <el-col :xs="24" :sm="24" :lg="24" :span="6">
- <el-form-item label="项目名称:" prop="name" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.name" class="filter-item" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="项目编号:" prop="orderId" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.orderId" class="filter-item" disabled />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="产品编号:" prop="productionNo" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.productionNo" class="filter-item" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="客户名称:" prop="clientName" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.clientName" class="filter-item" disabled />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="业务来源:" prop="clientSubName" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.clientSubName" class="filter-item" disabled />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="委托人:" prop="bailor" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.bailor" class="filter-item" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="退产品原因:" prop="returnReason" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="productionReturnForm.returnReason" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="是否退发票:" prop="returnInvoice" label-width="140px" class="postInfo-container-item">
- <el-select v-model="productionReturnForm.returnInvoice" style="width: 100%">
- <el-option label="不退发票" value="0"></el-option>
- <el-option label="退发票" value="1"></el-option>
- <el-option label="未开发票" value="2"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="productionReturnDialog = false">取 消</el-button>
- <el-button type="primary" @click="saveProductionreturn()">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import YPageListLayout from '@/components/YPageListLayout'
- import Breadcrumb from '@/components/Breadcrumb'
- import MoreSearchBar from '@/components/MoreSearchBar'
- import { getCookie, setCookie, removeCookie } from '@/utils/auth'
- export default {
- name: 'myOrder',
- components: {
- Breadcrumb,
- YPageListLayout,
- MoreSearchBar
- },
- filters: {
- },
- data() {
- return {
- pageData: { records: [] },
- listQuery: {
- page: 1,
- size: 20,
- descs: 'id',
- keyword: null,
- startDate: null,
- endDate: null
- },
- shouldAmountDialog: false,
- makeInvoiceListDialog: false,
- newInvoiceDialog: false,
- outWarehouseDialog: false,
- outWarehouseListDialog: false,
- productionListDialog: false,
- allotAmountDialog: false,
- fund: {
- id: null,
- businessType: null,
- orderName: null,
- orderId: null,
- shouldAmount: null,
- remark: null,
- businessType: null,
- businessId: null,
- businessSubId: null,
- orderFundId: null,
- productionFundId: null,
- evaluateAmount: null,
- orderShouldAmount: null,
- },
- invoiceData: [],
- invoice: {
- id: null,
- orderFundId: null,
- productionFundId: null,
- title: null,
- type: null,
- taxNo: null,
- planAmount: null,
- planMakeDate: null,
- bankName: null,
- bankAccount: null,
- bankAddress: null,
- bankTel: null,
- makeItem: null,
- itemQuantity: null,
- itemUnit: null,
- taxRate: null,
- taxAmount: null,
- remark: null,
- realPayAmount: null,
- realAmount: null,
- realMakeDate: null
- },
- outWarehouse: {
- id: null,
- productionFundId: null,
- remark: null,
- realAmount: null,
- standardAmount: null
- },
- outApllyList: [],
- bag: {
- businessId: null,
- businessType: null,
- reportNo: null,
- productions: []
- },
- activeName: null,
- todoBusinessId: null,
- taskId: null,
- orderProduction: {
- reports: [],
- orderName: null,
- orderId: null,
- realAmount: null,
- id: null
- },
- productionLabel: "产品",
- notAllotAmount: null,
- orderDate: '',
- pickerOptions: {
- shortcuts: [{
- text: '最近一周',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- hiddenLabels: [],
- productionReturnForm: {},
- productionReturnDialog: false,
- productionReturnFormRules: {
- returnReason: [{ required: true, message: '退产品原因不能为空', trigger: 'blur' }],
- returnInvoice: [{ required: true, message: '请选择是否退发票', trigger: 'change' }],
- },
- }
- },
- created() {
- if (getCookie("MajorMineList-hiddenLabels") != undefined) {
- this.hiddenLabels = JSON.parse(getCookie("MajorMineList-hiddenLabels"))
- }
- this.getList();
- this.todoBusinessId = this.$route.query.todoBusinessId;
- this.taskId = this.$route.query.tId;
- this.currentNodeId = this.$route.query.cId;
- this.statementNo = (this.$route.query.sNo==null || this.$route.query.sNo ==='null')?null:this.$route.query.sNo;
- this.reportNo = typeof (this.$route.query.rNo) == undefined ? null : this.$route.query.rNo;
- if (this.todoBusinessId) {
- this.productionListDialog = true;
- this.productionList(this.todoBusinessId, this.reportNo == null ? this.statementNo : this.reportNo)
- this.activeName = this.reportNo == null ? this.statementNo : this.reportNo
- }
- },
- methods: {
- resetSearch() {
- this.$router.push({ query: {} });
- this.orderDate = '';
- this.listQuery = {
- current: 1,
- size: 20,
- descs: 'id',
- }
- this.getList()
- },
- searchList() {
- // 重置分页
- this.listQuery.page = 1;
- this.listQuery.size = 20;
- if (this.orderDate) {
- this.listQuery.startDate = this.orderDate[0] + ' 00:00:00';
- this.listQuery.endDate = this.orderDate[1] + ' 23:59:59';
- }
- this.getList()
- },
- getList() {
- let loadingInstance = this.$loading({ fullscreen: true });
- this.$api.majorProduction.myOrder(Object.assign({}, this.listQuery)).then(res => {
- if (res.code === 200) {
- this.pageData = res.data;
- loadingInstance.close();
- }
- })
- },
- aliasProductionType(code) {
- if (code === 'STATEMENT') {
- return '价值意见书';
- }
- if (code === 'LETTER') {
- return '复评函';
- }
- return '报告';
- },
- openShouldAmountDialog(row) {
- this.shouldAmountDialog = true;
- this.fund.id = row.id;
- this.fund.businessType = 'MAJOR_BUSINESS';
- this.fund.businessId = row.businessId;
- this.fund.orderFundId = row.orderFundId;
- this.fund.shouldAmount = row.shouldAmount;
- this.fund.remark = row.remark;
- this.fund.orderId = row.orderId;
- this.fund.orderName = row.orderName;
- this.fund.productionFundId = row.productionFundId;
- this.fund.productionNo = row.productionNo;
- this.fund.productionType = row.production;
- this.fund.evaluateAmount = row.evaluateAmount;
- },
- saveShouldAmount() {
- this.$refs.fund.validate(valid => {
- if (valid) {
- //设置订单应收款
- if (!this.fund.id) {
- this.fund.id = this.fund.orderFundId;
- if (this.fund.id) {
- this.$api.orderFund.edit(this.fund).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '订单应收款已完善',
- type: 'success',
- duration: 1000
- });
- this.getList();
- this.shouldAmountDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '订单应收款保存错误',
- type: 'error',
- duration: 1000
- });
- }
- })
- } else {
- this.$api.orderFund.add(this.fund).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '订单应收款已完善',
- type: 'success',
- duration: 1000
- });
- this.getList();
- this.shouldAmountDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '订单应收款保存错误',
- type: 'error',
- duration: 1000
- });
- }
- })
- }
- } else {
- //设置产品应收款
- console.log(this.fund)
- if (this.fund.shouldAmount==0 && this.fund.productionType != 'STATEMENT'){
- this.$notify({
- title: '失败',
- message: '非意见书必须设置应收款金额',
- type: 'error',
- duration: 2000
- });
- return;
- }
- this.fund.productionShouldAmount = this.fund.shouldAmount;
- this.fund.id = this.fund.productionFundId;
- if (this.fund.id) {
- this.$api.productionFund.edit(this.fund).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '应收款已保存',
- type: 'success',
- duration: 1000
- });
- this.getList();
- this.shouldAmountDialog = false;
- if (this.productionListDialog){
- this.productionList(this.todoBusinessId, this.reportNo == null ? this.statementNo : this.reportNo)
- }
- } else {
- this.$notify({
- title: '失败',
- message: '应收款保存错误',
- type: 'error',
- duration: 1000
- });
- }
- })
- } else {
- this.$api.productionFund.add(this.fund).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '应收款已保存',
- type: 'success',
- duration: 1000
- });
- this.getList();
- this.shouldAmountDialog = false;
- if (this.productionListDialog){
- this.productionList(this.todoBusinessId, this.reportNo == null ? this.statementNo : this.reportNo)
- } } else {
- this.$notify({
- title: '失败',
- message: '应收款保存错误',
- type: 'error',
- duration: 1000
- });
- }
- })
- }
- }
- }
- })
- },
- cleanData() {
- this.fund.shouldAmount = null;
- this.fund.id = null;
- this.fund.businessType = null;
- this.fund.remark = null;
- this.fund.businessType = null;
- this.fund.businessId = null;
- this.fund.businessSubId = null;
- this.fund.productionFundId = null;
- this.fund.remark = null;
- this.fund.evaluateAmount = null
- },
- getFinanceInvoiceList() {
- this.$api.financeInvoice.getList(this.invoice.orderFundId, this.invoice.productionFundId).then(res => {
- if (res.code === 200) {
- this.invoiceData = res.data
- }
- })
- },
- openFinanceInvoiceDialog(orderFundId, realAmount, clientName, clientSubName, productionFundId) {
- if (!orderFundId) {
- this.$notify({
- title: '提示',
- message: '请先完善应收款,再操作。',
- type: 'info',
- duration: 2000
- });
- return;
- }
- this.makeInvoiceListDialog = true;
- if (orderFundId) {
- this.invoice.orderFundId = orderFundId;
- this.invoice.realPayAmount = realAmount;
- this.invoice.productionFundId = productionFundId;
- this.invoice.title = clientName + clientSubName;
- this.getFinanceInvoiceList();
- }
- },
- openNewInvoiceDialog() {
- if (!this.invoice.orderFundId) {
- this.$notify({
- title: '提示',
- message: '申请开票前,请先完善应收款金额。',
- type: 'info',
- duration: 2000
- });
- return;
- } else {
- this.newInvoiceDialog = true;
- }
- },
- saveInvoice() {
- this.$refs.invoice.validate(valid => {
- if (valid) {
- if (this.invoice.id) {
- this.$api.financeInvoice.edit(this.invoice).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '开票申请修改成功',
- type: 'success',
- duration: 2000
- });
- this.getFinanceInvoiceList();
- this.newInvoiceDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '开票申请修改失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- } else {
- this.$api.financeInvoice.add(this.invoice).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '开票申请提交成功',
- type: 'success',
- duration: 2000
- });
- this.getFinanceInvoiceList();
- this.newInvoiceDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '开票申请提交失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- }
- }
- })
- },
- cleanFinanceInvoiceForm() {
- // this.$refs.invoice.resetFields();
- this.invoice = {
- id: null,
- orderFundId: this.invoice.orderFundId,
- productionFundId: this.invoice.productionFundId,
- title: null,
- type: null,
- taxNo: null,
- planAmount: null,
- planMakeDate: null,
- bankName: null,
- bankAccount: null,
- bankAddress: null,
- bankTel: null,
- makeItem: null,
- itemQuantity: null,
- itemUnit: null,
- taxRate: null,
- taxAmount: null,
- remark: null
- }
- },
- invoiceDetail(id) {
- this.$api.financeInvoice.detail(id).then(res => {
- if (res.code === 200) {
- this.invoice = res.data;
- }
- })
- this.newInvoiceDialog = true;
- },
- cancellation(id) {
- const h = this.$createElement
- this.$prompt(
- h('p', null, [h('span', { style: 'color: red' }, '请输入作废原因:')]), '开票作废', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'error',
- inputValidator: (value) => {
- if (!value) {
- return '作废原因不能为空'
- }
- },
- }).then(({ value }) => {
- this.invoice.reason = value;
- this.invoice.id = id;
- this.$api.financeInvoice.cancellation(this.invoice).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '作废申请已提交',
- type: 'success',
- duration: 2000
- });
- this.getFinanceInvoiceList();
- } else {
- this.$notify({
- title: '失败',
- message: '作废提交失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- })
- },
- openApplyOutWarehouseList(row) {
- console.log(row)
- if (row.shouldAmount) {
- this.getListByBizTypeProductionId('MAJOR_BUSINESS', row.id);
- this.outWarehouseListDialog = true;
- this.outWarehouse.productionFundId = row.productionFundId;
- this.outWarehouse.realAmount = row.realAmount
- this.outWarehouse.ifProductionFund = row.realAmount != null
- this.outWarehouse.id = row.id;
- this.outWarehouse.businessType = 'MAJOR_BUSINESS';
- this.outWarehouse.standardAmount = row.standardAmount;
- } else {
- this.$notify({
- title: '失败',
- message: '请先填写应收款',
- type: 'error',
- duration: 2000
- });
- }
- },
- openOutWarehouseDialog() {
- if (this.outApllyList.length > 0) {
- const applys = this.outApllyList;
- for (let i in applys) {
- if (applys[i].departmentCheckState == null && applys[i].financeCheckState == null) {
- this.$notify({
- title: '提示',
- message: '存在待审核的申请,请勿重复申请。',
- type: 'info',
- duration: 2000
- });
- return;
- }
- }
- this.outWarehouseDialog = true;
- } else {
- this.outWarehouseDialog = true
- }
- },
- getApplyOutList(productionFundId) {
- this.$api.productionOutWarehouse.getList(productionFundId).then(res => {
- if (res.code === 200) {
- this.outApllyList = res.data;
- }
- })
- },
- getListByBizTypeProductionId(businessType, productionId) {
- this.$api.productionOutWarehouse.getListByBizTypeProductionId(businessType, productionId).then(res => {
- if (res.code === 200) {
- this.outApllyList = res.data;
- }
- })
- },
- doApplyOut(row) {
- if (row.shouldAmount!=null) {
- this.getListByBizTypeProductionId('MAJOR_BUSINESS', row.id);
- if (this.outApllyList.length > 0) {
- const applys = this.outApllyList;
- for (let i in applys) {
- if (applys[i].departmentCheckState == null && applys[i].financeCheckState == null) {
- this.$notify({
- title: '提示',
- message: '存在待审核的申请,请勿重复申请。',
- type: 'info',
- duration: 2000
- });
- return;
- }
- }
- } else {
- this.outWarehouse.productionFundId = row.productionFundId;
- this.outWarehouse.realAmount = row.realAmount
- this.outWarehouse.ifProductionFund = row.realAmount != null
- this.outWarehouse.id = row.id;
- this.outWarehouse.businessType = 'MAJOR_BUSINESS';
- this.outWarehouse.standardAmount = row.standardAmount;
- let taskRecordDTO = new Object();
- taskRecordDTO.recordId = this.taskId;
- taskRecordDTO.taskData = this.outWarehouse;
- this.$api.productionOutWarehouse.add(taskRecordDTO).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '出库申请已提交',
- type: 'success',
- duration: 2000
- });
- this.commitNode();
- this.outWarehouseDialog = false;
- this.outWarehouseListDialog = false;
- this.productionListDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '出库申请提交失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- }
- } else {
- this.$notify({
- title: '失败',
- message: '请先填写应收款',
- type: 'error',
- duration: 2000
- });
- }
- },
- outApplyCancel(id, productionId, state) {
- this.$confirm('请确认是否撤销此出库申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- center: true
- }).then(() => {
- if (state === '审核通过') {
- this.$notify({
- title: '提示',
- message: '出库申请已通过,无法撤销。',
- type: 'info',
- duration: 2000
- });
- return;
- }
- if (id) {
- this.$api.productionOutWarehouse.cancel(id).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '申请已撤销',
- type: 'success',
- duration: 2000
- });
- this.getListByBizTypeProductionId('MAJOR_BUSINESS', productionId);
- }
- })
- }
- })
- },
- productionList(id) {
- this.productionListDialog = true;
- this.bag.businessId = id;
- if (id) {
- this.$api.businessProduction.bag(id).then(res => {
- if (res.code === 200) {
- this.bag = res.data;
- }
- })
- }
- },
- aliasProductionType(code) {
- let name = '价值意见书';
- if (code === 'REPORT') {
- name = '报告';
- }
- if (code === 'LETTER') {
- name = '复评函';
- }
- return name;
- },
- noTaskConfirmDelivery(id) {
- this.$confirm('确认执行产品送达操作?', '提示', {
- confirmButtonText: '确认送达',
- cancelButtonText: '取消',
- type: 'warning',
- center: true
- }).then(() => {
- this.$api.majorProduction.noTaskConfirmDelivery(id).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '产品送达状态修改成功',
- type: 'success',
- duration: 2000
- });
- this.productionListDialog = false;
- this.getList();
- } else {
- this.$notify({
- title: '失败',
- message: '产品送达状态修改失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- })
- },
- confirmDelivery(id) {
- this.$confirm('确认执行产品送达操作?', '提示', {
- confirmButtonText: '确认送达',
- cancelButtonText: '取消',
- type: 'warning',
- center: true
- }).then(() => {
- let taskRecordDTO = new Object();
- taskRecordDTO.recordId = this.taskId;
- taskRecordDTO.taskData = id;
- this.$api.majorProduction.confirmDelivery(taskRecordDTO).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '产品送达状态修改成功',
- type: 'success',
- duration: 2000
- });
- this.productionListDialog = false;
- this.commitNode();
- } else {
- this.$notify({
- title: '失败',
- message: '产品送达状态修改失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- })
- },
- commitNode() {
- let commit = new Object;
- commit.instanceNodeId = this.currentNodeId;
- commit.state = 'PASS';
- commit.comments = this.outWarehouse.remark;
- commit.businessMinId = this.reportNo;
- commit.businessSubId = this.statementNo;
- commit.ifProductionFund = this.outWarehouse.ifProductionFund;
- this.$api.workflow.commit(commit).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '工作流节点提交成功。',
- type: 'success',
- duration: 2000
- });
- } else {
- this.$notify({
- title: '失败',
- message: '工作流节点提交失败,请联系管理员。',
- type: 'error',
- duration: 2000
- });
- }
- })
- },
- openAllotProductionDialog(row) {
- if (!row.orderFundId) {
- this.$notify({
- title: '提示',
- message: '该订单还没有认领实收款,请先认领实收款后再分配给产品。',
- type: 'info',
- duration: 3000
- });
- return;
- }
- this.getProductionList(row.orderFundId);
- this.orderProduction.orderId = row.orderId;
- this.orderProduction.orderName = row.orderName;
- this.orderProduction.realAmount = row.realAmount;
- this.orderProduction.orderFundId = row.orderFundId;
- },
- getProductionList(orderFundId) {
- if (orderFundId) {
- this.$api.businessProduction.getProductionByOrderFundId(orderFundId).then(res => {
- if (res.code === 200) {
- this.orderProduction.reports = res.data;
- let allotAmount = res.data.map(item => item.claimedAmount).reduce(function (prev, cur) {
- return prev + cur;
- }, 0);
- this.notAllotAmount = this.orderProduction.realAmount - allotAmount;
- this.allotAmountDialog = true;
- }
- })
- }
- },
- allotProduction() {
- this.$api.businessProduction.allotMajorProduction(this.orderProduction).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '实收款分配成功',
- type: 'success',
- duration: 2000
- });
- this.allotAmountDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '实收款分配失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- },
- fliterSearch(params) {
- let loadingInstance = this.$loading({ fullscreen: true });
- this.$api.majorProduction.myOrder(Object.assign({}, params)).then(res => {
- if (res.code === 200) {
- this.pageData = res.data;
- loadingInstance.close();
- }
- })
- },
- searchList() {
- // 重置分页
- this.listQuery.page = 1
- this.listQuery.size = 20
- this.getList()
- },
- resetParams() {
- this.$router.push({ query: {} });
- this.listQuery = {
- current: 1,
- size: 20,
- descs: 'created',
- }
- this.getList();
- },
- stateStyle(state) {
- if (state === '已开票') {
- return 'color:green'
- } else {
- return 'color:red'
- }
- },
- copyInvoice(row) {
- this.invoice = row;
- this.invoice.id = null;
- this.invoice.state = null;
- this.invoice.reason = null;
- this.invoice.created = null;
- this.invoice.modified = null;
- this.invoice.ticketNo = null;
- this.invoice.realMakeDate = null;
- this.invoice.realAmount = null;
- this.newInvoiceDialog = true;
- },
- // 大中型我的订单导出
- exportMyOrder() {
- this.$utils.exportUtil(
- "/majorProduction/exportMyOrder", this.listQuery,
- "导出"
- );
- },
- switchHeader(data) {
- this.hiddenLabels.push(data);
- setCookie("MajorMineList-hiddenLabels", this.hiddenLabels);
- },
- showAllLabel() {
- removeCookie("MajorMineList-hiddenLabels");
- location.reload();
- },
- toCommission(productionNo,orderId,businessId,productionId,orderName){
- this.$router.push(`/income/major/declare/market?productionNo=${productionNo}&orderId=${orderId}&businessId=${businessId}&productionId=${productionId}&orderName=${orderName}`)
- },
- openProductionReturnDialog(row) {
- // 判断产品是否已经出库了
- if (row.delivery) {
- // 赋值基础信息
- this.productionReturnForm.businessType = 'MAJOR_BUSINESS';
- this.productionReturnForm.businessId = row.businessId;
- this.productionReturnForm.productionId = row.id;
- this.productionReturnForm.name = row.orderName;
- this.productionReturnForm.orderId = row.orderId;
- this.productionReturnForm.productionNo = row.productionNo;
- this.productionReturnForm.productionType = row.production;
- this.productionReturnForm.clientName = row.clienteleName;
- this.productionReturnForm.clientSubName = row.clienteleSubName;
- this.productionReturnForm.bailor = row.bailor;
- // 打开dialog
- this.productionReturnDialog = true;
- } else {
- this.$notify({
- title: '警告',
- message: '产品未标记送达,无法发起产品退回流程!',
- type: 'warning',
- duration: 2000,
- });
- }
- },
- // 发起产品退回流程
- saveProductionreturn() {
- this.$refs.productionReturnForm.validate((valid) => {
- if (valid) {
- this.$api.productionReturn.save(this.productionReturnForm).then((res) => {
- if (res.code === 200) {
- this.$notify({
- title: '成功',
- message: '产品退回申请流程已发起!',
- type: 'success',
- duration: 2000,
- });
- this.productionReturnDialog = false;
- }
- });
- }
- });
- },
- // 重置表单
- resetProductionReturnForm() {
- this.$refs.productionReturnForm.resetFields();
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- /deep/.doWarehouseClass {
- border-radius: 10px;
- }
- .real-amount {
- /deep/ .el-form-item__label {
- color: red;
- font-weight: bold
- }
- }
- </style>
|