Browse Source

1.资产业务列表查询渲染修改
2.资产订单开票相关业务页面开发

GouGengquan 1 năm trước cách đây
mục cha
commit
31b2124803

+ 1 - 1
src/views/assets/TerminateList.vue

@@ -34,7 +34,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="300">
                     <template slot-scope="{row}">
-                        <span>{{ row.name }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="业务类型" align="center" width="150">

+ 1 - 1
src/views/assets/allList.vue

@@ -54,7 +54,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.name }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="业务类型" align="center" width="150">

+ 1 - 1
src/views/assets/archivedList.vue

@@ -54,7 +54,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="150">
                     <template slot-scope="{row}">
-                        <span>{{ row.name }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="业务类型" align="center" width="150">

+ 1 - 1
src/views/assets/doneList.vue

@@ -27,7 +27,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="300">
                     <template slot-scope="{row}">
-                        <span>{{ row.assetsName }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="意见书号" align="center" width="250">

+ 301 - 4
src/views/assets/myOrderList.vue

@@ -48,7 +48,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.name }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="业务类型" align="center" width="150">
@@ -171,6 +171,8 @@
                                 @click="openAllotProductionDialog(row)">
                                 实收款分配
                             </el-button>
+                            <el-button type="primary" size="mini"
+                                @click="openFinanceInvoiceDialog(row.orderFundId)">申请开票</el-button>
                             <!-- <el-button v-if="row.currentNodeCode === 'REPORT_OUT_APPLY'" type="text"
                             @click="canceladdRepertoryOutWarehouse(row)">
                             撤销出库申请 
@@ -253,7 +255,8 @@
             <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="allotOrderRealAmountToProduction()">确认分配</el-button>
+                        <el-button style="float:right" type="success"
+                            @click="allotOrderRealAmountToProduction()">确认分配</el-button>
                     </el-col>
                 </el-row>
                 <el-card style="margin-top:20px" shadow="hover">
@@ -340,6 +343,155 @@
                 </el-card>
             </el-form>
         </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 style="width: 100%">
+                    <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="开票状态">
+                    </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 @click="invoiceDetail(row.id)" type="text" size="small">修改</el-button>
+                            <el-button @click="cancellation(row.id)" type="text" size="small">作废</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-dialog>
+        <el-dialog :visible.sync="newInvoiceDialog" width="75%" 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="6" :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="6" :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:206px">
+                                <el-option label="普票" value="普票"></el-option>
+                                <el-option label="专票" value="专票"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :xs="24" :sm="12" :lg="6" :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:206px" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :xs="24" :sm="12" :lg="6" :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="6" :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="选择日期"
+                                style="width:206px">
+                            </el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-divider content-position="left">银行信息</el-divider>
+                <el-row>
+                    <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                        <el-form-item label="开户行:" prop="bankName" label-width="140px" class="postInfo-container-item">
+                            <el-input v-model.trim="invoice.bankName" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                        <el-form-item label="银行账号:" prop="bankAccount" label-width="140px" class="postInfo-container-item">
+                            <el-input v-model.trim="invoice.bankAccount" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                        <el-form-item label="地址:" prop="bankAddress" label-width="140px" class="postInfo-container-item">
+                            <el-input v-model.trim="invoice.bankAddress" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                        <el-form-item label="电话:" prop="bankTel" label-width="140px" class="postInfo-container-item">
+                            <el-input v-model.trim="invoice.bankTel" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-divider content-position="left">发票信息</el-divider>
+                <el-row>
+                    <el-col :xs="24" :sm="12" :lg="6" :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="6" :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-col :xs="24" :sm="12" :lg="6" :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="6" :span="6">
+                        <el-form-item label="税点:" prop="taxRate" label-width="140px" class="postInfo-container-item">
+                            <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.taxRate"
+                                type="number" style="width:206px" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                        <el-form-item label="税额:" prop="taxAmount" label-width="140px" class="postInfo-container-item">
+                            <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.taxAmount"
+                                type="number" style="width:206px" class="filter-item" />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :xs="24" :sm="12" :lg="18" :span="6">
+                        <el-form-item label="备注:" prop="remark" label-width="140px" class="postInfo-container-item">
+                            <el-input v-model.trim="invoice.remark" type="textarea" 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>
     </div>
 </template>
 
@@ -439,7 +591,29 @@ export default {
                 orderId: null,
                 realAmount: null,
                 id: null
-            }
+            },
+            invoiceData: [],
+            invoice: {
+                id: null,
+                orderFundId: 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
+            },
+            makeInvoiceListDialog: false,
+            newInvoiceDialog: false
         }
     },
     created() {
@@ -830,7 +1004,7 @@ export default {
                 }
             })
         },
-        editOrder(row){
+        editOrder(row) {
             this.$router.push({
                 path: "/assets/editOrder",
                 query: {
@@ -841,6 +1015,129 @@ export default {
                     disabledStatus: false
                 }
             })
+        },
+        openFinanceInvoiceDialog(orderFundId) {
+            if (!orderFundId) {
+                this.$notify({
+                    title: '提示',
+                    message: '请先完善应收款,再操作。',
+                    type: 'info',
+                    duration: 2000
+                });
+                return;
+            }
+            this.makeInvoiceListDialog = true;
+            if (orderFundId) {
+                this.invoice.orderFundId = orderFundId;
+                this.getFinanceInvoiceList();
+            }
+        },
+        getFinanceInvoiceList() {
+            this.$api.financeInvoice.getList(this.invoice.orderFundId).then(res => {
+                if (res.code === 200) {
+                    this.invoiceData = res.data
+                }
+            })
+        },
+        openNewInvoiceDialog() {
+            this.invoice.id = null;
+            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
+                                });
+                            }
+                        })
+                    }
+                }
+            })
+        },
+        invoiceDetail(id) {
+            this.$api.financeInvoice.detail(id).then(res => {
+                if (res.code === 200) {
+                    this.invoice = res.data;
+                }
+            })
+            this.newInvoiceDialog = true;
+        },
+        cancellation(id) {
+            this.$confirm('请确认是否作废此开票?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning',
+                center: true
+            }).then(() => {
+                this.$api.financeInvoice.cancellation(id).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
+                        });
+                    }
+                })
+            })
+        },
+        cleanFinanceInvoiceForm() {
+            
         }
     }
 }

+ 1 - 0
src/views/assets/orderDetail.vue

@@ -2861,6 +2861,7 @@ export default {
       // aProListSelectDTO.reportNo = this.pageParams.row.reportNo;
       // if (this.currentNode.nodeCode == 'WRITE_REPORT' && this.assetsEvaluationTarget[0].statementNo !== null) {
       // aProListSelectDTO.reportNo = this.assetsEvaluationTarget[0].reportNo;
+      //获取评估对象中取的号
       aProListSelectDTO.reportNos = this.assetsEvaluationTarget.filter(obj => obj.reportNo !== null && obj.reportNo !== '').map(obj => obj.reportNo);
       // }
       this.$api.assets.getProductionList(aProListSelectDTO).then(res => {

+ 1 - 1
src/views/assets/repertoryList.vue

@@ -32,7 +32,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="300">
                     <template slot-scope="{row}">
-                        <span>{{ row.orderName }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="报告号" align="center" width="250">

+ 1 - 1
src/views/assets/todoList.vue

@@ -54,7 +54,7 @@
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.name }}</span>
+                        <span>{{ row.reportName || row.statementName || row.name }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="业务类型" align="center" width="150">