feat(wms): 修改报表时间区间为昨天6点至今天6点并添加标签打印功能
修改多个报表页面的默认时间区间从全天改为昨天6点至今天6点,自动处理跨月跨年情况 在钢卷操作面板添加标签打印按钮功能,优化标签预览按钮样式
This commit is contained in:
@@ -137,7 +137,8 @@
|
||||
<i slot="reference" class="el-icon-setting param-icon"></i>
|
||||
</el-popover>
|
||||
|
||||
<i class="el-icon-view param-icon" @click="handlePreviewLabel(item)" title="查看标签"></i>
|
||||
<el-button style="margin-left: 0px; padding: 4px !important;" type="text" size="mini" @click="handlePreviewLabel(item)" title="查看标签">预览</el-button>
|
||||
<el-button style="margin-left: 0px; padding: 4px !important;" type="text" size="mini" @click="handlePrintLabel(item)" title="打印标签">打印</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -328,7 +329,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="handleAbnormal">查看异常</el-button>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="confirmException">确 定</el-button>
|
||||
<el-button type="primary" @click="confirmException">确 定</el-button>
|
||||
<el-button @click="cancelException">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -337,6 +338,8 @@
|
||||
<el-dialog title="标签预览" :visible.sync="labelRender.visible" append-to-body>
|
||||
<label-render :content="labelRender.data" :labelType="labelRender.type" />
|
||||
</el-dialog>
|
||||
|
||||
<label-render ref="labelRender" v-show="false" :content="labelRender.data" :labelType="labelRender.type" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -477,6 +480,21 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
// 打印标签
|
||||
handlePrintLabel(row) {
|
||||
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
||||
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
||||
|
||||
this.labelRender.data = {
|
||||
...row,
|
||||
itemName: itemName,
|
||||
updateTime: row.updateTime?.split(' ')[0] || '',
|
||||
};
|
||||
this.$refs.labelRender.printLabel();
|
||||
// this.labelRender.visible = true;
|
||||
// this.labelRender.data = row;
|
||||
// this.labelRender.type = '2';
|
||||
},
|
||||
|
||||
/** 预览标签 */
|
||||
handlePreviewLabel(row) {
|
||||
|
||||
Reference in New Issue
Block a user