Commit 9b2a2440 authored by 李苏's avatar 李苏 💬

7/2调整

parent 90fc1ce0
......@@ -55,6 +55,7 @@
label: 'packCode'
},
give: (row) => {
console.log(row,'M24062100050001M24062100050001')
this.form.wlid=row.wlid
this.form.wlxxCode=row.wlxxCode
this.form.zlh=row.zlh
......
......@@ -32,7 +32,7 @@
},
config: {
/* 基本配置*/
url: 'lxyl/zlgl/kccj',
url: 'lxyl/zlgl/kccj/query/detail',
queryUrl: 'lxyl/zlgl/kccj/query/detail',
tableTitle: [{
title: "物料编码",
......
<template>
</template>
<script>
</script>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<div class="full">
<el-tabs class="full" v-model="activeName">
<el-tab-pane class="full" label="汇总" name="first">
<Wlxx @getRow='getRow' />
<Wlxx ref="hz" @getRow='getRow' />
</el-tab-pane>
<el-tab-pane class="full" label="明细" name="second">
<Add ref="add" />
......@@ -54,12 +50,28 @@
},
methods: {
save() {
/* hz信息*/
let hzInfo =this.$refs.hz.$refs.basePage.singleItem
console.log(hzInfo,'hzInfo')
let list = this.$refs.add.$refs.basePage.tabData || []
if (list.length != 0) {
let ckList = list.map(item => item.ckid)
list.forEach(item => {
item.sl=item.kcsl
item.lydjid=item.id||item.lydjid
delete item.id
}
)
ckList = [...new Set(ckList)]
if (ckList.length == 1) {
this.$post('lxyl/zlgl/kccj/doGenerate', list).then(res => {
this.$post('lxyl/zlgl/kccj/save', {
ckid:hzInfo.ckid,
wlid:hzInfo.wlid,
wlph:hzInfo.wlph,
datas:[...list]
}).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
......
......@@ -74,14 +74,13 @@
})
},
/* 选择库存回调 */
savekc(list) {
list.forEach(item => {
// 转换并且push
delete item.id
this.formDetail.push(_.cloneDeep(item))
// savekc(list) {
// list.forEach(item => {
// delete item.id
// this.formDetail.push(_.cloneDeep(item))
})
}
// })
// }
},
mounted() {
this.form.llrName = this.username
......
......@@ -2,12 +2,13 @@
<BasePage :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Add :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
<Add :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='新增'" />
<Xj ref="xj" :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='下架'" />
</template>
<template #toolbar="ctx">
<el-button v-if="ctx.basePage.powerObj['01']" @click="showAdd(ctx.basePage)" size='mini' type="primary">新增</el-button>
<el-button v-if="ctx.basePage.powerObj['21']" @click="cxjyrw(ctx.basePage)" size='mini' type="primary">创建检验单</el-button>
<el-button v-if="ctx.basePage.powerObj['22']" @click="cjxjrw(ctx.basePage)" size='mini' type="primary">创建下架任务</el-button>
<el-button v-if="ctx.basePage.powerObj['22']" @click="cjxjrw(ctx.basePage)" size='mini' type="primary">下架</el-button>
</template>
......@@ -17,6 +18,7 @@
<script>
// import Edit from './edit.vue'
import Add from './addAll.vue'
import Xj from './xj.vue'
export default {
data() {
return {
......@@ -131,20 +133,14 @@
},
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()
}
})
ctx.DialogTitle = '下架'
ctx.DialogWidth = '70vw'
ctx.showDialog = true
this.$nextTick(()=>{
this.$refs.xj.$refs.basePage.queryParams.mid=ctx.singleItem.id
this.$refs.xj.$refs.basePage.refresh()
})
} else {
this.$warning('请选中一条数据')
}
......@@ -152,7 +148,7 @@
}
},
components: {
Add
Add,Xj
// Edit
}
......
......@@ -3,7 +3,7 @@
showExcel:false,
showPrint:false,
showField:true
}" :setFirstCurrent='false' :power='power' @getRow='getRow' class="min_full" style="height: 100%;"
}" :setFirstCurrent='false' ref="basePage" :power='power' @getRow='getRow' class="min_full" style="height: 100%;"
:config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<Xzgw @saveGw='saveGw' v-if="showDialog" :app='this' />
<BasePage :toolButtonConfig="{
showExcel:false,
showPrint:false,
showField:true
}" :autoQuery='false' ref="basePage" :showPagination='false' :toolButton='false' :power='power' class="min_full" style="height: 100%;"
:config="config" />
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">下 架</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import wlsx from 'common/src/mixin/wlphsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
import Xzgw from './xzgw.vue'
export default {
mixins: [wlsx, wlphsx],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
},
components:{
Xzgw
},
data() {
return {
showDialog: false,
DialogTitle: '选择工位',
DialogWidth: '30vw',
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: true,
saveSelected: true
},
config: {
/* Dialog*/
// queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/kccj/queryForXj',
queryUrl: 'lxyl/zlgl/kccj/queryForXj',
tableTitle: [
{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 180
},
{
title: "物料批号",
field: "wlph",
width: 180
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "数量",
field: "sl",
width: 140
},
{
title: "容器",
field: "rqCode",
width: 140
},
{
title: "重检日期",
field: "cjrq",
width: 140,
fieldType: 'ftDateTime'
},
{
title: "生产日期",
field: "scrq",
width: 140,
fieldType: 'ftDateTime'
},
{
title: "失效日期",
field: "sxrq",
width: 140,
fieldType: 'ftDateTime'
},
{
title: "合格标志",
field: "hgbz",
"transform": {
"url": "lxyl/zlgl/ukcjyd/init/zjqdStatusEnum",
"label": "name",
"value": "id"
},
width: 140
},
],
queryParams: [
],
/* 默认启停用 */
}
}
},
methods: {
saveGw(form){
let list = this.$refs.basePage.$refs.TablePager.selectedList
if(list.length==0){
this.$warning('请至少选择一条数据')
}else{
this.$post('lxyl/zlgl/kccj/lkxj ',{
id:this.$refs.basePage.queryParams.mid,
gwid:form.gwid,
datas:list.map(item=>item.id)
}).then(res=>{
if(res.success){
this.$success('操作成功')
this.app.showDialog=false
this.app.$refs.TablePager.refresh()
}
})
}
},
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList
if(list.length==0){
this.$warning('请至少选择一条数据')
}else{
this.showDialog=true
}
}
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this" class="editRow">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
v-if="(item.show==false)?false:true" :prop='item.prop' :key="item.prop" :type="item.type"
:typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</el-form>
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
/* 初始化数据 */
},
data() {
return {
isLoading: false,
text: '加载中',
readonly: false,
editColItemList: [{
label: '工位',
prop: 'gwid',
span: 24,
required: true,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/common/queryXlk',
transform: {
value: 'id',
label: 'name'
}
}
},
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('saveGw',this.form)
this.app.showDialog=false
}
})
}
}
}
</script>
<style scoped>
</style>
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