页面优化2加库区打印

yangwl
mengjiao 3 months ago
parent 7297fc8f30
commit 99a2748703

@ -66,6 +66,7 @@
v-hasPermi="['wms:area:export']" v-hasPermi="['wms:area:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -105,6 +106,11 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['wms:area:remove']" v-hasPermi="['wms:area:remove']"
>删除</el-button> >删除</el-button>
<el-button
size="mini"
type="text"
@click="showPrint(scope.row)"
>打印</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -117,6 +123,17 @@
@pagination="getList" @pagination="getList"
/> />
<el-dialog :title="printTitle" :visible.sync="printOpen" width="500px" append-to-body>
<div class="center-content" id="printFrom">
<canvas ref="qrCanvas"></canvas>
<ul class="no-bullets" >
<li class="material-info" style="font-size: 24px;">{{printData.areaCode}}</li>
</ul>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlePrint(printData)"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改库区对话框 --> <!-- 添加或修改库区对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" > <el-form ref="form" :model="form" :rules="rules" label-width="100px" >
@ -228,6 +245,7 @@
<script> <script>
import { listArea, getArea, delArea, addArea, updateArea } from "@/api/wms/area"; import { listArea, getArea, delArea, addArea, updateArea } from "@/api/wms/area";
import QRCode from "qrcode";
export default { export default {
name: "Area", name: "Area",
@ -243,6 +261,24 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
//
printTitle:"",
//
printOpen: false,
//
printData: {
areaCode: null,
printable: 'printFrom',
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null,
factory: null,
productDate: null,
workTable: [],
},
// //
total: 0, total: 0,
// //
@ -309,7 +345,9 @@ export default {
indexMethod(index){ indexMethod(index){
return index+1 ; return index+1 ;
}, },
/** 查询库区列表 */
/** 查询库区列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listArea(this.queryParams).then(response => { listArea(this.queryParams).then(response => {
@ -323,6 +361,25 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
showPrint(row) {
console.log(row.areaCode)
//const storageId = row.storageId || this.ids;
this.printData.areaCode = row.areaCode;
this.printOpen = true;
// 使 Vue nextTick DOM
this.$nextTick(() => {
const canvas = this.$refs.qrCanvas;
const options = {
width: 200, //
height: 200 //
};
QRCode.toCanvas(canvas,row.areaCode, options, error => {
if (error) console.error(error);
});
});
},
// //
reset() { reset() {
this.form = { this.form = {
@ -370,6 +427,20 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
handlePrint(params) {
console.log(params)
printJS({
printable: params.printable || 'printFrom', // id
type: params.type || 'html',
maxWidth: 1500, //
font_size: "",//
header: params.header, // '',
targetStyles: ['*'],
style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null
})
},
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.areaId) this.ids = selection.map(item => item.areaId)

@ -25,14 +25,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="入库单号" prop="orderNo"> <!-- <el-form-item label="入库单号" prop="orderNo">-->
<el-input <!-- <el-input-->
v-model="queryParams.orderNo" <!-- v-model="queryParams.orderNo"-->
placeholder="请输入入库单号" <!-- placeholder="请输入入库单号"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="产品名称" prop="productName"> <el-form-item label="产品名称" prop="productName">
<el-input <el-input
v-model="queryParams.productName" v-model="queryParams.productName"
@ -57,14 +57,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="条码" prop="barCode"> <!-- <el-form-item label="条码" prop="barCode">-->
<el-input <!-- <el-input-->
v-model="queryParams.barCode" <!-- v-model="queryParams.barCode"-->
placeholder="请输入条码" <!-- placeholder="请输入条码"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="数量" prop="amount"> <el-form-item label="数量" prop="amount">
<el-input <el-input
v-model="queryParams.amount" v-model="queryParams.amount"
@ -90,30 +90,30 @@
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="创建时间" prop="gmtCreate"> <!-- <el-form-item label="创建时间" prop="gmtCreate">-->
<el-date-picker clearable <!-- <el-date-picker clearable-->
v-model="queryParams.gmtCreate" <!-- v-model="queryParams.gmtCreate"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="请选择创建时间"> <!-- placeholder="请选择创建时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="最后更新人" prop="lastModifiedBy"> <!-- <el-form-item label="最后更新人" prop="lastModifiedBy">-->
<el-input <!-- <el-input-->
v-model="queryParams.lastModifiedBy" <!-- v-model="queryParams.lastModifiedBy"-->
placeholder="请输入最后更新人" <!-- placeholder="请输入最后更新人"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="最后更新时间" prop="gmtModified"> <!-- <el-form-item label="最后更新时间" prop="gmtModified">-->
<el-date-picker clearable <!-- <el-date-picker clearable-->
v-model="queryParams.gmtModified" <!-- v-model="queryParams.gmtModified"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="请选择最后更新时间"> <!-- placeholder="请选择最后更新时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
@ -171,14 +171,17 @@
<el-table v-loading="loading" :data="detailedList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="detailedList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="唯一序列号" align="center" prop="storageId" v-if="false" /> <el-table-column label="唯一序列号" align="center" prop="storageId" v-if="false" />
<el-table-column label="产品名称" align="center" prop="productName" width="280" />
<el-table-column label="产品编码" align="center" prop="productCode" width="250">
<template slot-scope="scope">
<span>{{ formatProductCode(scope.row.productCode) }}</span>
</template>
</el-table-column>
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column label="仓库编码" align="center" prop="whCode" /> <el-table-column label="仓库编码" align="center" prop="whCode" />
<el-table-column label="库区编码" align="center" prop="waCode" /> <el-table-column label="库区编码" align="center" prop="waCode" />
<el-table-column label="库位编码" align="center" prop="wlCode" /> <el-table-column label="库位编码" align="center" prop="wlCode" />
<el-table-column label="入库单号" align="center" prop="orderNo" />
<el-table-column label="产品名称" align="center" prop="productName" />
<el-table-column label="产品编码" align="center" prop="productCode" />
<el-table-column label="托盘号" align="center" prop="sn" /> <el-table-column label="托盘号" align="center" prop="sn" />
<el-table-column label="条码" align="center" prop="barCode" />
<el-table-column label="数量" align="center" prop="amount" /> <el-table-column label="数量" align="center" prop="amount" />
<el-table-column label="备用1" align="center" prop="userDefined1" v-if="false" /> <el-table-column label="备用1" align="center" prop="userDefined1" v-if="false" />
<el-table-column label="备用2" align="center" prop="userDefined2" v-if="false" /> <el-table-column label="备用2" align="center" prop="userDefined2" v-if="false" />
@ -190,20 +193,6 @@
<el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" /> <el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" />
<el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" /> <el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" />
<el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" /> <el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" />
<el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="最后更新人" align="center" prop="lastModifiedBy" />
<el-table-column label="最后更新时间" align="center" prop="gmtModified" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="有效标记" align="center" prop="activeFlag" v-if="false" />
<el-table-column label="工厂编码" align="center" prop="factoryCode" v-if="false" />
<el-table-column label="sap工厂编码" align="center" prop="sapFactoryCode" v-if="false" />
</el-table> </el-table>
@ -457,6 +446,11 @@ export default {
this.title = "修改成品库存明细"; this.title = "修改成品库存明细";
}); });
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -33,22 +33,22 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="库位编码" prop="wlCode"> <!-- <el-form-item label="库位编码" prop="wlCode">-->
<el-input <!-- <el-input-->
v-model="queryParams.wlCode" <!-- v-model="queryParams.wlCode"-->
placeholder="请输入库位编码" <!-- placeholder="请输入库位编码"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="库位名称" prop="wlName"> <!-- <el-form-item label="库位名称" prop="wlName">-->
<el-input <!-- <el-input-->
v-model="queryParams.wlName" <!-- v-model="queryParams.wlName"-->
placeholder="请输入库位名称" <!-- placeholder="请输入库位名称"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="产品编码" prop="productCode"> <el-form-item label="产品编码" prop="productCode">
<el-input <el-input
v-model="queryParams.productCode" v-model="queryParams.productCode"
@ -65,30 +65,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="总数量" prop="amount">
<el-input
v-model="queryParams.amount"
placeholder="请输入总数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="冻结数量" prop="storageAmount">
<el-input
v-model="queryParams.storageAmount"
placeholder="请输入冻结数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="占用数量" prop="occupyAmount">
<el-input
v-model="queryParams.occupyAmount"
placeholder="请输入占用数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="LPN" prop="lpn">--> <!-- <el-form-item label="LPN" prop="lpn">-->
<!-- <el-input--> <!-- <el-input-->
<!-- v-model="queryParams.lpn"--> <!-- v-model="queryParams.lpn"-->
@ -105,14 +85,14 @@
<!-- @keyup.enter.native="handleQuery"--> <!-- @keyup.enter.native="handleQuery"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="入库时间" prop="receiveDate"> <!-- <el-form-item label="入库时间" prop="receiveDate">-->
<el-date-picker clearable <!-- <el-date-picker clearable-->
v-model="queryParams.receiveDate" <!-- v-model="queryParams.receiveDate"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="请选择入库时间"> <!-- placeholder="请选择入库时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<!-- <el-form-item label="生产时间" prop="productDate">--> <!-- <el-form-item label="生产时间" prop="productDate">-->
<!-- <el-date-picker clearable--> <!-- <el-date-picker clearable-->
<!-- v-model="queryParams.productDate"--> <!-- v-model="queryParams.productDate"-->
@ -201,14 +181,14 @@
<!-- @keyup.enter.native="handleQuery"--> <!-- @keyup.enter.native="handleQuery"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="创建时间" prop="gmtCreate"> <!-- <el-form-item label="创建时间" prop="gmtCreate">-->
<el-date-picker clearable <!-- <el-date-picker clearable-->
v-model="queryParams.gmtCreate" <!-- v-model="queryParams.gmtCreate"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="请选择创建时间"> <!-- placeholder="请选择创建时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<!-- <el-form-item label="最后更新人" prop="lastModifiedBy">--> <!-- <el-form-item label="最后更新人" prop="lastModifiedBy">-->
<!-- <el-input--> <!-- <el-input-->
<!-- v-model="queryParams.lastModifiedBy"--> <!-- v-model="queryParams.lastModifiedBy"-->
@ -305,30 +285,19 @@
<el-table v-loading="loading" :data="majorList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="majorList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="唯一序列" align="center" prop="storageId" v-if="false" /> <el-table-column label="唯一序列" align="center" prop="storageId" v-if="false" />
<el-table-column label="产品编码" align="center" prop="productCode" width="150"/>
<el-table-column label="产品名称" align="center" prop="productName" width="250"/>
<el-table-column label="工厂号" align="center" prop="factoryCode" />
<el-table-column label="仓库编码" align="center" prop="whCode" /> <el-table-column label="仓库编码" align="center" prop="whCode" />
<el-table-column label="区域编号" align="center" prop="regionCode" /> <el-table-column label="区域编号" align="center" prop="regionCode" />
<el-table-column label="库区编码" align="center" prop="waCode" /> <el-table-column label="库区编码" align="center" prop="waCode" />
<el-table-column label="库存类型CP成品" align="center" prop="storageType" /> <el-table-column label="单位" align="center" prop="userDefined1" />
<el-table-column label="库位编码" align="center" prop="wlCode" /> <el-table-column label="非限制使用的库存" align="center" prop="amount" />
<el-table-column label="产品编码" align="center" prop="productCode" /> <el-table-column label="冻结数量" align="center" prop="storageAmount" />
<el-table-column label="产品名称" align="center" prop="productName" /> <el-table-column label="占用数量" align="center" prop="occupyAmount" />
<el-table-column label="总数量" align="center" prop="amount" /> <el-table-column label="总数量" align="center" prop="amount" />
<el-table-column label="冻结数量" align="center" prop="storageAmount" /> <el-table-column label="批次" align="center" prop="productBatch" />
<el-table-column label="占用数量" align="center" prop="occupyAmount" /> <el-table-column label="SAP库位" align="center" prop="userDefined2" v-if="false" />
<el-table-column label="LPN" align="center" prop="lpn" />
<!-- <el-table-column label="入库批次号" align="center" prop="productBatch" />-->
<el-table-column label="入库时间" align="center" prop="receiveDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.receiveDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="生产时间" align="center" prop="productDate" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="单位" align="center" prop="userDefined1" />
<el-table-column label="SAP库位" align="center" prop="userDefined2" />
<el-table-column label="备用3" align="center" prop="userDefined3" v-if="false" /> <el-table-column label="备用3" align="center" prop="userDefined3" v-if="false" />
<el-table-column label="备用4" align="center" prop="userDefined4" v-if="false" /> <el-table-column label="备用4" align="center" prop="userDefined4" v-if="false" />
<el-table-column label="备用5" align="center" prop="userDefined5" v-if="false" /> <el-table-column label="备用5" align="center" prop="userDefined5" v-if="false" />
@ -337,21 +306,21 @@
<el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" /> <el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" />
<el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" /> <el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" />
<el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" /> <el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" />
<el-table-column label="创建时间" align="center" prop="gmtCreate" width="180"> <!-- <el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span> <!-- <span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="最后更新人" align="center" prop="lastModifiedBy" /> <!-- <el-table-column label="最后更新人" align="center" prop="lastModifiedBy" />-->
<el-table-column label="最后更新时间" align="center" prop="gmtModified" width="180"> <!-- <el-table-column label="最后更新时间" align="center" prop="gmtModified" width="180">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span> <!-- <span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="有效标记" align="center" prop="activeFlag" /> <!-- <el-table-column label="有效标记" align="center" prop="activeFlag" />-->
<el-table-column label="工厂号" align="center" prop="factoryCode" />
<el-table-column label="SAP工厂号" align="center" prop="sapFactoryCode" /> <!-- <el-table-column label="SAP工厂号" align="center" prop="sapFactoryCode" />-->
<el-table-column label="库位名称" align="center" prop="wlName" /> <!-- <el-table-column label="库位名称" align="center" prop="wlName" />-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">--> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button--> <!-- <el-button-->
@ -419,14 +388,14 @@
<!-- <el-form-item label="入库批次号" prop="productBatch">--> <!-- <el-form-item label="入库批次号" prop="productBatch">-->
<!-- <el-input v-model="form.productBatch" placeholder="请输入入库批次号" />--> <!-- <el-input v-model="form.productBatch" placeholder="请输入入库批次号" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="入库时间" prop="receiveDate"> <!-- <el-form-item label="入库时间" prop="receiveDate">-->
<el-date-picker clearable <!-- <el-date-picker clearable-->
v-model="form.receiveDate" <!-- v-model="form.receiveDate"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="请选择入库时间"> <!-- placeholder="请选择入库时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<!-- <el-form-item label="生产时间" prop="productDate">--> <!-- <el-form-item label="生产时间" prop="productDate">-->
<!-- <el-date-picker clearable--> <!-- <el-date-picker clearable-->
<!-- v-model="form.productDate"--> <!-- v-model="form.productDate"-->

@ -10,7 +10,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="库区" prop="waCode"> <el-form-item label="库区" prop="waCode">
<el-input <el-input
v-model="queryParams.waCode" v-model="queryParams.waCode"
@ -28,7 +28,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料号" prop="materialCode"> <el-form-item label="物料号" prop="materialCode">
<el-input <el-input
v-model="queryParams.materialCode" v-model="queryParams.materialCode"
@ -115,12 +115,17 @@
<el-table-column label="仓库" align="center" prop="whCode" /> <el-table-column label="仓库" align="center" prop="whCode" />
<el-table-column label="库区" align="center" prop="waCode" /> <el-table-column label="库区" align="center" prop="waCode" />
<el-table-column label="库位编码" align="center" prop="wlCode" /> <el-table-column label="库位编码" align="center" prop="wlCode" />
<el-table-column label="物料号" align="center" prop="materialCode" /> <el-table-column label="物料号" align="center" prop="materialCode" width="250">
<el-table-column label="物料描述" align="center" prop="materialDesc" /> <template slot-scope="scope">
<el-table-column label="总数量" align="center" prop="amount" /> <span>{{ formatProductCode(scope.row.materialCode) }}</span>
</template>
</el-table-column>
<el-table-column label="物料描述" align="center" prop="materialDesc" width="250"/>
<el-table-column label="工厂号" align="center" prop="factoryCode" />
<el-table-column label="非限制使用的库存" align="center" prop="amount" />
<el-table-column label="冻结数量" align="center" prop="storageAmount" /> <el-table-column label="冻结数量" align="center" prop="storageAmount" />
<el-table-column label="占用数量" align="center" prop="occupyAmount" /> <el-table-column label="占用数量" align="center" prop="occupyAmount" />
<el-table-column label="总数量" align="center" prop="amount" />
<el-table-column label="单位" align="center" prop="userDefined1" /> <el-table-column label="单位" align="center" prop="userDefined1" />
<el-table-column label="SAP库位" align="center" prop="userDefined2" v-if="false" /> <el-table-column label="SAP库位" align="center" prop="userDefined2" v-if="false" />
<el-table-column label="备用3" align="center" prop="userDefined3" v-if="false" /> <el-table-column label="备用3" align="center" prop="userDefined3" v-if="false" />
@ -130,20 +135,20 @@
<el-table-column label="备用7" align="center" prop="userDefined7" v-if="false" /> <el-table-column label="备用7" align="center" prop="userDefined7" v-if="false" />
<el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" /> <el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" />
<el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" /> <el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" />
<el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" /> <!-- <el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" />-->
<el-table-column label="创建时间" align="center" prop="gmtCreate" width="180"> <!-- <el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span> <!-- <span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="更新人" align="center" prop="lastModifiedBy" /> <!-- <el-table-column label="更新人" align="center" prop="lastModifiedBy" />-->
<el-table-column label="更新时间" align="center" prop="gmtModified" width="180"> <!-- <el-table-column label="更新时间" align="center" prop="gmtModified" width="180">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span> <!-- <span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="有效标记" align="center" prop="activeFlag" v-if="false" /> <!-- <el-table-column label="有效标记" align="center" prop="activeFlag" v-if="false" />-->
<el-table-column label="工厂号" align="center" prop="factoryCode" />
<el-table-column label="SAP工厂号" align="center" prop="sapFactoryCode" v-if="false" /> <el-table-column label="SAP工厂号" align="center" prop="sapFactoryCode" v-if="false" />
@ -421,6 +426,11 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.storageId) this.ids = selection.map(item => item.storageId)

@ -126,8 +126,12 @@
<el-table-column label="仓库" align="center" prop="whCode" /> <el-table-column label="仓库" align="center" prop="whCode" />
<el-table-column label="库区" align="center" prop="waCode" /> <el-table-column label="库区" align="center" prop="waCode" />
<el-table-column label="库位编码" align="center" prop="wlCode" /> <el-table-column label="库位编码" align="center" prop="wlCode" />
<el-table-column label="物料号" align="center" prop="materialCode" /> <el-table-column label="物料号" align="center" prop="materialCode" width="250">
<el-table-column label="物料描述" align="center" prop="materialDesc" /> <template slot-scope="scope">
<span>{{ formatProductCode(scope.row.materialCode) }}</span>
</template>
</el-table-column>
<el-table-column label="物料描述" align="center" prop="materialDesc" width="300"/>
<el-table-column label="托盘号" align="center" prop="sn" /> <el-table-column label="托盘号" align="center" prop="sn" />
<el-table-column label="数量" align="center" prop="amount" /> <el-table-column label="数量" align="center" prop="amount" />
<el-table-column label="备用1" align="center" prop="userDefined1" v-if="false" /> <el-table-column label="备用1" align="center" prop="userDefined1" v-if="false" />
@ -349,6 +353,11 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
// //
reset() { reset() {
this.form = { this.form = {

@ -45,10 +45,14 @@
<el-table-column label="序号" type="index" /> <el-table-column label="序号" type="index" />
<el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" /> <el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" />
<el-table-column label="ID" align="center" prop="ID" v-if="false" /> <el-table-column label="ID" align="center" prop="ID" v-if="false" />
<el-table-column label="出库单号" align="center" prop="produceCode" /> <el-table-column label="出库单号" align="center" prop="produceCode" width="200px"/>
<el-table-column label="型号编码" align="center" prop="materialCode" /> <el-table-column label="型号编码" align="center" prop="materialCode" width="200px">
<el-table-column label="型号名称" align="center" prop="materialDesc" /> <template slot-scope="scope">
<el-table-column label="批次号" align="center" prop="userDefined1" /> <span>{{ formatProductCode(scope.row.materialCode) }}</span>
</template>
</el-table-column>
<el-table-column label="型号名称" align="center" prop="materialDesc" width="200px"/>
<el-table-column label="批次号" align="center" prop="userDefined1" width="300px"/>
<el-table-column label="计划日期" align="center" prop="planDate" width="180" v-if="false"> <el-table-column label="计划日期" align="center" prop="planDate" width="180" v-if="false">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planDate, '{y}-{m}-{d}') }}</span>
@ -593,6 +597,11 @@ export default {
this.$modal.msgSuccess("操作完成"); this.$modal.msgSuccess("操作完成");
}); });
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
const _this = this const _this = this

@ -6,7 +6,7 @@
<el-input v-model="queryParams.produceCode" placeholder="请输入出库单号" clearable <el-input v-model="queryParams.produceCode" placeholder="请输入出库单号" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="批次号" prop="materialCode"> <el-form-item label="型号编码" prop="materialCode">
<el-input v-model="queryParams.userDefined1" placeholder="请输入型号编码" clearable <el-input v-model="queryParams.userDefined1" placeholder="请输入型号编码" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
@ -45,11 +45,15 @@
<el-table-column label="序号" type="index" v-if="false" /> <el-table-column label="序号" type="index" v-if="false" />
<el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" /> <el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" />
<el-table-column label="ID" align="center" prop="ID" v-if="false" /> <el-table-column label="ID" align="center" prop="ID" v-if="false" />
<el-table-column label="出库单号" align="center" prop="produceCode" /> <el-table-column label="出库单号" align="center" prop="produceCode" width="250"/>
<el-table-column label="需求时间" align="center" prop="userDefined5" /> <el-table-column label="需求时间" align="center" prop="userDefined5" width="250"/>
<el-table-column label="型号编码" align="center" prop="materialCode" /> <el-table-column label="物料编码" align="center" prop="materialCode" width="250">
<el-table-column label="型号名称" align="center" prop="materialDesc" /> <template slot-scope="scope">
<el-table-column label="批次号" align="center" prop="userDefined1" /> <span>{{ formatProductCode(scope.row.materialCode) }}</span>
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" prop="materialDesc" width="250"/>
<el-table-column label="批次号" align="center" prop="userDefined1" width="250"/>
<!-- <el-table-column label="计划日期" align="center" prop="planDate" width="180" v-if="false">--> <!-- <el-table-column label="计划日期" align="center" prop="planDate" width="180" v-if="false">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.planDate, '{y}-{m}-{d}') }}</span>--> <!-- <span>{{ parseTime(scope.row.planDate, '{y}-{m}-{d}') }}</span>-->
@ -59,7 +63,7 @@
<el-table-column label="单位" align="center" prop="unit" v-if="false" /> <el-table-column label="单位" align="center" prop="unit" v-if="false" />
<el-table-column label="计划数量" align="center" prop="planNumber" /> <el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="出库数量" align="center" prop="outNumber" /> <el-table-column label="出库数量" align="center" prop="outNumber" />
<el-table-column label="需求时间" align="center" prop="userDefined5" /> <el-table-column label="需求时间" align="center" prop="userDefined5" width="250"/>
<el-table-column label="仓库编号" align="center" prop="locCode" /> <el-table-column label="仓库编号" align="center" prop="locCode" />
<el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" /> <el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" />
<el-table-column label="产线名称" align="center" prop="productionLineDesc" v-if="false" /> <el-table-column label="产线名称" align="center" prop="productionLineDesc" v-if="false" />
@ -81,7 +85,7 @@
<span v-else-if="scope.row.userDefined10 === '3'">过账失败</span> <span v-else-if="scope.row.userDefined10 === '3'">过账失败</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="过账凭证" align="center" prop="userDefined9" /> <el-table-column label="过账凭证" align="center" prop="userDefined9" width="250"/>
<el-table-column label="sap订单过账信息" align="center" prop="userDefined11" /> <el-table-column label="sap订单过账信息" align="center" prop="userDefined11" />
@ -140,7 +144,7 @@
<el-table :data="addoutorderList" @selection-change="handleSelectionChange1"> <el-table :data="addoutorderList" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="55" align="center" :index="indexMethod" /> <el-table-column type="selection" width="55" align="center" :index="indexMethod" />
<el-table-column label="序号" type="index"> </el-table-column> <el-table-column label="序号" type="index"> </el-table-column>
<el-table-column label="物料描述" align="center" prop="materialDesc" /> <el-table-column label="物料描述" align="center" prop="materialDesc" width="255"/>
<el-table-column label="物料编号" align="center" prop="materialCode" /> <el-table-column label="物料编号" align="center" prop="materialCode" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
@ -543,6 +547,11 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;

@ -170,8 +170,12 @@
<el-table-column label="ID" align="center" prop="id" v-if="false" /> <el-table-column label="ID" align="center" prop="id" v-if="false" />
<el-table-column label="报工单号" align="center" prop="workOrder" /> <el-table-column label="报工单号" align="center" prop="workOrder" />
<el-table-column label="生产工单号" align="center" prop="productOrder" /> <el-table-column label="生产工单号" align="center" prop="productOrder" />
<el-table-column label="产品名称" align="center" prop="productName" /> <el-table-column label="产品名称" align="center" prop="productName" width="250px"/>
<el-table-column label="产品编码" align="center" prop="productCode" /> <el-table-column label="产品编码" align="center" prop="productCode" width="200px">
<template slot-scope="scope">
<span>{{ formatProductCode(scope.row.productCode) }}</span>
</template>
</el-table-column>
<el-table-column label="仓库编码" align="center" prop="whCode" /> <el-table-column label="仓库编码" align="center" prop="whCode" />
<el-table-column label="库区编码" align="center" prop="waCode" /> <el-table-column label="库区编码" align="center" prop="waCode" />
<el-table-column label="库位编码" align="center" prop="wlCode" /> <el-table-column label="库位编码" align="center" prop="wlCode" />
@ -390,6 +394,12 @@ export default {
this.title = "修改成品生产入库记录报"; this.title = "修改成品生产入库记录报";
}); });
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -283,7 +283,12 @@
<el-table-column label="库区编码" align="center" prop="waCode" v-if="false"/> <el-table-column label="库区编码" align="center" prop="waCode" v-if="false"/>
<el-table-column label="库位编码" align="center" prop="wlCode" v-if="false"/> <el-table-column label="库位编码" align="center" prop="wlCode" v-if="false"/>
<el-table-column label="产品名称" align="center" prop="productName" width="200px"/> <el-table-column label="产品名称" align="center" prop="productName" width="200px"/>
<el-table-column label="产品编码" align="center" prop="productCode" /> <!-- <el-table-column label="产品编码" align="center" prop="productCode" />-->
<el-table-column label="产品编码" align="center" prop="productCode" width="250">
<template slot-scope="scope">
<span>{{ formatProductCode(scope.row.productCode) }}</span>
</template>
</el-table-column>
<el-table-column label="产品分类" align="center" prop="productSort" v-if="false"/> <el-table-column label="产品分类" align="center" prop="productSort" v-if="false"/>
<!-- <el-table-column label="规格型号" align="center" prop="specification" />--> <!-- <el-table-column label="规格型号" align="center" prop="specification" />-->
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitOfMeasure" />
@ -604,6 +609,11 @@ export default {
this.$modal.msgSuccess("过账完成"); this.$modal.msgSuccess("过账完成");
}).catch(() => {}); }).catch(() => {});
}, },
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -102,7 +102,7 @@
<el-table-column label="工单号" align="center" prop="productOrder" width="200px"/> <el-table-column label="工单号" align="center" prop="productOrder" width="200px"/>
<el-table-column label="批次" align="center" prop="batchCode" width="200px"/> <el-table-column label="批次" align="center" prop="batchCode" width="200px"/>
<el-table-column label="产品名称" align="center" prop="productName" width="200px"/> <el-table-column label="产品名称" align="center" prop="productName" width="200px"/>
<el-table-column label="产品编码" align="center" prop="productCode"> <el-table-column label="产品编码" align="center" prop="productCode" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ formatProductCode(scope.row.productCode) }}</span> <span>{{ formatProductCode(scope.row.productCode) }}</span>
</template> </template>

Loading…
Cancel
Save