|
@@ -246,6 +246,14 @@
|
|
</h4>
|
|
</h4>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="8" class="noprint">
|
|
|
|
+ <a-upload productName="file" :showUploadList="true" :file-list="fileList" :headers="tokenHeader" :multiple="false" :action="importExcelUrl" :data="{code:this.detailsPlanNum.planNum,name:this.fileName}" >
|
|
|
|
+ <a-button type="primary" disabled>附件上传</a-button>
|
|
|
|
+ </a-upload>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="8" class="noprint">
|
|
|
|
+ <a-button type="primary" @click="openEnclosure">附件</a-button>
|
|
|
|
+ </a-col>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</div>
|
|
</div>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -328,7 +336,8 @@
|
|
<Csubmit-information ref="CsubmitInformation" @close="closeInformation"></Csubmit-information>
|
|
<Csubmit-information ref="CsubmitInformation" @close="closeInformation"></Csubmit-information>
|
|
<!-- 选择指派人员 -->
|
|
<!-- 选择指派人员 -->
|
|
<select-user-modal ref="SelectUserModal" @selectFinished="selectFinished"></select-user-modal>
|
|
<select-user-modal ref="SelectUserModal" @selectFinished="selectFinished"></select-user-modal>
|
|
- </div>
|
|
|
|
|
|
+ <attachment-display ref="attachmentDisplay"></attachment-display>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</a-modal>
|
|
</a-modal>
|
|
</template>
|
|
</template>
|
|
@@ -352,11 +361,11 @@ import accidentListModal from '@views/cost-allocation-total/modal/accidentListMo
|
|
import SelectUserModal from '@views/cost-allocation-total/modal/SelectUserModal.vue'
|
|
import SelectUserModal from '@views/cost-allocation-total/modal/SelectUserModal.vue'
|
|
import { USER_AUTH } from "@/store/mutation-types"
|
|
import { USER_AUTH } from "@/store/mutation-types"
|
|
import { seachPlanNum, addHalfInfo,deleteFileDetail,assignedData,cancelSubmit } from '@api/document/cost-allocation-total.js'
|
|
import { seachPlanNum, addHalfInfo,deleteFileDetail,assignedData,cancelSubmit } from '@api/document/cost-allocation-total.js'
|
|
-
|
|
|
|
|
|
+import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
|
|
export default {
|
|
export default {
|
|
name: 'CostAllocationTable', // 成本分配 (新增)
|
|
name: 'CostAllocationTable', // 成本分配 (新增)
|
|
mixins: [JeecgListMixin],
|
|
mixins: [JeecgListMixin],
|
|
- components: { JEllipsis,SelectUserModal,CsubmitInformation, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
|
|
|
|
|
|
+ components: { JEllipsis,AttachmentDisplay,SelectUserModal,CsubmitInformation, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
|
|
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -504,18 +513,18 @@ export default {
|
|
this.detailsPlanNum.shortseveral = 0
|
|
this.detailsPlanNum.shortseveral = 0
|
|
this.detailsPlanNum.shortvalue = 0
|
|
this.detailsPlanNum.shortvalue = 0
|
|
}
|
|
}
|
|
- // var fileList = (this.detailsPlanNum.attachs!==''&&this.detailsPlanNum.attachs)?this.detailsPlanNum.attachs.split(","):[]
|
|
|
|
- // this.fileList = []
|
|
|
|
- // if(fileList.length!==0){
|
|
|
|
- // fileList.map(item=>{
|
|
|
|
- // this.fileList.push({
|
|
|
|
- // uid: '-1',
|
|
|
|
- // name: item,
|
|
|
|
- // status: 'done',
|
|
|
|
- // url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
|
|
+ var fileList = (this.detailsPlanNum.attachs!==''&&this.detailsPlanNum.attachs)?this.detailsPlanNum.attachs.split(","):[]
|
|
|
|
+ this.fileList = []
|
|
|
|
+ if(fileList.length!==0){
|
|
|
|
+ fileList.map(item=>{
|
|
|
|
+ this.fileList.push({
|
|
|
|
+ uid: '-1',
|
|
|
|
+ name: item,
|
|
|
|
+ status: 'done',
|
|
|
|
+ url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
//调整表头格式
|
|
//调整表头格式
|
|
this.adjustingHeader()
|
|
this.adjustingHeader()
|
|
// this.accidentListData = res.result.syCostAllocationAccidentList //事故单
|
|
// this.accidentListData = res.result.syCostAllocationAccidentList //事故单
|
|
@@ -649,6 +658,20 @@ export default {
|
|
this.color2 = this.color2>0?this.color2:-this.color2
|
|
this.color2 = this.color2>0?this.color2:-this.color2
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ openEnclosure(){
|
|
|
|
+ this.$refs.attachmentDisplay.AttachmentModVis = true
|
|
|
|
+ var attachList = [];
|
|
|
|
+ if (this.detailsPlanNum != null && this.detailsPlanNum.accessorItemList != null){
|
|
|
|
+ this.detailsPlanNum.accessorItemList.forEach(e=>{
|
|
|
|
+ var attach = {};
|
|
|
|
+ attach.name = e.filename;
|
|
|
|
+ attach.src=e.fileurl;
|
|
|
|
+ attachList.push(attach);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.$refs.attachmentDisplay.attachmentData = attachList;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
|
|
//判断有无指派人
|
|
//判断有无指派人
|
|
determineAssignedPerson(){
|
|
determineAssignedPerson(){
|
|
@@ -819,7 +842,9 @@ export default {
|
|
priceExcludingtaxAll = 0
|
|
priceExcludingtaxAll = 0
|
|
this.$refs.unitTabs.ingData.map(item=>{
|
|
this.$refs.unitTabs.ingData.map(item=>{
|
|
if(item.goodsName!=='合计'){
|
|
if(item.goodsName!=='合计'){
|
|
- item.usdAmount = ((item.priceExcludingtax?Number(item.priceExcludingtax):0)/this.detailsPlanNum.exchangeRate)
|
|
|
|
|
|
+ if((!item.usdAmount|| item.usdAmount=='')||item.rmbAmount == item.usdAmount){
|
|
|
|
+ item.usdAmount = ((item.priceExcludingtax?Number(item.priceExcludingtax):0)/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
|
|
|
|
+ }
|
|
if(item.rmbAmount !== item.usdAmount){ usdAmountAll+=item.usdAmount?Number(item.usdAmount):0 }
|
|
if(item.rmbAmount !== item.usdAmount){ usdAmountAll+=item.usdAmount?Number(item.usdAmount):0 }
|
|
transferCostAll+=item.transferCostAll?Number(item.transferCost):0
|
|
transferCostAll+=item.transferCostAll?Number(item.transferCost):0
|
|
rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
|
|
rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
|
|
@@ -936,13 +961,15 @@ export default {
|
|
var usaMoney = 0,
|
|
var usaMoney = 0,
|
|
rmbMoney = 0
|
|
rmbMoney = 0
|
|
val.map(item=>{
|
|
val.map(item=>{
|
|
- if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'){
|
|
|
|
|
|
+ if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'&&Number(item.amount)>0){
|
|
item.amount=Number(item.amount)*(-1)
|
|
item.amount=Number(item.amount)*(-1)
|
|
- }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'){
|
|
|
|
|
|
+ }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'&&Number(item.amount)>0){
|
|
item.amountrmb = Number(item.amountrmb)*(-1)
|
|
item.amountrmb = Number(item.amountrmb)*(-1)
|
|
}
|
|
}
|
|
- usaMoney += Number(item.amount),
|
|
|
|
- rmbMoney+=Number(item.amountrmb)
|
|
|
|
|
|
+ if(item.accidentUndertaker!=='合计'){
|
|
|
|
+ usaMoney += Number(item.amount),
|
|
|
|
+ rmbMoney+=Number(item.amountrmb)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
|
|
this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
|
|
this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
|
|
this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
|