2
0

2 Commity 51ae0924bd ... f3081efec4

Autor SHA1 Správa Dátum
  gydx_2024_lyh f3081efec4 Merge remote-tracking branch 'origin/master' 2 mesiacov pred
  gydx_2024_lyh acb6e7698f lyh 2 mesiacov pred

+ 114 - 4
gydxnbplus/src/components/RuleManagement.vue

@@ -87,7 +87,7 @@
       </el-table-column>
       <el-table-column label="操作" align="center" min-width="200">
         <template v-slot="scope">
-          <el-button @click="manageUser(scope.row)" type="primary" :icon="EditPen">用户管理</el-button>
+          <el-button @click="manageUser(scope.row);this.wawawa=false;" type="primary" :icon="EditPen">用户管理</el-button>
           <el-button @click="deleteRule(scope.row)" type="danger" :icon="Delete">删除</el-button>
         </template>
       </el-table-column>
@@ -153,6 +153,65 @@
       </template>
     </el-dialog>
   </div>
+
+
+
+
+
+
+  <!-- 编辑部门登录框 -->
+  <el-dialog v-model="RootLogin" title="供应商请登录">
+    <div class="form-edit-dialog" >
+
+      <div class="form-item">
+        <label for="RootLink" class="label-style">用户账号:</label>
+        <input type="text" id="RootLink" v-model="RootLink" placeholder="输入用户账号" class="input-style" />
+      </div>
+      <div class="form-item">
+        <label for="RootPass" class="label-style">用户密码:</label>
+        <input type="text" id="YourPass" v-model="RootPass" placeholder="输入用户密码" class="input-style" />
+      </div>
+    </div>
+    <template #footer>
+          <span class="dialog-footer" style="margin-top: 20px">
+            <el-button type="primary" @click="queryRoot">确定</el-button>
+            <el-button @click="RootLogin = false">取消</el-button>
+
+          </span>
+    </template>
+  </el-dialog>
+  <!-- 编辑部门对话框 -->
+  <el-dialog :data="queryLoginID" v-model="wawawa" title="编辑部门">
+    <div class="form-edit-dialog">
+      <div class="form-item">
+        <label for="FoodRuleID" class="label-style">用户ID:</label>
+        <input type="text" id="FoodRuleID" v-model="FoodRuleID" placeholder="输入用户账号" class="input-style" />
+      </div>
+
+      <div class="form-item">
+        <label for="FoodRuleName" class="label-style">规则名称:</label>
+        <input prop="foodSupplierLink" type="text" id="FoodRuleName" v-model="FoodRuleName" class="input-style" />
+      </div>
+      <div class="form-item">
+        <label for="TotalRounds" class="label-style">轮次数(次):</label>
+        <input prop="foodSupplierPass" type="text" id="TotalRounds" v-model="TotalRounds"  class="input-style" />
+      </div>
+      <div class="form-item">
+        <label for="RoundsTime" class="label-style">轮次时间(分钟):</label>
+        <input prop="foodSupplierPass" type="text" id="RoundsTime" v-model="RoundsTime"  class="input-style" />
+      </div>
+      <div class="form-item">
+        <label for="RoundSpacingTime" class="label-style">间隔时长(分钟):</label>
+        <input prop="foodSupplierPass" type="text" id="RoundSpacingTime" v-model="TotalRounds"  class="input-style" />
+      </div>
+    </div>
+    <template #footer>
+    <span class="dialog-footer" style="margin-top: 20px">
+      <el-button type="primary" @click="editRule">确定</el-button>
+      <el-button @click="wawawa = false">取消</el-button>
+    </span>
+    </template>
+  </el-dialog>
 </template>
 <script>
 import * as XLSX from 'xlsx';
