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

325前端调整

parent ed398b42
<template>
<DefaultDialog :app='app'>
<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 slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
......@@ -12,8 +13,10 @@
</DefaultDialog>
</template>
<script>
import wlsx from 'common/src/mixin/wlphsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default {
mixins: [wlsx, wlphsx],
props: {
app: {
type: Object,
......@@ -49,9 +52,8 @@
// queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/kccj/queryZkPackOrRq',
queryUrl:'lxyl/zlgl/kccj/queryZkPackOrRq',
tableTitle: [
{
queryUrl: 'lxyl/zlgl/kccj/queryZkPackOrRq',
tableTitle: [{
title: "仓库",
field: "ckName",
width: 140
......@@ -120,16 +122,34 @@
[{
label: '物料信息',
prop: 'wlxxInfo',
span: 6,
span: 4,
type: 'input',
value: ''
},
{
label: '物料批号',
prop: 'wlphInfo',
span: 6,
span: 4,
type: 'input',
value: ''
},
{
label: '检验日期',
startProp: "jyrqStart",
endProp: "jyrqEnd",
span: 8,
type: 'RelDaterangeV2',
startValue: '',
endValue: '',
},
{
label: '过期日期',
startProp: "gqrqStart",
endProp: "gqrqEnd",
span: 8,
type: 'RelDaterangeV2',
startValue: '',
endValue: '',
}
]
......@@ -141,28 +161,28 @@
}
},
methods: {
save(){
let list =this.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length!=0){
let ckList=list.map(item=>item.ckid)
ckList=[... new Set(ckList)]
if(ckList.length==1){
this.$post('lxyl/zlgl/kccj/doGenerate',list).then(res=>{
if(res.success){
this.app.showDialog=false
this.app.refresh()
}
})
}else{
this.$warning('只能勾选相同仓库的数据进行操作')
}
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length != 0) {
let ckList = list.map(item => item.ckid)
ckList = [...new Set(ckList)]
if (ckList.length == 1) {
this.$post('lxyl/zlgl/kccj/doGenerate', list).then(res => {
if (res.success) {
this.app.showDialog = false
this.app.refresh()
}
})
} else {
this.$warning('只能勾选相同仓库的数据进行操作')
}
}else{
this.$warning('请至少勾选一条数据')
} else {
this.$warning('请至少勾选一条数据')
}
}
}
}
}
</script>
......
......@@ -7,6 +7,7 @@
<template #toolbar="ctx">
<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="cjxjrw(ctx.basePage)" size='mini' type="primary">创建下架任务</el-button>
</template>
......@@ -122,6 +123,27 @@
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: {
......
......@@ -7,6 +7,7 @@
<template #toolbar="ctx">
<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="cjxjrw(ctx.basePage)" size='mini' type="primary">创建下架任务</el-button>
</template>
......@@ -117,6 +118,27 @@
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: {
......
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