From 19e30a39d6c080d657c092d823fc0925ea622582 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期一, 18 三月 2024 15:46:55 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/zgyw-ui
---
src/views/system/work-order/distribute/index.vue | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 216 insertions(+), 0 deletions(-)
diff --git a/src/views/system/work-order/distribute/index.vue b/src/views/system/work-order/distribute/index.vue
new file mode 100644
index 0000000..0a0f18c
--- /dev/null
+++ b/src/views/system/work-order/distribute/index.vue
@@ -0,0 +1,216 @@
+<template>
+ <div class="row">
+ <el-row type="flex" justify="left">
+ <el-col :span="24" style="position: relative">
+ <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
+ <el-menu-item index="0" @click="changeUnit(null, '鍏ㄩ儴')">
+ 鍏ㄩ儴鍗曚綅
+ </el-menu-item>
+ <el-menu-item index="1">
+ 鑷祦浜曡繍缁村崟浣�(70/70)
+ </el-menu-item>
+ <el-menu-item index="2">
+ 澶у畨杩愮淮(50/50)
+ </el-menu-item>
+ <el-menu-item index="3">瀵岄『杩愮淮鍗曚綅(20/70)</el-menu-item>
+ <el-menu-item index="4">楂樻柊杩愮淮鍗曚綅(15/40)</el-menu-item>
+ <el-menu-item index="5">鑽e幙杩愮淮鍗曚綅(90/90)</el-menu-item>
+ <el-menu-item index="6">璐′簳杩愮淮鍗曚綅(45/45)</el-menu-item>
+ <el-menu-item index="7">娌挎哗杩愮淮鍗曚綅(70/70)</el-menu-item>
+ </el-menu>
+ <el-tooltip class="item" effect="dark" content="鑷姩涓嬪彂璁剧疆" placement="left">
+ <el-button class="setting" style="" type="success" icon="el-icon-s-tools" circle></el-button>
+ </el-tooltip>
+ </el-col>
+ </el-row>
+
+ <el-row class="op-warp" type="flex" justify="left" >
+ <el-col :span="24">
+ <el-button size="small" type="info" @click="selectedDistribute" class="op">涓嬪彂閫変腑宸ュ崟</el-button>
+ <el-button size="small" type="danger" @click="allDistribute" class="op">鍏ㄩ儴涓嬪彂</el-button>
+ <el-popover
+ class="op"
+ placement="right"
+ width="300px"
+ trigger="click">
+ <span style="font-weight: bold;font-size: 16px">蹇�熶笅鍙�</span>
+ <el-form ref="fastDistributeForm" :model="fastDistributeForm" :rules="fastDistributeRules" label-width="80px">
+ <el-form-item label="蹇嵎鏂瑰紡" prop="fastWay">
+ <el-radio v-model="fastDistributeForm.fastWay" label="0">鏈�杩�30鍒嗛挓</el-radio>
+ <el-radio v-model="fastDistributeForm.fastWay" label="01">鏈�杩�1灏忔椂</el-radio>
+ <el-radio v-model="fastDistributeForm.fastWay" label="10">鏈�杩�2灏忔椂</el-radio>
+ <el-radio v-model="fastDistributeForm.fastWay" label="11">鏈�杩�1澶�</el-radio>
+ <el-radio v-model="fastDistributeForm.fastWay" label="101">鑷畾涔�</el-radio>
+ </el-form-item>
+ <el-form-item v-if="fastDistributeForm.fastWay === '101'" label="鏃堕棿鑼冨洿">
+ <el-date-picker
+ style="width: 100%"
+ v-model="fastTimeRange"
+ type="datetimerange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="鏁伴噺闄愬埗" prop="fastNumLimit">
+ <el-input v-model="fastDistributeForm.fastNumLimit" size="small" type="number" placeholder="姝ゆ宸ュ崟涓嬪彂鏈�澶ф暟閲�"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="small" @click="fastDistribute">绔嬪嵆涓嬪彂</el-button>
+ </el-form-item>
+ </el-form>
+ <el-button slot="reference" type="primary" size="small">蹇嵎涓嬪彂</el-button>
+ </el-popover>
+ </el-col>
+ </el-row>
+
+ <el-row class="content-warp" type="flex" justify="left">
+ <el-col :span="24">
+ <el-table v-loading="loading" :data="workOrderList" @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column label="宸ュ崟鍙�" align="center" prop="workOrderNo"/>
+ <el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitName"/>
+ <el-table-column label="宸ュ崟鏉ユ簮" align="center" prop="source"/>
+ <el-table-column label="鏁呴殰绫诲瀷" align="center" prop="errorType"/>
+ <el-table-column label="浜х敓鏃堕棿" align="center" prop="createTime"/>
+ </el-table>
+
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+ </el-col>
+
+ </el-row>
+ </div>
+</template>
+
+<script>
+export default {
+ name: 'index',
+ data() {
+ return {
+ // 褰撳墠杩愮淮鍗曚綅
+ unitId: null,
+ unitName: "",
+ // 澶氶��
+ multipleSelection: [],
+ // 涓嬪彂鏃堕棿鑼冨洿
+ fastTimeRange: [],
+ // 涓嬪彂
+ fastDistributeForm: {
+ fastWay: '',
+ fastNumLimit: null,
+ start: null,
+ end: null,
+ unitId: null
+ },
+ // 涓嬪彂琛ㄥ崟楠岃瘉
+ fastDistributeRules: {
+ fastWay: [
+ { required: true, message: "璇烽�夋嫨蹇�熷垎鍙戞柟寮�", trigger: "change" }
+ ],
+ fastNumLimit: [
+ { required: true, message: "璇疯緭鍏ュ揩閫熷垎鍙戞暟閲忛檺鍒�", trigger: "change" }
+ ],
+ },
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 鎬绘潯鏁�
+ total: 0,
+ // 闈炲涓鐢�
+ multiple: true,
+ activeIndex: '0',
+ loading: false,
+ workOrderList: [],
+ }
+ },
+ methods: {
+ changeUnit(unitId, unitName) {
+ this.unitId = unitId;
+ this.unitName = unitName;
+ // todo 瑙﹀彂鏁版嵁鏌ヨ
+ },
+ clearFastDistributeForm() {
+ this.fastDistributeForm.fastWay = ''
+ this.fastDistributeForm.start = null
+ this.fastDistributeForm.end = null
+ this.fastDistributeForm.fastNumLimit = null
+ this.fastTimeRange = []
+ },
+ allDis() {},
+ // 鍏ㄩ儴涓嬪彂
+ allDistribute() {
+ this.$modal.confirm("纭畾瑕佷笅鍙�" + (this.unitId ? this.unitName + "涓嬬殑" : "鎵�鏈夊伐鍗�") + "鍚楋紵").then(function() {
+ return this.allDis();
+ }).then(() => {
+ // this.getList();
+ // this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
+ },
+ // 蹇�熶笅鍙�
+ fastDistribute() {
+ this.$refs['fastDistributeForm'].validate((valid) => {
+ if (valid) {
+ // 濡傛灉鏄嚜瀹氫箟鏂瑰紡锛岄偅涔堟椂闂存蹇呭~
+ if (this.fastDistributeForm.fastWay === '101' && !this.fastTimeRange.length > 0) {
+ this.$message.warning("璇烽�夋嫨鏃堕棿鑼冨洿")
+ return false
+ }
+ if (this.fastTimeRange.length > 0) {
+ this.fastDistributeForm.start = this.fastTimeRange[0]
+ this.fastDistributeForm.end = this.fastTimeRange[1]
+ }
+ this.fastDistributeForm.unitId = this.unitId
+ // todo 鎻愪氦蹇�熷彂甯冭姹�
+ } else {
+ return false
+ }
+ })
+ },
+ // 閫変腑宸ュ崟涓嬪彂
+ selectedDistribute() {
+ if (this.multipleSelection.length < 1) {
+ this.$message.warning("璇峰厛閫夋嫨瑕佷笅鍙戠殑宸ュ崟")
+ return
+ }
+ // todo 涓嬪彂宸ュ崟
+ },
+ handleSelect(key, keyPath) {
+ console.log(key, keyPath);
+ },
+ getList() {
+
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.multipleSelection = selection.map(item => item.id)
+ },
+ }
+}
+</script>
+
+<style scoped>
+.row {
+ padding: 0 20px;
+}
+.op-warp {
+ margin-top: 10px;
+}
+.content-warp {
+ margin-top: 10px;
+}
+.op {
+ margin-right: 5px;
+}
+.setting {
+ position: absolute;
+ top: 10px;
+ right:5px
+}
+</style>
--
Gitblit v1.8.0