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

LPN

parent 28af525c
...@@ -18,10 +18,7 @@ ...@@ -18,10 +18,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" size="mini" @click="handleprint"
type="primary"
size="mini"
@click="handleprint"
>打印</el-button >打印</el-button
> >
</el-form-item> </el-form-item>
...@@ -38,14 +35,15 @@ ...@@ -38,14 +35,15 @@
v-hasPermi="['pro:scheduleSetupRule:export']" v-hasPermi="['pro:scheduleSetupRule:export']"
>导出</el-button> >导出</el-button>
</el-col> --> </el-col> -->
<right-toolbar <!-- <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
></right-toolbar> ></right-toolbar> -->
</el-row> </el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
v-if="scheduleSetupRuleList.length > 0"
:data="scheduleSetupRuleList" :data="scheduleSetupRuleList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
...@@ -78,21 +76,13 @@ ...@@ -78,21 +76,13 @@
<el-table-column label="创建时间" align="center" prop="createTime" /> <el-table-column label="创建时间" align="center" prop="createTime" />
</el-table> </el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div> </div>
</template> </template>
<script> <script>
import { listlpnrecord } from '@/api/mes/lpn/lpnLabel' import { listlpnrecord } from '@/api/mes/lpn/lpnLabel'
import { listReport } from '@/api/mes/report/ureport' import { postBatchPrintPdf } from '@/utils/ruoyi'
export default { export default {
name: 'lpnLabel', name: 'lpnLabel',
...@@ -142,15 +132,31 @@ export default { ...@@ -142,15 +132,31 @@ export default {
} }
}, },
created() { created() {
this.getList() // this.getList()
}, },
methods: { methods: {
handleprint(){ handleprint() {
if (this.timer !== null) return if (this.timer !== null) return
this.timer = setTimeout(()=>{ this.timer = setTimeout(async () => {
console.log('打印', this.queryParams) this.timer = null
this.timer = null await this.getList()
},100) 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) { onItemSelected(obj) {
if (obj != undefined && obj != null) { if (obj != undefined && obj != null) {
...@@ -160,9 +166,9 @@ export default { ...@@ -160,9 +166,9 @@ export default {
} }
}, },
/** 查询客户产品标签模板对照表列表 */ /** 查询客户产品标签模板对照表列表 */
getList() { async getList() {
this.loading = true this.loading = true
listlpnrecord(this.queryParams).then((response) => { await listlpnrecord(this.queryParams).then((response) => {
this.scheduleSetupRuleList = response.rows this.scheduleSetupRuleList = response.rows
this.total = response.total this.total = response.total
this.loading = false 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