食堂进销
This commit is contained in:
1 parent
7f1cfdb0e7
commit
7fa87b6ebd
5 files changed
+356
-132
No files matched your search
@@ -8,6 +8,14 @@ export function fetchList(query?: Object) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function fetchGetSelectTemplatePage(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/canteen/canteenProductionTemplate/getSelectTemplatePage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function addObj(obj?: Object) {
|
export function addObj(obj?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/canteen/canteenProductionTemplate',
|
url: '/canteen/canteenProductionTemplate',
|
||||||
|
|||||||
@@ -1,134 +1,359 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
<el-dialog
|
||||||
:close-on-click-modal="false" draggable>
|
:title="form.id ? '编辑生产记录' : '新增生产记录'"
|
||||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
v-model="visible"
|
||||||
<el-row :gutter="24">
|
width="1300px"
|
||||||
<el-col :span="12" class="mb20">
|
:close-on-click-modal="false"
|
||||||
<el-form-item label="加工日期" prop="productionTime">
|
draggable
|
||||||
<el-input v-model="form.productionTime" placeholder="请输入加工日期"/>
|
>
|
||||||
</el-form-item>
|
<el-form
|
||||||
</el-col>
|
ref="formRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
|
<!-- 主表信息 -->
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="加工日期" prop="productionTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.productionTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
|
class="w-full"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="加工人" prop="handlerUser">
|
||||||
|
<el-input v-model="form.handlerUser" placeholder="请输入加工人"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="加工批次" prop="recordCode">
|
||||||
|
<el-input v-model="form.recordCode" placeholder="请输入加工批次"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="生产模板">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<el-button @click="openTemplateDialog">选择生产模板</el-button>
|
||||||
|
<span v-if="selectedTemplates.length" style="margin-left: 12px;">
|
||||||
|
已选{{ selectedTemplates.length }}个模板
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
<!-- 子表信息 -->
|
||||||
<el-form-item label="加工人" prop="handlerUser">
|
<el-form-item label="生产详情" style="margin-top: 16px;">
|
||||||
<el-input v-model="form.handlerUser" placeholder="请输入加工人"/>
|
<el-table
|
||||||
|
:data="form.productionDetailList"
|
||||||
|
border
|
||||||
|
:span-method="spanMethod"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column prop="dishName" label="菜品名称" width="180" />
|
||||||
|
<el-table-column label="生成数量" width="120">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.produceQuantity"
|
||||||
|
:min="1"
|
||||||
|
:precision="0"
|
||||||
|
@change="updateProduceQuantity(row)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="materialName" label="食材名称" width="180" />
|
||||||
|
<el-table-column prop="materialUnit" label="单位" width="80" />
|
||||||
|
<el-table-column prop="baseUsage" label="基准用量" width="120" />
|
||||||
|
<el-table-column prop="lossRate" label="损耗率" width="120">
|
||||||
|
<template #default="{ row }">{{ row.lossRate }}%</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实际用量" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.actualUsage"
|
||||||
|
:min="0"
|
||||||
|
:precision="2"
|
||||||
|
@change="calculateActualOutput(row)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实际产出" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.actualOutput"
|
||||||
|
:min="0"
|
||||||
|
:precision="2"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-form>
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
<template #footer>
|
||||||
<el-form-item label="主id" prop="recordId">
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
<el-input v-model="form.recordId" placeholder="请输入主id"/>
|
<el-button type="primary" @click="submitForm" :loading="loading">确 定</el-button>
|
||||||
</el-form-item>
|
</template>
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
<!-- 生产模板选择弹窗 -->
|
||||||
<el-form-item label="加工批次号" prop="recordCode">
|
<el-dialog
|
||||||
<el-input v-model="form.recordCode" placeholder="请输入加工批次号"/>
|
v-model="templateDialogVisible"
|
||||||
</el-form-item>
|
title="选择生产模板"
|
||||||
</el-col>
|
width="800px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="h-[500px] flex flex-col">
|
||||||
|
<el-form :inline="true" class="mb-4">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input
|
||||||
|
v-model="templateQuery.templateName"
|
||||||
|
placeholder="模板名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="searchTemplate"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="searchTemplate">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
<div class="flex-1 overflow-auto">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-table
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注"/>
|
ref="templateTable"
|
||||||
</el-form-item>
|
:data="templateList"
|
||||||
</el-col>
|
border
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
height="100%"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="templateName" label="模板名称" />
|
||||||
|
<el-table-column prop="dishName" label="菜品名称" />
|
||||||
|
<el-table-column prop="baseOutput" label="基准产出量" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
<div class="mt-4">
|
||||||
<el-form-item label="部门id" prop="deptId">
|
<pagination
|
||||||
<el-input v-model="form.deptId" placeholder="请输入部门id"/>
|
v-model:current-page="templateQuery.current"
|
||||||
</el-form-item>
|
v-model:page-size="templateQuery.size"
|
||||||
</el-col>
|
:total="templateTotal"
|
||||||
|
@size-change="val => { templateQuery.size = val; templateQuery.current = 1; searchTemplate() }"
|
||||||
|
@current-change="val => { templateQuery.current = val; searchTemplate() }"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-row>
|
<div class="dialog-footer" style="margin-top: 20px;">
|
||||||
</el-form>
|
<el-button @click="templateDialogVisible = false">取消</el-button>
|
||||||
<template #footer>
|
<el-button type="primary" @click="confirmTemplateSelection">确定</el-button>
|
||||||
<span class="dialog-footer">
|
</div>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
</div>
|
||||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="CanteenProductionRecordDialog">
|
<script setup lang="ts">
|
||||||
import { useDict } from '/@/hooks/dict';
|
import { ref, reactive } from 'vue'
|
||||||
import { useMessage } from "/@/hooks/message";
|
import type { FormInstance } from 'element-plus'
|
||||||
import { getObj, addObj, putObj } from '/@/api/canteen/canteenProductionRecord'
|
import { useMessage } from "/@/hooks/message"
|
||||||
import { rule } from '/@/utils/validate';
|
import { fetchGetSelectTemplatePage } from "/@/api/canteen/canteenProductionTemplate"
|
||||||
const emit = defineEmits(['refresh']);
|
import { addObj, putObj } from "/@/api/canteen/canteenProductionRecord"
|
||||||
|
import Pagination from '/@/components/Pagination/index.vue'
|
||||||
|
|
||||||
// 定义变量内容
|
|
||||||
const dataFormRef = ref();
|
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
// 定义字典
|
const formRef = ref<FormInstance>()
|
||||||
|
const selectedTemplates = ref<any[]>([])
|
||||||
|
|
||||||
// 提交表单数据
|
// 生产模板选择相关
|
||||||
const form = reactive({
|
const templateDialogVisible = ref(false)
|
||||||
id:'',
|
const templateList = ref<any[]>([])
|
||||||
productionTime: '',
|
const templateTotal = ref(0)
|
||||||
handlerUser: '',
|
const templateQuery = reactive({
|
||||||
recordId: '',
|
current: 1,
|
||||||
recordCode: '',
|
size: 10,
|
||||||
remark: '',
|
templateName: ''
|
||||||
deptId: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
// 定义校验规则
|
|
||||||
const dataRules = ref({
|
|
||||||
productionTime: [{required: true, message: '加工日期不能为空', trigger: 'blur'}],
|
|
||||||
recordCode: [{required: true, message: '加工批次号不能为空', trigger: 'blur'}],
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 打开弹窗
|
const form = reactive({
|
||||||
const openDialog = (id: string) => {
|
id: undefined,
|
||||||
visible.value = true
|
productionTime: new Date().toISOString().split('T')[0],
|
||||||
form.id = ''
|
handlerUser: '',
|
||||||
|
recordCode: '',
|
||||||
|
productionDetailList: [] as any[]
|
||||||
|
})
|
||||||
|
|
||||||
// 重置表单数据
|
const rules = {
|
||||||
nextTick(() => {
|
productionTime: [{ required: true, message: '请选择加工日期', trigger: 'change' }],
|
||||||
dataFormRef.value?.resetFields();
|
handlerUser: [{ required: true, message: '请输入加工人', trigger: 'blur' }],
|
||||||
});
|
recordCode: [{ required: true, message: '请输入加工批次', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
|
||||||
// 获取canteenProductionRecord信息
|
// 行合并逻辑
|
||||||
if (id) {
|
const rowspanMap = ref<number[]>([])
|
||||||
form.id = id
|
const generateRowspanMap = () => {
|
||||||
getcanteenProductionRecordData(id)
|
const map: number[] = []
|
||||||
}
|
let currentDish = ''
|
||||||
};
|
let count = 0
|
||||||
|
let startIndex = 0
|
||||||
|
|
||||||
// 提交
|
form.productionDetailList.forEach((item, index) => {
|
||||||
const onSubmit = async () => {
|
if (item.dishName !== currentDish) {
|
||||||
const valid = await dataFormRef.value.validate().catch(() => {});
|
if (currentDish !== '') {
|
||||||
if (!valid) return false;
|
for (let i = startIndex; i < index; i++) {
|
||||||
|
map[i] = i === startIndex ? count : 0
|
||||||
try {
|
}
|
||||||
loading.value = true;
|
}
|
||||||
form.id ? await putObj(form) : await addObj(form);
|
currentDish = item.dishName
|
||||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
startIndex = index
|
||||||
visible.value = false;
|
count = 1
|
||||||
emit('refresh');
|
} else {
|
||||||
} catch (err: any) {
|
count++
|
||||||
useMessage().error(err.msg);
|
}
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化表单数据
|
|
||||||
const getcanteenProductionRecordData = (id: string) => {
|
|
||||||
// 获取数据
|
|
||||||
loading.value = true
|
|
||||||
getObj(id).then((res: any) => {
|
|
||||||
Object.assign(form, res.data)
|
|
||||||
}).finally(() => {
|
|
||||||
loading.value = false
|
|
||||||
})
|
})
|
||||||
};
|
|
||||||
|
|
||||||
// 暴露变量
|
// 处理最后一组
|
||||||
|
if (currentDish !== '') {
|
||||||
|
for (let i = startIndex; i < form.productionDetailList.length; i++) {
|
||||||
|
map[i] = i === startIndex ? count : 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rowspanMap.value = map
|
||||||
|
}
|
||||||
|
|
||||||
|
// 单元格合并方法
|
||||||
|
const spanMethod = ({ row, column, rowIndex, columnIndex }: any) => {
|
||||||
|
if (columnIndex === 0 || columnIndex === 1) { // 合并菜品名称和生成数量列
|
||||||
|
const span = rowspanMap.value[rowIndex]
|
||||||
|
return {
|
||||||
|
rowspan: span,
|
||||||
|
colspan: span > 0 ? 1 : 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { rowspan: 1, colspan: 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
const emit = defineEmits(['refresh'])
|
||||||
|
|
||||||
|
const disabledDate = (time: Date) => {
|
||||||
|
return time.getTime() > Date.now()
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchTemplate = async () => {
|
||||||
|
try {
|
||||||
|
const res = await fetchGetSelectTemplatePage(templateQuery)
|
||||||
|
templateList.value = res.data.records
|
||||||
|
templateTotal.value = res.data.total
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取生产模板列表失败:', error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSelectionChange = (selection: any[]) => {
|
||||||
|
selectedTemplates.value = selection
|
||||||
|
}
|
||||||
|
|
||||||
|
const confirmTemplateSelection = () => {
|
||||||
|
if (selectedTemplates.value.length === 0) {
|
||||||
|
useMessage().warning('请至少选择一个模板')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
form.productionDetailList = []
|
||||||
|
selectedTemplates.value.forEach(template => {
|
||||||
|
const details = template.canteenProductionTemplateDetailList.map((item: any) => ({
|
||||||
|
...item,
|
||||||
|
dishName: template.dishName,
|
||||||
|
materialUnit: item.unit, // 正确传递食材单位字段
|
||||||
|
produceQuantity: 1,
|
||||||
|
actualUsage: item.baseUsage * 1,
|
||||||
|
actualOutput: 0,
|
||||||
|
manualModified: false
|
||||||
|
}))
|
||||||
|
form.productionDetailList.push(...details)
|
||||||
|
})
|
||||||
|
|
||||||
|
generateRowspanMap()
|
||||||
|
templateDialogVisible.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新生成数量
|
||||||
|
const updateProduceQuantity = (changedRow: any) => {
|
||||||
|
const dishName = changedRow.dishName
|
||||||
|
form.productionDetailList.forEach(row => {
|
||||||
|
if (row.dishName === dishName) {
|
||||||
|
row.produceQuantity = changedRow.produceQuantity
|
||||||
|
if (!row.manualModified) {
|
||||||
|
row.actualUsage = Number((row.baseUsage * changedRow.produceQuantity).toFixed(2))
|
||||||
|
calculateActualOutput(row)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算实际产出
|
||||||
|
const calculateActualOutput = (row: any) => {
|
||||||
|
row.manualModified = true
|
||||||
|
const lossAmount = row.actualUsage * (row.lossRate / 100)
|
||||||
|
row.actualOutput = Number((row.actualUsage - lossAmount).toFixed(2))
|
||||||
|
}
|
||||||
|
|
||||||
|
const openTemplateDialog = () => {
|
||||||
|
templateDialogVisible.value = true
|
||||||
|
selectedTemplates.value = []
|
||||||
|
searchTemplate()
|
||||||
|
}
|
||||||
|
|
||||||
|
const openDialog = (row?: any) => {
|
||||||
|
visible.value = true
|
||||||
|
if (row) {
|
||||||
|
Object.assign(form, row)
|
||||||
|
generateRowspanMap()
|
||||||
|
} else {
|
||||||
|
form.id = undefined
|
||||||
|
form.productionTime = new Date().toISOString().split('T')[0]
|
||||||
|
form.handlerUser = ''
|
||||||
|
form.recordCode = ''
|
||||||
|
form.productionDetailList = []
|
||||||
|
selectedTemplates.value = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitForm = async () => {
|
||||||
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
await formRef.value.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const api = form.id ? putObj : addObj
|
||||||
|
const res = await api(form)
|
||||||
|
if (res.code === 0) {
|
||||||
|
useMessage().success(form.id ? '修改成功' : '新增成功')
|
||||||
|
emit('refresh')
|
||||||
|
visible.value = false
|
||||||
|
} else {
|
||||||
|
useMessage().error(res.msg || (form.id ? '修改失败' : '新增失败'))
|
||||||
|
}
|
||||||
|
} catch (error: any) {
|
||||||
|
useMessage().error(error.msg || (form.id ? '修改失败' : '新增失败'))
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog
|
openDialog
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -29,14 +29,14 @@
|
|||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<el-button type="primary" @click="openMaterialDialog">选择食材</el-button>
|
<el-button type="primary" @click="openMaterialDialog">选择食材</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :data="form.canteenProductionTemplateDetailList" border>
|
<el-table :data="form.canteenProductionTemplateDetailList" border>
|
||||||
<el-table-column label="食材名称" prop="materialName" />
|
<el-table-column label="食材名称" prop="materialName" />
|
||||||
<el-table-column label="基准用量" width="200">
|
<el-table-column label="基准用量" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="row.baseUsage"
|
v-model="row.baseUsage"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
/>
|
/>
|
||||||
@@ -45,9 +45,9 @@
|
|||||||
<el-table-column label="损耗率" width="200">
|
<el-table-column label="损耗率" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="row.lossRate"
|
v-model="row.lossRate"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="100"
|
:max="100"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
@@ -371,7 +371,7 @@ const closeDialog = () => {
|
|||||||
|
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
|
|
||||||
await formRef.value.validate(async (valid) => {
|
await formRef.value.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@@ -397,4 +397,4 @@ const submitForm = async () => {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog
|
openDialog
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="40" />
|
<el-table-column type="index" label="#" width="40" />
|
||||||
<el-table-column prop="templateName" label="模版名称" show-overflow-tooltip/>
|
<el-table-column prop="templateName" label="模版名称" show-overflow-tooltip/>
|
||||||
<el-table-column prop="dishId" label="菜品id" show-overflow-tooltip/>
|
<!-- <el-table-column prop="dishId" label="菜品id" show-overflow-tooltip/>-->
|
||||||
<el-table-column prop="baseOutput" label="基准产出量(碗)" show-overflow-tooltip/>
|
<el-table-column prop="baseOutput" label="基准产出量" show-overflow-tooltip/>
|
||||||
<el-table-column label="操作" width="150">
|
<el-table-column label="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="edit-pen" text type="primary" v-auth="'canteen_canteenProductionTemplate_edit'"
|
<el-button icon="edit-pen" text type="primary" v-auth="'canteen_canteenProductionTemplate_edit'"
|
||||||
|
|||||||
@@ -32,27 +32,18 @@
|
|||||||
@queryTable="getDataList"></right-toolbar>
|
@queryTable="getDataList"></right-toolbar>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="state.dataList" v-loading="state.loading" border
|
<el-table :data="state.dataList" v-loading="state.loading" border
|
||||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||||
@selection-change="selectionChangHandle"
|
@selection-change="selectionChangHandle"
|
||||||
@sort-change="sortChangeHandle">
|
@sort-change="sortChangeHandle">
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="40" />
|
<el-table-column type="index" label="#" width="40" />
|
||||||
<el-table-column prop="supplierName" label="货商名称" show-overflow-tooltip/>
|
<el-table-column prop="supplierName" label="货商名称" show-overflow-tooltip/>
|
||||||
<el-table-column prop="address" label="货商地址" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="phone" label="电话号码" show-overflow-tooltip/>
|
<el-table-column prop="phone" label="电话号码" show-overflow-tooltip/>
|
||||||
<el-table-column prop="tax" label="税号" show-overflow-tooltip/>
|
<el-table-column prop="tax" label="税号" show-overflow-tooltip/>
|
||||||
<el-table-column prop="linkName" label="联系人" show-overflow-tooltip/>
|
<el-table-column prop="linkName" label="联系人" show-overflow-tooltip/>
|
||||||
<el-table-column prop="openAccount" label="开户行账号" show-overflow-tooltip/>
|
<el-table-column prop="openAccount" label="开户行账号" show-overflow-tooltip/>
|
||||||
<el-table-column prop="email" label="邮箱地址" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="deptId" label="所属部门ID" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="supplierType" label="货商类别" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="supplierArea" label="货商地区" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="passwordModifyTime" label="修改时间" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="openName" label="开户行" show-overflow-tooltip/>
|
<el-table-column prop="openName" label="开户行" show-overflow-tooltip/>
|
||||||
<el-table-column prop="contractNumber" label="合同号" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="status" label="状态 0使用 1禁用" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="pinyinCod" label="拼音简码" show-overflow-tooltip/>
|
|
||||||
<el-table-column label="操作" width="150">
|
<el-table-column label="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="edit-pen" text type="primary" v-auth="'canteen_canteenSupplier_edit'"
|
<el-button icon="edit-pen" text type="primary" v-auth="'canteen_canteenSupplier_edit'"
|
||||||
@@ -140,4 +131,4 @@ const handleDelete = async (ids: string[]) => {
|
|||||||
useMessage().error(err.msg);
|
useMessage().error(err.msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
Reference in new issue
Block a user