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