|
@@ -5,6 +5,10 @@
|
|
<!-- 搜索区域 -->
|
|
<!-- 搜索区域 -->
|
|
<el-form class="list-search-container" :inline="true" style="display: flex">
|
|
<el-form class="list-search-container" :inline="true" style="display: flex">
|
|
<el-form-item class="section-title" label="包装线列表" />
|
|
<el-form-item class="section-title" label="包装线列表" />
|
|
|
|
+ <el-form-item class="section-title" label="请选择当前工段:">
|
|
|
|
+ <el-select-v2 v-model="queryDeptParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 100px"
|
|
|
|
+ @change="handleDeptChange" />
|
|
|
|
+ </el-form-item>
|
|
<el-button type="primary" icon="Plus" :disabled="packageResourceGroups.length === 0" @click="handleAdd()"
|
|
<el-button type="primary" icon="Plus" :disabled="packageResourceGroups.length === 0" @click="handleAdd()"
|
|
v-hasPermi="['business:packageResourceGroup:add']">新增</el-button>
|
|
v-hasPermi="['business:packageResourceGroup:add']">新增</el-button>
|
|
<el-button type="info" icon="Search" @click="getList()"
|
|
<el-button type="info" icon="Search" @click="getList()"
|
|
@@ -117,11 +121,7 @@ import {
|
|
} from "@/api/business/resourceGroup";
|
|
} from "@/api/business/resourceGroup";
|
|
import { listGroup, addGroup, updateGroup, delGroup, listDetails, addDetails } from "@/api/business/packageResourceGroup";
|
|
import { listGroup, addGroup, updateGroup, delGroup, listDetails, addDetails } from "@/api/business/packageResourceGroup";
|
|
import { delDetail } from "@/api/business/packageResourceGroupDetail"
|
|
import { delDetail } from "@/api/business/packageResourceGroupDetail"
|
|
-import {
|
|
|
|
- listDeptProcess,
|
|
|
|
- addDeptProcess,
|
|
|
|
- delDeptProcess,
|
|
|
|
-} from "@/api/business/deptProcess";
|
|
|
|
|
|
+import { getDeptListByUserIdInPackage } from "@/api/business/planDetailSubDetail.js";
|
|
import resourceGroupForm from "./form";
|
|
import resourceGroupForm from "./form";
|
|
import useUserStore from '@/store/modules/user'
|
|
import useUserStore from '@/store/modules/user'
|
|
import EmployeeChoiceDialog from './EmployeeChoiceDialog.vue'
|
|
import EmployeeChoiceDialog from './EmployeeChoiceDialog.vue'
|
|
@@ -133,6 +133,7 @@ const data = reactive({
|
|
queryDeptParams: {
|
|
queryDeptParams: {
|
|
deptName: "",
|
|
deptName: "",
|
|
deptCode: "",
|
|
deptCode: "",
|
|
|
|
+ deptId: "",
|
|
},
|
|
},
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -167,7 +168,7 @@ const groupList = ref([]);
|
|
const groupLoading = ref(false);
|
|
const groupLoading = ref(false);
|
|
/**资源组明细 */
|
|
/**资源组明细 */
|
|
const groupDetailLoading = ref(false);
|
|
const groupDetailLoading = ref(false);
|
|
-const groupDetailList = ref([]);
|
|
|
|
|
|
+const deptList = ref([]);
|
|
/**工序 */
|
|
/**工序 */
|
|
const userList = ref([]);
|
|
const userList = ref([]);
|
|
const deptProcessLoading = ref(false);
|
|
const deptProcessLoading = ref(false);
|
|
@@ -192,6 +193,10 @@ function getList() {
|
|
workSectionLoading.value = false;
|
|
workSectionLoading.value = false;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+//切换工段
|
|
|
|
+function handleDeptChange() {
|
|
|
|
+ getList()
|
|
|
|
+}
|
|
/**工段点击事件 */
|
|
/**工段点击事件 */
|
|
const handleWorkSectionChange = (row) => {
|
|
const handleWorkSectionChange = (row) => {
|
|
queryParams.value.code = "";
|
|
queryParams.value.code = "";
|
|
@@ -206,6 +211,18 @@ const handleWorkSectionChange = (row) => {
|
|
|
|
|
|
/*******************************工序方法区*********************************** */
|
|
/*******************************工序方法区*********************************** */
|
|
/**获取工序 */
|
|
/**获取工序 */
|
|
|
|
+function getDeptList(){
|
|
|
|
+ getDeptListByUserIdInPackage().then((response) => {
|
|
|
|
+ deptList.value = response.data.rows;
|
|
|
|
+ if (deptList.value.length > 0) {
|
|
|
|
+ queryDeptParams.value.deptId = deptList.value[0].value;
|
|
|
|
+ getList();
|
|
|
|
+ } else {
|
|
|
|
+ packageResourceGroups.value = [];
|
|
|
|
+ userList.value = []
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
const getDetails = () => {
|
|
const getDetails = () => {
|
|
deptProcessIds.value = []
|
|
deptProcessIds.value = []
|
|
deptProcessLoading.value = true;
|
|
deptProcessLoading.value = true;
|
|
@@ -359,6 +376,6 @@ function handleEmployeeMultipleSelected(infos) {
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- getList();
|
|
|
|
|
|
+ getDeptList();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|