|
|
@@ -106,7 +106,7 @@
|
|
|
v-model="form.payeeName"
|
|
|
maxlength="20"
|
|
|
style="width: 300px"
|
|
|
- disabled
|
|
|
+ :disabled="true"
|
|
|
v-if="
|
|
|
company.scyId != form.zbiPayerId &&
|
|
|
company.scyId != form.zbiPayeeId
|
|
|
@@ -115,7 +115,7 @@
|
|
|
<el-select
|
|
|
style="width: 300px"
|
|
|
v-model="form.zbiPayeeId"
|
|
|
- disabled
|
|
|
+ :disabled="true"
|
|
|
filterable
|
|
|
remote
|
|
|
v-if="
|
|
|
@@ -129,7 +129,7 @@
|
|
|
<el-select
|
|
|
style="width: 300px"
|
|
|
v-model="form.zbiPayeeId"
|
|
|
- disabled
|
|
|
+ :disabled="true"
|
|
|
filterable
|
|
|
clearable
|
|
|
remote
|
|
|
@@ -157,9 +157,9 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="贸易日期" prop="zbiDate">
|
|
|
<el-date-picker
|
|
|
- disabled
|
|
|
style="width: 300px"
|
|
|
v-model="form.zbiDate"
|
|
|
+ :disabled="true"
|
|
|
clearable
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
@@ -179,9 +179,9 @@
|
|
|
prop="zbiPayDate"
|
|
|
>
|
|
|
<el-date-picker
|
|
|
- disabled
|
|
|
style="width: 300px"
|
|
|
v-model="form.zbiPayDate"
|
|
|
+ :disabled="true"
|
|
|
clearable
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
@@ -283,11 +283,11 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-table
|
|
|
- stripe
|
|
|
:data="fileList"
|
|
|
@selection-change="handleInvoiceSelectionChange"
|
|
|
row-key="ziiId"
|
|
|
default-expand-all
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
border
|
|
|
>
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
@@ -391,6 +391,9 @@
|
|
|
>
|
|
|
<el-container>
|
|
|
<el-aside width="300px" style="background-color: white">
|
|
|
+ <el-button type="primary" @click="openUploadInvoice"
|
|
|
+ >上传发票</el-button
|
|
|
+ >
|
|
|
<el-header style="background-color: #dfe2e8; text-align: center">
|
|
|
<el-checkbox
|
|
|
:indeterminate="isIndeterminate"
|
|
|
@@ -401,37 +404,61 @@
|
|
|
<label>已上传发票列表</label>
|
|
|
</el-header>
|
|
|
<el-main style="height: 550px; border: groove">
|
|
|
- <el-checkbox-group
|
|
|
- v-model="checkedInvoice"
|
|
|
- @change="handleInvoiceSelectionChange"
|
|
|
+ <div
|
|
|
+ :style="
|
|
|
+ item.ziiCheckStt == '1'
|
|
|
+ ? { 'background-color': '#a8f87f' }
|
|
|
+ : {}
|
|
|
+ "
|
|
|
+ v-for="(item, index) in fileList"
|
|
|
+ :label="item"
|
|
|
+ :key="index"
|
|
|
>
|
|
|
- <el-checkbox
|
|
|
- v-for="(item, index) in fileList"
|
|
|
- :label="item"
|
|
|
- :key="index"
|
|
|
- style="width: 100%"
|
|
|
+ <i
|
|
|
+ class="el-icon-question"
|
|
|
+ style="color: blue"
|
|
|
+ v-if="item.ziiCheckStt == '0'"
|
|
|
><label @click="changeInvoice(item)"
|
|
|
><el-link :underline="false">{{
|
|
|
item.name
|
|
|
}}</el-link></label
|
|
|
- ><i
|
|
|
- class="el-icon-success"
|
|
|
- style="color: green"
|
|
|
- v-if="item.ziiCheckStt == '1'"
|
|
|
- ></i>
|
|
|
- <i
|
|
|
- class="el-icon-error"
|
|
|
- style="color: red"
|
|
|
- v-if="item.ziiCheckStt == '2' || item.ziiCheckStt == '3'"
|
|
|
- >{{ checkSttFormat(item) }}</i
|
|
|
- >
|
|
|
- </el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
+ ></i
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ class="el-icon-success"
|
|
|
+ style="color: green"
|
|
|
+ v-if="item.ziiCheckStt == '1'"
|
|
|
+ ><label @click="changeInvoice(item)"
|
|
|
+ ><el-link :underline="false">{{
|
|
|
+ item.name
|
|
|
+ }}</el-link></label
|
|
|
+ ></i
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ class="el-icon-error"
|
|
|
+ style="color: red"
|
|
|
+ v-if="item.ziiCheckStt == '2' || item.ziiCheckStt == '3'"
|
|
|
+ ><label @click="changeInvoice(item)"
|
|
|
+ ><el-link :underline="false">{{
|
|
|
+ item.name
|
|
|
+ }}</el-link></label
|
|
|
+ ><label>{{ checkSttFormat(item) }}</label></i
|
|
|
+ >
|
|
|
+ <el-link
|
|
|
+ style="float: right"
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="delInvoice(item)"
|
|
|
+ >删除</el-link
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</el-main>
|
|
|
<div style="text-align: center; margin-top: 20px">
|
|
|
- <el-button type="primary" @click="delInvoice">删除</el-button>
|
|
|
<el-button type="primary" @click="toCheckAgian()"
|
|
|
- >重新验真</el-button
|
|
|
+ >再次验证</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="submitCheck()"
|
|
|
+ >保存并上传</el-button
|
|
|
>
|
|
|
</div>
|
|
|
</el-aside>
|
|
|
@@ -456,6 +483,7 @@
|
|
|
label-width="auto"
|
|
|
:inline="true"
|
|
|
label-position="top"
|
|
|
+ :disabled="invoice.ziiCheckStt == '1'"
|
|
|
>
|
|
|
<el-form-item label="发票代码:">
|
|
|
<el-input v-model="invoice.ziiNo" maxlength="20" />
|
|
|
@@ -479,17 +507,17 @@
|
|
|
<el-input v-model="invoice.ziiSellerNo" maxlength="20" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发票金额:">
|
|
|
- <el-input v-model="invoice.ziiTotalAmount" maxlength="16" />
|
|
|
+ <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount)" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="税价金额:">
|
|
|
- <el-input v-model="invoice.ziiAmount" maxlength="16" />
|
|
|
+ <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount)"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-main>
|
|
|
<el-footer>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- @click="submitCheck()"
|
|
|
+ @click="queryDouble()"
|
|
|
style="float: right"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
@@ -611,6 +639,7 @@ import {
|
|
|
delFile,
|
|
|
commitBill,
|
|
|
getAmount,
|
|
|
+ queryDouble,
|
|
|
} from "@/api/service/bill/bill";
|
|
|
import { getOwnCompany, companyRelList } from "@/api/common/company";
|
|
|
import { amtformat } from "@/utils/amtCommon";
|
|
|
@@ -704,10 +733,10 @@ export default {
|
|
|
trigger: ["blur", "change"],
|
|
|
},
|
|
|
{
|
|
|
- pattern:/^[a-zA-Z0-9]+$/,
|
|
|
+ pattern: /^[a-zA-Z0-9]+$/,
|
|
|
message: "请输入数字或英文",
|
|
|
trigger: ["blur", "change"],
|
|
|
- }
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
//类型
|
|
|
@@ -743,18 +772,25 @@ export default {
|
|
|
//链属企业
|
|
|
company: {},
|
|
|
pickerOptionsStart: {
|
|
|
- disabledDate: time => {
|
|
|
- if (this.form.zbiPayDate) {
|
|
|
- return time.getTime() > new Date(this.form.zbiPayDate).getTime()
|
|
|
- }
|
|
|
- }
|
|
|
+ disabledDate: (time) => {
|
|
|
+ if (this.form.zbiPayDate) {
|
|
|
+ return (
|
|
|
+ time.getTime() >
|
|
|
+ new Date(this.form.zbiPayDate).getTime() -
|
|
|
+ 14 * 24 * 60 * 60 * 1000
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
pickerOptionsEnd: {
|
|
|
- disabledDate: time => {
|
|
|
- if (this.form.zbiDate) {
|
|
|
- return time.getTime() < new Date(this.form.zbiDate).getTime()
|
|
|
- }
|
|
|
- }
|
|
|
+ disabledDate: (time) => {
|
|
|
+ if (this.form.zbiDate) {
|
|
|
+ return (
|
|
|
+ time.getTime() <
|
|
|
+ new Date(this.form.zbiDate).getTime() + 13 * 24 * 60 * 60 * 1000
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
@@ -804,19 +840,20 @@ export default {
|
|
|
getDetail(zbiId) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
- getBill(zbiId).then((response) => {
|
|
|
- this.form = response.data;
|
|
|
- if (this.form.zbiPayerId == this.company.scyId) {
|
|
|
- this.type = "00";
|
|
|
- } else {
|
|
|
- this.type = "01";
|
|
|
- }
|
|
|
+ getBill(zbiId)
|
|
|
+ .then((response) => {
|
|
|
+ this.form = response.data;
|
|
|
+ if (this.form.zbiPayerId == this.company.scyId) {
|
|
|
+ this.type = "00";
|
|
|
+ } else {
|
|
|
+ this.type = "01";
|
|
|
+ }
|
|
|
loading.close();
|
|
|
- })
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
loading.close();
|
|
|
});
|
|
|
@@ -852,21 +889,49 @@ export default {
|
|
|
},
|
|
|
//发票上传窗口
|
|
|
openUpload() {
|
|
|
- this.uploadOpen = true;
|
|
|
+ this.open = true;
|
|
|
},
|
|
|
//上传
|
|
|
submitUpload() {
|
|
|
this.$refs.upload.submit();
|
|
|
},
|
|
|
+ //上传发票窗口
|
|
|
+ openUploadInvoice() {
|
|
|
+ this.uploadOpen = true;
|
|
|
+ },
|
|
|
+ //判重验证
|
|
|
+ queryDouble() {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ if (
|
|
|
+ this.invoice &&
|
|
|
+ this.invoice.ziiId &&
|
|
|
+ this.invoice.ziiCheckStt != "1"
|
|
|
+ ) {
|
|
|
+ queryDouble(this.invoice).then((response) => {
|
|
|
+ this.fileList.forEach((file) => {
|
|
|
+ if (response.id == file.id) {
|
|
|
+ file.ziiCheckStt = response.ziiCheckStt;
|
|
|
+ file.zbiName = response.zbiName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // this.invoice = this.fileList[0] ? this.fileList[0] : {};
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
//去验真
|
|
|
toCheck() {
|
|
|
this.uploadOpen = false;
|
|
|
- this.open = true;
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
fd.append("fileList", JSON.stringify(this.fileList)); // 文件对象
|
|
|
@@ -891,12 +956,15 @@ export default {
|
|
|
toCheckAgian() {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ let checkList = this.checkedInvoice.filter((element) => {
|
|
|
+ return element.ziiCheckStt == "0";
|
|
|
});
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
- fd.append("fileList", JSON.stringify(this.checkedInvoice)); // 文件对象
|
|
|
+ fd.append("fileList", JSON.stringify(checkList)); // 文件对象
|
|
|
invoiceVerification(fd)
|
|
|
.then((response) => {
|
|
|
response.forEach((element) => {
|
|
|
@@ -913,6 +981,19 @@ export default {
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
|
+ //金额校验格式
|
|
|
+ changeRate(e,input){
|
|
|
+ e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
|
|
|
+ this.input=e.target.value
|
|
|
+ input=this.input
|
|
|
+ },
|
|
|
+ //表格置灰
|
|
|
+ tableRowClassName({ row, rowIndex }) {
|
|
|
+ if (row.ziiCheckStt != "1") {
|
|
|
+ return "warning-row";
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ },
|
|
|
//切换发票
|
|
|
changeInvoice(item) {
|
|
|
this.invoice = item;
|
|
|
@@ -921,9 +1002,9 @@ export default {
|
|
|
httpRequest(param) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
@@ -932,36 +1013,53 @@ export default {
|
|
|
getInvoiceText(fd)
|
|
|
.then((response) => {
|
|
|
response.data.url = response.data.url + "/" + getToken();
|
|
|
- this.fileList.push(response.data);
|
|
|
+ var flag = true;
|
|
|
+ this.fileList.forEach((element) => {
|
|
|
+ if (element.ziiNo == response.data.ziiNo) {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (flag) {
|
|
|
+ this.fileList.push(response.data);
|
|
|
+ } else {
|
|
|
+ let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.upload.uploadFiles.findIndex(
|
|
|
+ (item) => item.uid === uid
|
|
|
+ ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.upload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
|
|
|
+ this.$message.error("检测发票重复上传,请检查后重试");
|
|
|
+ }
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
- let idx = this.$refs.upload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
- this.$refs.upload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
+ let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.upload.uploadFiles.findIndex(
|
|
|
+ (item) => item.uid === uid
|
|
|
+ ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.upload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
|
- beforeUpload(files){
|
|
|
- var testmsg=files.name.substring(files.name.lastIndexOf('.')+1);
|
|
|
- const extension = testmsg === 'jpg';
|
|
|
- const extension2 = testmsg === 'jpeg';
|
|
|
- const extension3 = testmsg === 'png';
|
|
|
- if(!extension && !extension2 && !extension3){
|
|
|
+ beforeUpload(files) {
|
|
|
+ var testmsg = files.name.substring(files.name.lastIndexOf(".") + 1);
|
|
|
+ const extension = testmsg === "jpg";
|
|
|
+ const extension2 = testmsg === "jpeg";
|
|
|
+ const extension3 = testmsg === "png";
|
|
|
+ if (!extension && !extension2 && !extension3) {
|
|
|
this.$message.warning(`请选择图片格式文件`);
|
|
|
}
|
|
|
return extension || extension2 || extension3;
|
|
|
},
|
|
|
//上传前校验
|
|
|
beforeAvatarUpload(file) {
|
|
|
- const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
|
|
|
+ const isJPG = file.type === "image/jpeg" || file.type === "image/png";
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
|
if (!isJPG) {
|
|
|
- this.$message.error('上传图片只能是 JPG/PNG 格式');
|
|
|
+ this.$message.error("上传图片只能是 JPG/PNG 格式");
|
|
|
}
|
|
|
if (!isLt2M) {
|
|
|
- this.$message.error('上传图片大小不能超过 2MB');
|
|
|
+ this.$message.error("上传图片大小不能超过 2MB");
|
|
|
}
|
|
|
return isJPG && isLt2M;
|
|
|
},
|
|
|
@@ -981,9 +1079,9 @@ export default {
|
|
|
httpRequestContract(param) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
@@ -997,9 +1095,11 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
- let idx = this.$refs.contractUpload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
- this.$refs.contractUpload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
+ let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.contractUpload.uploadFiles.findIndex(
|
|
|
+ (item) => item.uid === uid
|
|
|
+ ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.contractUpload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
|
@@ -1007,9 +1107,9 @@ export default {
|
|
|
httpRequestLogistics(param) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
@@ -1023,9 +1123,11 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
- let idx = this.$refs.logisticsUpload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
- this.$refs.logisticsUpload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
+ let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.logisticsUpload.uploadFiles.findIndex(
|
|
|
+ (item) => item.uid === uid
|
|
|
+ ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.logisticsUpload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
|
@@ -1033,9 +1135,9 @@ export default {
|
|
|
httpRequestOther(param) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
@@ -1049,9 +1151,11 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
- let idx = this.$refs.otherUpload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
- this.$refs.otherUpload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
+ let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.otherUpload.uploadFiles.findIndex(
|
|
|
+ (item) => item.uid === uid
|
|
|
+ ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.otherUpload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
|
@@ -1065,7 +1169,7 @@ export default {
|
|
|
},
|
|
|
//删除合同附件
|
|
|
handleRemoveContract(file, fileList) {
|
|
|
- var self = this
|
|
|
+ var self = this;
|
|
|
// if (self.contractList) {
|
|
|
// const loading = this.$loading({
|
|
|
// lock: true,
|
|
|
@@ -1074,10 +1178,10 @@ export default {
|
|
|
// background: 'rgba(0, 0, 0, 0.7)'
|
|
|
// });
|
|
|
// delFile(file.id).then(function () {
|
|
|
- self.contractList = self.contractList.reduce((total, current) => {
|
|
|
- current.id !== file.id && total.push(current);
|
|
|
- return total;
|
|
|
- }, []);
|
|
|
+ self.contractList = self.contractList.reduce((total, current) => {
|
|
|
+ current.id !== file.id && total.push(current);
|
|
|
+ return total;
|
|
|
+ }, []);
|
|
|
// loading.close();
|
|
|
// }).catch(() => {
|
|
|
// loading.close();
|
|
|
@@ -1095,10 +1199,10 @@ export default {
|
|
|
// background: 'rgba(0, 0, 0, 0.7)'
|
|
|
// });
|
|
|
// delFile(file.id).then(function () {
|
|
|
- self.logisticsList = self.logisticsList.reduce((total, current) => {
|
|
|
- current.id !== file.id && total.push(current);
|
|
|
- return total;
|
|
|
- }, []);
|
|
|
+ self.logisticsList = self.logisticsList.reduce((total, current) => {
|
|
|
+ current.id !== file.id && total.push(current);
|
|
|
+ return total;
|
|
|
+ }, []);
|
|
|
// loading.close();
|
|
|
// }).catch(() => {
|
|
|
// loading.close();
|
|
|
@@ -1116,10 +1220,10 @@ export default {
|
|
|
// background: 'rgba(0, 0, 0, 0.7)'
|
|
|
// });
|
|
|
// delFile(file.id).then(function () {
|
|
|
- self.otherList = self.otherList.reduce((total, current) => {
|
|
|
- current.id !== file.id && total.push(current);
|
|
|
- return total;
|
|
|
- }, []);
|
|
|
+ self.otherList = self.otherList.reduce((total, current) => {
|
|
|
+ current.id !== file.id && total.push(current);
|
|
|
+ return total;
|
|
|
+ }, []);
|
|
|
// loading.close();
|
|
|
// }).catch(() => {
|
|
|
// loading.close();
|
|
|
@@ -1169,7 +1273,7 @@ export default {
|
|
|
//删除发票
|
|
|
delInvoice(row) {
|
|
|
var self = this;
|
|
|
- const ids = row.id || this.ids;
|
|
|
+ const ids = [row.id] || this.ids;
|
|
|
if (ids && ids.length != 0) {
|
|
|
this.$confirm("是否确认删除此数据项?", "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -1198,9 +1302,11 @@ export default {
|
|
|
},
|
|
|
//发票合计
|
|
|
allAmount() {
|
|
|
- var strarr = [0.00];
|
|
|
+ var strarr = [0.0];
|
|
|
for (let i in this.fileList) {
|
|
|
- strarr.push(this.fileList[i]["ziiAmount"]);
|
|
|
+ if (this.fileList[i]["ziiCheckStt"] == "1") {
|
|
|
+ strarr.push(this.fileList[i]["ziiAmount"]);
|
|
|
+ }
|
|
|
}
|
|
|
return (Math.floor(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果
|
|
|
// return this.handleInput(eval(strarr.join("+"))); //结果
|
|
|
@@ -1216,19 +1322,19 @@ export default {
|
|
|
this.form.otherList = this.otherList;
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
commitBill(this.form)
|
|
|
.then((response) => {
|
|
|
- loading.close();
|
|
|
+ loading.close();
|
|
|
this.msgSuccess("修改账款成功");
|
|
|
this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
this.$router.go(-1);
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- loading.close();
|
|
|
+ loading.close();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -1328,4 +1434,9 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
-</script>
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.el-table .warning-row {
|
|
|
+ background: rgb(223, 223, 223);
|
|
|
+}
|
|
|
+</style>
|