mirror of
https://github.com/shawncai/ERP.git
synced 2024-11-10 09:13:08 +08:00
修改代码 5.14
This commit is contained in:
parent
b59b8b962d
commit
4cc722dbc5
5 changed files with 143 additions and 10 deletions
|
@ -662,7 +662,10 @@ export default {
|
|||
notinvoiceQuantity: '未开票数',
|
||||
invoiceMoney: '已开票额',
|
||||
notinvoiceMoney: '未开票额',
|
||||
invoice: '开票'
|
||||
invoice: '开票',
|
||||
deliveryNumber: '到货单号',
|
||||
arrivalTime: '到货时间',
|
||||
warehouseReceiptNumber: '入库单号'
|
||||
},
|
||||
supplierPunishmentCount: {
|
||||
supplierName: '供应商名称',
|
||||
|
|
|
@ -253,6 +253,16 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
jundgeprice() {
|
||||
const value = ['1-22-24-115']
|
||||
const roles = this.$store.getters && this.$store.getters.roles
|
||||
const permissionRoles = value
|
||||
const hasPermission = roles.some(role => {
|
||||
return permissionRoles.includes(role)
|
||||
})
|
||||
console.log('hasPermission=======', hasPermission)
|
||||
return hasPermission
|
||||
},
|
||||
clickRow(val) {
|
||||
if (val.judgeStat === 0) {
|
||||
this.$refs.table.toggleRowSelection(val)
|
||||
|
|
|
@ -34,22 +34,62 @@
|
|||
:label="$t('stockTrackList.supplierName')"
|
||||
prop="supplierName"
|
||||
width="200"
|
||||
fixed="left"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('stockTrackList.receiptDate')"
|
||||
prop="receiptDate"
|
||||
width="200"
|
||||
fixed="left"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('stockTrackList.orderNumber')"
|
||||
prop="orderNumber"
|
||||
fixed="left"
|
||||
width="200"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('stockDetailCount.productCode')"
|
||||
prop="productCode"
|
||||
fixed="left"
|
||||
width="200"
|
||||
align="center"/>
|
||||
<!-- 新增四列开始 -->
|
||||
<el-table-column
|
||||
:label="$t('stockTrackList.arrivalTime')"
|
||||
prop="orderArrivalVos.arrivalDate"
|
||||
width="200"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<p> {{ scope.row.orderArrivalVos[0].arrivalDate }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('stockTrackList.deliveryNumber')"
|
||||
prop="orderArrivalVos.arrivalNumber"
|
||||
width="200"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<p> {{ scope.row.orderArrivalVos[0].arrivalNumber }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('stockTrackList.warehouseReceiptNumber')" prop="delayNum" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="right"
|
||||
width="720"
|
||||
trigger="hover">
|
||||
<el-table :data="scope.row.orderEnterVos" border size="small">
|
||||
<el-table-column label="订单编号" min-width="200" property="enterNumber"/>
|
||||
<el-table-column label="入库日期" min-width="200" property="enterDate"/>
|
||||
</el-table>
|
||||
<div slot="reference" class="name-wrapper link-type">
|
||||
{{ scope.row.orderEnterVos.length > 0 ? scope.row.orderEnterVos.length > 1 ? '...' : scope.row.orderEnterVos[0].enterNumber : '无' }}
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 新增四列结束 -->
|
||||
<el-table-column
|
||||
:label="$t('stockTrackList.deliveryDate')"
|
||||
prop="deliveryDate"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
style="width: 250px"/>
|
||||
|
||||
<el-button v-waves size="small" class="filter-item" type="primary" icon="el-icon-search" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
|
||||
|
||||
<el-button v-permission="['1-14-16-6']" v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 60px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">
|
||||
|
@ -43,11 +43,26 @@
|
|||
<span class="link-type" @click="handleDetail2(scope.row)">{{ scope.row.arrivalNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('report.delayNum')"
|
||||
prop="delayNum"
|
||||
width="200"
|
||||
align="center"/>
|
||||
<el-table-column :label="$t('report.delayNum')" prop="delayNum" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="right"
|
||||
width="720"
|
||||
trigger="hover">
|
||||
<el-table :data="scope.row.orderDelayVos" border size="small">
|
||||
<el-table-column label="订单编号" min-width="200" property="orderNumber"/>
|
||||
<el-table-column :label="$t('Hmodule.wpbh')" min-width="200" property="productCode"/>
|
||||
<el-table-column :label="$t('Hmodule.wpmc')" min-width="200" property="productName"/>
|
||||
<el-table-column label="延迟天数" min-width="100" property="days"/>
|
||||
<el-table-column label="实际到货日期" min-width="100" property="actualDate"/>
|
||||
<el-table-column label="应到货日期" min-width="100" property="shouldDate"/>
|
||||
</el-table>
|
||||
<div slot="reference" class="name-wrapper link-type">
|
||||
{{ scope.row.delayNum }}
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('report.arrivalRate3')"
|
||||
prop="arrivalRate"
|
||||
|
@ -194,14 +209,12 @@ export default {
|
|||
}
|
||||
},
|
||||
activated() {
|
||||
this.getlist()
|
||||
setTimeout(() => {
|
||||
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
|
||||
}, 100)
|
||||
},
|
||||
mounted() {
|
||||
this.getlist()
|
||||
this.changeName()
|
||||
// this.changeName()
|
||||
setTimeout(() => {
|
||||
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
|
||||
}, 100)
|
||||
|
@ -210,6 +223,55 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
cutnull(data) {
|
||||
for (let x = 0; x < data.length; x++) {
|
||||
if (data[x] === null || data[x] === undefined || data[x] === '') { // 如果是null 把直接内容转为 ''
|
||||
data.splice(x, 1)
|
||||
x--
|
||||
} else {
|
||||
if (Array.isArray(data[x])) { // 是数组遍历数组 递归继续处理
|
||||
data[x] = data[x].map(z => {
|
||||
return this.cutnull(z)
|
||||
})
|
||||
}
|
||||
if (typeof (data[x]) === 'object') { // 是json 递归继续处理
|
||||
data[x] = this.cutnull(data[x])
|
||||
}
|
||||
}
|
||||
}
|
||||
return data
|
||||
},
|
||||
handleExport() {
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
if (this.list[i].orderDelayVos) {
|
||||
for (let j = 0; j < this.list[i].orderDelayVos.length; j++) {
|
||||
this.list[i].orderDelayVos[j].supplierName = this.list[i].supplierName
|
||||
}
|
||||
}
|
||||
}
|
||||
const newarr = this.list.map(item => {
|
||||
return item.orderDelayVos
|
||||
})
|
||||
const newarr2 = this.cutnull([].concat.apply([], newarr))
|
||||
console.log('newarr2=', newarr2)
|
||||
this.downloadLoading = true
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['供应商', '订单编号', '物品名称', '物品编码', '延迟天数', '实际到货日期', '应到货日期']
|
||||
const filterVal = ['supplierName', 'orderNumber', 'productName', 'productCode', 'days', 'actualDate', 'shouldDate']
|
||||
const data = this.formatJson(filterVal, newarr2)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '客户资料表'
|
||||
})
|
||||
this.downloadLoading = false
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
handleDetail2(row) {
|
||||
console.log('row', row)
|
||||
const param = {}
|
||||
|
@ -311,6 +373,14 @@ export default {
|
|||
},
|
||||
// 搜索
|
||||
handleFilter() {
|
||||
if (this.date.length < 2) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '请选择日期',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.getemplist.pageNum = 1
|
||||
if (this.date === null || this.date === undefined || this.date === '') {
|
||||
this.getemplist.beginTime = ''
|
||||
|
|
|
@ -456,6 +456,16 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
jundgeprice() {
|
||||
const value = ['1-22-24-115']
|
||||
const roles = this.$store.getters && this.$store.getters.roles
|
||||
const permissionRoles = value
|
||||
const hasPermission = roles.some(role => {
|
||||
return permissionRoles.includes(role)
|
||||
})
|
||||
console.log('hasPermission=======', hasPermission)
|
||||
return hasPermission
|
||||
},
|
||||
getinformation() {
|
||||
if (this.$store.getters.empcontract) {
|
||||
console.log('getempcontract', this.$store.getters.empcontract)
|
||||
|
|
Loading…
Reference in a new issue