供应商增加品类

main
siontion 5 months ago
parent 82c2bbbb00
commit 350e2c0cb2

@ -5,8 +5,8 @@ VITE_PORT=8090
VITE_OPEN=true
# 内部测试
# VITE_BASE_URL='http://222.71.165.188:8102'
VITE_BASE_URL='http://localhost:8102'
# VITE_BASE_URL='http://192.168.30.3:8102'
# VITE_BASE_URL='http://localhost:8102'
VITE_BASE_URL='http://192.168.30.3:8102'
# 外网测试
# VITE_BASE_URL='http://60.190.91.78:8102'
# 接口地址

@ -1,6 +1,6 @@
<template>
<div class="xyp-base-supplier">
<a-card :bordered="false" style="margin: 10px">
<div class="xyp-base-supplier" >
<a-card :bordered="false" style="margin: 10px;">
<vxe-grid ref="xGrid" :stripe="true" v-bind="gridOptionsA">
<template #toolbar_buttons>
<vxe-button status="success" icon="vxe-icon-add" @click="fnBaseSupplierForm('add')"></vxe-button>
@ -45,6 +45,7 @@ const gridOptionsA: any = reactive({
{ field: 'LotNo', title: '原材料批次号', sortable: true, minWidth: 160, },
{ field: 'ProductionDate', title: '出厂日期', sortable: true, minWidth: 160, slots: { default: 'slotProductionDate' } },
{ field: 'CheckDate', title: '检验日期', sortable: true, minWidth: 160, slots: { default: 'slotCheckDate' } },
{ field: 'MatTargetName', title: '配电箱品类', sortable: true, minWidth: 160 },
{ title: '操作', width: 220, fixed: 'right', slots: { default: 'operate' } }
],
pagerConfig: {

@ -1,6 +1,6 @@
<template>
<div class="xyp-base-supplier-form" v-if="refShow">
<vxe-modal v-model="refShow" width="800" height="660" show-zoom show-footer>
<vxe-modal v-model="refShow" width="800" height="760" show-zoom show-footer>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
@ -56,6 +56,13 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="配电箱类型" field="MatTarget" span="24">
<template #default="params">
<vxe-select v-model="params.data.MatTarget" multiple clearable>
<vxe-option v-for="item in matTargetOptions" :key="item.value" :value="item.value" :label="item.label" placeholder="请选择"></vxe-option>
</vxe-select>
</template>
</vxe-form-item>
</vxe-form>
</a-card>
</template>
@ -89,8 +96,49 @@ const formDataAInit = {
"CheckNo": "",
"LotNo": "",
"ProductionDate": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"CheckDate": dayjs().format("YYYY-MM-DD HH:mm:ss")
"CheckDate": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"MatTarget":[],
"MatTargetName": ""
}
const matTargetOptions = ref([
{
value: 'guiti',
label: '柜体材质、厚度及尺寸'
},
{
value: 'mupai',
label: '母排'
},
{
value: 'bileiqi',
label: '避雷器'
},
{
value: 'langyong',
label: '浪涌保护器'
},
{
value: 'dianliu',
label: '电流互感器'
},
{
value: 'shengyu',
label: '剩余电流动作保护器'
},
{
value: 'duanluqi',
label: '断路器'
},
{
value: 'dianrongqi',
label: '电容器'
},
{
value: 'rongduanqi',
label: '熔断器式隔离开关'
}
])
// [success]
const emit = defineEmits(['success'])
//
@ -155,6 +203,9 @@ const open = async (type: string, row?: any) => {
}
const rowInfoA = await BaseSupplierApi.getBaseSupplier(paramsA)
formDataA.value = rowInfoA.Data
if(formDataA.value.MatTarget.length>0){
formDataA.value.MatTarget = eval(formDataA.value.MatTarget)
}
break;
case 'copy':
await fnResetA()
@ -172,6 +223,9 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ProductionDate = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.CheckDate = dayjs().format("YYYY-MM-DD HH:mm:ss")
formDataA.value = rowInfoB.Data
if(formDataA.value.MatTarget.length>0){
formDataA.value.MatTarget = eval(formDataA.value.MatTarget)
}
break;
case 'delete':
modalTitle.value = '删除供应商'
@ -210,6 +264,12 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
let tmp_name = "";
formDataA.value.MatTarget.forEach( (item:any) =>{
tmp_name+= item+","
})
formDataA.value.MatTargetName = tmp_name.replace(/(^,)|(,$)/g,'');
switch (formTypeA.value) {
case 'add':
const paramsA = {

@ -30,6 +30,7 @@ const props = defineProps(
return [
{ type: 'radio', width: 40, fixed: 'left' },
{ field: 'CheckNo', title: '原材料检验批次号', fixed: 'left', width: 160 },
{ field: 'MatTargetName', title: '配电箱品类', width: 160 },
{ field: 'LotNo', title: '原材料批次号', width: 160 },
{ field: 'Brand', title: '原材料品牌', width: 160 },
{ field: 'Name', title: '原材料制造商', width: 160 },
@ -90,7 +91,8 @@ const gridOptionsA: any = ref({
items: [
{ field: 'LotNo', title: '原材料批次号', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入原材料批次号' } } },
{ field: 'Spec', title: '原材料规格型号', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入原材料规格型号' } } },
{ field: 'Brand', title: '原材料品牌', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入原材料品牌' } } },
{ field: 'MatTargetName', title: '配电箱品类', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入配电箱品类' } } },
{ field: 'Brand', title: '原材料品牌', span: 8,folding: true, itemRender: { name: '$input', props: { placeholder: '请输入原材料品牌' } } },
{ span: 24, align: 'center', collapseNode: true, itemRender: { name: '$buttons', children: [{ props: { type: 'submit', content: '查询', status: 'primary' } }, { props: { type: 'reset', content: '重置' } }] } }
]
},

Loading…
Cancel
Save