|
|
@@ -18,9 +18,10 @@
|
|
|
<el-table-column type="index" width="40" style="text-align: center"> </el-table-column>
|
|
|
<el-table-column prop="descr" label="摘要" width="auto" style="padding: 0">
|
|
|
<template slot-scope="{ row }">
|
|
|
+<!-- type="textarea"-->
|
|
|
<el-input
|
|
|
style="width: 100%"
|
|
|
- type="textarea"
|
|
|
+ type="text"
|
|
|
v-model="row.descr"
|
|
|
size="small"
|
|
|
autocomplete="off"
|
|
|
@@ -31,9 +32,11 @@
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="accountCode" label="科目代码" width="400px">
|
|
|
+ <el-table-column prop="accountCode" label="科目代码" width="360px">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <div style="display: flex; align-items: center; justify-content: space-between">
|
|
|
+ <div
|
|
|
+ style="display: flex; align-items: center; justify-content: space-between"
|
|
|
+ >
|
|
|
<search-query
|
|
|
style="width: 100%"
|
|
|
:datalist="accountData"
|
|
|
@@ -50,9 +53,12 @@
|
|
|
@corpChange="corpChange($event, 'accountId', row)"
|
|
|
>
|
|
|
</search-query>
|
|
|
- <el-tooltip v-if="!disabled" class="item" effect="dark" content="修改" placement="top">
|
|
|
+ <el-tooltip v-if="!disabled &&(row.isEmpl===1 || row.isCorp === 1 || row.isDept === 1 || row.isItem === 1)" class="item" effect="dark" content="核算项目" placement="top">
|
|
|
<el-button size="mini" type="primary" icon="el-icon-edit" circle @click="auxiliaryAccountingfun(row)" :disabled="disabled"></el-button>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip v-if="!disabled && row.isDc === 1" class="item" effect="dark" content="预收/预付核销" placement="top">
|
|
|
+ <el-button size="mini" type="primary" icon="el-icon-scissors" circle @click="showOffRecordsfun(row)" :disabled="disabled"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
<!-- _【职员】 _【部门】 _【客户】-->
|
|
|
@@ -60,7 +66,8 @@
|
|
|
(row.accountCnName ? row.accountCnName : " ") +
|
|
|
(row.isEmpl === 1 && row.emplName ? "/" + row.emplName : "") +
|
|
|
(row.isDept === 1 && row.deptName ? "/" + row.deptName : "") +
|
|
|
- (row.isCorp === 1 && row.corpShortName ? "/" + row.corpShortName : "")
|
|
|
+ (row.isCorp === 1 && row.corpShortName ? "/" + row.corpShortName : "") +
|
|
|
+ (row.isItem === 1 ? "/" + row.itemClassify + "-" + (row.itemName ? row.itemName : "") : "")
|
|
|
}}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -68,15 +75,7 @@
|
|
|
|
|
|
<el-table-column prop="dc" label="方向" width="60px" style="padding: 0">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- style="width: 100%; text-align: center"
|
|
|
- v-text="row.dc == 'D' ? '借' : '贷'"
|
|
|
- size="small"
|
|
|
- autocomplete="off"
|
|
|
- clearable
|
|
|
- :disabled="true"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ <span>{{ row.dc == 'D' ? '借' : '贷' }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
@@ -121,7 +120,7 @@
|
|
|
<el-table-column prop="exrate" label="汇率" width="100px">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
- v-if="row.curCode == 'USD'"
|
|
|
+ v-if="row.curCode === 'USD'"
|
|
|
style="width: 100%"
|
|
|
v-model="row.exrate"
|
|
|
size="small"
|
|
|
@@ -141,11 +140,12 @@
|
|
|
<el-table-column prop="amountDrUsd" label="借方" width="120px">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
+ v-if="row.changeMode !== 'd'"
|
|
|
style="width: 100%; text-align: right"
|
|
|
v-model="row.amountDrUsd"
|
|
|
size="small"
|
|
|
autocomplete="off"
|
|
|
- :disabled="row.curCode == 'CNY' || !row.accountId || disabled"
|
|
|
+ :disabled="row.curCode === 'CNY' || !row.accountId || disabled"
|
|
|
clearable
|
|
|
placeholder="请输入借方"
|
|
|
:precision="2"
|
|
|
@@ -158,11 +158,12 @@
|
|
|
<el-table-column prop="amountCrUsd" label="货方" width="120px">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
+ v-if="row.changeMode !== 'd'"
|
|
|
style="width: 100%"
|
|
|
v-model="row.amountCrUsd"
|
|
|
size="small"
|
|
|
autocomplete="off"
|
|
|
- :disabled="row.curCode == 'CNY' || !row.accountId || disabled"
|
|
|
+ :disabled="row.curCode === 'CNY' || !row.accountId || disabled"
|
|
|
clearable
|
|
|
placeholder="请输入货方"
|
|
|
:precision="2"
|
|
|
@@ -202,7 +203,7 @@
|
|
|
:disabled="disabled"
|
|
|
></el-button>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip class="item" effect="dark" content="删除" placement="top">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="scope.row.changeMode === 'd' ? '恢复' : '删除'" placement="top">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
@@ -267,7 +268,7 @@ export default {
|
|
|
sums[index] = "合计";
|
|
|
return;
|
|
|
}
|
|
|
- const values = data.map((item) => Number(item[column.property]));
|
|
|
+ const values = data.map((item) => item.changeMode === 'd' ? 0.00 : Number(item[column.property]));
|
|
|
// 显示列的统计 金额
|
|
|
let arr = ["amountDr", "amountCr", "amountDrUsd", "amountCrUsd"];
|
|
|
// 判断是否有这个数据
|
|
|
@@ -282,7 +283,7 @@ export default {
|
|
|
}
|
|
|
}, 0);
|
|
|
sums[index] = sums[index].toFixed(2); // 把合计的参数保留两位小数
|
|
|
- sums[index] += " 元";
|
|
|
+ // sums[index] += " 元";
|
|
|
} else {
|
|
|
sums[index] = " ";
|
|
|
}
|
|
|
@@ -337,7 +338,7 @@ export default {
|
|
|
// this.$set(row,'amountDrUsd',0)
|
|
|
// }
|
|
|
if (row.curCode == "USD") {
|
|
|
- this.$set(row, "exrate", row.exrate ? Number(row.exrate) : 0);
|
|
|
+ this.$set(row, "exrate", row.exrate ? Number(row.exrate) : 1);
|
|
|
this.$set(row, "amountCr", row.amountCr ? Number(row.amountCr) : 0);
|
|
|
this.$set(row, "amountDr", row.amountDr ? Number(row.amountDr) : 0);
|
|
|
|
|
|
@@ -354,9 +355,9 @@ export default {
|
|
|
if (name == "Cusd") {
|
|
|
this.$set(row, "amountDrUsd", 0);
|
|
|
}
|
|
|
- this.$set(row, "exrate", row.exrate ? Number(row.exrate) : 0);
|
|
|
- this.$set(row, "amountCr", row.amountCrUsd ? Number(row.amountCrUsd) : 0);
|
|
|
- this.$set(row, "amountDr", row.amountDrUsd ? Number(row.amountDrUsd) : 0);
|
|
|
+ this.$set(row, "exrate", row.exrate ? Number(row.exrate) : 1);
|
|
|
+ this.$set(row, "amountCrUsd", row.amountCrUsd ? Number(row.amountCrUsd) : 0);
|
|
|
+ this.$set(row, "amountDrUsd", row.amountDrUsd ? Number(row.amountDrUsd) : 0);
|
|
|
|
|
|
this.$set(row, "amountCr", (row.amountCrUsd * row.exrate).toFixed(2));
|
|
|
this.$set(row, "amountDr", (row.amountDrUsd * row.exrate).toFixed(2));
|
|
|
@@ -384,6 +385,12 @@ export default {
|
|
|
}
|
|
|
this.$emit("auxiliaryAccountingfun", row);
|
|
|
},
|
|
|
+ showOffRecordsfun (row){
|
|
|
+ if (!row.accountId) {
|
|
|
+ return this.$message.warning("请先选择科目代码");
|
|
|
+ }
|
|
|
+ this.$emit("showOffRecordsfun", row);
|
|
|
+ },
|
|
|
// 下拉回调
|
|
|
corpChange(value, name, row) {
|
|
|
let found = false;
|
|
|
@@ -415,6 +422,9 @@ export default {
|
|
|
this.$set(row, "isItem", item.isItem);
|
|
|
this.$set(row, "itemClassifyId", item.itemClassifyId);
|
|
|
this.$set(row, "itemClassify", item.itemClassify);
|
|
|
+
|
|
|
+ this.$set(row, "isDc", item.isDc);
|
|
|
+ this.$set(row, "isArAp", item.isArAp);
|
|
|
// 打开弹窗
|
|
|
this.$emit("auxiliaryAccountingfun", row);
|
|
|
}
|
|
|
@@ -444,6 +454,9 @@ export default {
|
|
|
this.$set(row, "itemClassifyId", 0);
|
|
|
this.$set(row, "itemClassify", "");
|
|
|
|
|
|
+ this.$set(row, "isDc", 0);
|
|
|
+ this.$set(row, "isArAp", 0);
|
|
|
+
|
|
|
this.$set(row, "exrate", 0);
|
|
|
}
|
|
|
|