8/14
This commit is contained in:
@@ -209,7 +209,8 @@
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button type="warning" @click="submitForm('0')">保存为草稿</el-button>
|
||||
<el-button type="primary" @click="submitForm('1')">发布</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -314,17 +315,13 @@ const rules = {
|
||||
content: [{ required: true, message: '请输入内容', trigger: 'blur' }]
|
||||
};
|
||||
|
||||
// 禁用 form.value.taskTime.split(' - ') 范围外的所有日期,包括边界日期(开始和结束当天)
|
||||
const disabledDate = (time: Date) => {
|
||||
const startDate = new Date();
|
||||
startDate.setHours(0, 0, 0, 0);
|
||||
// 获取当前选择日期的零点时间戳
|
||||
const disabledDate = (time: string) => {
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
const selectDate = new Date(time);
|
||||
selectDate.setHours(0, 0, 0, 0);
|
||||
// 禁用早于开始日期 或 晚于结束日期的日期
|
||||
// 注意:这里使用 < 和 >,意味着等于开始或结束日期时返回 false(不禁用/可选)
|
||||
return selectDate.getTime() < startDate.getTime();
|
||||
return selectDate.getTime() < today.getTime();
|
||||
};
|
||||
|
||||
const userid = ref();
|
||||
// 报名截止日期
|
||||
const deadline = ref([]);
|
||||
@@ -539,7 +536,8 @@ function init() {
|
||||
}
|
||||
|
||||
// 提交
|
||||
const submitForm = () => {
|
||||
const submitForm = (status: string) => {
|
||||
form.value.status = status;
|
||||
console.log(form.value);
|
||||
// if (!isSignin.value) {
|
||||
// form.value.SignInfo = null;
|
||||
|
||||
@@ -99,16 +99,16 @@
|
||||
<el-input disabled maxlength="20" show-word-limit v-model.trim="form.houseArea" placeholder="请输入面积" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收费模式" prop="chargeMode">
|
||||
<el-input v-model.trim="form.chargeMode" placeholder="请输入收费模式" />
|
||||
<el-input v-model.trim="form.chargeMode" show-word-limit placeholder="请输入收费模式" maxlength="200" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收费标准" prop="chargeStandard">
|
||||
<el-input v-model.trim="form.chargeStandard" placeholder="请输入收费标准" />
|
||||
<el-input v-model.trim="form.chargeStandard" show-word-limit placeholder="请输入收费标准" maxlength="200" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contractNo">
|
||||
<el-input maxlength="20" show-word-limit v-model.trim="form.contractNo" placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="contractStatus">
|
||||
<el-input v-model.trim="form.contractStatus" placeholder="请输入合同状态" />
|
||||
<el-input show-word-limit maxlength="200" v-model.trim="form.contractStatus" placeholder="请输入合同状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁起始日" prop="leaseStartDate">
|
||||
<el-date-picker
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
{{ form.costPrice }}
|
||||
</el-form-item>
|
||||
<el-form-item label="当前库存" prop="stockNum">
|
||||
<el-input-number v-model="form.stockNum" placeholder="请输入当前库存" />
|
||||
{{ form.stockNum }}
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin-top: 30px">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="cancelForm">返回</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -37,7 +35,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { listStockMain, listStockUpdate } from '@/api/system/Tstock';
|
||||
import { listStockMain } from '@/api/system/Tstock';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@@ -70,18 +68,18 @@ if (route.query.id) {
|
||||
}
|
||||
// !== 提交 =============================================================================
|
||||
// 提交
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (userid.value) {
|
||||
listStockUpdate(form.value).then((res) => {
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
// const submitForm = () => {
|
||||
// formRef.value?.validate(async (valid: boolean) => {
|
||||
// if (valid) {
|
||||
// if (userid.value) {
|
||||
// listStockUpdate(form.value).then(() => {
|
||||
// ElMessage.success('编辑成功');
|
||||
// cancelForm();
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// 推出
|
||||
const cancelForm = () => {
|
||||
router.back();
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:edit:inventory']">编辑</el-button>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:edit:inventory']">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<el-option v-for="(item, index) in warehouselist" :key="index" :label="item.warehouseName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库状态" prop="operateStatus">
|
||||
<el-radio-group v-model="form.operateStatus">
|
||||
<el-radio v-for="(item, index) in com_stock_out_status" :key="index" :value="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="出库状态" prop="operateStatus">-->
|
||||
<!-- <el-radio-group v-model="form.operateStatus">-->
|
||||
<!-- <el-radio v-for="(item, index) in com_stock_out_status" :key="index" :value="item.value">{{ item.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="领用人" prop="leader">
|
||||
<el-input maxlength="20" v-model.trim="form.leader" placeholder="请输入领用人" />
|
||||
</el-form-item>
|
||||
@@ -62,12 +62,12 @@
|
||||
<el-table-column label="出库价" align="center">
|
||||
<template #default="scope">
|
||||
<!-- <el-input v-model.trim.number="scope.row.outPrice"></el-input> -->
|
||||
<el-input-number maxlength="7" v-model="scope.row.outPrice" :min="0" placeholder="价格" />
|
||||
<el-input-number :min="0" :max="9999999" maxlength="7" v-model.trim.number="scope.row.outPrice" placeholder="价格" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="inNo">
|
||||
<template #default="scope">
|
||||
<el-input-number maxlength="7" v-model="scope.row.outNum" :min="0" placeholder="个数" />
|
||||
<el-input-number :max="9999999" maxlength="7" v-model.trim.number="scope.row.outNum" :min="0" placeholder="个数" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark">
|
||||
@@ -95,10 +95,7 @@ import { listSupplier } from '@/api/system/Tsupplier';
|
||||
import { listWarehouse } from '@/api/system/Twarehouse';
|
||||
import { MaterialVO } from '@/api/system/Tmaterial/type';
|
||||
import { addStockOut, getStockOut, updateStockOut } from '@/api/system/TissueOut';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_stock_out_status } = toRefs<any>(proxy?.useDict('com_stock_out_status'));
|
||||
interface tabletype extends MaterialVO {
|
||||
interface tableType extends MaterialVO {
|
||||
costPrice?: number; // 成本价
|
||||
inNum?: number; // 成本价
|
||||
}
|
||||
@@ -111,13 +108,13 @@ const formRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
outNo: null, //
|
||||
operateStatus: '0', //
|
||||
operateStatus: '1', //
|
||||
outDate: '', // 出库日期
|
||||
supplierId: '', // 供应商
|
||||
warehouseId: '', // 出库仓库
|
||||
leader: '', // 备注
|
||||
remark: '', // 备注
|
||||
items: [] as tabletype[] // 联系人
|
||||
items: [] as tableType[] // 联系人
|
||||
});
|
||||
const itemsid = computed(() => {
|
||||
return form.value.items.map((item) => item.id).join(',');
|
||||
|
||||
@@ -20,14 +20,6 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-has-permi="['warehouse:add:issueout']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-has-permi="['system:stockOut:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:disable-delete="multiple"
|
||||
:disable-edit="single"
|
||||
@@ -66,7 +58,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="StockOut" lang="ts">
|
||||
import { listStockOut, delStockOut, addStockOut, updateStockOut } from '@/api/system/TissueOut/index';
|
||||
import { listStockOut, delStockOut } from '@/api/system/TissueOut';
|
||||
import { StockOutVO, StockOutQuery, StockOutForm } from '@/api/system/TissueOut/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
|
||||
@@ -74,7 +66,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_stock_out_status } = toRefs<any>(proxy?.useDict('com_stock_out_status'));
|
||||
|
||||
const stockOutList = ref<StockOutVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
@@ -83,12 +74,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const stockOutFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: StockOutForm = {
|
||||
id: undefined,
|
||||
@@ -122,7 +107,7 @@ const data = reactive<PageData<StockOutForm, StockOutQuery>>({
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
/** 查询出库主列表 */
|
||||
const getList = async () => {
|
||||
@@ -133,18 +118,6 @@ const getList = async () => {
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
stockOutFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
@@ -173,7 +146,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleMain = async (row?: StockOutVO) => {
|
||||
const handleMain = (row?: StockOutVO) => {
|
||||
router.push({
|
||||
path: '/warehouse/stockoutMain',
|
||||
query: {
|
||||
@@ -181,22 +154,22 @@ const handleMain = async (row?: StockOutVO) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
stockOutFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateStockOut(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addStockOut(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
// /** 提交按钮 */
|
||||
// const submitForm = () => {
|
||||
// stockOutFormRef.value?.validate(async (valid: boolean) => {
|
||||
// if (valid) {
|
||||
// buttonLoading.value = true;
|
||||
// if (form.value.id) {
|
||||
// await updateStockOut(form.value).finally(() => (buttonLoading.value = false));
|
||||
// } else {
|
||||
// await addStockOut(form.value).finally(() => (buttonLoading.value = false));
|
||||
// }
|
||||
// proxy?.$modal.msgSuccess('操作成功');
|
||||
// dialog.visible = false;
|
||||
// await getList();
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: StockOutVO) => {
|
||||
@@ -207,17 +180,6 @@ const handleDelete = async (row?: StockOutVO) => {
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'system/stockOut/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`stockOut_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -73,12 +73,12 @@ const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (userid.value) {
|
||||
updateMaterial(form.value).then((res) => {
|
||||
updateMaterial(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addMaterial(form.value).then((res) => {
|
||||
addMaterial(form.value).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
cancelForm();
|
||||
});
|
||||
|
||||
@@ -20,14 +20,6 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-has-permi="['system:material:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-has-permi="['system:material:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:disable-delete="multiple"
|
||||
:disable-edit="single"
|
||||
@@ -187,7 +179,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: MaterialVO) => {
|
||||
const handleUpdate = (row?: MaterialVO) => {
|
||||
const _id = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/warehouse/editMaterial',
|
||||
@@ -222,18 +214,6 @@ const handleDelete = async (row?: MaterialVO) => {
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'system/material/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`material_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
<table border>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 60px">序号</td>
|
||||
<td style="width: 90px;">序号</td>
|
||||
<td>物资名称</td>
|
||||
<td>品牌</td>
|
||||
<td>规格型号</td>
|
||||
<td style="width: 40px">单位</td>
|
||||
<td style="width: 80px">单位</td>
|
||||
<td>供应商</td>
|
||||
<td style="width: 40px">数量</td>
|
||||
<td style="width: 80px">数量</td>
|
||||
<td style="width: 80px">单价</td>
|
||||
<td>合计</td>
|
||||
<td>备注</td>
|
||||
@@ -31,7 +31,7 @@
|
||||
<td>{{ item.model }}</td>
|
||||
<td>{{ item.unit }}</td>
|
||||
<td>{{ form.supplierName }}</td>
|
||||
<td>{{ item.stockNum }}</td>
|
||||
<td>{{ item.inNum }}</td>
|
||||
<td>{{ item.costPrice }}</td>
|
||||
<td>{{ item.totalPrice }}</td>
|
||||
<td>{{ item.remark }}</td>
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<el-option v-for="(item, index) in warehouselist" :key="index" :label="item.warehouseName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库状态" prop="operateStatus">
|
||||
<el-radio-group v-model="form.operateStatus">
|
||||
<el-radio v-for="(item, index) in com_stock_in_status" :key="index" :value="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入库状态" prop="operateStatus">-->
|
||||
<!-- <el-radio-group v-model="form.operateStatus">-->
|
||||
<!-- <el-radio v-for="(item, index) in com_stock_in_status" :key="index" :value="item.value">{{ item.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="制单人" prop="leader">
|
||||
<el-input maxlength="20" v-model.trim="form.leader" placeholder="请输入制单人" />
|
||||
</el-form-item>
|
||||
@@ -61,12 +61,18 @@
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="成本价" align="center" prop="inNo">
|
||||
<template #default="scope">
|
||||
<el-input maxlength="7" v-model.trim.number="scope.row.costPrice" placeholder="请输入"></el-input>
|
||||
<el-input-number
|
||||
maxlength="7"
|
||||
:min="0"
|
||||
:max="9999999"
|
||||
v-model.trim.number="scope.row.costPrice"
|
||||
placeholder="请输入"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="inNo">
|
||||
<template #default="scope">
|
||||
<el-input maxlength="7" v-model.trim.number="scope.row.inNum" placeholder="请输入"></el-input>
|
||||
<el-input-number maxlength="7" :min="0" :max="9999999" v-model.trim.number="scope.row.inNum" placeholder="请输入"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark">
|
||||
@@ -95,10 +101,7 @@ import { listWarehouse } from '@/api/system/Twarehouse';
|
||||
import { addStockIn, getStockIn, updateStockIn } from '@/api/system/TPurchaseIn';
|
||||
import { MaterialVO } from '@/api/system/Tmaterial/type';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_stock_in_status } = toRefs<any>(proxy?.useDict('com_stock_in_status'));
|
||||
|
||||
interface tabletype extends MaterialVO {
|
||||
interface tableType extends MaterialVO {
|
||||
costPrice?: number; // 成本价
|
||||
inNum?: number; // 成本价
|
||||
}
|
||||
@@ -117,7 +120,7 @@ const form = ref({
|
||||
warehouseId: '', // 入库仓库
|
||||
leader: '', // 备注
|
||||
remark: '', // 备注
|
||||
items: [] as tabletype[] // 联系人
|
||||
items: [] as tableType[] // 联系人
|
||||
});
|
||||
const itemsid = computed(() => {
|
||||
return form.value.items.map((item) => item.id).join(',');
|
||||
@@ -159,7 +162,7 @@ function init() {
|
||||
init();
|
||||
|
||||
function handleChangeitem(row: MaterialVO[]) {
|
||||
const arr = row
|
||||
form.value.items = row
|
||||
.map((item) => {
|
||||
if (!item.id) return null;
|
||||
const find = form.value.items.find((i) => i.id === item.id);
|
||||
@@ -177,7 +180,6 @@ function handleChangeitem(row: MaterialVO[]) {
|
||||
}
|
||||
})
|
||||
.filter((item) => item !== null);
|
||||
form.value.items = arr;
|
||||
}
|
||||
function handleDeleteRow(id: string) {
|
||||
const findindex = form.value.items.findIndex((item) => item.id === id);
|
||||
|
||||
@@ -57,7 +57,7 @@ const rules = ref({
|
||||
contactPhone: [
|
||||
{ required: false, message: '请输入 联系电话', trigger: 'blur' },
|
||||
{
|
||||
validator: (_, value) => {
|
||||
validator: (_: any, value: string) => {
|
||||
if (value === '') {
|
||||
return true;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ const rules = ref({
|
||||
email: [
|
||||
{ required: false, message: '请输入 邮箱', trigger: 'blur' },
|
||||
{
|
||||
validator: (_, value) => validator(value, 'email'),
|
||||
validator: (_: any, value: string | number) => validator(value, 'email'),
|
||||
message: '请输入正确的邮箱格式',
|
||||
trigger: 'blur'
|
||||
}
|
||||
@@ -98,12 +98,12 @@ const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (userid.value) {
|
||||
updateSupplier(form.value).then((res) => {
|
||||
updateSupplier(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addSupplier(form.value).then((res) => {
|
||||
addSupplier(form.value).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
cancelForm();
|
||||
});
|
||||
|
||||
@@ -20,14 +20,6 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-has-permi="['warehouse:add:supplier']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-has-permi="['system:supplier:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:disable-delete="multiple"
|
||||
:disable-edit="single"
|
||||
@@ -92,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Supplier" lang="ts">
|
||||
import { listSupplier, delSupplier, addSupplier, updateSupplier } from '@/api/system/Tsupplier/index';
|
||||
import { listSupplier, delSupplier, addSupplier, updateSupplier } from '@/api/system/Tsupplier';
|
||||
import { SupplierVO, SupplierQuery, SupplierForm } from '@/api/system/Tsupplier/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
|
||||
@@ -195,7 +187,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: SupplierVO) => {
|
||||
const handleUpdate = (row?: SupplierVO) => {
|
||||
const _ids = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/warehouse/editSupplier',
|
||||
@@ -231,17 +223,6 @@ const handleDelete = async (row?: SupplierVO) => {
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'system/supplier/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`supplier_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Warehouse" lang="ts">
|
||||
import { listWarehouse, delWarehouse, addWarehouse, updateWarehouse } from '@/api/system/Twarehouse/index';
|
||||
import { listWarehouse, delWarehouse, addWarehouse, updateWarehouse } from '@/api/system/Twarehouse';
|
||||
import { WarehouseVO, WarehouseQuery, WarehouseForm } from '@/api/system/Twarehouse/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
|
||||
@@ -207,7 +207,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: WarehouseVO) => {
|
||||
const handleUpdate = (row?: WarehouseVO) => {
|
||||
const _ids = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/warehouse/editWarehouse',
|
||||
@@ -244,7 +244,7 @@ const handleDelete = async (row?: WarehouseVO) => {
|
||||
};
|
||||
|
||||
// 切换状态
|
||||
const handleChangeSwitch = (val: string, row) => {
|
||||
const handleChangeSwitch = (val: string, row: WarehouseForm) => {
|
||||
updateWarehouse(row)
|
||||
.then(() => {
|
||||
ElMessage.success('修改状态成功');
|
||||
|
||||
Reference in New Issue
Block a user