|
|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-dialog title="指示" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose">
|
|
|
- <el-tag type="success" style="margin-right: 10px;">剩余出纳收费(RMB){{ Number(form.amountDr - form.actualAmountDr).toFixed(2) }}</el-tag>
|
|
|
- <el-tag type="info" style="margin-right: 10px;">剩余出纳收费(USD){{ Number(form.amountDrUsd - form.actualAmountDrUsd).toFixed(2) }}</el-tag>
|
|
|
- <el-tag type="warning" style="margin-right: 10px;">剩余出纳付费(RMB){{ Number(form.amountCr - form.actualAmountCr).toFixed(2) }}</el-tag>
|
|
|
- <el-tag type="danger">剩余出纳付费(USD){{ Number(form.amountCrUsd - form.actualAmountCrUsd).toFixed(2) }}</el-tag>
|
|
|
+ <el-tag type="success" style="margin-right: 10px;">剩余收费(RMB){{ Number(form.amountDr - form.actualAmountDr).toFixed(2) }}</el-tag>
|
|
|
+ <el-tag type="info" style="margin-right: 10px;">剩余收费(USD){{ Number(form.amountDrUsd - form.actualAmountDrUsd).toFixed(2) }}</el-tag>
|
|
|
+ <el-tag type="warning" style="margin-right: 10px;">剩余付费(RMB){{ Number(form.amountCr - form.actualAmountCr).toFixed(2) }}</el-tag>
|
|
|
+ <el-tag type="danger">剩余付费(USD){{ Number(form.amountCrUsd - form.actualAmountCrUsd).toFixed(2) }}</el-tag>
|
|
|
<avue-crud
|
|
|
v-if="dialogVisible"
|
|
|
:option="option"
|
|
|
@@ -16,11 +16,22 @@
|
|
|
@on-load="onLoad"
|
|
|
>
|
|
|
<template slot="indexHeader" slot-scope="{ row }">
|
|
|
- <el-button type="primary" size="small" icon="el-icon-plus" circle @click="addRow" :disabled="form.cashierStatus == 2||disabled"></el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ circle
|
|
|
+ @click="addRow"
|
|
|
+ :disabled="form.cashierStatus == 2 || disabled"
|
|
|
+ ></el-button>
|
|
|
</template>
|
|
|
<template slot="index" slot-scope="{ row, index }">
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
+ <template slot="status" slot-scope="{ row }">
|
|
|
+ <span v-if="row.status == 0">{{ row.dc == "D" ? "未收款" : "未支付" }}</span>
|
|
|
+ <span v-if="row.status == 1">{{ row.dc == "D" ? "已收款" : "已支付" }}</span>
|
|
|
+ </template>
|
|
|
<template slot="curCode" slot-scope="{ row }">
|
|
|
<dic-select
|
|
|
v-if="row.$cellEdit"
|
|
|
@@ -62,13 +73,7 @@
|
|
|
<el-select v-if="row.$cellEdit" v-model="row.dc" placeholder="请选择" size="small" @change="dcChange(row)">
|
|
|
<el-option v-for="item in dcOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
</el-select>
|
|
|
- <span v-else>{{ row.dc == "D" ? "收" : "付" }}</span>>
|
|
|
- </template>
|
|
|
- <template slot="isTax" slot-scope="{ row }">
|
|
|
- <el-select v-if="row.$cellEdit" v-model="row.isTax" placeholder="请选择" size="small" @change="isTaxChange(row)">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
- </el-select>
|
|
|
- <span v-else>{{ row.isTax == 1 ? "含税" : "不含税" }}</span>
|
|
|
+ <span v-else>{{ row.dc == "D" ? "收" : "付" }}</span>
|
|
|
</template>
|
|
|
<template slot="taxRate" slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
@@ -80,19 +85,24 @@
|
|
|
size="small"
|
|
|
:controls="false"
|
|
|
:min="0"
|
|
|
- :disabled="row.isTax == 0"
|
|
|
></el-input-number>
|
|
|
<span v-else>{{ row.taxRate }}</span>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button type="text" size="small" @click="rowEdit(row)" :disabled="row.status == 1||disabled">{{ row.$cellEdit ? "保存" : "编辑" }}</el-button>
|
|
|
- <el-button type="text" size="small" @click="rowDel(row, index)" :disabled="row.status == 1||disabled">删除</el-button>
|
|
|
+ <el-button type="text" size="small" @click="rowEdit(row)" :disabled="row.status == 1 || disabled">{{
|
|
|
+ row.$cellEdit ? "保存" : "编辑"
|
|
|
+ }}</el-button>
|
|
|
+ <el-button type="text" size="small" @click="rowDel(row, index)" :disabled="row.status == 1 || disabled">删除</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false" size="mini">取 消</el-button>
|
|
|
- <el-button v-if="form.cashierStatus == 0" size="mini" type="success" @click="allClick('申请出纳')" :disabled="disabled">申请出纳</el-button>
|
|
|
- <el-button v-if="form.cashierStatus == 1" size="mini" type="danger" @click="allClick('撤销申请出纳')" :disabled="disabled">撤销申请出纳</el-button>
|
|
|
+ <el-button v-if="form.cashierStatus == 0" size="mini" type="success" @click="allClick('申请出纳')" :disabled="disabled"
|
|
|
+ >{{ form.dc == "D" ? "收费" : "付费" }}申请</el-button
|
|
|
+ >
|
|
|
+ <el-button v-if="form.cashierStatus == 1" size="mini" type="danger" @click="allClick('撤销申请出纳')" :disabled="disabled"
|
|
|
+ >撤销{{ form.dc == "D" ? "收费" : "付费" }}申请</el-button
|
|
|
+ >
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -160,24 +170,13 @@ export default {
|
|
|
{
|
|
|
label: "状态",
|
|
|
prop: "status",
|
|
|
- width: "100",
|
|
|
- type: "select",
|
|
|
- dicData: [
|
|
|
- {
|
|
|
- label: "未出纳",
|
|
|
- value: "0"
|
|
|
- },
|
|
|
- {
|
|
|
- label: "已出纳",
|
|
|
- value: "1"
|
|
|
- }
|
|
|
- ],
|
|
|
+ width: "60",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "收/付",
|
|
|
prop: "dc",
|
|
|
- width: "100",
|
|
|
+ width: "90",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
@@ -189,7 +188,7 @@ export default {
|
|
|
{
|
|
|
label: "汇率",
|
|
|
prop: "exrate",
|
|
|
- width: "100",
|
|
|
+ width: "70",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
@@ -205,27 +204,21 @@ export default {
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "是否含税",
|
|
|
- prop: "isTax",
|
|
|
- width: "100",
|
|
|
+ label: "税率(%)",
|
|
|
+ prop: "taxRate",
|
|
|
+ width: "80",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "税率",
|
|
|
- prop: "taxRate",
|
|
|
+ label: "净额",
|
|
|
+ prop: "amountNet",
|
|
|
width: "100",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "税额",
|
|
|
prop: "amountTax",
|
|
|
- width: "100",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "净额",
|
|
|
- prop: "amountNet",
|
|
|
- width: "100",
|
|
|
+ width: "80",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
@@ -297,9 +290,9 @@ export default {
|
|
|
type: "success",
|
|
|
message: "保存成功!"
|
|
|
});
|
|
|
-
|
|
|
- for (let [key, value] of Object.entries(res.data.data)) {
|
|
|
- this.$set(row, key,value);
|
|
|
+
|
|
|
+ for (let [key, value] of Object.entries(res.data.data)) {
|
|
|
+ this.$set(row, key, value);
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
@@ -313,7 +306,7 @@ export default {
|
|
|
return this.$message.error("请保存数据");
|
|
|
}
|
|
|
}
|
|
|
- this.$confirm("是否申请出纳?", "提示", {
|
|
|
+ this.$confirm("是否申请"+(this.form.dc=="D"?"收费?":"付费?"), "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
@@ -336,10 +329,10 @@ export default {
|
|
|
if (name == "撤销申请出纳") {
|
|
|
for (let item of this.data) {
|
|
|
if (item.status == 1) {
|
|
|
- return this.$message.error("数据已出纳,不允许撤销申请出纳");
|
|
|
+ return this.$message.error("数据已"+(this.form.dc=="D"?"收款":"支付")+",不允许撤销申请"+(this.form.dc=="D"?"收费":"付费"));
|
|
|
}
|
|
|
}
|
|
|
- this.$confirm("是否撤销申请出纳?", "提示", {
|
|
|
+ this.$confirm("是否撤销申请"+(this.form.dc=="D"?"收费?":"付费?"), "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
@@ -384,10 +377,6 @@ export default {
|
|
|
row.amountTax = Number(Number(row.amountLoc ? row.amountLoc : 0) * Number(row.taxRate ? row.taxRate / 100 : 0)).toFixed(2);
|
|
|
row.amountNet = Number(Number(row.amountLoc ? row.amountLoc : 0) - Number(row.amountTax ? row.amountTax : 0)).toFixed(2);
|
|
|
},
|
|
|
- isTaxChange(row) {
|
|
|
- row.taxRate = 0;
|
|
|
- this.calculateChange(row);
|
|
|
- },
|
|
|
dcChange(row) {
|
|
|
if (row.dc == "D" && row.curCode == "CNY") {
|
|
|
row.amount = Number(this.form.amountDr - this.form.actualAmountDr).toFixed(2);
|
|
|
@@ -415,7 +404,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
addRow() {
|
|
|
- this.data.push({ $cellEdit: true, isTax: 1, srcId: this.form.id, dc: "D" });
|
|
|
+ this.data.push({ $cellEdit: true, srcId: this.form.id, dc: this.form.dc, taxRate: 0 });
|
|
|
},
|
|
|
openDialog(row) {
|
|
|
this.dialogVisible = true;
|