|
@@ -23,7 +23,7 @@
|
|
|
<el-dialog v-model="dialogFormVisible" title="部门选择" width="500" draggable append-to-body>
|
|
|
<el-form :model="formParam" label-width="80px">
|
|
|
<el-form-item label="部门">
|
|
|
- <el-select v-model="formParam.deptid" placeholder="请选择部门">
|
|
|
+ <el-select v-model="formParam.deptid" placeholder="请选择部门" filterable>
|
|
|
<el-option v-for="(col, index) in deptEnum" :key="index" :label="col.label" :value="col.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -44,11 +44,16 @@
|
|
|
<el-form-item label="压包数量" v-if="formParam.packtype == 0">
|
|
|
<el-input-number v-model="formParam.packqty" :min="0" :max="1000" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="复制到">
|
|
|
+ <el-select v-model="formParam.createby" :placeholder="userInfo.username" filterable clearable>
|
|
|
+ <el-option v-for="(col, index) in userListData" :key="index" :label="col.username" :value="col.username"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="BatchCopyMattressAudited">确认</el-button>
|
|
|
+ <el-button type="primary" :loading="loadingBtn" @click="BatchCopyMattressAudited">确认</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -67,6 +72,7 @@ import {
|
|
|
ReCalculateERPCost,
|
|
|
GetComputeMattressById
|
|
|
} from "@/api/modules/quote";
|
|
|
+import { getUserList } from "@/api/modules/basicinfo";
|
|
|
import { CommonDynamicSelect } from "@/api/modules/common";
|
|
|
import { ColumnProps } from "@/components/LjVxeTable/interface";
|
|
|
import LjDrawer from "@/components/LjDrawer/index.vue";
|
|
@@ -107,12 +113,15 @@ const {
|
|
|
} = useHooks();
|
|
|
const { toExcelQuote } = useHooksCpQuote();
|
|
|
const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
|
|
|
+const { userInfo } = useUserStore();
|
|
|
|
|
|
// const initParams = ref({});
|
|
|
const dialogVisible = ref(false);
|
|
|
// const vxeTableRef = ref();
|
|
|
const dialogFormVisible = ref(false);
|
|
|
+const loadingBtn = ref(false);
|
|
|
const deptEnum = ref([]);
|
|
|
+const userListData = ref([]);
|
|
|
const QuoteListDrawerRef = ref(null);
|
|
|
|
|
|
const { isShowOriginFormulaMattress } = storeToRefs(globalStore);
|
|
@@ -126,7 +135,8 @@ const formParam = ref({
|
|
|
area: "维持原状",
|
|
|
cabinet_type: "维持原状",
|
|
|
packtype: 0,
|
|
|
- packqty: 0
|
|
|
+ packqty: 0,
|
|
|
+ createby: ""
|
|
|
});
|
|
|
|
|
|
const getData = (params: any) => {
|
|
@@ -357,7 +367,6 @@ const action: detailAction[] = [
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const { userInfo } = useUserStore();
|
|
|
try {
|
|
|
curRecords.map(item => {
|
|
|
if (item.createby !== userInfo.username && userInfo.empid != 0) {
|
|
@@ -620,6 +629,11 @@ const openDeptChoosen = async curRecords => {
|
|
|
// return { label: item.deptname, value: item.deptid };
|
|
|
// });
|
|
|
// }
|
|
|
+
|
|
|
+ let res = await getUserList({ simple: 1 });
|
|
|
+ console.log("pricelist res :>> ", res);
|
|
|
+ userListData.value = res.userList;
|
|
|
+
|
|
|
let enumMap = vxeTableRef.value.enumMap;
|
|
|
deptEnum.value = enumMap.get("deptid");
|
|
|
console.log("openDeptChoosen deptEnum.value :>> ", deptEnum.value);
|
|
@@ -630,6 +644,8 @@ const openDeptChoosen = async curRecords => {
|
|
|
formParam.value.packqty = curRecords[0].packqty;
|
|
|
|
|
|
dialogFormVisible.value = true;
|
|
|
+
|
|
|
+ // loadingBtn.value = false;
|
|
|
} else {
|
|
|
console.error("获取部门列表为空");
|
|
|
}
|
|
@@ -647,6 +663,7 @@ const BatchCopyMattressAudited = () => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ loadingBtn.value = true;
|
|
|
let list = curRecords.map((item: any) => {
|
|
|
return {
|
|
|
mattressid: Number(item.mattressid),
|
|
@@ -654,7 +671,8 @@ const BatchCopyMattressAudited = () => {
|
|
|
area: formParam.value.area,
|
|
|
cabinet_type: formParam.value.cabinet_type,
|
|
|
packtype: formParam.value.packtype,
|
|
|
- packqty: formParam.value.packqty
|
|
|
+ packqty: formParam.value.packqty,
|
|
|
+ createby: formParam.value.createby
|
|
|
};
|
|
|
});
|
|
|
ElMessageBox.confirm(`是否确定要批复制${curRecords.length}张床垫报价单吗?`, "询问", {
|
|
@@ -667,6 +685,7 @@ const BatchCopyMattressAudited = () => {
|
|
|
ElMessage.success("批复制成功!");
|
|
|
dialogFormVisible.value = false;
|
|
|
vxeTableRef.value.refresh();
|
|
|
+ loadingBtn.value = false;
|
|
|
});
|
|
|
})
|
|
|
.catch((e: TypeError) => {
|
|
@@ -675,6 +694,7 @@ const BatchCopyMattressAudited = () => {
|
|
|
type: "info",
|
|
|
message: "操作取消"
|
|
|
});
|
|
|
+ loadingBtn.value = false;
|
|
|
});
|
|
|
};
|
|
|
|