add:新增粉料计划
This commit is contained in:
@@ -200,9 +200,25 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
||||
map.put("material_code", "%" + material_code + "%");
|
||||
}
|
||||
String vbillcode = MapUtil.getStr(whereJson, "vbillcode");
|
||||
String proc_status = MapUtil.getStr(whereJson, "proc_status");
|
||||
String contract_no = MapUtil.getStr(whereJson, "contract_no");
|
||||
String supp_name = MapUtil.getStr(whereJson, "supp_name");
|
||||
String iszero = MapUtil.getStr(whereJson, "iszero");
|
||||
if (!ObjectUtil.isEmpty(vbillcode)) {
|
||||
map.put("vbillcode", "%" + vbillcode + "%");
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(proc_status)) {
|
||||
map.put("proc_status", proc_status);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(contract_no)) {
|
||||
map.put("contract_no", "%" + contract_no + "%");
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(supp_name)) {
|
||||
map.put("supp_name", "%" + supp_name + "%");
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(iszero)) {
|
||||
map.put("iszero", "true".equals(iszero)?"= 0":"<> 0");
|
||||
}
|
||||
|
||||
String classIds = classstandardService.getAllChildIdStr(MaterOptTypeEnum.ZLFL.getClass_idStr());
|
||||
map.put("classIds",classIds);
|
||||
|
||||
@@ -18,7 +18,12 @@
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.vbillcode TYPEAS s_string
|
||||
输入.proc_status TYPEAS s_string
|
||||
输入.contract_no TYPEAS s_string
|
||||
输入.supp_name TYPEAS s_string
|
||||
输入.classIds TYPEAS f_string
|
||||
输入.vbillcodes TYPEAS f_string
|
||||
输入.iszero TYPEAS f_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -129,6 +134,7 @@
|
||||
SELECT
|
||||
oder.id,
|
||||
oder.contract_no,
|
||||
oder.proc_status,
|
||||
supp.supp_name,
|
||||
mater.material_name,
|
||||
mater.material_code,
|
||||
@@ -180,6 +186,21 @@
|
||||
oder.vbillcode like 输入.vbillcode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.supp_name <> ""
|
||||
supp.supp_name like 输入.supp_name
|
||||
ENDOPTION
|
||||
OPTION 输入.contract_no <> ""
|
||||
oder.contract_no like 输入.contract_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.proc_status <> ""
|
||||
oder.proc_status = 输入.proc_status
|
||||
ENDOPTION
|
||||
OPTION 输入.iszero <> ""
|
||||
(oder.QTY - redtl.allqty) 输入.iszero
|
||||
ENDOPTION
|
||||
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
mater.material_type_id in 输入.classIds
|
||||
ENDOPTION
|
||||
@@ -196,7 +217,7 @@
|
||||
IF 输入.flag = "2"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
oder.vbillcode,
|
||||
oder.contract_no,
|
||||
dtl.receive_code,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
@@ -222,5 +243,87 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "12"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
oder.vbillcode,
|
||||
oder.contract_no,
|
||||
mater.material_name,
|
||||
mater.material_code,
|
||||
oder.PRICE_TAX,
|
||||
oder.QTY,
|
||||
oder.QTY * oder.PRICE_TAX AS money,
|
||||
oder.remark
|
||||
FROM
|
||||
PCS_IF_PurchaseOrderProc oder
|
||||
LEFT JOIN md_me_materialbase mater ON oder.ITEM_ID = mater.ext_id
|
||||
WHERE
|
||||
oder.dr = '0'
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
oder.CREATE_DATE >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
oder.CREATE_DATE <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.vbillcode <> ""
|
||||
oder.vbillcode like 输入.vbillcode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
mater.material_type_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.material_code <> ""
|
||||
(mater.material_code like 输入.material_code or
|
||||
mater.material_name like 输入.material_code )
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "13"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
oder.vbillcode,
|
||||
dtl.receive_code,
|
||||
oder.QTY - redtl.allqty AS notqty,
|
||||
redtl.allqty,
|
||||
redtl.allqty * oder.PRICE_TAX AS all_valmoney,
|
||||
LEFT(remst.input_time,10) as input_time,
|
||||
dtl.receive_qty,
|
||||
dtl.receive_qty * oder.PRICE_TAX AS valmoney,
|
||||
supp.supp_name,
|
||||
supp.honour_days,
|
||||
DATE_ADD(LEFT(remst.input_time,10),INTERVAL supp.honour_days DAY) AS plan_date
|
||||
FROM
|
||||
PCS_IF_PurchaseOrderProc oder
|
||||
LEFT JOIN md_cs_supplierbase supp ON oder.VEND_ID = supp.ext_id
|
||||
LEFT JOIN PCS_RC_ReceiveDtl dtl ON dtl.source_billdtl_id = oder.id AND dtl.source_bill_code = oder.vbillcode
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
sum( a.receive_qty ) AS allqty,
|
||||
max(a.source_billdtl_id) AS source_billdtl_id,
|
||||
max( a.material_id ) AS material_id,
|
||||
max( a.pcsn ) AS pcsn,
|
||||
max( a.receive_id ) AS receive_id
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl a
|
||||
LEFT JOIN PCS_IF_PurchaseOrderProc p ON a.source_billdtl_id = p.id AND a.source_bill_code = p.vbillcode
|
||||
GROUP BY
|
||||
a.source_billdtl_id
|
||||
)
|
||||
AS redtl ON redtl.source_billdtl_id = dtl.source_billdtl_id
|
||||
LEFT JOIN PCS_RC_ReceiveMst remst ON remst.receive_id = dtl.receive_id
|
||||
WHERE 1=1
|
||||
OPTION 输入.vbillcodes <> ""
|
||||
oder.vbillcode in 输入.vbillcodes
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
Binary file not shown.
@@ -248,7 +248,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
jo10.put("first", "覆盖日期(含待检)");
|
||||
rows.add(jo10);
|
||||
JSONObject jo11 = new JSONObject();
|
||||
jo11.put("first", "后续需求量");
|
||||
jo11.put("first", "后续10天需求量");
|
||||
rows.add(jo11);
|
||||
JSONObject jo6 = new JSONObject();
|
||||
jo6.put("first", "合同在途");
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
@@ -36,7 +35,6 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单编号">
|
||||
<el-input
|
||||
v-model="query.vbillcode"
|
||||
@@ -45,6 +43,46 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input
|
||||
v-model="query.supp_name"
|
||||
clearable
|
||||
placeholder="供应商"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号">
|
||||
<el-input
|
||||
v-model="query.contract_no"
|
||||
clearable
|
||||
placeholder="合同编号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.proc_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in procStatusList"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="未到重量">
|
||||
<div>
|
||||
<el-radio-group v-model="query.iszero" @change="crud.toQuery">
|
||||
<el-radio-button label="true">为0</el-radio-button>
|
||||
<el-radio-button label="false">不为0</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
@@ -69,7 +107,8 @@
|
||||
</el-table-column>-->
|
||||
<el-table-column label="合同内容" align="center">
|
||||
<el-table-column prop="subscribedate" label="签订时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="contract_no" label="合同编码2" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="contract_no" label="合同编码" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="proc_status" label="处理状态" width="120px" :formatter="formaterStatus" show-overflow-tooltip/>
|
||||
<el-table-column prop="supp_name" label="供应商" min-width="220" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip />
|
||||
@@ -78,11 +117,11 @@
|
||||
<el-table-column prop="money" label="金额" show-overflow-tooltip :formatter="crud.formatNum3" width="110" />
|
||||
<el-table-column prop="notqty" label="未到货重量" :formatter="crud.formatNum3" show-overflow-tooltip width="110"/>
|
||||
<el-table-column prop="honour_days" label="账龄" width="100px" show-overflow-tooltip/>
|
||||
<el-table-column prop="allqty" label="合计重量" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="all_valmoney" label="合计金额" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
</el-table-column>
|
||||
<el-table-column label="到货情况" align="center">
|
||||
<el-table-column prop="receive_code" label="到货通知单" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="allqty" label="合计重量" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="all_valmoney" label="合计金额" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="input_time" label="到货时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="receive_qty" label="到货重量" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="valmoney" label="到货金额" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
@@ -147,12 +186,16 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
procStatusList: [],
|
||||
openParam: '',
|
||||
receiveDialog: false,
|
||||
remarkDaing: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudOrderproc.getProcStatus().then(res => {
|
||||
this.procStatusList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -162,6 +205,13 @@ export default {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formaterStatus(row, column) {
|
||||
for (const item of this.procStatusList) {
|
||||
if (item.code === row.proc_status) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
openReceive(row) {
|
||||
this.openParam = row.vbillcode
|
||||
this.receiveDialog = true
|
||||
|
||||
236
mes/qd/src/views/wms/statistics/materPlan2/StructIvt2.vue
Normal file
236
mes/qd/src/views/wms/statistics/materPlan2/StructIvt2.vue
Normal file
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
title="待检入库量"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
物料:<el-select
|
||||
v-model="queryrow.material_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择物料"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in XLList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
供应商:<el-input
|
||||
v-model="queryrow.source_name"
|
||||
size="mini"
|
||||
style="width: 200px"
|
||||
clearable
|
||||
placeholder="模糊查询"
|
||||
@change="MyQuery3"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="success" @click="MyQuery2">查询</el-button>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="downExcel"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;background: transparent;overflow:auto;"
|
||||
:max-height="590"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="receive_code" label="到货单号" min-width="100" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" />
|
||||
<el-table-column prop="pcsn" label="批次" min-width="100" />
|
||||
<el-table-column prop="receive_qty" label="订单重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="noin_qty" label="剩余重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="source_name" label="供应商" min-width="100" />
|
||||
<el-table-column prop="receive_date" label="到货时间" min-width="100" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import report from '@/api/wms/statistics/report'
|
||||
import { presenter, header, crud } from '@crud/crud'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'StructIvt4',
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentRow: {},
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '', source_name: '' },
|
||||
sortable: null,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.queryrow = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downExcel() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/statistical/download2/2', this.queryrow).then(result => {
|
||||
downloadFile(result, '待检入库量', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
open() {
|
||||
report.query4().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
this.MyQuery2()
|
||||
},
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.queryrow = msg
|
||||
},
|
||||
queryStruct() {
|
||||
this.fullscreenLoading = true
|
||||
report.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.queryrow.material_id = ''
|
||||
this.queryrow.source_name = ''
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.queryrow.material_id = value
|
||||
this.fullscreenLoading = true
|
||||
report.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
MyQuery3(value) {
|
||||
this.queryrow.source_name = value
|
||||
this.fullscreenLoading = true
|
||||
report.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (column.property === 'receive_qty') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
|
||||
if (column.property === 'noin_qty') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
MyQuery2() {
|
||||
this.fullscreenLoading = true
|
||||
report.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
290
mes/qd/src/views/wms/statistics/materPlan2/StructIvt3.vue
Normal file
290
mes/qd/src/views/wms/statistics/materPlan2/StructIvt3.vue
Normal file
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
title="合同在途"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
物料:<el-select
|
||||
v-model="queryrow.material_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择物料"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in XLList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
供应商:<el-select
|
||||
v-model="queryrow.source_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="供应商"
|
||||
class="filter-item"
|
||||
@change="MyQuery3"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in Depts"
|
||||
:key="item.index"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-checkbox
|
||||
v-model="queryrow.hide"
|
||||
style="color: red"
|
||||
@change="MyQuery4"
|
||||
>隐藏在途重量为零</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="success" @click="MyQuery2">查询</el-button>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="downExcel"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;background: transparent;overflow:auto;"
|
||||
:max-height="590"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="receive_code" label="合同号" min-width="100" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" />
|
||||
<el-table-column prop="sumqty" label="合同重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="notqty" label="在途重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="norigtaxprice" label="含税单价" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="norigtaxmny" label="金额" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="notmny" label="在途金额" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="name" label="供应商" min-width="150" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import report from '@/api/wms/statistics/report'
|
||||
import { presenter, header, crud } from '@crud/crud'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'StructIvt3',
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentRow: {},
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '', source_name: '', hide: true },
|
||||
sortable: null,
|
||||
Depts: [],
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.queryrow = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downExcel() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/statistical/download2/3', this.queryrow).then(result => {
|
||||
downloadFile(result, '合同在途', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
open() {
|
||||
report.query4().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
this.MyQuery2()
|
||||
report.supplier().then(res => {
|
||||
debugger
|
||||
this.Depts = res
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.queryrow = msg
|
||||
},
|
||||
queryStruct() {
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.queryrow.material_id = ''
|
||||
this.queryrow.source_name = ''
|
||||
this.queryrow.hide = true
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.queryrow.material_id = value
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
MyQuery3(value) {
|
||||
this.queryrow.source_name = value
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
MyQuery4(value) {
|
||||
this.queryrow.hide = value
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (column.property === 'sumqty') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
|
||||
if (column.property === 'notqty') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
|
||||
if (column.property === 'norigtaxmny') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
if (column.property === 'notmny') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
MyQuery2() {
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
197
mes/qd/src/views/wms/statistics/materPlan2/StructIvt4.vue
Normal file
197
mes/qd/src/views/wms/statistics/materPlan2/StructIvt4.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="库存现存量"
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
物料:<el-select
|
||||
v-model="queryrow.material_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择物料"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in XLList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="success" @click="MyQuery2">查询</el-button>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="downExcel"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dragTable"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;background: transparent;overflow:auto;"
|
||||
:max-height="590"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" />
|
||||
<el-table-column prop="pcsn" label="批次" min-width="100" />
|
||||
<el-table-column prop="qty" label="可用重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import report from '@/api/wms/statistics/report'
|
||||
import { presenter, header, crud } from '@crud/crud'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'StructIvt4',
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentRow: {},
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
XLList: [],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '' },
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.queryrow = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downExcel() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/statistical/download2/1', this.queryrow).then(result => {
|
||||
downloadFile(result, '库存现存量', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
open() {
|
||||
report.query4().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
this.MyQuery2()
|
||||
},
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.queryrow = msg
|
||||
},
|
||||
queryStruct() {
|
||||
this.fullscreenLoading = true
|
||||
report.query1(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.queryrow.material_id = ''
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.queryrow.material_id = value
|
||||
this.fullscreenLoading = true
|
||||
report.query1(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (column.property === 'qty') {
|
||||
const total = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
sums[index]
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
MyQuery2() {
|
||||
this.fullscreenLoading = true
|
||||
report.query1(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
289
mes/qd/src/views/wms/statistics/materPlan2/index.vue
Normal file
289
mes/qd/src/views/wms/statistics/materPlan2/index.vue
Normal file
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="统计日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织">
|
||||
<el-select
|
||||
v-model="query.org_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="所属组织"
|
||||
multiple
|
||||
style="width: 400px"
|
||||
class="filter-item"
|
||||
@change="handTaskStatus"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in Depts"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
highlight-current-row
|
||||
v-loading="crud.loading"
|
||||
:row-class-name="tableRowClassName"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
:max-height="590"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col.prop !== 'first'" :prop="col.prop" :label="col.label" width="120px" />
|
||||
<el-table-column v-if="col.prop === 'first'" :prop="col.prop" :label="col.label" width="140px" fixed>
|
||||
<template slot-scope="scope">
|
||||
<span v-show="!isshow(scope.row)">{{ scope.row.first }}</span>
|
||||
<el-link v-show="isshow(scope.row)" type="warning" @click="open2(scope.$index, scope.row)">{{ scope.row.first }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<!--分页组件-->
|
||||
<StructIvt4 ref="child" :dialog-show.sync="structshow" :rowmst="form" />
|
||||
<StructIvt3 ref="child3" :dialog-show.sync="structshow3" :rowmst="form" />
|
||||
<StructIvt2 ref="child2" :dialog-show.sync="structshow2" :rowmst="form" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
/*顶部滚动条*/
|
||||
.top-scroll {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.top-scroll .top-scroll-content {
|
||||
background-color: #fff;
|
||||
height: 15px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-table__body-wrapper {
|
||||
display: block;
|
||||
}
|
||||
::v-deep .el-table__body tr.current-row>td {
|
||||
color: #fff;
|
||||
background: #409EFF!important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import report from '@/api/wms/statistics/report'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import StructIvt4 from '@/views/wms/statistics/materPlan/StructIvt4'
|
||||
import StructIvt3 from '@/views/wms/statistics/materPlan/StructIvt3'
|
||||
import StructIvt2 from '@/views/wms/statistics/materPlan/StructIvt2'
|
||||
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import Date from '@/utils/datetime'
|
||||
import workorder from '@/api/wms/pdm/workorder'
|
||||
|
||||
export default {
|
||||
name: 'MaterPlanQuery',
|
||||
components: { crudOperation, rrOperation, StructIvt4, StructIvt2, StructIvt3 },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '粉料计划表',
|
||||
url: 'api/statistical/materPlanQuery',
|
||||
idField: '1',
|
||||
sort: '1,desc',
|
||||
query: {
|
||||
task_status: ''
|
||||
},
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
topScrollWidth: 10,
|
||||
cols: [],
|
||||
cols2: [],
|
||||
dtlList: [],
|
||||
form: {},
|
||||
structshow: false,
|
||||
structshow2: false,
|
||||
structshow3: false,
|
||||
Depts: [],
|
||||
query_flag: true,
|
||||
statusList: [],
|
||||
permission: {},
|
||||
rules: {},
|
||||
key: null
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
workorder.getDepts().then(res => {
|
||||
this.Depts = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date(), new Date().daysLater(30)]
|
||||
},
|
||||
methods: {
|
||||
handleScrollTop() {
|
||||
if (this.$refs.topScroll) {
|
||||
var scrollLeft = this.$refs.topScroll.scrollLeft
|
||||
var scrollTop = this.$refs.dtl_table.bodyWrapper.scrollTop
|
||||
this.$refs.dtl_table.bodyWrapper.scrollTo(scrollLeft, scrollTop)
|
||||
// this.refreshTable()
|
||||
}
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
report.getHeader().then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
report.getHeader2().then(res => {
|
||||
this.cols2 = res
|
||||
})
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date().daysLater(30)).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
const data = this.crud.query
|
||||
report.materPlanDtlQuery(data).then(res => {
|
||||
this.dtlList = res.content
|
||||
this.topScrollWidth = this.$refs.dtl_table.bodyWrapper.scrollWidth + 'px'
|
||||
this.tableDom = this.$refs.dtl_table.bodyWrapper
|
||||
this.tableDom.addEventListener('scroll', () => {
|
||||
var scrollLeft = this.tableDom.scrollLeft
|
||||
this.$refs.topScroll.scrollTo(scrollLeft, 0)
|
||||
})
|
||||
})
|
||||
crudInspectionsheetmst.getStatus().then(res => {
|
||||
this.statusList = res
|
||||
})
|
||||
return true
|
||||
},
|
||||
handTaskStatus(value) {
|
||||
var str1 = ''
|
||||
if (value) {
|
||||
for (const item of value) {
|
||||
if (str1 === '') {
|
||||
str1 = item
|
||||
} else {
|
||||
str1 = str1 + ',' + item
|
||||
}
|
||||
}
|
||||
this.query.task_status = str1
|
||||
} else {
|
||||
this.query.task_status = ''
|
||||
}
|
||||
},
|
||||
open2(index, row) {
|
||||
if (row.first === '库存现存量') {
|
||||
this.structshow = true
|
||||
}
|
||||
if (row.first === '待检入库量') {
|
||||
this.structshow2 = true
|
||||
}
|
||||
if (row.first === '合同在途') {
|
||||
this.structshow3 = true
|
||||
}
|
||||
},
|
||||
isshow(row) {
|
||||
if (row.first === '库存现存量') {
|
||||
return true
|
||||
} else if (row.first === '待检入库量') {
|
||||
return true
|
||||
} else if (row.first === '合同在途') {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/rawUatWcQuery/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '原材料碳化钨', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 === 1) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
refreshTable() {
|
||||
this.key = Math.random()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
::v-deep .el-table__body tr.current-row>td {
|
||||
color: #fff;
|
||||
background: #409EFF!important;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user