|
@@ -41,6 +41,8 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
<el-button v-if="canSave" style="margin-left: 10px;" size="small" type="primary"
|
|
<el-button v-if="canSave" style="margin-left: 10px;" size="small" type="primary"
|
|
|
@click="FileDown">生成表格</el-button>
|
|
@click="FileDown">生成表格</el-button>
|
|
|
|
|
+ <el-button v-if="canSave" style="margin-left: 10px;" size="small" type="primary"
|
|
|
|
|
+ @click="downloadword">生成验收报告</el-button>
|
|
|
<el-button v-if="control.isReview" size="small" @click="ConferenceAffairsAudit(1)"
|
|
<el-button v-if="control.isReview" size="small" @click="ConferenceAffairsAudit(1)"
|
|
|
type="primary">审核通过</el-button>
|
|
type="primary">审核通过</el-button>
|
|
|
<el-button v-if="canSave" size="small" @click="ConferenceAffairsSave(true)"
|
|
<el-button v-if="canSave" size="small" @click="ConferenceAffairsSave(true)"
|
|
@@ -158,7 +160,7 @@
|
|
|
<el-popover v-if="scope.row.imgsList.length>0" placement="right" width="400" trigger="hover">
|
|
<el-popover v-if="scope.row.imgsList.length>0" placement="right" width="400" trigger="hover">
|
|
|
<div style="white-space: pre-line;">
|
|
<div style="white-space: pre-line;">
|
|
|
<label>文件列表:</label>
|
|
<label>文件列表:</label>
|
|
|
- <div v-for="(item,index) in scope.row.imgsList" :key="index">
|
|
|
|
|
|
|
+ <div v-for="(item,index) in scope.row.imgsList" :key="index" @click="downloadimg(item)">
|
|
|
<div class="conferencecostfile-box">
|
|
<div class="conferencecostfile-box">
|
|
|
<div>{{ExtractWJ(item)}}</div>
|
|
<div>{{ExtractWJ(item)}}</div>
|
|
|
<div @click.stop="deleteImage(item,scope.row.id)" class="conferencecost-content-dleWJ">✖</div>
|
|
<div @click.stop="deleteImage(item,scope.row.id)" class="conferencecost-content-dleWJ">✖</div>
|
|
@@ -219,10 +221,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="conferencecost-foot-totalcost">
|
|
<div class="conferencecost-foot-totalcost">
|
|
|
- 成本总计:{{ conferenceAffairsCost.costAll }} <span style="color: red;">{{ danwei }}</span>
|
|
|
|
|
|
|
+ 成本总计:{{ reservetwo(conferenceAffairsCost.costAll) }} <span style="color: red;">{{ danwei }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="conferencecost-foot-totalquotations">
|
|
<div class="conferencecost-foot-totalquotations">
|
|
|
- 报价总计:{{ conferenceAffairsCost.baoJiaAll }} <span style="color: red;">{{ danwei }}</span>
|
|
|
|
|
|
|
+ 报价总计:{{ reservetwo(conferenceAffairsCost.baoJiaAll) }} <span style="color: red;">{{ danwei }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="conferencecost-allocation">
|
|
<div class="conferencecost-allocation">
|
|
@@ -255,6 +257,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import { Decimal } from 'decimal.js'
|
|
|
import { debounce } from '../../store/statice'
|
|
import { debounce } from '../../store/statice'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -273,8 +276,8 @@ export default {
|
|
|
allocationGroupId: '',//分配团组Id
|
|
allocationGroupId: '',//分配团组Id
|
|
|
id: 0,
|
|
id: 0,
|
|
|
remark: '',
|
|
remark: '',
|
|
|
- costAll: '',//成本总计
|
|
|
|
|
- baoJiaAll: '',//报价总计
|
|
|
|
|
|
|
+ costAll: 0,//成本总计
|
|
|
|
|
+ baoJiaAll: 0,//报价总计
|
|
|
mostCurr: 0, //最终币种
|
|
mostCurr: 0, //最终币种
|
|
|
},
|
|
},
|
|
|
units: [],
|
|
units: [],
|
|
@@ -368,6 +371,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ reservetwo(value) {
|
|
|
|
|
+ // 截取当前数据到小数点后两位
|
|
|
|
|
+ let realVal = new Decimal(value).toFixed(2)
|
|
|
|
|
+ return realVal
|
|
|
|
|
+ },
|
|
|
//截取
|
|
//截取
|
|
|
ExtractWJ(fileName) {
|
|
ExtractWJ(fileName) {
|
|
|
if (!fileName) return '';
|
|
if (!fileName) return '';
|
|
@@ -404,24 +412,50 @@ export default {
|
|
|
},
|
|
},
|
|
|
//添加一行
|
|
//添加一行
|
|
|
addlineclick() {
|
|
addlineclick() {
|
|
|
- this.tableDatas.push({
|
|
|
|
|
- index: this.tableDatas.length + 1,
|
|
|
|
|
- priceType: '',//费用类型
|
|
|
|
|
- priceName: '',//费用名称
|
|
|
|
|
- costPrice: 0,//成本费用
|
|
|
|
|
- currency: 836,//币种
|
|
|
|
|
- rate: 1,//当时汇率s
|
|
|
|
|
- count: 0,//数量333
|
|
|
|
|
- unit: '',//单位
|
|
|
|
|
- coefficient: 0,//系数
|
|
|
|
|
- baoJiaPrice: 0,//报价金额
|
|
|
|
|
- addedValue: 0,//附加值
|
|
|
|
|
- details: '',//明细
|
|
|
|
|
- reviewStatus: 0,//审核状态
|
|
|
|
|
- diid: this.conferenceid,//团组Id
|
|
|
|
|
- id: 0,//主表Id
|
|
|
|
|
- remark: '',//备注
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ var url = "/api/Groups/ConferenceAffairsChildAddRow"
|
|
|
|
|
+ var that = this
|
|
|
|
|
+ this.$axios({
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
|
|
+ },
|
|
|
|
|
+ data: {
|
|
|
|
|
+ userId: this.userId,
|
|
|
|
|
+ diid: that.conferenceid,
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(function (res) {
|
|
|
|
|
+ var data = res.data.data;
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ that.tableDatas.push(data);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: res.data.msg
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ // this.tableDatas.push({
|
|
|
|
|
+ // index: this.tableDatas.length + 1,
|
|
|
|
|
+ // priceType: '',//费用类型
|
|
|
|
|
+ // priceName: '',//费用名称
|
|
|
|
|
+ // costPrice: 0,//成本费用
|
|
|
|
|
+ // currency: 836,//币种
|
|
|
|
|
+ // rate: 1,//当时汇率s
|
|
|
|
|
+ // count: 0,//数量333
|
|
|
|
|
+ // unit: '',//单位
|
|
|
|
|
+ // coefficient: 0,//系数
|
|
|
|
|
+ // baoJiaPrice: 0,//报价金额
|
|
|
|
|
+ // addedValue: 0,//附加值
|
|
|
|
|
+ // details: '',//明细
|
|
|
|
|
+ // reviewStatus: 0,//审核状态
|
|
|
|
|
+ // diid: this.conferenceid,//团组Id
|
|
|
|
|
+ // imgs:'',
|
|
|
|
|
+ // imgsList:[],//图片列表
|
|
|
|
|
+ // id: 0,//主表Id
|
|
|
|
|
+ // remark: '',//备注
|
|
|
|
|
+ // });
|
|
|
|
|
+
|
|
|
this.updateTotals();
|
|
this.updateTotals();
|
|
|
},
|
|
},
|
|
|
calculateQuotation(row) {
|
|
calculateQuotation(row) {
|
|
@@ -471,9 +505,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
//移除
|
|
//移除
|
|
|
removeRow(index, row) {
|
|
removeRow(index, row) {
|
|
|
-
|
|
|
|
|
- // this.tableDatas.splice(index, 1);
|
|
|
|
|
- //this.updateTotals();//jisuan总计
|
|
|
|
|
|
|
+ // if (row.id === 0) {
|
|
|
|
|
+ // this.tableDatas.splice(index, 1);
|
|
|
|
|
+ // this.updateTotals();//jisuan总计
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
var url = "/api/Groups/ConferenceAffairSinglesDelete"
|
|
var url = "/api/Groups/ConferenceAffairSinglesDelete"
|
|
|
var that = this
|
|
var that = this
|
|
|
this.$axios({
|
|
this.$axios({
|
|
@@ -857,6 +894,38 @@ export default {
|
|
|
that.ConferenceAffairsLoad();
|
|
that.ConferenceAffairsLoad();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ //图片下载
|
|
|
|
|
+ downloadimg(filePath) {
|
|
|
|
|
+ window.open(filePath);
|
|
|
|
|
+ },
|
|
|
|
|
+ //xiazai
|
|
|
|
|
+ downloadword(){
|
|
|
|
|
+ var url = "/api/Groups/InspectionReportFileDown"
|
|
|
|
|
+ var that = this
|
|
|
|
|
+ that.$axios({
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
|
|
+ },
|
|
|
|
|
+ data: {
|
|
|
|
|
+ diid: that.conferenceid,
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(function (res) {
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.msg
|
|
|
|
|
+ });
|
|
|
|
|
+ window.open(res.data.data.url);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: res.data.msg
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//删除图片
|
|
//删除图片
|
|
|
deleteImage(filePath, childId) {
|
|
deleteImage(filePath, childId) {
|
|
|
const filePaths=[filePath];
|
|
const filePaths=[filePath];
|
|
@@ -892,6 +961,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|