20220914-syy-辅料管理

zhc4dev
暖暖 2 years ago
parent 3027467b3b
commit c52ff55ffd
  1. 82
      ant-design-vue-jeecg/src/components/procedure/processFabric.vue
  2. 9
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  3. 98
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesFormDetail.vue

@ -1,34 +1,45 @@
<template>
<div>
<div v-for="(item,index) in tableModel" :key="index">
<h3>辅料{{index+1}}</h3>
<div style="padding: 15px 25px;display: flex;justify-content: space-between">
<!-- <img :src="img == ''?img1:img" style="width:30%;">-->
<!-- <video v-if="mp4 != ''" :src="mp4" style="border:1px solid #d9d9d9;width:30%;"/>-->
<!-- <p v-else style="padding-top: 20px"> 暂无视频</p>-->
<table border="1" style="font-size:14px;" class="table" >
<tr>
<td style="text-align: center">编号:</td>
<td>{{item.nums}}</td>
<td style="text-align: center">名称:</td>
<td>{{item.contents}}</td>
<td style="text-align: center">图片:</td>
<td>{{item.picture}}</td>
<td style="text-align: center">材质:</td>
<td>{{item.material}}</td>
</tr>
<tr>
<td style="text-align: center">规格:</td>
<td>{{item.specs}}</td>
<td style="text-align: center">库存量:</td>
<td>{{item.store}}</td>
<td style="text-align: center">供货商:</td>
<td colspan="3">{{item.supplierInfo}}</td>
</tr>
</table>
</div>
<!-- <div v-for="(item,index) in tableModel" :key="index">-->
<!-- <h3>辅料{{index+1}}</h3>-->
<div style="padding: 15px 25px;">
<el-descriptions class="margin-top" :column="3" border style="margin-top: 50px">
<el-descriptions-item>
<template slot="label"><i class="el-icon-receiving"></i>类型id</template>
{{tableModel.typeId}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-coin"></i>编号</template>
{{tableModel.nums}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-postcard"></i>名称</template>
{{tableModel.contents}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-copy-document"></i>图片</template>
{{tableModel.picture}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-price-tag"></i>材质</template>
{{tableModel.material}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-files"></i>规格</template>
{{tableModel.specs}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-takeaway-box"></i>库存量</template>
{{tableModel.store}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><i class="el-icon-location-outline"></i>供货商</template>
{{tableModel.supplierInfo}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- </div>-->
</template>
<script>
export default {
@ -50,12 +61,15 @@
watch: {
// cData
model: function(newVal,oldVal){
if(Array.isArray(newVal)){
this.tableModel = newVal;
}else{
this.tableModel.push(newVal)
}
newVal && this.getTableModel();
// if(Array.isArray(newVal)){
// this.tableModel = newVal;
// }else{
// this.tableModel.push(newVal)
this.tableModel= newVal
console.log('组件页面')
console.log(this.tableModel)
// }
// newVal && this.getTableModel();
}
},
methods: {
@ -69,4 +83,6 @@
.table{border-color:#d9d9d9;border-radius: 3px}
.table td{padding: 10px 20px;max-width: 380px;}
.table td span{color: #333}
/deep/ .ant-modal-body{min-height: 450px;}
.margin-top i{margin-right: 5px}
</style>

@ -75,7 +75,7 @@
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
<a @click="handleDetail(record.id)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@ -90,6 +90,7 @@
</div>
<zy-accessories-modal ref="modalForm" @ok="modalFormOk"></zy-accessories-modal>
<ZyAccessoriesFormDetail ref="ZyAccessoriesFormDetail"></ZyAccessoriesFormDetail>
</a-card>
</template>
@ -99,12 +100,13 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyAccessoriesModal from './modules/ZyAccessoriesModal'
import ZyAccessoriesFormDetail from './modules/ZyAccessoriesFormDetail'
export default {
name: 'ZyAccessoriesList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyAccessoriesModal
ZyAccessoriesModal,ZyAccessoriesFormDetail
},
data () {
return {
@ -204,6 +206,9 @@
fieldList.push({type:'int',value:'store',text:'库存量'})
fieldList.push({type:'string',value:'supplierInfo',text:'供货商信息'})
this.superFieldList = fieldList
},
handleDetail(id){
this.$refs.ZyAccessoriesFormDetail.showModal(id)
}
}
}

@ -0,0 +1,98 @@
<template>
<div>
<a-modal
title="辅料管理-详情"
:visible="visible"
:confirm-loading="confirmLoading"
:width='1100'
@ok="handleOk"
@cancel="handleCancel"
>
<h1 style="text-align: center;margin-bottom: 30px;border-bottom: 1px solid #e8e8e8;padding-bottom: 20px;font-size: 22px;">黄淮学院服装智能制造管理平台 - <span>辅料管理</span></h1>
<!-- <el-descriptions class="margin-top" :column="3" border style="margin-top: 50px">-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-receiving"></i>类型id</template>-->
<!-- {{model.typeId}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-coin"></i>编号</template>-->
<!-- {{model.nums}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-postcard"></i>名称</template>-->
<!-- {{model.contents}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-copy-document"></i>图片</template>-->
<!-- {{model.picture}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-price-tag"></i>材质</template>-->
<!-- {{model.material}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-files"></i>规格</template>-->
<!-- {{model.specs}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-takeaway-box"></i>库存量</template>-->
<!-- {{model.store}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"><i class="el-icon-location-outline"></i>供货商</template>-->
<!-- {{model.supplierInfo}}-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
<processFabric :model="model"></processFabric>
</a-modal>
</div>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import processFabric from '@/components/procedure/processFabric'
export default {
name: 'ZyAccessoriesFormDetail',
components: {
processFabric
},
data () {
return {
model:{
},
visible: false,
confirmLoading: false,
validatorRules: {
},
}
},
methods:{
showModal(id) {
this.visible = true;
this.$http.get('/accessories/zyAccessories/queryById?id='+id).then(
res=>{
this.model = res.result
console.log('详情页面')
console.log(this.model)
})
},
handleOk() {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
handleCancel() {
this.visible = false;
},
}
}
</script>
<style scoped>
/deep/ .ant-modal-body{min-height: 450px;}
.margin-top i{margin-right: 5px}
</style>
Loading…
Cancel
Save