浏览代码

系统设置新增参数(催缴内容),工单管理新增催缴按钮

hzj18279462576@163.com 1 年之前
父节点
当前提交
d6d4b808fe
共有 9 个文件被更改,包括 1019 次插入297 次删除
  1. 812 246
      package-lock.json
  2. 1 0
      package.json
  3. 22 0
      src/main.js
  4. 2 2
      src/router/index.js
  5. 2 2
      src/store/modules/user.js
  6. 2 2
      src/views/evaluate/evaluate.vue
  7. 20 5
      src/views/waiting/waiting.vue
  8. 144 26
      src/views/workOrder/workOrder.vue
  9. 14 14
      vite.config.js

文件差异内容过多而无法显示
+ 812 - 246
package-lock.json


+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "sass-loader": "^13.2.0",
     "sass-loader": "^13.2.0",
     "sortablejs": "^1.15.0",
     "sortablejs": "^1.15.0",
     "terser": "^5.16.5",
     "terser": "^5.16.5",
+    "v-viewer": "^3.0.11",
     "vue": "^3.2.45",
     "vue": "^3.2.45",
     "vue-pdf-embed": "^1.2.1",
     "vue-pdf-embed": "^1.2.1",
     "vue-router": "^4.0.10",
     "vue-router": "^4.0.10",

+ 22 - 0
src/main.js

@@ -13,11 +13,33 @@ import "animate.css/animate.min.css";
 // 打印功能
 // 打印功能
 import print from "vue3-print-nb";
 import print from "vue3-print-nb";
 
 
+import Viewer from "v-viewer";
+import "viewerjs/dist/viewer.css";
+
 const app = createApp(App);
 const app = createApp(App);
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
   app.component(key, component);
   app.component(key, component);
 }
 }
 
 
+app.use(Viewer, {
+  defaultOptions: {
+    zIndex: '999999999',
+    inline: false,
+    button: true, //右上角按钮
+    navbar: true, //底部缩略图
+    title: true, //当前图片标题
+    toolbar: true, //底部工具栏
+    tooltip: true, //显示缩放百分比
+    movable: true, //是否可以移动
+    zoomable: true, //是否可以缩放
+    rotatable: true, //是否可旋转
+    scalable: true, //是否可翻转
+    transition: true, //使用 CSS3 过度
+    fullscreen: true, //播放时是否全屏
+    keyboard: true, //是否支持键盘
+  },
+});
+
 app.use(ElementPlus, {
 app.use(ElementPlus, {
   locale: zhCn,
   locale: zhCn,
 });
 });

+ 2 - 2
src/router/index.js

@@ -8,8 +8,8 @@ import NProgress from "nprogress";
 import "nprogress/nprogress.css";
 import "nprogress/nprogress.css";
 import Layout from "@/layout/index.vue";
 import Layout from "@/layout/index.vue";
 const router = createRouter({
 const router = createRouter({
-  history: createWebHashHistory("/campusMaintenance/repairManage"), // 线上地址
-  // history: createWebHashHistory("/testingServer/repairManage"), // 测试环境发布地址
+  // history: createWebHashHistory("/campusMaintenance/repairManage"), // 线上地址
+  history: createWebHashHistory("/testingServer/repairManage"), // 测试环境发布地址
   routes: [
   routes: [
     {
     {
       path: "/login",
       path: "/login",

+ 2 - 2
src/store/modules/user.js

@@ -8,8 +8,8 @@ const state = {
   activeIndex: 0,
   activeIndex: 0,
   username: "",
   username: "",
   password: "",
   password: "",
-  api: "/campusMaintenance/repair-api/repair/api", // 线上
-  // api: "/testingServer/repairTest/repair/api", // 测试
+  // api: "/campusMaintenance/repair-api/repair/api", // 线上
+  api: "/alumnus/repairTest/repair/api", // 测试
   // api: "/repair/api/", // wxl 测试
   // api: "/repair/api/", // wxl 测试
   newsNum: "",
   newsNum: "",
   schoolId: "", // 管理员等级
   schoolId: "", // 管理员等级

+ 2 - 2
src/views/evaluate/evaluate.vue

@@ -157,8 +157,8 @@
                   <div>{{ i.content }}</div>
                   <div>{{ i.content }}</div>
                   <!-- 评价图片 -->
                   <!-- 评价图片 -->
                   <div v-if="i.images" class="evaluateImg">
                   <div v-if="i.images" class="evaluateImg">
-                    <div v-for="(item, index) in i.images">
-                      <img @click="lookImg(item)" :key="index" :src="item" alt="" />
+                    <div v-for="(item, index) in i.images" v-viewer>
+                      <img :key="index" :src="item" alt="" />
                     </div>
                     </div>
                   </div>
                   </div>
                   <!-- 评价录音 -->
                   <!-- 评价录音 -->

+ 20 - 5
src/views/waiting/waiting.vue

@@ -10,7 +10,7 @@
           <h3>评价设置</h3>
           <h3>评价设置</h3>
           <div>
           <div>
             <span>工单完成后 </span>
             <span>工单完成后 </span>
-            <el-input clearable v-model="ruleForm.day" class="w-50 m-2" style="width: 80px" @blur="timeUpdata" />
+            <el-input clearable v-model="ruleForm.day" class="w-50 m-2" style="width: 80px" @change="timeUpdata" />
             <span>&nbsp;&nbsp;天,用户未评价系统默认为好评</span>
             <span>&nbsp;&nbsp;天,用户未评价系统默认为好评</span>
           </div>
           </div>
         </div>
         </div>
@@ -19,17 +19,30 @@
           <div class="phone">
           <div class="phone">
             <span>墨轩湖紧急电话 : </span>
             <span>墨轩湖紧急电话 : </span>
             <el-input clearable v-model="ruleForm.emergencyMxh" class="w-50 m-2" style="width: 200px"
             <el-input clearable v-model="ruleForm.emergencyMxh" class="w-50 m-2" style="width: 200px"
-              @blur="timeUpdata" />
+              @change="timeUpdata" />
           </div>
           </div>
           <div class="phone">
           <div class="phone">
             <span>黄家湖紧急电话 : </span>
             <span>黄家湖紧急电话 : </span>
             <el-input clearable v-model="ruleForm.emergencyCall" class="w-50 m-2" style="width: 200px"
             <el-input clearable v-model="ruleForm.emergencyCall" class="w-50 m-2" style="width: 200px"
-              @blur="timeUpdata" />
+              @change="timeUpdata" />
           </div>
           </div>
           <div class="phone">
           <div class="phone">
             <span>服务监督电话 : </span>
             <span>服务监督电话 : </span>
             <el-input clearable v-model="ruleForm.servicePhone" class="w-50 m-2" style="width: 200px"
             <el-input clearable v-model="ruleForm.servicePhone" class="w-50 m-2" style="width: 200px"
-              @blur="timeUpdata" />
+              @change="timeUpdata" />
+          </div>
+        </div>
+        <div class="condition">
+          <h3>催缴内容设置</h3>
+          <div>
+            <el-input
+              v-model="ruleForm.collectionContent"
+              style="width: 1000px"
+              placeholder="请输入催缴内容"
+              show-word-limit
+              type="textarea"
+               @change="timeUpdata"
+            />
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -56,13 +69,13 @@ const store = useStore();
 const api = ref("");
 const api = ref("");
 const router = useRouter();
 const router = useRouter();
 
 
-
 // 表格数据
 // 表格数据
 const ruleForm = reactive({
 const ruleForm = reactive({
   day: "", // 自动好评时间
   day: "", // 自动好评时间
   emergencyCall: "", // 黄家湖紧急电话
   emergencyCall: "", // 黄家湖紧急电话
   emergencyMxh: "",// 墨轩湖紧急电话
   emergencyMxh: "",// 墨轩湖紧急电话
   servicePhone: "", // 服务监督电话
   servicePhone: "", // 服务监督电话
+  collectionContent:'悠好!关于您于(报修时间]申请的【耗材】耗材服务(工单编号:[工单编号),我们注意到当前仍有待支付款项,为保障服务持续畅通,请您及时完成结算。',
   id: "",
   id: "",
 });
 });
 // 获取系统设置数据
 // 获取系统设置数据
@@ -81,6 +94,7 @@ const getlist = async (message) => {
     ruleForm.emergencyCall = res.data.data.emergencyCall; // 黄家湖紧急电话
     ruleForm.emergencyCall = res.data.data.emergencyCall; // 黄家湖紧急电话
     ruleForm.emergencyMxh = res.data.data.emergencyMxh; // 墨轩湖紧急电话
     ruleForm.emergencyMxh = res.data.data.emergencyMxh; // 墨轩湖紧急电话
     ruleForm.servicePhone = res.data.data.servicePhone; // 服务监督电话
     ruleForm.servicePhone = res.data.data.servicePhone; // 服务监督电话
+    ruleForm.collectionContent = res.data.data.collectionContent; // 服务监督电话
     ruleForm.id = res.data.data.id; // id
     ruleForm.id = res.data.data.id; // id
     sessionStorage.setItem("sm_start", res.data.data.sm_start);
     sessionStorage.setItem("sm_start", res.data.data.sm_start);
     sessionStorage.setItem("sm_end", res.data.data.sm_end);
     sessionStorage.setItem("sm_end", res.data.data.sm_end);
@@ -115,6 +129,7 @@ const timeUpdata = async () => {
     emergencyCall: ruleForm.emergencyCall, // 紧急电话
     emergencyCall: ruleForm.emergencyCall, // 紧急电话
     emergencyMxh: ruleForm.emergencyMxh, // 紧急电话
     emergencyMxh: ruleForm.emergencyMxh, // 紧急电话
     servicePhone: ruleForm.servicePhone, // 服务监督电话
     servicePhone: ruleForm.servicePhone, // 服务监督电话
+    collectionContent: ruleForm.collectionContent, // 服务监督电话
     id: ruleForm.id, // id
     id: ruleForm.id, // id
   };
   };
   let res = await axios({
   let res = await axios({

+ 144 - 26
src/views/workOrder/workOrder.vue

@@ -141,6 +141,37 @@
           {{ i.name + " (" + i.key + ")" }}
           {{ i.name + " (" + i.key + ")" }}
         </li>
         </li>
       </ul>
       </ul>
+      <div>
+        <!-- <el-button
+          @change="batchCall"
+          v-if="dayIndex == 10 || dayIndex == 0"
+          color="rgba(111, 182, 184, 1)"
+          class="payment"
+          type="primary"
+        >
+          批量催缴
+        </el-button> -->
+        <el-popconfirm
+          v-if="dayIndex == 10 || dayIndex == 0"
+          width="220"
+          confirm-button-text="确认"
+          cancel-button-text="取消"
+          :icon="InfoFilled"
+          icon-color="#f89626"
+          title="是否批量发送催缴信息?"
+          @confirm="batchCall"
+          @cancel="cancelEvent"
+        >
+          <template #reference>
+            <el-button
+              color="rgba(111, 182, 184, 1)"
+              class="payment"
+              type="primary"
+              >批量催缴</el-button
+            >
+          </template>
+        </el-popconfirm>
+      </div>
     </div>
     </div>
     <div class="footer">
     <div class="footer">
       <el-table
       <el-table
@@ -276,6 +307,21 @@
         <el-table-column align="center" width="240" label="操作">
         <el-table-column align="center" width="240" label="操作">
           <template #default="scope">
           <template #default="scope">
             <div class="operation">
             <div class="operation">
+              <el-popconfirm
+                v-if="scope.row.state == '待支付'"
+                width="220"
+                confirm-button-text="确认"
+                cancel-button-text="取消"
+                :icon="InfoFilled"
+                icon-color="#f89626"
+                title="是否发送催缴信息?"
+                @confirm="singleCall(scope.row)"
+                @cancel="cancelEvent"
+              >
+                <template #reference>
+                  <div class="btns">催缴</div>
+                </template>
+              </el-popconfirm>
               <div
               <div
                 class="btns"
                 class="btns"
                 v-if="scope.row.dispatch == 1"
                 v-if="scope.row.dispatch == 1"
@@ -614,7 +660,7 @@
           </div>
           </div>
           <div class="consumables">
           <div class="consumables">
             <div
             <div
-              style="border-bottom: 1px solid #ccc;margin-top: 8px"
+              style="border-bottom: 1px solid #ccc; margin-top: 8px"
               class=""
               class=""
               v-for="i in consumables"
               v-for="i in consumables"
             >
             >
@@ -677,9 +723,8 @@
                     <div class="overContent">{{ i.content }}</div>
                     <div class="overContent">{{ i.content }}</div>
                     <!-- 评价图片 -->
                     <!-- 评价图片 -->
                     <div v-if="i.images" class="evaluateImg">
                     <div v-if="i.images" class="evaluateImg">
-                      <div v-for="(item, index) in i.images">
+                      <div v-for="(item, index) in i.images" v-viewer>
                         <img
                         <img
-                          @click="lookImg(item)"
                           :key="index"
                           :key="index"
                           :src="item"
                           :src="item"
                           alt=""
                           alt=""
@@ -1818,7 +1863,7 @@ const refuseOfflineRules = reactive({
 
 
 // 关单 (关单--------------------------------------------)
 // 关单 (关单--------------------------------------------)
 const customsOrderVisible = ref(false); // 关单弹窗
 const customsOrderVisible = ref(false); // 关单弹窗
-const customsOrderTitle = ref('关单'); // 关单弹窗
+const customsOrderTitle = ref("关单"); // 关单弹窗
 const customsOrderList = ref(); // 关单原因列表
 const customsOrderList = ref(); // 关单原因列表
 const customsOrderData = ref({
 const customsOrderData = ref({
   reason: "",
   reason: "",
@@ -1926,6 +1971,7 @@ watch(
 );
 );
 // 天数切换按钮选项
 // 天数切换按钮选项
 const dayBtn = (index) => {
 const dayBtn = (index) => {
+  console.log(index);
   dayIndex.value = index;
   dayIndex.value = index;
   getList();
   getList();
 };
 };
@@ -1946,6 +1992,72 @@ const printBox = () => {
     });
     });
   }, 500);
   }, 500);
 };
 };
+// 批量催缴
+const batchCall = async () => {
+  let data = {
+    ids: [],
+  };
+
+  let res = await axios({
+    method: "post",
+    url: api.value + "/repairCall/batchCall",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    data: data,
+  });
+  console.log(res, "批量催缴");
+  if (res.data.code == 200) {
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 单个催缴
+const singleCall = async (row) => {
+  let data = {
+    id: row.id,
+  };
+
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairCall/singleCall",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "单个催缴");
+  if (res.data.code == 200) {
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
 
 
 // 工单数据
 // 工单数据
 const getList = async () => {
 const getList = async () => {
@@ -3028,7 +3140,7 @@ const cancelRefuseOffline = () => {
 // 关单弹窗  (关单-----------------------------------------)
 // 关单弹窗  (关单-----------------------------------------)
 const customsOrder = (row) => {
 const customsOrder = (row) => {
   customsOrderVisible.value = true;
   customsOrderVisible.value = true;
-  customsOrderTitle.value='关单';
+  customsOrderTitle.value = "关单";
   console.log(row, "关单row");
   console.log(row, "关单row");
   customsOrderData.value.recordId = row.id;
   customsOrderData.value.recordId = row.id;
   customsOrderData.value.reason = "";
   customsOrderData.value.reason = "";
@@ -3039,7 +3151,7 @@ const cancelCustomsOrder = () => {
 };
 };
 // 确定关单
 // 确定关单
 const customsOrderYes = async () => {
 const customsOrderYes = async () => {
-  if(customsOrderTitle.value=='关单'){
+  if (customsOrderTitle.value == "关单") {
     let data = {
     let data = {
       recordId: customsOrderData.value.recordId,
       recordId: customsOrderData.value.recordId,
       reason: customsOrderData.value.reason,
       reason: customsOrderData.value.reason,
@@ -3055,7 +3167,7 @@ const customsOrderYes = async () => {
         },
         },
         params: data,
         params: data,
       });
       });
-  
+
       if (res.data.code == 200) {
       if (res.data.code == 200) {
         searchBtn();
         searchBtn();
         customsOrderVisible.value = false;
         customsOrderVisible.value = false;
@@ -3081,9 +3193,9 @@ const customsOrderYes = async () => {
         center: true,
         center: true,
       });
       });
     }
     }
-  }else if(customsOrderTitle.value=='批量关单'){
+  } else if (customsOrderTitle.value == "批量关单") {
     let data = {
     let data = {
-      recordIds: customsOrderData.value.recordId.join(','),
+      recordIds: customsOrderData.value.recordId.join(","),
       reason: customsOrderData.value.reason,
       reason: customsOrderData.value.reason,
       remark: customsOrderData.value.remark,
       remark: customsOrderData.value.remark,
     };
     };
@@ -3097,7 +3209,7 @@ const customsOrderYes = async () => {
         },
         },
         params: data,
         params: data,
       });
       });
-  
+
       if (res.data.code == 200) {
       if (res.data.code == 200) {
         searchBtn();
         searchBtn();
         customsOrderVisible.value = false;
         customsOrderVisible.value = false;
@@ -3631,19 +3743,19 @@ const handleSelectionChange = (val) => {
 const batchOperate = async () => {
 const batchOperate = async () => {
   if (selectData.list.length) {
   if (selectData.list.length) {
     customsOrderVisible.value = true;
     customsOrderVisible.value = true;
-    customsOrderTitle.value='批量关单';
+    customsOrderTitle.value = "批量关单";
     customsOrderData.value.reason = "";
     customsOrderData.value.reason = "";
     customsOrderData.value.remark = "";
     customsOrderData.value.remark = "";
-    let recordIds=[]
-    selectData.list.forEach(i=>{
-      recordIds.push(i.id)
-    })
-    customsOrderData.value.recordId=recordIds
-  }else{
+    let recordIds = [];
+    selectData.list.forEach((i) => {
+      recordIds.push(i.id);
+    });
+    customsOrderData.value.recordId = recordIds;
+  } else {
     ElMessage({
     ElMessage({
       type: "warning",
       type: "warning",
       showClose: true,
       showClose: true,
-      message:'至少勾选一条数据',
+      message: "至少勾选一条数据",
       center: true,
       center: true,
     });
     });
   }
   }
@@ -3714,7 +3826,7 @@ onBeforeMount(async () => {
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
 .content-box {
 .content-box {
-  width: 97.5%;
+  width: calc(100% - 40px);
   height: 89%;
   height: 89%;
   margin: 20px auto;
   margin: 20px auto;
   background-color: #fff;
   background-color: #fff;
@@ -3743,7 +3855,7 @@ onBeforeMount(async () => {
   }
   }
 
 
   .middle {
   .middle {
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 10px auto;
     margin: 10px auto;
     padding-top: 10px;
     padding-top: 10px;
     display: flex;
     display: flex;
@@ -3775,13 +3887,16 @@ onBeforeMount(async () => {
   }
   }
 
 
   .btn {
   .btn {
-    margin: 10px 0;
-
+    width: calc(100% - 60px);
+    margin: 10px auto;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
     ul {
     ul {
       list-style: none;
       list-style: none;
       display: flex;
       display: flex;
-      padding: 0 20px;
-      margin: 0 0 0 15px;
+      padding: 0;
+      margin: 0;
 
 
       li {
       li {
         color: #000;
         color: #000;
@@ -3803,10 +3918,13 @@ onBeforeMount(async () => {
         color: rgba(111, 182, 184, 1);
         color: rgba(111, 182, 184, 1);
       }
       }
     }
     }
+    .payment {
+      color: #fff;
+    }
   }
   }
 
 
   .footer {
   .footer {
-    width: 96%;
+    width: calc(100% - 60px);
     height: 550px;
     height: 550px;
     margin: 10px auto 30px;
     margin: 10px auto 30px;
 
 
@@ -4861,7 +4979,7 @@ onBeforeMount(async () => {
 
 
   .el-pagination {
   .el-pagination {
     // width: 1600px;
     // width: 1600px;
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 0 auto 18px;
     margin: 0 auto 18px;
     justify-content: flex-end;
     justify-content: flex-end;
 
 

+ 14 - 14
vite.config.js

@@ -23,26 +23,26 @@ export default defineConfig({
     // 是否开启 https
     // 是否开启 https
     // https: false,
     // https: false,
     // 测试地址
     // 测试地址
-    // proxy: {
-    //   "/testingServer/repairTest/repair/api": {
-    //     target:
-    //       "https://chtech.ncjti.edu.cn/testingServer/repairTest/repair/api",
-    //     changeOrigin: true,
-    //     rewrite: (path) =>
-    //       path.replace(/^\/testingServer\/repairTest\/repair\/api/, ""),
-    //   },
-    // },
-
-    // 在线地址
     proxy: {
     proxy: {
-      "/campusMaintenance/repair-api/repair/api": {
+      "/alumnus/repairTest/repair/api": {
         target:
         target:
-          "https://chtech.ncjti.edu.cn/campusMaintenance/repair-api/repair/api",
+          "https://chtech.ncjti.edu.cn/alumnus/repairTest/repair/api",
         changeOrigin: true,
         changeOrigin: true,
         rewrite: (path) =>
         rewrite: (path) =>
-          path.replace(/^\/campusMaintenance\/repair-api\/repair\/api/, ""),
+          path.replace(/^\/alumnus\/repairTest\/repair\/api/, ""),
       },
       },
     },
     },
+
+    // 在线地址
+    // proxy: {
+    //   "/campusMaintenance/repair-api/repair/api": {
+    //     target:
+    //       "https://chtech.ncjti.edu.cn/campusMaintenance/repair-api/repair/api",
+    //     changeOrigin: true,
+    //     rewrite: (path) =>
+    //       path.replace(/^\/campusMaintenance\/repair-api\/repair\/api/, ""),
+    //   },
+    // },
     // wxl 服务器
     // wxl 服务器
     // proxy: {
     // proxy: {
     //   "/repair/api/": {
     //   "/repair/api/": {