Commit d7eff98c by T

调拨销毁单自适应打印

parent df714b2f
......@@ -17,7 +17,13 @@ export default {
}
},
created() {
//若为分局及以上则传findCode
if(this.$store.state.user.user.baseJpOrganization.code.substring(6,8) == '00'){
this.url = "http://" + window.location.host +"/my-app/?findCode=" + window.encodeURIComponent(window.btoa(this.$store.state.user.user.baseJpOrganization.findCode))
}else{
this.url = "http://" + window.location.host +"/my-app/?findCode=" + window.encodeURIComponent(window.btoa(this.$store.state.user.user.baseJpOrganization.code))
}
}
}
</script>
......
......@@ -6,7 +6,8 @@
<div style="font-size:30px;font-weight:600;letter-spacing:3px;position:relative;top:-6px;color: #f6f6f6;z-index: -1;"><center><span>{{ name }}警用装备智能管理平台</span></center></div>
<div class="right-menu" style="margin-top:-50px;">
<template v-if="device!=='mobile'">
<el-tooltip content="大屏展示" effect="dark" placement="bottom" v-show="$store.state.user.user.baseJpOrganization.code.substring(6,8) == '00'">
<el-tooltip content="大屏展示" effect="dark" placement="bottom" v-show="$store.state.user.user.baseJpOrganization.code.substring(9,11) == '00'">
<!-- <el-tooltip content="大屏展示" effect="dark" placement="bottom" v-show="$store.state.user.user.baseJpOrganization.code.substring(6,8) == '00'"> -->
<Github class="screenfull right-menu-item"/>
</el-tooltip>
</template>
......
......@@ -152,6 +152,7 @@ export default {
this.$store.dispatch('Login', user).then(() => {
this.loading = false
setTimeout(this.purchaseAlert , 2000)
//判断密码为123456(MD5),跳转强行提示修改
if(user.password === 'e10adc3949ba59abbe56e057f20f883e'){
this.$router.push({path:'/user/center', query: { fromLoginPage: 'true' }});
......
......@@ -13,7 +13,7 @@
<eForm ref="form"/>
<eListForm ref="eListForm"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" stripe border >
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" stripe border>
<el-table-column type="index" label="序号" width="50"/>
<el-table-column prop="orderCode" label="采购单号"/>
<el-table-column prop="warehouseName" label="目标仓库"/>
......
......@@ -2,10 +2,10 @@
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" ref="form" :visible.sync="dialog" :title="'查看装备库存状态'" width="1200px">
<!-- 搜索 -->
<div class="head-container">
<el-cascader v-model="id" :options="orgList"
<!-- <el-cascader v-model="id" :options="orgList"
:props="{ value: 'id', label: 'name', checkStrictly: true, emitPath: false }" filterable
class="filter-item" style="width: 300px;margin-left:0px" placeholder="请选择本级或下级的组织机构" @change="orgChange"/>
<el-select v-model="sizeId"
class="filter-item" style="width: 300px;margin-left:0px" placeholder="请选择本级或下级的组织机构" @change="orgChange"/> -->
<!-- <el-select v-model="sizeId"
v-if="id!==''"
style="width:240px "
class="filter-item"
......@@ -13,9 +13,8 @@
placeholder="请选择装备型号"
@change="orgChangeSizeFind">
<el-option v-for="item in equipmentSizeList" :key="item.id" :label="item.sizeName" :value="item.id"/>
</el-select>
</el-select> -->
<el-select v-model="sizeId"
v-if="id==''"
style="width:240px "
class="filter-item"
:filterable="true"
......@@ -35,7 +34,7 @@
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="sizeName" label="装备型号名称" align="center"/>
<el-table-column prop="orgName" label="组织机构名称" width="300" align="center"/>
<!-- <el-table-column prop="orgName" label="组织机构名称" width="300" align="center"/> -->
<el-table-column prop="zsCount" label="装备总数" align="center"/>
<el-table-column prop="zkCount" label="在库数" align="center"/>
<el-table-column prop="ckCount" label="出库数" align="center"/>
......@@ -81,6 +80,7 @@ export default {
},
methods: {
initTable(equipmentId, findCode, orgCode, code, orgId) {
console.log(orgCode)
this.equipmentId = equipmentId
this.findCode= findCode
this.orgId = orgId
......@@ -132,21 +132,22 @@ export default {
reject(err)
})
})
},
orgChangeSizeFind(){
this.findCode=this.findCode,
this.initPost2()
},
// orgChangeSizeFind(){
// this.findCode=this.findCode,
// this.initPost2()
// },
orgChangeSizeFind2(sizeId){
this.sizeId =sizeId
this.findCode=this.findCode,
this.initPost3()
// this.findCode=this.findCode,
this.initPost()
//console.log('2222')
},
async initPost3() {
return new Promise((resolve, reject) => {
this.loading = true
initPdata(this.url, transform({findCode: this.findCode, equipmentId: this.equipmentId, sizeId: this.sizeId})).then(res => {
initPdata(this.url, transform({findCode: this.findCode, orgCode: this.orgCode, equipmentId: this.equipmentId, sizeId: this.sizeId})).then(res => {
if (res.code === '10000') {
this.data = res.data
//按号型重新排序
......@@ -172,6 +173,7 @@ export default {
async initPost() {
return new Promise((resolve, reject) => {
this.loading = true
this.params.sizeId = this.sizeId
initPdata(this.url, transform(this.params)).then(res => {
if (res.code === '10000') {
this.data = res.data
......
......@@ -51,7 +51,10 @@
<el-table ref="table" v-loading="loading" :data="data" show-summary :summary-method="getSummaries" stripe border style="width: 100%;" @row-click="rowClick">
<el-table-column type="expand" width="50">
<template slot-scope="props">
<el-table :data="props.row.children" stripe border style="width: 94%;margin: auto;">
<el-table :data="props.row.orgChild" stripe border style="width: 94%;margin: auto;" >
<el-table-column type="expand" width="50">
<template slot-scope="props1">
<el-table :data="props1.row.children" stripe border style="width: 94%;margin: auto;">
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="name" label="装备类型名称" align="center"/>
<el-table-column prop="zsCount" label="总数" sortable align="center"/>
......@@ -63,17 +66,16 @@
<el-table-column prop="bfCount" label="报废数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code !== '330200000000'"/>
<el-table-column label="操作" width="80" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="show(scope.row.id, props.row.findCode, props.row.orgCode,props.row.orgId)">查看</el-button>
<el-button size="mini" type="primary" @click="show(scope.row.id, props1.row.findCode, props1.row.orgCode,props1.row.orgId)">查看</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="orgName" label="组织机构名称" align="center" :show-overflow-tooltip="true">
<el-table-column prop="nameJc" label="组织机构名称" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.nameJc ? scope.row.nameJc : scope.row.orgName }}
<!-- {{ scope.row.nameJc ? scope.row.nameJc : (scope.row.orgCode === code ? scope.row.orgName + '本级' : scope.row.orgName.replace(orgName, '')) }} -->
{{ (scope.row.orgCode === code ? scope.row.orgName + '本级' : scope.row.orgName.replace(orgName, '')) }}
</template>
</el-table-column>
<el-table-column prop="zsCount" label="总数" sortable align="center"/>
......@@ -84,6 +86,19 @@
<el-table-column prop="bfCount" label="销毁数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code === '330200000000'"/>
<el-table-column prop="bfCount" label="报废数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code !== '330200000000'"/>
</el-table>
</template>
</el-table-column>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="nameJc" label="组织机构名称" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="zsCount" label="总数" sortable align="center"/>
<el-table-column prop="zkCount" label="在库数" sortable align="center"/>
<el-table-column prop="ckCount" label="出库数" sortable align="center"/>
<el-table-column prop="djgCount" label="单警柜在库数" sortable align="center"/>
<el-table-column prop="djgckCount" label="单警柜出库数" sortable align="center"/>
<el-table-column prop="bfCount" label="销毁数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code === '330200000000'"/>
<el-table-column prop="bfCount" label="报废数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code !== '330200000000'"/>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
......@@ -107,6 +122,8 @@ import { initPdata } from '@/api/data'
import md5 from 'js-md5'
import cnchar from "cnchar";
import eForm from './form'
import XLSX from 'xlsx';
export default {
name: 'Equipmentall',
mixins: [initData],
......@@ -116,7 +133,7 @@ export default {
data() {
return {
orgId: this.$store.state.user.user.baseJpOrganization.id,
orgName: '',
orgName: this.$store.state.user.user.baseJpOrganization.name,
code: this.$store.state.user.user.baseJpOrganization.code,
typeId: '',
orgList: [],
......@@ -263,16 +280,24 @@ export default {
initPdata(this.url, params).then(res => {
if(res.code == '10000') {
list = res.data.content
let arr = []
import('@/utils/Export2Excel').then(excel => {
const tHeader = ['装备名称', '总数', '在库数', '出库数', '报废数']
const filterVal = ['name', 'zsCount', 'zkCount', 'ckCount', 'bfCount']
for (let org of list) {
for (let item of list) {
let orgChild = item.orgChild;
for (let org of orgChild) {
arr.push(org)
}
}
for(let k of arr) {
result.push({
sheetTitle: org.orgName,
sheetTitle: k.orgName,
th: tHeader,
data: this.formatJson(filterVal, org.children)
})
data: this.formatJson(filterVal, k.children)
});
}
excel.export_json_to_excel({
// header: tHeader,
data: result,
......
......@@ -69,142 +69,20 @@
<td class=xl7026343 style='border-left:none'>金额(元)</td>
<td class=xl7026343 style='border-left:none'>备注</td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>1</td>
<template v-if="form.resultPriceList">
<tr height=33 style='mso-height-source:userset;height:24.95pt' v-for="(item, index) in form.resultPriceList">
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>{{index + 1}}</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 1 ? this.form.resultPriceList[0].equipmentName + ((this.form.resultPriceList[0].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[0].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 1 ? this.form.resultPriceList[0].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 1 ? this.form.resultPriceList[0].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 1 ? this.form.resultPriceList[0].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 1 ? this.form.resultPriceList[0].totalPrice : '' : ''}}</td>
border-left:none'>{{ item.equipmentName ? item.equipmentName + (item.equipmentSizeName == '无号配号' ? '' : '('+ item.equipmentSizeName + ')') : '' }}</td>
<td class=xl7126343 style='border-top:none'>{{ item.equipmentUnitType || ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ item.price || '' }}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ item.count || ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ item.totalPrice || '' }}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align: center;'>
<span id="bzshow" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 1"><input id="bz" style="border: 0px;width: 160px;"></span>
</td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>2</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].equipmentName + ((this.form.resultPriceList[1].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[1].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow2" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 2"><input id="bz2" style="border: 0px;width: 160px;"></span>
</td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>3</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].equipmentName + ((this.form.resultPriceList[2].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[2].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow3" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 3"><input id="bz3" style="border: 0px;width: 160px;"></span>
 </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>4</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].equipmentName + ((this.form.resultPriceList[3].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[3].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].equipmentUnitType : '' : ''}} </td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].price : '' : ''}} </td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].count : '' : ''}} </td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].totalPrice : '' : ''}} </td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'> 
<span id="bzshow4" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 4"><input id="bz4" style="border: 0px;width: 160px;"></span>
</td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>5</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].equipmentName + ((this.form.resultPriceList[4].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[4].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow5" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 5"><input id="bz5" style="border: 0px;width: 160px;"></span>
 </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>6</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].equipmentName + ((this.form.resultPriceList[5].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[5].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow6" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 6"><input id="bz6" style="border: 0px;width: 160px;"></span> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>7</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].equipmentName + ((this.form.resultPriceList[6].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[6].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow7" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 7"><input id="bz7" style="border: 0px;width: 160px;"></span> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>8</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].equipmentName + ((this.form.resultPriceList[7].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[7].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow8" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 8"><input id="bz8" style="border: 0px;width: 160px;"></span> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7026343 style='height:24.95pt;border-top:none'>9</td>
<td colspan=4 class=xl8526343 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].equipmentName + ((this.form.resultPriceList[8].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[8].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow9" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 9"><input id="bz9" style="border: 0px;width: 160px;"></span> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7326343 style='height:24.95pt;border-top:none'>10</td>
<td colspan=4 class=xl8726343 style='border-right:.5pt solid black;
border-bottom:.5pt solid black;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].equipmentName + ((this.form.resultPriceList[9].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[9].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7126343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].equipmentUnitType : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].price : '' : ''}}</td>
<td class=xl7026343 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].count : '' : ''}}</td>
<td class=xl7226343 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].totalPrice : '' : ''}}</td>
<td class=xl8026343 style='border-top:none;border-left:none;text-align:center;'>
<span id="bzshow10" v-show=" this.form.resultPriceList && this.form.resultPriceList.length >= 10"><input id="bz10" style="border: 0px;width: 160px;"></span> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td colspan=3 height=33 class=xl8526343 style='height:24.95pt'>合计金额(大写):</td>
<td colspan=5 class=xl8926343 style='border-right:.5pt solid black'>{{digitUppercase(totalPrice)}}</td>
<td class=xl8126343 align=right style='border-top:none;border-left:none'>{{parseFloat(totalPrice).toFixed(2)}}
<span :id="'bzshow' + (index + 1)" v-show="item.equipmentName"><input :id="'bz' + (index + 1)" style="border: 0px;width: 160px;"></span>
</td>
<td class=xl8126343 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=66 style='mso-height-source:userset;height:50.1pt'>
<td colspan=1 height=66 class=xl8726343 style='height:50.1pt'>发物单位</td>
<td colspan=1 class=xl8826343> </td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>&nbsp; 发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<!-- <td class=xl7426343 style='border-top:none'> </td> -->
<td class=xl7426343 style='border-top:none'>&nbsp;收物单位</td>
<td class=xl8226343 style='border-top:none'> </td>
</tr>
</template>
<tr height=66 style='page-break-before:always;mso-height-source:userset;
height:50.1pt'>
<!-- <td colspan=2 height=66 class=xl9126343 style='height:50.1pt'>&nbsp;开 票 人:</td>
......@@ -264,7 +142,16 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
orgId: this.$store.state.user.user.baseJpOrganization.id,
dialog: false,
totalPrice: '',
form: {}
form: {},
bz: '',
resultPrice: {
count: '',
equipmentName: '',
equipmentSizeName: "",
equipmentUnitType: "",
price: 0,
totalPrice: 0,
}
}
},
computed: {
......@@ -283,9 +170,17 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
showOrderDetail(order) {
getByID({id:order}).then(res => {
this.form = res.data
let resultPriceList = res.data.resultPriceList
const length = resultPriceList.length
if (length <= 10) {
for (var i =0; i< 10 - length; i++) {
resultPriceList.push(this.resultPrice)
}
}
this.totalPrice = res.data.resultPriceList.slice(0, 10).reduce(function(acc, k) {
return acc + parseFloat(k.totalPrice)
}, 0);
}, 0).toFixed(2);;
})
// getOrderCountByOrgId({orgId: this.orgId, orderType: '调拨', orderCode: order}).then(res => {
// this.no = this.padding(res.data.no, 6)
......@@ -385,35 +280,19 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
})
},
handleFinish() {
// document.getElementById('select1Show').innerHTML = document.getElementById('select1').value
// document.getElementById('select2Show').innerHTML = document.getElementById('select2').value
// document.getElementById('select3Show').innerHTML = document.getElementById('select3').value
// document.getElementById('select4Show').innerHTML = document.getElementById('select4').value
// document.getElementById('select5Show').innerHTML = document.getElementById('select5').value
// document.getElementById('select6Show').innerHTML = document.getElementById('select6').value
// document.getElementById('select7Show').innerHTML = document.getElementById('select7').value
// document.getElementById('select8Show').innerHTML = document.getElementById('select8').value
// document.getElementById('select9Show').innerHTML = document.getElementById('select9').value
// document.getElementById('select10Show').innerHTML = document.getElementById('select10').value
// document.getElementById('leaderShow').innerHTML = document.getElementById('leader').value
// document.getElementById('leaderyjShow').innerHTML = document.getElementById('leaderyj').value
for (var i =1; i<= this.form.resultPriceList.length ; i++) {
document.getElementById('bzshow'+ i).innerHTML = document.getElementById('bz' + i).value
}
// document.getElementById('bzShow').innerHTML = document.getElementById('bz').value
// document.getElementById('glsShow').innerHTML = document.getElementById('gls').value
// document.getElementById('phoneShow').innerHTML = document.getElementById('phone').value
// document.getElementById('nowTimeShow').innerHTML = document.getElementById('nowTime').value
// document.getElementById('useTimeShow').innerHTML = document.getElementById('useTime').value
// document.getElementById('pickTimeShow').innerHTML = document.getElementById('pickTime').value
document.getElementById('bzshow').innerHTML = document.getElementById('bz').value
document.getElementById('bzshow2').innerHTML = document.getElementById('bz2').value
document.getElementById('bzshow3').innerHTML = document.getElementById('bz3').value
document.getElementById('bzshow4').innerHTML = document.getElementById('bz4').value
document.getElementById('bzshow5').innerHTML = document.getElementById('bz5').value
document.getElementById('bzshow6').innerHTML = document.getElementById('bz6').value
document.getElementById('bzshow7').innerHTML = document.getElementById('bz7').value
document.getElementById('bzshow8').innerHTML = document.getElementById('bz8').value
document.getElementById('bzshow9').innerHTML = document.getElementById('bz9').value
document.getElementById('bzshow10').innerHTML = document.getElementById('bz10').value
// document.getElementById('bzshow2').innerHTML = document.getElementById('bz2').value
// document.getElementById('bzshow3').innerHTML = document.getElementById('bz3').value
// document.getElementById('bzshow4').innerHTML = document.getElementById('bz4').value
// document.getElementById('bzshow5').innerHTML = document.getElementById('bz5').value
// document.getElementById('bzshow6').innerHTML = document.getElementById('bz6').value
// document.getElementById('bzshow7').innerHTML = document.getElementById('bz7').value
// document.getElementById('bzshow8').innerHTML = document.getElementById('bz8').value
// document.getElementById('bzshow9').innerHTML = document.getElementById('bz9').value
// document.getElementById('bzshow10').innerHTML = document.getElementById('bz10').value
var newstr = document.getElementById('printHtml').innerHTML
document.body.innerHTML = newstr
window.print()
......@@ -428,6 +307,7 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
tr { page-break-inside:avoid; page-break-after:auto }
.xl1526343
{padding-top:1px;
padding-right:1px;
......
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialog" :title="'打印单据'" width="1500px">
<div id="printHtml" align=center x:publishsource="Excel">
<table border=0 cellpadding=0 cellspacing=0 width=1071 style='border-collapse: collapse;table-layout:fixed;width:804pt'>
<col width=54 style='mso-width-source:userset;mso-width-alt:1728;width:41pt'>
<table border=0 cellpadding=0 cellspacing=0 width=1071 style='border-collapse: collapse;table-layout:fixed;width:804pt;'>
<col width=54 style='mso-width-source:userset;mso-width-alt:1728;width:42pt'>
<col width=69 style='mso-width-source:userset;mso-width-alt:2208;width:52pt'>
<col width=59 style='mso-width-source:userset;mso-width-alt:1888;width:44pt'>
<col width=108 style='mso-width-source:userset;mso-width-alt:3456;width:81pt'>
......@@ -73,106 +73,18 @@
<td class=xl7112633 style='border-left:none'>金额(元)</td>
<td class=xl7112633 style='border-left:none'>备注</td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>1</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList[0].equipmentName + ((this.form.resultPriceList[0].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[0].equipmentSizeName + ')') : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList[0].equipmentUnitType : ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList[0].price : ''}} </td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList[0].count : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList[0].totalPrice : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>2</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].equipmentName + ((this.form.resultPriceList[1].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[1].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].equipmentUnitType : '' : ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 2 ? this.form.resultPriceList[1].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>3</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].equipmentName + ((this.form.resultPriceList[2].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[2].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].equipmentUnitType : '' : ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 3 ? this.form.resultPriceList[2].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>4</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].equipmentName + ((this.form.resultPriceList[3].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[3].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].equipmentUnitType : '' : ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].count : '' : ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 4 ? this.form.resultPriceList[3].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>5</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].equipmentName + ((this.form.resultPriceList[4].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[4].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].equipmentUnitType : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].count : '' : ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 5 ? this.form.resultPriceList[4].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>6</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].equipmentName + ((this.form.resultPriceList[5].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[5].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].equipmentUnitType : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 6 ? this.form.resultPriceList[5].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>7</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].equipmentName + ((this.form.resultPriceList[6].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[6].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].equipmentUnitType : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 7 ? this.form.resultPriceList[6].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>8</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].equipmentName + ((this.form.resultPriceList[7].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[7].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].equipmentUnitType : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 8 ? this.form.resultPriceList[7].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>9</td>
<template v-if="form.resultPriceList">
<tr height=33 style='mso-height-source:userset;height:24.95pt' v-for="(item, index) in form.resultPriceList">
<td height=33 class=xl7112633 style='height:24.95pt;border-top:none'>{{index + 1}}</td>
<td colspan=4 class=xl8512633 style='border-right:.5pt solid black;
border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].equipmentName + ((this.form.resultPriceList[8].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[8].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].equipmentUnitType : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 9 ? this.form.resultPriceList[8].totalPrice : '' : ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td height=33 class=xl7412633 style='height:24.95pt;border-top:none'>10</td>
<td colspan=4 class=xl8712633 style='border-right:.5pt solid black;
border-bottom:.5pt solid black;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].equipmentName + ((this.form.resultPriceList[9].equipmentSizeName == '无号配号') ? '' : '('+ this.form.resultPriceList[9].equipmentSizeName + ')') : '' : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].equipmentUnitType : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].price : '' : ''}}</td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].count : '' : ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ this.form.resultPriceList ? this.form.resultPriceList.length >= 10 ? this.form.resultPriceList[9].totalPrice : '' : ''}}</td>
border-left:none'>{{ item.equipmentName ? item.equipmentName + (item.equipmentSizeName == '无号配号' ? '' : '('+ item.equipmentSizeName + ')') : ''}}</td>
<td class=xl7212633 style='border-top:none'>{{ item.equipmentUnitType || ''}} </td>
<td class=xl7312633 style='border-top:none'>{{ item.price || ''}} </td>
<td class=xl7112633 style='border-top:none;border-left:none'>{{ item.count || ''}}</td>
<td class=xl7312633 style='border-top:none'>{{ item.totalPrice || ''}}</td>
<td class=xl8012633 style='border-top:none;border-left:none'> </td>
</tr>
</template>
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td colspan=3 height=33 class=xl8512633 style='height:24.95pt'>合计金额(大写):</td>
<td colspan=5 class=xl8912633 style='border-right:.5pt solid black'>{{digitUppercase(totalPrice)}}</td>
......@@ -180,34 +92,35 @@
</td>
<td class=xl8112633 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=66 style='mso-height-source:userset;height:50.1pt'>
<td colspan=1 height=66 class=xl8726343 style='height:50.1pt'>&nbsp;发物单位</td>
<td colspan=1 class=xl8826343> </td>
<td class=xl7426343 style='border-top:none'>&nbsp;&nbsp;&nbsp;发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>&nbsp;&nbsp;&nbsp;发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>&nbsp;&nbsp;&nbsp;发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<!-- <td class=xl7426343 style='border-top:none'> </td> -->
<td class=xl7426343 style='border-top:none'>&nbsp;收物单位</td>
<td class=xl8226343 style='border-top:none'> </td>
</table>
<table border="0" style='width:1071px;padding-left:20px;border: none;'>
<tr style='height:50.1pt'>
<td colspan=1 width="107px">发物单位</td>
<td colspan=1 width="107px"> </td>
<td width="107px" style='border-top:none'>发物单位</td>
<td width="107px" style='border-top:none'> </td>
<td width="107px" style='border-top:none'>发物单位</td>
<td width="107px" style='border-top:none'> </td>
<td width="107px" style='border-top:none'>发物单位</td>
<td width="107px" style='border-top:none'> </td>
<td width="107px" style='border-top:none'>发物单位</td>
<td width="107px" style='border-top:none'> </td>
<td width="107px" style='border-top:none'>收物单位</td>
<td width="107px" style='border-top:none'> </td>
</tr>
<tr height=66 style='page-break-before:always;mso-height-source:userset;
height:50.1pt'>
<td colspan=1 height=66 class=xl9126343 style='height:50.1pt'>&nbsp;开 票 人:</td>
<td class=xl7726343></td>
<td class=xl7726343>&nbsp;&nbsp;&nbsp;审 核 人:</td>
<td class=xl7726343></td>
<td class=xl7726343>&nbsp;&nbsp;&nbsp;审 批 人:</td>
<td class=xl7726343></td>
<td class=xl7726343>&nbsp;&nbsp;&nbsp;财 务 章:</td>
<td class=xl7726343></td>
<td class=xl7726343>库 管 员:</td>
<!-- <td class=xl7726343></td> -->
<td class=xl7726343>&nbsp;签 收 人:</td>
<td class=xl8326343>&nbsp;</td>
<tr style='height:50.1pt'>
<td colspan=1 width="107px">开 票 人:</td>
<td width="107px"></td>
<td width="107px">审 核 人:</td>
<td width="107px"></td>
<td width="107px">审 批 人:</td>
<td width="107px"></td>
<td width="107px">财 务 章:</td>
<td width="107px"></td>
<td width="107px">库 管 员:</td>
<td width="107px"></td>
<td width="107px">签 收 人:</td>
<td width="107px"></td>
</tr>
<!-- <![if supportMisalignedColumns]> -->
<tr height=0 style='display:none'>
......@@ -249,7 +162,15 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
orgId: this.$store.state.user.user.baseJpOrganization.id,
dialog: false,
totalPrice: '',
form: {}
form: {},
resultPrice: {
count: '',
equipmentName: '',
equipmentSizeName: "",
equipmentUnitType: "",
price: 0,
totalPrice: 0,
}
}
},
computed: {
......@@ -263,9 +184,17 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
showOrderDetail(order) {
getByID({id:order}).then(res => {
this.form = res.data
this.totalPrice = res.data.resultPriceList.slice(0, 10).reduce(function(acc, k) {
let resultPriceList = res.data.resultPriceList
const length = resultPriceList.length
if (length <= 10) {
for (var i =0; i< 10 - length; i++) {
resultPriceList.push(this.resultPrice)
}
}
this.totalPrice = res.data.resultPriceList.reduce(function(acc, k) {
return acc + parseFloat(k.totalPrice)
}, 0);
}, 0).toFixed(2);
})
getOrderCountByOrgIdV2({orgId: this.orgId, orderType: '销', orderCode: order}).then(res => {
this.no = this.padding(res.data.no, 6)
......@@ -394,6 +323,7 @@ import { getOrderCountByOrgIdV2 } from '@/api/org'
table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
tr { page-break-inside:avoid; page-break-after:auto }
.xl1512633
{padding-top:1px;
padding-right:1px;
......
......@@ -51,7 +51,7 @@
<el-table-column prop="count" label="数量" align="center"/>
<el-table-column label="操作" v-if="orgCode === '330200000000'" width="150px" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="quickScrap(scope.row)">报废</el-button>
<el-button size="mini" type="primary" @click.stop="quickScrap(scope.row)">报废</el-button>
</template>
</el-table-column>
</el-table>
......@@ -206,13 +206,14 @@ export default {
this.detailList = val
console.log(val)
},
quickScrap(row){
// console.log(row)
this.form.warehouseId = row.warehouseId
this.form.flowType = 'scrap'
this.form.detailList = []
this.detailList.forEach(element => {
this.form.detailList.push({
quickScrap(row) {
this.form.warehouseId = row.warehouseId;
this.form.flowType = 'scrap';
this.form.detailList = [];
// 添加一个条件判断来确保 this.detailList 是一个有效的数组
if (Array.isArray(this.detailList) && this.detailList.length !== 0) {
this.form.detailList = this.detailList.map(element => ({
equipmentId: element.equId,
equipmentSizeId: element.sizeId,
supplierId: element.supplierId,
......@@ -220,19 +221,23 @@ export default {
quantity: 1,
unitPrice: element.unitPrice,
price: element.unitPrice * 1
})
})
if (this.form.detailList.length == 0) {
return this.$message.warning('至少报废一件')
}));
} else {
return this.$message.warning('至少报废一件,请展开勾选');
}
quickAddFixed(this.form).then(res => {
if (res.code === '10000') {
this.initPost()
this.$message.success('操作成功!');
this.initPost();
this.detailList = [];
} else {
this.$message.error(res.msg)
this.$message.error(res.msg);
}
})
});
}
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论