Commit 42678c27 authored by 李苏's avatar 李苏 💬

qrQuery init zt/or

parent e1c84297
...@@ -766,7 +766,7 @@ export const powerRoutes = [ ...@@ -766,7 +766,7 @@ export const powerRoutes = [
path: "kwxq", path: "kwxq",
}, },
{ {
component: 'ccgl/cxfx/kwxq/index', component: 'ccgl/cxfx/rqcx/index',
hidden: false, hidden: false,
meta: { meta: {
"title": "容器查询", "title": "容器查询",
......
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<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" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '容器类型',
prop: 'type',
span: 12,
type: 'RelSelect',
required:true,
typeConfig:{
src:"wms/jcsj/rq/init/type",
params:{flid:this.app.singleItem.flid},
// match:{
// key:'bmid',
// value:"bmmc"
// }
}
},
{
label: '容器分类',
prop: 'flid',
span: 12,
type: 'RelSelect',
typeConfig:{
src:"wms/jcsj/rqfl/init/rqfl",
params:{flid:this.app.singleItem.flid},
},
required:true,
},
// {
// label: '指定仓库',
// prop: 'ckid',
// span: 12,
// type: 'RelSelect',
// typeConfig:{
// src:"jcsj/common/ck/queryCkid",
// hasValue:false
// },
// },
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div style="display: flex;">
<Xq v-if="showDialog" :app='this' />
<div class="min_full" style="width: 200px;border-right: 0px;">
<LazyTree treeTitle='容器分类' @selected='selectedTree' url='wms/jcsj/rqfl/queryRoot' />
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">托盘编号:</span>
<el-input v-model="queryParams.code"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">状态:</span>
<RelSelect style="width: 100%;" src='wms/jcsj/rq/init/zt' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.zt'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">库存状态:</span>
<RelSelect style="width: 100%;" src='wms/jcsj/rq/init/kczt' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.kczt'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">停用:</span>
<RelSelect style="width: 100%;" :optionsData="[
{
name:'是',
id:'Y'
},
{
name:'否',
id:'N'
}
]" filterable clearable :match="{value:'id',label:'name'}" v-model='queryParams.tybz'></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<!-- <ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton> -->
<!-- <AttachFileButton :app='app'></AttachFileButton> -->
<!-- <ImportButton @success="()=>{
this.$refs['TablePager'].pageQuery()
}" :url="'/wms/jcsj/rq/import'" /> -->
<!-- <el-button @click="qktp" size='mini' type="primary" style="margin-left: 0px;">清空托盘</el-button> -->
<el-button @click="ckxq" size='mini' type="primary" >查看详情</el-button>
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager :operateButtons='false' @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' @getRow='getRow' >
</TablePager>
</div>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
apiTreeQuery,
qt
} from 'common/src/erpApi/baseData/material/rq.js';
/* edit页面*/
import Edit from './edit'
import Xq from './xq.vue'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'materialInfo',
/* 初始额外赋值*/
async mounted() {
// this.$refs['TablePager'].pageQuery()
},
data() {
return {
/* 树的标题 */
treeTitle: '容器分类',
treeDefaultProps: {
/* 构建递归的children */
children: 'children',
/* 展示的参数 */
label: 'name',
/* 父id */
fatherId: 'pid',
/* 子id */
sonId: 'id',
/* 无父节点构建root 的属性 type=5生效 */
rootName: "全部",
rootId: 'root'
},
treeQueryParams: {
},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'wms/jcsj/rq',
/* 查询参数*/
queryParams: {
zt: '',
kczt: '',
tybz: ''
},
/* 表格标题对应参数*/
tableTitle: [
{
title: "状态",
field: "zt",
width: 120,
transform: {
"url": "wms/jcsj/rq/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "编号",
field: "code",
width: 120
},
{
title: "容器类型",
field: "type",
width: 120,
transform: {
"url": "wms/jcsj/rq/init/type",
"label": "name",
"value": "id"
}
},
{
title: "容量状态",
field: "rlzt",
width: 120,
transform: {
"url": "wms/jcsj/rq/init/rlzt",
"label": "name",
"value": "id"
}
},
{
title: "运输状态",
field: "yszt",
width: 120,
transform: {
"url": "wms/jcsj/rq/init/yszt",
"label": "name",
"value": "id"
}
},
{
title: "启停状态",
field: "tybz",
width: 80,
formatter(a, b, v) {
let map = {
Y: '停用',
N: '正常'
}
return map[v]
}
},
{
title: "库存状态",
field: "kczt",
width: 80,
transform: {
"url": "wms/jcsj/rq/init/kczt",
"label": "name",
"value": "id"
}
},
{
title: "库位编码",
field: "kwCode",
width: 120
},
{
title: "停用日期",
field: "tyrq",
fieldType: 'ftDate'
},
{
title: "备注",
field: "bz",
width: 200
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
}
]
}
},
methods: {
ckxq(){
if (this.singleItem && this.singleItem.id){
this.DialogWidth='70vw'
this.DialogTitle='查看详情'
this.showDialog=true
}else{
this.$warning('请选中一条数据')
}
},
qktp() {
if (this.singleItem && this.singleItem.id) {
this.$confirm('是否继续操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('wms/jcsj/rq/clean', {
id: this.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
this.$refs['TablePager'].pageQuery()
}
})
})
} else {
this.$warning('请选择一条数据')
}
},
setEnable(id) {
this.$confirm('是否启用/停用, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
qt(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
},
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
selectedTree(e) {
this.queryParams.flid = e.id || 'root'
this.$refs['TablePager'].pageQuery()
},
// /* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
apiTreeQuery: apiTreeQuery,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,Xq
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage :toolButton='false' @basePageCreated='basePageCreated' :power='power' class="min_full"
style="height: 100%;" :config="config">
</BasePage>
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">关 闭</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
},
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* Dialog*/
// queryDetail: true,
/* 基本配置*/
url: 'wms/jcsj/rq/query/detail',
queryUrl: 'wms/jcsj/rq/query/detail',
tableTitle: [{
title: "容器",
field: "rqCode",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "物料编码",
field: "wlxxCode",
width: 140,
},
{
title: "物料名称",
field: "wlxxName",
width: 140,
},
{
title: "物料批号",
field: "wlph",
width: 140,
},
{
title: "制令号",
field: "zlh",
width: 140,
},
{
title: "数量",
field: "ztsl",
width: 140,
}
],
queryParams: [],
/* 默认启停用 */
}
}
},
methods: {
basePageCreated(ctx) {
ctx.queryParams.mid = this.app.singleItem.id
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
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