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

调整

parent 9150e2a3
......@@ -34,7 +34,7 @@
},
config: {
/* 基本配置*/
url: 'jcgl/ugjxx',
url: 'jxgl/ugjxx',
tableTitle: [{
title: "编码",
field: "code",
......
......@@ -33,7 +33,7 @@
},
config: {
/* 基本配置*/
url: 'jcgl/uwlxx',
url: 'jxgl/uwlxx',
tableTitle: [{
title: "编码",
field: "code",
......
......@@ -19,7 +19,7 @@
return {
config: {
/* 基本配置*/
url: 'jcgl/ugjxx',
url: 'jxgl/ugjxx',
tableTitle: [{
title: "编码",
field: "code",
......
......@@ -19,7 +19,7 @@
return {
config: {
/* 基本配置*/
url: 'jcgl/uwlxx',
url: 'jxgl/uwlxx',
tableTitle: [{
title: "编码",
field: "code",
......
......@@ -42,25 +42,25 @@
editColItemList: [
{
label: '备件名称',
prop: 'bpbjmc',
prop: 'name',
span: 12,
type: 'input',
},
{
label: '备件编码',
prop: 'bpbjbm',
prop: 'code',
span: 12,
type: 'input',
},
{
label: '备件规格',
prop: 'bpbjgg',
prop: 'gg',
span: 12,
type: 'input',
},
{
label: '备件材质',
prop: 'bpbjcz',
prop: 'cz',
span: 12,
type: 'input',
},
......
......@@ -50,13 +50,13 @@
dynamic: true,
code: true,
component: gjxx,
label: 'jxgjName',
label: 'name',
transform: {
value: 'id',
label: 'name'
},
give:(row)=>{
this.form.jxgjCode=row.code
this.form.code=row.code
this.form.cz=row.cz
this.form.ggxh=row.ggxh
}
......@@ -66,7 +66,7 @@
{
label: '工具编码',
readonly:true,
prop: 'jxgjCode',
prop: 'code',
span: 12,
type: 'input',
},
......
......@@ -20,7 +20,7 @@
import {
editMixin
} from 'common'
import wlxx from '@/views/auxinput/wlxx'
export default {
......@@ -41,20 +41,44 @@
readonly: false,
editColItemList: [
{
label: '耗材名称',
prop: 'hcName',
span: 12,
type: 'input',
},
label: '耗材名称',
prop: 'wlid',
span: 24,
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: '耗材规格/型号',
prop: 'hzgg',
prop: 'gg',
span: 12,
type: 'input',
},
{
label: '耗材材质',
prop: 'hccz',
prop: 'cz',
span: 12,
type: 'input',
},
......
<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"
style="height: 70vh;overflow: auto;overflow-x: hidden;">
<addgjmx @save='addgjmxbc' v-if="showDialog&&DialogTitle=='新增工具'" :app="this"></addgjmx>
......@@ -22,7 +22,7 @@
</editTableForEdit>
</div>
</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;">
<editTableForEdit :phsxTitle='false' :expandTitle='false' code='false' :AuxButton='false' :indexApp='app'
:type='type' ref="editTableForEdit1" :editTableTitle='editTableTitle2' :editTableData="editTableData2">
......@@ -32,7 +32,7 @@
</editTableForEdit>
</div>
</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;">
<editTableForEdit :phsxTitle='false' :expandTitle='false' code='false' :AuxButton='false' :indexApp='app'
:type='type' ref="editTableForEdit1" :editTableTitle='editTableTitle3' :editTableData="editTableData3">
......@@ -88,6 +88,12 @@
</el-tab-pane>
</el-tabs>
</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>
</template>
<script>
......@@ -106,22 +112,22 @@
addhcmx
},
computed:{
isbpbjsy(){
return this.form.isbpbjsy
sfsybpbj(){
return this.form.sfsybpbj
},
ishcsy(){
return this.form.ishcsy
sfsyhc(){
return this.form.sfsyhc
}
},
watch:{
isbpbjsy(v){
sfsybpbj(v){
if(v=='Y'){
this.activeName='2'
}else{
this.activeName='1'
}
},
ishcsy(v){
sfsyhc(v){
if(v=='Y'){
this.activeName='3'
}else{
......@@ -149,12 +155,12 @@
/* 表格信息*/
editTableTitle1: [{
label: '工具名称',
prop: 'jxgjName',
prop: 'name',
width: '260'
},
{
label: '工具编码',
prop: 'jxgjCode',
prop: 'code',
width: '260'
},
{
......@@ -170,38 +176,38 @@
],
editTableTitle2: [{
label: '备件名称',
prop: 'bpbjmc',
prop: 'name',
width: '260'
},
{
label: '备件编码',
prop: 'bpbjbm',
prop: 'code',
width: '260'
},
{
label: '备件规格',
prop: 'bpbjgg',
prop: 'gg',
width: '260'
},
{
label: '备件材质',
prop: 'bpbjcz',
prop: 'cz',
}
],
editTableTitle3: [{
label: '耗材名称',
prop: 'hcName',
prop: 'name',
width: '260'
},
{
label: '耗材规格/型号',
prop: 'hzgg',
prop: 'gg',
width: '260'
},
{
label: '耗材材质',
prop: 'hccz',
prop: 'cz',
width: '260'
}
],
......@@ -261,7 +267,7 @@
},
{
label: '备品备件使用',
prop: 'isbpbjsy',
prop: 'sfsybpbj',
span: 6,
type: 'checkbox',
value: 'N'
......@@ -269,7 +275,7 @@
},
{
label: '耗材使用',
prop: 'ishcsy',
prop: 'sfsyhc',
span: 6,
type: 'checkbox',
value: 'N'
......@@ -279,6 +285,63 @@
}
},
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){
console.log(response, file, fileList)
},
......
......@@ -17,8 +17,8 @@
name: 'sbjxxx',
data() {
return {
config: {
queryDetail:true,
/* 基本配置*/
url: 'jxgl/usbjx',
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