@@ -180,12 +239,23 @@ export default {
       selectedAddIntervalDuration: ref(''),
       selectedRoundNumber: ref(''),
       selectedRoundTime: ref(''),
+      showEditDialogVisible: ref(false),
       selectedIntervalDuration: ref(''),
       ruleName: ref(''),
       pageSize: 10,
+      RootLogin:ref(false),
+      wawawa:ref(false),
       totalDataCount: ref(0),
       currentPage: ref(1),
       gotoPage: ref(''),
+      departmentName: ref(''),
+      phoneNumber: ref(''),
+      YourID:ref(''),
+      FoodRuleID:ref(''),
+      FoodRuleName:ref(''),
+      TotalRounds:ref(''),
+      RoundsTime:ref(''),
+      RoundSpacingTime:ref(''),
       pageSizeOptions: [
         { value: 10, label: '10 条/页' },
         { value: 20, label: '20 条/页' },
@@ -250,9 +320,49 @@ export default {
       this.selectedRoundTime.value = '';
       this.selectedIntervalDuration.value = '';
     },
-    manageUser(rule) {
-      // 处理用户管理逻辑
-      console.log(`管理规则 ${rule.ruleName} 的用户`);
+    manageUser(row) {
+      // this.showEditDialogVisible = true;
+      this.RootLogin = true;
+      this.YourID=row.foodRuleID
+      this.FoodRuleID=row.foodRuleID
+      this.FoodRuleName=row.foodRuleName
+      this.TotalRounds=row.totalRounds
+      this.RoundsTime=row.roundsTime
+      this.RoundSpacingTime=row.roundSpacingTime
+    },
+
+    queryRoot(){
+
+      let querylogin = {
+        ManagerAcc:this.RootLink,
+        ManagerPass:this.RootPass,
+      };
+      http.post('/action/User/queryRootlyh',querylogin).then(res =>{
+        console.log(res,"wwwwwwwwwwwwwwwww")
+        this.wawawa=true;
+      }).catch(error=>{
+        console.log(error)
+      })
+    },
+
+    editRule() {
+      let updateRule={
+        FoodRuleID:this.FoodRuleID,
+        FoodRuleName:this.FoodRuleName,
+        TotalRounds:this.TotalRounds,
+        RoundsTime:this.RoundsTime,
+        RoundSpacingTime:this.RoundSpacingTime
+      };
+      http.post('/action/FoodRuleVO/updateRule',updateRule).then(res =>{
+        console.log(res,'这里是改好了数据')
+        alert("修改成功")
+        this.queryrule()
+        this.wawawa= false;
+      }).catch(error=>{
+        console.log(error)
+        alert("修改失败")
+      })
+
     },
 
     deleteRule(row) {

+ 83 - 18
gydxnbplus/src/components/VendorManagement.vue

@@ -109,26 +109,52 @@
       </template>
     </el-dialog>
 
-    <!-- 编辑部门对话框 -->
-    <el-dialog v-model="showEditDialogVisible" title="编辑部门">
-      <div class="form-edit-dialog">
+
+    <!-- 编辑部门登录框 -->
+    <el-dialog v-model="PeopleLogin" title="供应商请登录">
+      <div class="form-edit-dialog" >
+
         <div class="form-item">
-          <label for="editDepartmentName" class="label-style">部门名称:</label>
-          <input type="text" id="editDepartmentName" v-model="editDepartmentName" placeholder="输入部门名称" class="input-style" />
+          <label for="YourLink" class="label-style">用户账号:</label>
+          <input type="text" id="YourLink" v-model="YourLink" placeholder="输入用户账号" class="input-style" />
         </div>
         <div class="form-item">
-          <label for="editPhoneNumber" class="label-style">联系电话:</label>
-          <input type="tel" id="editPhoneNumber" v-model="editPhoneNumber" placeholder="输入联系电话" class="input-style" />
+          <label for="YourPass" class="label-style">用户密码:</label>
+          <input type="text" id="YourPass" v-model="YourPass" placeholder="输入用户密码" class="input-style" />
         </div>
       </div>
       <template #footer>
           <span class="dialog-footer" style="margin-top: 20px">
-            <el-button type="primary" @click="editDepartment">确定</el-button>
+            <el-button type="primary" @click="queryLogin">确定</el-button>
             <el-button @click="showEditDialogVisible = false">取消</el-button>
 
           </span>
       </template>
     </el-dialog>
+    <!-- 编辑部门对话框 -->
+    <el-dialog :data="queryLoginID" v-model="showEditDialogVisible" title="编辑部门">
+      <div class="form-edit-dialog">
+        <div class="form-item">
+          <label for="YourID" class="label-style">用户ID:</label>
+          <input type="text" id="YourID" v-model="YourID" placeholder="输入用户账号" class="input-style" />
+        </div>
+
+        <div class="form-item">
+          <label for="departmentName" class="label-style">部门名称:</label>
+          <input prop="foodSupplierLink" type="text" id="departmentName" v-model="departmentName" class="input-style" />
+        </div>
+        <div class="form-item">
+          <label for="phoneNumber" class="label-style">联系电话:</label>
+          <input prop="foodSupplierPass" type="text" id="phoneNumber" v-model="phoneNumber"  class="input-style" />
+        </div>
+      </div>
+      <template #footer>
+    <span class="dialog-footer" style="margin-top: 20px">
+      <el-button type="primary" @click="editDepartment">确定</el-button>
+      <el-button @click="showEditDialogVisible = false">取消</el-button>
+    </span>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -143,6 +169,7 @@ export default {
   data() {
     return {
       tableData2: [],
+      queryLoginID:[],
       tableData: ref([]),
       showAddDialog: ref(false),
       addDepartmentName: ref(''),
@@ -152,8 +179,12 @@ export default {
       phone: ref(''),
       email: ref(''),
       showEditDialogVisible: ref(false),
+      PeopleLogin:ref(false),
       editDepartmentName: ref(''),
-      editPhoneNumber: ref('')
+      editPhoneNumber: ref(''),
+      departmentName: ref(''),
+      phoneNumber: ref(''),
+      YourID:ref('')
     };
   },
   methods: {
@@ -207,18 +238,52 @@ export default {
       this.email.value = '';
     },
     showEditDialog(department) {
-      this.editDepartmentName.value = department.DepartmentName;
-      this.editPhoneNumber.value = department.PhoneNumber;
-      this.showEditDialogVisible.value = true;
+      this.editDepartmentName = department.DepartmentName;
+      this.editPhoneNumber = department.PhoneNumber;
+      // this.showEditDialogVisible = true;
+      this.PeopleLogin = true;
     },
+
+
+    queryLogin(){
+      let querylogin = {
+        FoodSupplierLink:this.YourLink,
+        FoodSupplierPass:this.YourPass,
+      };
+      http.post('/action/FoodSupplierVO/queryLoginlyh',querylogin).then(res =>{
+        console.log(res,"wwwwwwwwwwwwwwwww")
+        this.queryLoginID=res;
+        console.log(this.queryLoginID[0].foodSupplierName)
+        //
+        this.YourID=String(this.queryLoginID[0].foodSupplierID)
+        this.departmentName = String(this.queryLoginID[0].foodSupplierName);
+        console.log(this.departmentName)
+        this.phoneNumber = String(this.queryLoginID[0].foodSupplierLink);
+        this.querypeople()
+        this.showEditDialogVisible = true;
+      }).catch(error=>{
+        console.log(error)
+      })
+    },
+
     editDepartment() {
-      const index = this.tableData.findIndex(item => item.DepartmentName === this.editDepartmentName.value && item.PhoneNumber === this.editPhoneNumber.value);
-      if (index!== -1) {
-        this.tableData[index].DepartmentName = this.editDepartmentName.value;
-        this.tableData[index].PhoneNumber = this.editPhoneNumber.value;
-      }
-      this.showEditDialogVisible.value = false;
+     let updatePerson={
+       FoodSupplierID:this.YourID,
+       FoodSupplierName:this.departmentName,
+       FoodSupplierLink:this.phoneNumber,
+     };
+     http.post('/action/FoodSupplierVO/updateSupplier',updatePerson).then(res =>{
+       console.log(res,'这里是改好了数据')
+       alert("修改成功")
+       this.querypeople()
+       this.showEditDialogVisible= false;
+     }).catch(error=>{
+       console.log(error)
+       alert("修改失败")
+     })
+
     },
+
     deleteDepartment(row){
       // 添加确认删除的弹窗
       console.log(row.foodSupplierID)