Commit 550a9ad9 authored by 沈翠玲's avatar 沈翠玲

LPN

parent 28af525c
......@@ -18,10 +18,7 @@
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="handleprint"
<el-button type="primary" size="mini" @click="handleprint"
>打印</el-button
>
</el-form-item>
......@@ -38,14 +35,15 @@
v-hasPermi="['pro:scheduleSetupRule:export']"
>导出</el-button>
</el-col> -->
<right-toolbar
<!-- <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
></right-toolbar> -->
</el-row>
<el-table
v-loading="loading"
v-if="scheduleSetupRuleList.length > 0"
:data="scheduleSetupRuleList"
@selection-change="handleSelectionChange"
>
......@@ -78,21 +76,13 @@
<el-table-column label="创建时间" align="center" prop="createTime" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listlpnrecord } from '@/api/mes/lpn/lpnLabel'
import { listReport } from '@/api/mes/report/ureport'
import { postBatchPrintPdf } from '@/utils/ruoyi'
export default {
name: 'lpnLabel',
......@@ -142,15 +132,31 @@ export default {
}
},
created() {
this.getList()
// this.getList()
},
methods: {
handleprint(){
if (this.timer !== null) return
this.timer = setTimeout(()=>{
console.log('打印', this.queryParams)
this.timer = null
},100)
handleprint() {
if (this.timer !== null) return
this.timer = setTimeout(async () => {
this.timer = null
await this.getList()
if (
!this.scheduleSetupRuleList ||
this.scheduleSetupRuleList.length === 0
)
return this.$modal.msgError('没有数据')
const valueList = this.scheduleSetupRuleList.map((v) => {
return {
packagePrint: {
lpnNo: v.lpnNo,
}
}
})
await postBatchPrintPdf('package-lpnV2', valueList).then(() => {
this.visible = false
this.getPackageList()
})
}, 100)
},
onItemSelected(obj) {
if (obj != undefined && obj != null) {
......@@ -160,9 +166,9 @@ export default {
}
},
/** 查询客户产品标签模板对照表列表 */
getList() {
async getList() {
this.loading = true
listlpnrecord(this.queryParams).then((response) => {
await listlpnrecord(this.queryParams).then((response) => {
this.scheduleSetupRuleList = response.rows
this.total = response.total
this.loading = false
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment