Commit 5a4c185e authored by 李苏's avatar 李苏 💬

325前端调整

parent ed398b42
<template> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;"> <div slot="form" style="display: flex;height: 70vh;">
<BasePage ref="basePage" :toolButton='false' :power='power' class="min_full" style="height: 100%;" :config="config" /> <BasePage ref="basePage" :toolButton='false' :power='power' class="min_full" style="height: 100%;"
:config="config" />
</div> </div>
<div slot="reFooter" class="refooter"> <div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -12,8 +13,10 @@ ...@@ -12,8 +13,10 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
import wlsx from 'common/src/mixin/wlphsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default { export default {
mixins: [wlsx, wlphsx],
props: { props: {
app: { app: {
type: Object, type: Object,
...@@ -49,9 +52,8 @@ ...@@ -49,9 +52,8 @@
// queryDetail: true, // queryDetail: true,
/* 基本配置*/ /* 基本配置*/
url: 'lxyl/zlgl/kccj/queryZkPackOrRq', url: 'lxyl/zlgl/kccj/queryZkPackOrRq',
queryUrl:'lxyl/zlgl/kccj/queryZkPackOrRq', queryUrl: 'lxyl/zlgl/kccj/queryZkPackOrRq',
tableTitle: [ tableTitle: [{
{
title: "仓库", title: "仓库",
field: "ckName", field: "ckName",
width: 140 width: 140
...@@ -120,16 +122,34 @@ ...@@ -120,16 +122,34 @@
[{ [{
label: '物料信息', label: '物料信息',
prop: 'wlxxInfo', prop: 'wlxxInfo',
span: 6, span: 4,
type: 'input', type: 'input',
value: '' value: ''
}, },
{ {
label: '物料批号', label: '物料批号',
prop: 'wlphInfo', prop: 'wlphInfo',
span: 6, span: 4,
type: 'input', type: 'input',
value: '' value: ''
},
{
label: '检验日期',
startProp: "jyrqStart",
endProp: "jyrqEnd",
span: 8,
type: 'RelDaterangeV2',
startValue: '',
endValue: '',
},
{
label: '过期日期',
startProp: "gqrqStart",
endProp: "gqrqEnd",
span: 8,
type: 'RelDaterangeV2',
startValue: '',
endValue: '',
} }
] ]
...@@ -141,24 +161,24 @@ ...@@ -141,24 +161,24 @@
} }
}, },
methods: { methods: {
save(){ save() {
let list =this.$refs.basePage.$refs.TablePager.selectedList||[] let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if(list.length!=0){ if (list.length != 0) {
let ckList=list.map(item=>item.ckid) let ckList = list.map(item => item.ckid)
ckList=[... new Set(ckList)] ckList = [...new Set(ckList)]
if(ckList.length==1){ if (ckList.length == 1) {
this.$post('lxyl/zlgl/kccj/doGenerate',list).then(res=>{ this.$post('lxyl/zlgl/kccj/doGenerate', list).then(res => {
if(res.success){ if (res.success) {
this.app.showDialog=false this.app.showDialog = false
this.app.refresh() this.app.refresh()
} }
}) })
}else{ } else {
this.$warning('只能勾选相同仓库的数据进行操作') this.$warning('只能勾选相同仓库的数据进行操作')
} }
}else{ } else {
this.$warning('请至少勾选一条数据') this.$warning('请至少勾选一条数据')
} }
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<template #toolbar="ctx"> <template #toolbar="ctx">
<el-button @click="showAdd(ctx.basePage)" size='mini' type="primary">新增</el-button> <el-button @click="showAdd(ctx.basePage)" size='mini' type="primary">新增</el-button>
<el-button @click="cxjyrw(ctx.basePage)" size='mini' type="primary">创建检验任务</el-button> <el-button @click="cxjyrw(ctx.basePage)" size='mini' type="primary">创建检验任务</el-button>
<el-button @click="cjxjrw(ctx.basePage)" size='mini' type="primary">创建下架任务</el-button>
</template> </template>
...@@ -122,6 +123,27 @@ ...@@ -122,6 +123,27 @@
this.$warning('请选中一条数据') this.$warning('请选中一条数据')
} }
},
cjxjrw(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/zlgl/kccj/genXjrw', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
} }
}, },
components: { components: {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<template #toolbar="ctx"> <template #toolbar="ctx">
<el-button @click="showAdd(ctx.basePage)" size='mini' type="primary">新增</el-button> <el-button @click="showAdd(ctx.basePage)" size='mini' type="primary">新增</el-button>
<el-button @click="cxjyrw(ctx.basePage)" size='mini' type="primary">创建检验任务</el-button> <el-button @click="cxjyrw(ctx.basePage)" size='mini' type="primary">创建检验任务</el-button>
<el-button @click="cjxjrw(ctx.basePage)" size='mini' type="primary">创建下架任务</el-button>
</template> </template>
...@@ -117,6 +118,27 @@ ...@@ -117,6 +118,27 @@
this.$warning('请选中一条数据') this.$warning('请选中一条数据')
} }
},
cjxjrw(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/ukcyhd/genXjrw', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
} }
}, },
components: { components: {
......
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