ソースを参照

流程添加编辑与详情功能

asd26269546 2 年 前
コミット
41cd66e80d

+ 4 - 4
src/components/WDLY/process/SendPurchaseWDLY.vue

@@ -393,19 +393,19 @@ onMounted(() => {
   }
   setTimeout(() => {
     if(!props.queryData.purchaseDetailList) return
-    alert(1231231231231231)
-    console.log(props.queryData,'123123123kljasdjkashdkjasdh')
     formData.data = props.queryData
     proxy.post("/subscribeDetail/detail", { ids: props.queryData.purchaseDetailList.map(item => {
       return item.subscribeDetailId
     }) }).then((res) => {
-      formData.data.purchaseDetailList = props.queryData.purchaseDetailList.map((x) => ({
-        ...x,
+      console.log(formData.data.purchaseDetailList)
+      formData.data.purchaseDetailList = props.queryData.purchaseDetailList.map((x,index) => ({
+        ...res[index],
         subscribeCount: x.count,
         count: x.count,
         price: x.price,
         amount: x.amount,
       }));
+      console.log(formData.data.purchaseDetailList)
     });
   }, 2000);
   

+ 1 - 0
src/layout/components/TagsView/index.vue

@@ -170,6 +170,7 @@ function refreshSelectedTag(view) {
   }
 }
 function closeSelectedTag(view) {
+  console.log(view)
   proxy.$tab.closePage(view).then(({ visitedViews }) => {
     if (isActive(view)) {
       toLastView(visitedViews, view)

+ 63 - 24
src/views/WDLY/basic/product/index.vue

@@ -361,6 +361,7 @@ let rules = ref({
 const { proxy } = getCurrentInstance();
 const productUnit = ref([]);
 const productType = ref([]);
+const salesStatus = ref([]);
 const selectConfig = computed(() => [
   {
     label: "产品类型",
@@ -463,13 +464,13 @@ const config = computed(() => {
         width: 80,
       },
     },
-    {
-      attrs: {
-        label: "标准采购价",
-        prop: "purchasePrice",
-        width: 100,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "标准采购价",
+    //     prop: "purchasePrice",
+    //     width: 100,
+    //   },
+    // },
     // {
     //   attrs: {
     //     label: "产品备注",
@@ -611,17 +612,7 @@ const formConfig = computed(() => {
       label: "备注",
       itemType: "textarea",
     },
-    {
-      type: "radio",
-      prop: "combination",
-      label: "是否组合",
-      required: true,
-      border: true,
-      data: [
-        { label: "是", value: "1" },
-        { label: "否", value: "0" },
-      ],
-    },
+    
     {
       type: "json",
       prop: "victoriatouristJson",
@@ -648,16 +639,49 @@ const formConfig = computed(() => {
           min: 0,
           controls: false,
         },
+        // {
+        //   type: "number",
+        //   prop: "purchasePrice",
+        //   label: "标准采购价",
+        //   itemWidth: 33,
+        //   precision: 2,
+        //   min: 0,
+        //   controls: false,
+        // },
         {
-          type: "number",
-          prop: "purchasePrice",
-          label: "标准采购价",
-          itemWidth: 33,
+          type: "input",
+          prop: "weight",
+          label: "重量",
+          itemWidth: 50,
           precision: 2,
           min: 0,
           controls: false,
         },
-
+        {
+          type: "input",
+          prop: "materialQuality",
+          label: "材质 / 面料",
+          itemWidth: 50,
+          precision: 2,
+          min: 0,
+          controls: false,
+        },
+        {
+          type: "input",
+          prop: "applicableTemp",
+          label: "适用温度",
+          itemWidth: 50,
+          precision: 2,
+          min: 0,
+          controls: false,
+        },
+        {
+          type: "select",
+          prop: "salesStatus",
+          label: "销售状态",
+          required: true,
+          data: salesStatus.value,
+        },
         {
           type: "date",
           prop: "clearancePeriod",
@@ -668,6 +692,17 @@ const formConfig = computed(() => {
       ],
     },
     {
+      type: "radio",
+      prop: "combination",
+      label: "是否组合",
+      required: true,
+      border: true,
+      data: [
+        { label: "是", value: "1" },
+        { label: "否", value: "0" },
+      ],
+    },
+    {
       type: "slot",
       slotName: "combination",
       label: "",
@@ -1018,7 +1053,7 @@ const submitMove = () => {
 };
 
 const getDict = () => {
-  proxy.getDictOne(["unit", "product_type"]).then((res) => {
+  proxy.getDictOne(["unit", "product_type",'sales_status']).then((res) => {
     productUnit.value = res["unit"].map((x) => ({
       label: x.dictValue,
       value: x.dictKey,
@@ -1027,6 +1062,10 @@ const getDict = () => {
       label: x.dictValue,
       value: x.dictKey,
     }));
+    salesStatus.value = res["sales_status"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
   });
 };
 getDict();

+ 19 - 11
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -756,17 +756,25 @@ watch(
 
 const handleClickContractCode = (row) => {
   proxy.post("/deliverGoodsDetails/detail", { id: row.id }).then((res) => {
-    formData.dataOne = {
-      supplyName: row.supplyName,
-      purchaseCode: row.contractCode,
-      deliverGoodsDetailsList: res.map((x) => ({
-        ...x,
-        purchaseDetailId: x.id,
-        alreadyDeliverGoodsQuantity: x.deliverGoodsQuantity,
-        deliverGoodsQuantity: Number(x.count) - Number(x.deliverGoodsQuantity),
-      })),
-    };
-    dialogVisibleOne.value = true;
+    proxy.$router.push({
+        path: "/platform_manage/process/processApproval",
+        query: {
+            flowKey: row.processInstanceId,
+            id: row.flowId,
+            processType:20,
+        },
+    });
+    // formData.dataOne = {
+    //   supplyName: row.supplyName,
+    //   purchaseCode: row.contractCode,
+    //   deliverGoodsDetailsList: res.map((x) => ({
+    //     ...x,
+    //     purchaseDetailId: x.id,
+    //     alreadyDeliverGoodsQuantity: x.deliverGoodsQuantity,
+    //     deliverGoodsQuantity: Number(x.count) - Number(x.deliverGoodsQuantity),
+    //   })),
+    // };
+    // dialogVisibleOne.value = true;
   });
 };
 

+ 1 - 1
src/views/WDLY/purchaseManage/subscribe/index.vue

@@ -411,12 +411,12 @@ const getList = async (req) => {
     }
   );
 };
-
 const openModal = () => {
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
       flowKey: "wdly_apply_purchase",
+      time:Date.now(),
     },
   });
 };

+ 52 - 0
src/views/login.vue

@@ -5,6 +5,24 @@
 			<div class="warp-bg">
 				<div class="left-bg">
 					<img src="../assets/images/login-img.png" alt="" />
+					
+					<div class="swiper-text">
+						<el-carousel height="100px" direction="vertical" indicator-position='none' :autoplay="true">
+							<el-carousel-item>
+								<h3>为中小企业提供数字管理</h3>
+								<p>一站式定制解决方案</p>
+							</el-carousel-item>
+							<el-carousel-item>
+								<h3>物联网筑基,云计算赋能</h3>
+								<p>助力企业实现数字化协同</p>
+							</el-carousel-item>
+							<el-carousel-item>
+								<h3>数据驱动,助力决策</h3>
+								<p>loT SaaS定制全套解决方案</p>
+							</el-carousel-item>
+						</el-carousel>
+						
+					</div>
 				</div>
 				<div class="right-bg">
 					<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
@@ -183,11 +201,45 @@ getCookie()
 			height: 100vh;
 			float: left;
 			overflow: hidden;
+			position: relative;
 			img{
 				float: right;
 				margin-right: 75px;
 				margin-top: 120px;
 			}
+
+			.swiper-text{
+				position: absolute;
+				right: 164px;
+				top: 120px;
+				color:#fff;
+				overflow: hidden;
+				height: 200px;
+				width: 500px;
+				.el-carousel{
+					width: 100%;
+					height: 100%;
+				}
+				h3{
+					font-size: 40px;
+					font-weight: 400;
+					margin-bottom: 20px;
+					margin-top: 0;
+				}
+				p{
+					font-size: 26px;
+					margin: 0;
+				}
+				p::before{
+					content:' ';
+					border-bottom: 4px solid #fff;
+					display: inline-block;
+					width: 60px;
+					margin-right: 20px;
+					position: relative;
+					top:-5px;
+				}
+			}
 		}
 		.right-bg{
 			width: calc(50vw - 200px);

+ 2 - 2
src/views/process/porcessDefinition/index.vue

@@ -15,7 +15,7 @@
         }"
         :action-list="[
           {
-            text: '添加',
+            text: '添加流程',
             action: () => openModal('add'),
           },
         ]"
@@ -25,7 +25,7 @@
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="400" v-loading="loading">
+    <el-dialog :title="modalType == 'add' ? '添加流程' : '编辑流程'" v-model="dialogVisible" width="400" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform"> </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>

+ 26 - 15
src/views/process/processApproval/index.vue

@@ -25,14 +25,15 @@
         <SendSubscribeWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"></SendSubscribeWDLY>
         <SendPurchaseWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_purchase'" :queryData="queryData.data"></SendPurchaseWDLY>
       </div>
-      <div class="bottom">
+      <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
             <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="handleSubmit">提交</el-button>
+            <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit">提交</el-button>
+            <el-button type="primary" v-else  v-for="i in approvalRecordData.buttonInfoList" :key='i.type' @click="handleSubmit(i.type)">{{i.name}}</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -50,9 +51,9 @@
                 <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
               </div>
               <div class="right-conetnt">
-                <div class="name">办理人:{{ item.processedUser }}</div>
+                <div class="name">{{ item.nodeName }}</div>
                 <div class="remark">
-                  <div class="label">{{ item.nodeName }}</div>
+                  <div class="label"><span v-if="item.status != 3">办理人:</span>{{ item.processedUser }}<span class="time">{{item.processedDate}}</span></div>
                   {{ item.remark }}
                 </div>
               </div>
@@ -77,6 +78,7 @@
         <el-form-item>
           <div style="width: 100%; text-align: center">
             <el-button type="primary" @click="handleSelectUser">提交</el-button>
+            
           </div>
         </el-form-item>
       </el-form>
@@ -116,6 +118,7 @@ import ServiceContract from "@/components/process/ServiceContract";
 import SendSubscribeWDLY from "@/components/WDLY/process/SendSubscribeWDLY";
 //采购发起
 import SendPurchaseWDLY from "@/components/WDLY/process/SendPurchaseWDLY";
+import { ref } from "vue";
 
 const router = useRouter();
 const route = useRoute();
@@ -159,7 +162,7 @@ const handleResult = (res) => {
   }
 };
 // 提交逻辑
-const handleSubmit = async () => {
+const handleSubmit = async (_type) => {
   
   try {
     // 调用发起组件的提交事件
@@ -217,7 +220,7 @@ const handleSubmit = async () => {
               .post("/flowProcess/jump", {
                 ...flowForm,
                 data,
-                handleType:1,
+                handleType:_type,
                 version:route.query.version,
                 flowId:route.query.id
               })
@@ -246,6 +249,7 @@ const handleSubmit = async () => {
 // 页面跳转
 const skipPage = () => {
   const useTagsStore = useTagsViewStore();
+  console.log(useTagsStore)
   useTagsStore.delVisitedView(router.currentRoute.value);
   ElMessage({
     message: "操作成功!",
@@ -307,8 +311,10 @@ let queryData = reactive({
 });
 // 记录
 const recordList = ref([]);
+const approvalRecordData = ref({
+  buttonInfoList:[],
+});
 const getRecords = (_id) => {
-  console.log(route,12312312312)
   if(_id) {
     proxy
     .post("/flowExample/getApprovalRecord", {
@@ -317,6 +323,7 @@ const getRecords = (_id) => {
     .then((res) => {
       console.log(res, "ass");
       recordList.value = res.recordList;
+      approvalRecordData.value = res
     });
   }else{
     proxy
@@ -332,8 +339,8 @@ const getRecords = (_id) => {
   
 };
 onMounted(() => {
-  console.log(route.query.id,1231231231231)
-  if(route.query.processType == 10) {
+  //processType 10 为修改 20为查看
+  if(route.query.processType == 10 || route.query.processType == 20) {
     proxy.post('/flowProcess/getStartData',{flowId:route.query.id}).then(res=>{
       console.log(res)
       queryData.data = { ...res };
@@ -398,13 +405,17 @@ onMounted(() => {
           flex: 1;
           .name {
             font-size: 12px;
-            color: #333;
+            
+            color: #39c55a;
             margin-bottom: 10px;
             span {
               color: #999;
-              float: right;
+              
             }
           }
+          .time{
+            float: right;
+          }
           .remark {
             padding: 10px;
             color: #666666;
@@ -412,7 +423,7 @@ onMounted(() => {
             background: #f1f1f1;
             border-radius: 2px;
             .label {
-              color: #39c55a;
+              color: #999;
               margin-bottom: 10px;
             }
           }
@@ -461,7 +472,7 @@ onMounted(() => {
         .right-btm-status{
           background: #ff9a00!important;
         }
-        .label{
+        .name{
           color: #ff9a00!important;
         }
         .left-icon{
@@ -472,7 +483,7 @@ onMounted(() => {
         .right-btm-status{
           background: #999!important;
         }
-        .label{
+        .name{
           color: #999!important;
         }
         .left-icon{
@@ -483,7 +494,7 @@ onMounted(() => {
         .right-btm-status{
           background: #ff4d4f!important;
         }
-        .label{
+        .name{
           color: #ff4d4f!important;
         }
         .left-icon{

+ 385 - 0
src/views/system/feedback/index.vue

@@ -0,0 +1,385 @@
+<template>
+  <div class="feedback">
+    
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        searchKey="userName"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
+        :action-list="[
+          {
+            text: '添加反馈',
+            action: () => openModal('add'),
+          },
+        ]"
+        @get-list="getList">
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '添加反馈' : '编辑反馈'" v-if="dialogVisible" v-model="dialogVisible" width="500" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+        
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+    <el-dialog title="修改密码" v-model="roomDialogVisible" width="300" :before-close="handleClose" v-loading="loading">
+      <template #footer>
+        <el-input v-model="password" type="password" placeholder="请输入新密码" show-password style="margin-bottom: 20px" />
+        <el-button @click="roomDialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitPassword(password)" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+/* eslint-disable vue/no-unused-components */
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import treeList from "@/components/treeList/index";
+import { computed, defineComponent, ref } from "vue";
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+let dialogVisible = ref(false);
+let modalType = ref("add");
+const validatePass = (rule, value, callback) => {
+  if (!formData.data.password && modalType.value == "add") {
+    callback(new Error("请输入账号和密码"));
+  } else {
+    callback();
+  }
+};
+let rules = ref({
+  name: [{ required: true, message: '请填写姓名' }],
+	companyName: [{ required: true, message: '请填写公司名称' }],
+	contactInformation: [{ required: true, message: '请填写联系方式' }],
+	problemStatement: [{ required: true, message: '请填写备注' }],
+});
+
+const userId = ref("");
+const { proxy } = getCurrentInstance();
+const password = ref("");
+const roomDialogVisible = ref(false);
+const selectConfig = computed(() => {
+  return [];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "公司名称",
+        prop: "companyName",
+      },
+    },
+    {
+      attrs: {
+        label: "联系方式",
+        prop: "contactInformation",
+        align: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "模块名称",
+        prop: "moduleType",
+      },
+    },
+    {
+      attrs: {
+        label: "问题描述",
+        prop: "problemStatement",
+      },
+    },
+    {
+      attrs: {
+        label: "是否回复",
+        prop: "status",
+      },
+      render(status) {
+        return status == 1 ? "是" : "否";
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              // 弹窗提示是否删除
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                // 删除
+                proxy
+                  .post(
+                    "/tenantUser/" + row.userId,
+                    {
+                      id: row.userId,
+                    },
+                    "delete"
+                  )
+                  .then((res) => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const treeListData = ref([]);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "name",
+      label: "姓名",
+      required: true,
+      itemWidth: 50,
+      //disabled:true,
+      itemType: "text",
+    },
+    {
+      type: "treeSelect",
+      prop: "moduleType",
+      label: "模块名称",
+      data: [],
+    },
+    {
+      type: "input",
+      prop: "companyName",
+      label: "公司名称",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "contactInformation",
+      label: "联系方式",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "problemStatement",
+      label: "问题说明",
+      required: true,
+      itemType: "textarea",
+    },
+
+    
+  ];
+});
+const newPassword = () => {
+  formData.data.password = generatePassword();
+};
+const generatePassword = () => {
+  var length = 12,
+    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
+    password = "";
+  for (var i = 0, n = charset.length; i < length; ++i) {
+    password += charset.charAt(Math.floor(Math.random() * n));
+  }
+  return password;
+};
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/problemFeedback/page", sourceList.value.pagination).then((message) => {
+    message.rows.map((item) => {
+      item.deptName = item.dept ? item.dept.deptName : item.dept;
+    });
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+//递归获取路由数据,初始化
+const getRouterData = (data) => {
+	data.forEach((item) => {
+		item.label = item.meta.title
+    item.id = item.meta.title
+		if (item.children && item.children.length > 0) {
+			getRouterData(item.children)
+		}
+	})
+}
+
+const getRouter = () => {
+	proxy.get('getRouters', {}).then((res) => {
+    console.log(res.data)
+		getRouterData(res.data)
+		for (let i = 0; i < res.data.length; i++) {
+			const element = res.data[i]
+			if (element.type == 2) {
+				formConfig.value[1].data = element.children
+			}
+		}
+	})
+}
+getRouter()
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    userType: 1,
+  };
+};
+const TreetenantId = ref("");
+const selection = ref({
+  data: [],
+});
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+  console.log(_selection.length);
+};
+
+const tree = ref(null);
+const submitForm = () => {
+  byform.value.handleSubmit((valid) => {
+    proxy
+      .post(
+        "/problemFeedback/" + modalType.value,
+        {
+          ...formData.data,
+          tenantId: sourceList.value.pagination.tenantId,
+        },
+      )
+      .then((res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        getList();
+      });
+  });
+};
+const recursive = (data) => {
+  data.map((item) => {
+    item.label = item.deptName;
+    item.id = item.deptId;
+    if (item.children) {
+      recursive(item.children);
+    } else {
+      item.children = [];
+    }
+  });
+};
+
+const submitPassword = (password1) => {
+  if (!password1) {
+    ElMessage({
+      message: "请输入新密码",
+      type: "warning",
+    });
+    return;
+  }
+  proxy
+    .post(
+      "/tenantUser/resetPwd",
+      {
+        password: password1,
+        userId: userId.value,
+      },
+      "PUT"
+    )
+    .then((res) => {
+      ElMessage({
+        message: "重置成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+      password.value = "";
+    });
+};
+
+const getDtl = (row) => {
+  formData.data = { ...row};
+    modalType.value = "edit";
+    console.log(modalType.value);
+    dialogVisible.value = true;
+};
+getList();
+</script>
+
+<style lang="scss" scoped>
+.feedback {
+  padding: 20px;
+  display: flex;
+  justify-content: space-between;
+
+  
+
+  .content {
+    width: 100%;
+  }
+}
+</style>