Commit 72697f0f authored by 李苏's avatar 李苏 💬

调整

parent 9150e2a3
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'jcgl/ugjxx', url: 'jxgl/ugjxx',
tableTitle: [{ tableTitle: [{
title: "编码", title: "编码",
field: "code", field: "code",
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'jcgl/uwlxx', url: 'jxgl/uwlxx',
tableTitle: [{ tableTitle: [{
title: "编码", title: "编码",
field: "code", field: "code",
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
return { return {
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'jcgl/ugjxx', url: 'jxgl/ugjxx',
tableTitle: [{ tableTitle: [{
title: "编码", title: "编码",
field: "code", field: "code",
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
return { return {
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'jcgl/uwlxx', url: 'jxgl/uwlxx',
tableTitle: [{ tableTitle: [{
title: "编码", title: "编码",
field: "code", field: "code",
......
...@@ -42,25 +42,25 @@ ...@@ -42,25 +42,25 @@
editColItemList: [ editColItemList: [
{ {
label: '备件名称', label: '备件名称',
prop: 'bpbjmc', prop: 'name',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
{ {
label: '备件编码', label: '备件编码',
prop: 'bpbjbm', prop: 'code',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
{ {
label: '备件规格', label: '备件规格',
prop: 'bpbjgg', prop: 'gg',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
{ {
label: '备件材质', label: '备件材质',
prop: 'bpbjcz', prop: 'cz',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
......
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
dynamic: true, dynamic: true,
code: true, code: true,
component: gjxx, component: gjxx,
label: 'jxgjName', label: 'name',
transform: { transform: {
value: 'id', value: 'id',
label: 'name' label: 'name'
}, },
give:(row)=>{ give:(row)=>{
this.form.jxgjCode=row.code this.form.code=row.code
this.form.cz=row.cz this.form.cz=row.cz
this.form.ggxh=row.ggxh this.form.ggxh=row.ggxh
} }
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
{ {
label: '工具编码', label: '工具编码',
readonly:true, readonly:true,
prop: 'jxgjCode', prop: 'code',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
import { import {
editMixin editMixin
} from 'common' } from 'common'
import wlxx from '@/views/auxinput/wlxx'
export default { export default {
...@@ -42,19 +42,43 @@ ...@@ -42,19 +42,43 @@
editColItemList: [ editColItemList: [
{ {
label: '耗材名称', label: '耗材名称',
prop: 'hcName', prop: 'wlid',
span: 12, span: 24,
type: 'input', required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
dynamic: true,
code: true,
component: wlxx,
label: 'name',
transform: {
value: 'id',
label: 'name'
},
give:(row)=>{
this.form.name=row.name
this.form.cz=row.cz
this.form.gg=row.gg
}
}
}, },
// {
// label: '耗材名称',
// prop: 'wlxxName',
// span: 12,
// type: 'input',
// },
{ {
label: '耗材规格/型号', label: '耗材规格/型号',
prop: 'hzgg', prop: 'gg',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
{ {
label: '耗材材质', label: '耗材材质',
prop: 'hccz', prop: 'cz',
span: 12, span: 12,
type: 'input', type: 'input',
}, },
......
<template> <template>
<RelDialog width="80vw" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <RelDialog @getForm='getForm' ref="reldialog" width="80vw" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules" <el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules"
style="height: 70vh;overflow: auto;overflow-x: hidden;"> style="height: 70vh;overflow: auto;overflow-x: hidden;">
<addgjmx @save='addgjmxbc' v-if="showDialog&&DialogTitle=='新增工具'" :app="this"></addgjmx> <addgjmx @save='addgjmxbc' v-if="showDialog&&DialogTitle=='新增工具'" :app="this"></addgjmx>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</editTableForEdit> </editTableForEdit>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="form.isbpbjsy=='Y'" label="备品备件使用" name="2"> <el-tab-pane v-if="form.sfsybpbj=='Y'" label="备品备件使用" name="2">
<div style="height: 300px;"> <div style="height: 300px;">
<editTableForEdit :phsxTitle='false' :expandTitle='false' code='false' :AuxButton='false' :indexApp='app' <editTableForEdit :phsxTitle='false' :expandTitle='false' code='false' :AuxButton='false' :indexApp='app'
:type='type' ref="editTableForEdit1" :editTableTitle='editTableTitle2' :editTableData="editTableData2"> :type='type' ref="editTableForEdit1" :editTableTitle='editTableTitle2' :editTableData="editTableData2">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</editTableForEdit> </editTableForEdit>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="form.ishcsy=='Y'" label="耗材使用" name="3"> <el-tab-pane v-if="form.sfsyhc=='Y'" label="耗材使用" name="3">
<div style="height: 300px;"> <div style="height: 300px;">
<editTableForEdit :phsxTitle='false' :expandTitle='false' code='false' :AuxButton='false' :indexApp='app' <editTableForEdit :phsxTitle='false' :expandTitle='false' code='false' :AuxButton='false' :indexApp='app'
:type='type' ref="editTableForEdit1" :editTableTitle='editTableTitle3' :editTableData="editTableData3"> :type='type' ref="editTableForEdit1" :editTableTitle='editTableTitle3' :editTableData="editTableData3">
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<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>
</RelDialog> </RelDialog>
</template> </template>
<script> <script>
...@@ -106,22 +112,22 @@ ...@@ -106,22 +112,22 @@
addhcmx addhcmx
}, },
computed:{ computed:{
isbpbjsy(){ sfsybpbj(){
return this.form.isbpbjsy return this.form.sfsybpbj
}, },
ishcsy(){ sfsyhc(){
return this.form.ishcsy return this.form.sfsyhc
} }
}, },
watch:{ watch:{
isbpbjsy(v){ sfsybpbj(v){
if(v=='Y'){ if(v=='Y'){
this.activeName='2' this.activeName='2'
}else{ }else{
this.activeName='1' this.activeName='1'
} }
}, },
ishcsy(v){ sfsyhc(v){
if(v=='Y'){ if(v=='Y'){
this.activeName='3' this.activeName='3'
}else{ }else{
...@@ -149,12 +155,12 @@ ...@@ -149,12 +155,12 @@
/* 表格信息*/ /* 表格信息*/
editTableTitle1: [{ editTableTitle1: [{
label: '工具名称', label: '工具名称',
prop: 'jxgjName', prop: 'name',
width: '260' width: '260'
}, },
{ {
label: '工具编码', label: '工具编码',
prop: 'jxgjCode', prop: 'code',
width: '260' width: '260'
}, },
{ {
...@@ -170,38 +176,38 @@ ...@@ -170,38 +176,38 @@
], ],
editTableTitle2: [{ editTableTitle2: [{
label: '备件名称', label: '备件名称',
prop: 'bpbjmc', prop: 'name',
width: '260' width: '260'
}, },
{ {
label: '备件编码', label: '备件编码',
prop: 'bpbjbm', prop: 'code',
width: '260' width: '260'
}, },
{ {
label: '备件规格', label: '备件规格',
prop: 'bpbjgg', prop: 'gg',
width: '260' width: '260'
}, },
{ {
label: '备件材质', label: '备件材质',
prop: 'bpbjcz', prop: 'cz',
} }
], ],
editTableTitle3: [{ editTableTitle3: [{
label: '耗材名称', label: '耗材名称',
prop: 'hcName', prop: 'name',
width: '260' width: '260'
}, },
{ {
label: '耗材规格/型号', label: '耗材规格/型号',
prop: 'hzgg', prop: 'gg',
width: '260' width: '260'
}, },
{ {
label: '耗材材质', label: '耗材材质',
prop: 'hccz', prop: 'cz',
width: '260' width: '260'
} }
], ],
...@@ -261,7 +267,7 @@ ...@@ -261,7 +267,7 @@
}, },
{ {
label: '备品备件使用', label: '备品备件使用',
prop: 'isbpbjsy', prop: 'sfsybpbj',
span: 6, span: 6,
type: 'checkbox', type: 'checkbox',
value: 'N' value: 'N'
...@@ -269,7 +275,7 @@ ...@@ -269,7 +275,7 @@
}, },
{ {
label: '耗材使用', label: '耗材使用',
prop: 'ishcsy', prop: 'sfsyhc',
span: 6, span: 6,
type: 'checkbox', type: 'checkbox',
value: 'N' value: 'N'
...@@ -279,6 +285,63 @@ ...@@ -279,6 +285,63 @@
} }
}, },
methods: { methods: {
getForm(form){
this.$post('jxgl/ujxgj/query',{
mid:form.id
}).then(res=>{
res.data.records.forEach(item=>{
this.editTableData1.push(item)
console.log(this.editTableData1,'this.editTableData1')
})
})
this.$post('jxgl/ujxwl/query',{
mid:form.id
}).then(res=>{
res.data.records.forEach(item=>{
this.editTableData3.push(item)
})
})
this.$post('jxgl/ubpbj/query',{
mid:form.id
}).then(res=>{
res.data.records.forEach(item=>{
this.editTableData2.push(item)
})
})
},
save(){
this.$refs['form'].validate((valid) => {
if (valid) {
if(this.type=='add'){
let params = {
details: [{
id: 'U_JXGJ',
records: [...this.editTableData1] || []
},
{
id: 'U_JXWL',
records: [...this.editTableData3] || []
},
{
id: 'U_BPBJ',
records: [...this.editTableData2] || []
}],
master: this.form
}
this.$post('jxgl/usbjx/add',params).then(res=>{
if(res.success){
this.$success('添加成功')
this.$refs.reldialog.closeAll()
}
})
}
}
})
},
success(response, file, fileList){ success(response, file, fileList){
console.log(response, file, fileList) console.log(response, file, fileList)
}, },
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
name: 'sbjxxx', name: 'sbjxxx',
data() { data() {
return { return {
config: { config: {
queryDetail:true,
/* 基本配置*/ /* 基本配置*/
url: 'jxgl/usbjx', url: 'jxgl/usbjx',
tableTitle: [{ tableTitle: [{
......
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