Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -180,6 +180,7 @@
|
||||
<!-- <el-tag type="info" size="small">{{ scope.row.currentCoilNo }}</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="厂家卷号" align="center" prop="supplierCoilNo" />
|
||||
|
||||
<el-table-column label="新增时间" align="center" prop="createTime" width="150" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
<th>卷号</th>
|
||||
<th>规格</th>
|
||||
<th>材质</th>
|
||||
<th>数量(件)</th>
|
||||
<!-- <th>数量(件)</th> -->
|
||||
<th>重量(T)</th>
|
||||
<th>单价</th>
|
||||
<!-- <th>单价</th> -->
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -68,7 +68,7 @@
|
||||
</tr>
|
||||
<!-- 明细数据 -->
|
||||
<tr v-for="(item, index) in displayWaybillDetails" :key="index">
|
||||
<td><input type="text" class="transparent-input" v-model="item.productName" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.productName" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.edgeType" />
|
||||
</td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.packageType" />
|
||||
@@ -83,11 +83,11 @@
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.specification" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.material" />
|
||||
</td>
|
||||
<td><input type="number" class="table-input transparent-input" v-model.number="item.quantity"
|
||||
placeholder="0" /></td>
|
||||
<!-- <td><input type="number" class="table-input transparent-input" v-model.number="item.quantity"
|
||||
placeholder="0" /></td> -->
|
||||
<td><input type="number" class="table-input transparent-input" v-model.number="item.weight"
|
||||
placeholder="0.00" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.unitPrice" /></td>
|
||||
<!-- <td><input type="text" class="table-input transparent-input" v-model="item.unitPrice" /></td> -->
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
<div class="waybill-pickup-location">
|
||||
<!-- <div class="pickup-location-item inline"> -->
|
||||
<span class="label">取货地点:</span>
|
||||
<span style="font-size: 16px; font-weight: bold;">取货地点:</span>
|
||||
<input type="text" class="editable-input full-input transparent-input" v-model="localWaybill.pickupLocation" />
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
@@ -466,7 +466,8 @@ export default {
|
||||
.label {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
width: 100px;
|
||||
font-size: 16px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -480,7 +481,7 @@ export default {
|
||||
padding: 4px 8px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
font-family: SimSun, serif;
|
||||
outline: none;
|
||||
transition: all 0.2s;
|
||||
@@ -492,7 +493,7 @@ export default {
|
||||
}
|
||||
|
||||
.date-input {
|
||||
width: 30px;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
margin-right: 5px;
|
||||
}
|
||||
@@ -525,6 +526,7 @@ export default {
|
||||
line-height: 6mm;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
@@ -533,7 +535,7 @@ export default {
|
||||
/* 表格列宽设置 */
|
||||
.waybill-table th:nth-child(1),
|
||||
.waybill-table td:nth-child(1) {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
/* 品名 */
|
||||
}
|
||||
|
||||
@@ -581,27 +583,29 @@ export default {
|
||||
|
||||
.waybill-table th:nth-child(9),
|
||||
.waybill-table td:nth-child(9) {
|
||||
width: 40px;
|
||||
width: 80px;
|
||||
/* 材质 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(10),
|
||||
/* 数量(件) */
|
||||
/* .waybill-table th:nth-child(10),
|
||||
.waybill-table td:nth-child(10) {
|
||||
width: 60px;
|
||||
/* 数量(件) */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(11),
|
||||
.waybill-table td:nth-child(11) {
|
||||
} */
|
||||
|
||||
.waybill-table th:nth-child(10),
|
||||
.waybill-table td:nth-child(10) {
|
||||
width: 80px;
|
||||
/* 重量(kg) */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(12),
|
||||
/* 单价 */
|
||||
/* .waybill-table th:nth-child(12),
|
||||
.waybill-table td:nth-child(12) {
|
||||
width: 40px;
|
||||
/* 单价 */
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
|
||||
.waybill-table th {
|
||||
@@ -623,10 +627,10 @@ export default {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
/* font-family: inherit; */
|
||||
font-size: 16px;
|
||||
line-height: 6mm;
|
||||
text-align: inherit;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@@ -695,8 +699,10 @@ export default {
|
||||
/* 备注样式 */
|
||||
.waybill-remarks {
|
||||
margin-bottom: 30px;
|
||||
font-size: 14px;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
/* font-weight: 600; */
|
||||
font-weight: bold;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
@@ -721,9 +727,12 @@ export default {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.waybill-pickup-location label {
|
||||
font-size: 14px;
|
||||
margin-right: 10px;
|
||||
font-size: 16px;
|
||||
/* margin-right: 10px; */
|
||||
text-align: left !important;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
@@ -742,7 +751,7 @@ export default {
|
||||
}
|
||||
|
||||
.footer-item .label {
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
margin-right: 10px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
229
klp-ui/src/views/wms/report/zha_.vue
Normal file
229
klp-ui/src/views/wms/report/zha_.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row>
|
||||
<el-form label-width="80px" inline>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeStart" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择开始时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeEnd" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择结束时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场钢卷号" prop="endTime">
|
||||
<el-input style="width: 200px; display: inline-block;" v-model="queryParams.enterCoilNo"
|
||||
placeholder="请输入入场钢卷号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前钢卷号" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="逻辑库位" prop="endTime">
|
||||
<warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="endTime">
|
||||
<memo-input style="width: 200px;" v-model="queryParams.itemSpecification" storageKey="coilSpec"
|
||||
placeholder="请选择规格" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材质" prop="endTime">
|
||||
<muti-select style="width: 200px;" v-model="queryParams.itemMaterial" :options="dict.type.coil_material"
|
||||
placeholder="请选择材质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家" prop="endTime">
|
||||
<muti-select style="width: 200px;" v-model="queryParams.itemManufacturer"
|
||||
:options="dict.type.coil_manufacturer" placeholder="请选择厂家" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="收货计划" prop="planId">
|
||||
<el-select style="width: 200px;" v-model="queryParams.planId" placeholder="请输入计划名称搜索收货计划" filterable remote
|
||||
:remote-method="remoteMethod">
|
||||
<el-option v-for="item in planList" :key="item.planId" :label="item.planName" :value="item.planId" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="endTime">
|
||||
<el-button type="primary" @click="getList">查询</el-button>
|
||||
<el-button type="primary" @click="exportData">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-descriptions title="统计信息" :column="3" border>
|
||||
<el-descriptions-item label="总钢卷数量">{{ summary.totalCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="总重">{{ summary.totalWeight }}t</el-descriptions-item>
|
||||
<el-descriptions-item label="均重">{{ summary.avgWeight }}t</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions title="明细信息" :column="3" border>
|
||||
</el-descriptions>
|
||||
<el-table :data="list" border height="calc(100vh - 320px)">
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.enterCoilNo"></coil-no>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.currentCoilNo"></coil-no>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="逻辑库位" align="center" prop="warehouseName" />
|
||||
<!-- <el-table-column label="实际库区" align="center" prop="actualWarehouseName" /> -->
|
||||
<el-table-column label="产品类型" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row.product" />
|
||||
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row.rawMaterial" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量 (吨)" align="center" prop="netWeight" />
|
||||
<el-table-column label="长度 (米)" align="center" prop="length" />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="出库状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status === 0 ? '在库' : '已出库' }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="更新人" align="center" prop="updateByName" />
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCoilWithIds } from "@/api/wms/coil";
|
||||
import {
|
||||
listPendingAction,
|
||||
} from '@/api/wms/pendingAction';
|
||||
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||
import MemoInput from "@/components/MemoInput";
|
||||
import MutiSelect from "@/components/MutiSelect";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import { listDeliveryPlan } from '@/api/wms/deliveryPlan'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ProductInfo,
|
||||
RawMaterialInfo,
|
||||
CoilNo,
|
||||
MemoInput,
|
||||
MutiSelect,
|
||||
WarehouseSelect,
|
||||
},
|
||||
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
|
||||
data() {
|
||||
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
|
||||
const addZero = (num) => num.toString().padStart(2, '0')
|
||||
|
||||
const now = new Date() // 当前本地北京时间
|
||||
// 核心:获取【昨天】的日期对象(自动处理跨月/跨年,无边界问题)
|
||||
const yesterday = new Date(now)
|
||||
yesterday.setDate(yesterday.getDate() - 1)
|
||||
|
||||
// 昨天的年、月、日(补零格式化)
|
||||
const yesYear = yesterday.getFullYear()
|
||||
const yesMonth = addZero(yesterday.getMonth() + 1)
|
||||
const yesDay = addZero(yesterday.getDate())
|
||||
|
||||
// 今天的年、月、日(补零格式化)
|
||||
const nowYear = now.getFullYear()
|
||||
const nowMonth = addZero(now.getMonth() + 1)
|
||||
const nowDay = addZero(now.getDate())
|
||||
|
||||
// ✅ 目标时间区间:昨天早上6点 至 今天早上6点
|
||||
const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00`
|
||||
const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00`
|
||||
return {
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
// status: 1,
|
||||
byCreateTimeStart: startTime,
|
||||
byCreateTimeEnd: endTime,
|
||||
selectType: 'raw_material',
|
||||
enterCoilNo: '',
|
||||
currentCoilNo: '',
|
||||
warehouseId: '',
|
||||
productName: '',
|
||||
itemSpecification: '',
|
||||
itemMaterial: '',
|
||||
itemManufacturer: '',
|
||||
planId: '',
|
||||
},
|
||||
planList: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
summary() {
|
||||
// 总钢卷数量、总重、均重
|
||||
const totalCount = this.list.length
|
||||
const totalWeight = this.list.reduce((acc, cur) => acc + parseFloat(cur.netWeight), 0)
|
||||
const avgWeight = totalCount > 0 ? (totalWeight / totalCount).toFixed(2) : 0
|
||||
return {
|
||||
totalCount,
|
||||
totalWeight: totalWeight.toFixed(2),
|
||||
avgWeight,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remoteMethod(query) {
|
||||
listDeliveryPlan({ planName: query, pageNum: 1, pageSize: 5, planType: 1 }).then(res => {
|
||||
this.planList = res.rows
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
listPendingAction({
|
||||
// actionStatus: 2,
|
||||
warehouseId: this.queryParams.planId,
|
||||
// actionType: 401,
|
||||
actionType: 11, // 酸轧工序
|
||||
pageSize: 999,
|
||||
pageNum: 1,
|
||||
startTime: this.queryParams.byCreateTimeStart,
|
||||
endTime: this.queryParams.byCreateTimeEnd,
|
||||
}).then(res => {
|
||||
const actions = res.rows
|
||||
const coilIds = actions.map(item => item.coilId).join(',')
|
||||
console.log(coilIds)
|
||||
if (!coilIds) {
|
||||
this.$message({
|
||||
message: '暂无数据',
|
||||
type: 'warning',
|
||||
})
|
||||
this.list = []
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
coilIds: coilIds,
|
||||
}).then(res => {
|
||||
this.list = res.rows
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportData() {
|
||||
this.download('wms/materialCoil/export', {
|
||||
coilIds: this.list.map(item => item.coilId).join(',')
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.remoteMethod('')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user