From cce8b8793ca1466ca1330f3bd62e11ae6551261e Mon Sep 17 00:00:00 2001
From: cpT <1@123>
Date: 星期二, 01 七月 2025 13:51:58 +0800
Subject: [PATCH] #改造
---
src/main/webapp/views/taskWrk/taskWrk.html | 879 ++++++++++++++++++++++++++++++++++------------------------
1 files changed, 513 insertions(+), 366 deletions(-)
diff --git a/src/main/webapp/views/taskWrk/taskWrk.html b/src/main/webapp/views/taskWrk/taskWrk.html
index c6d5c52..ec84e8b 100644
--- a/src/main/webapp/views/taskWrk/taskWrk.html
+++ b/src/main/webapp/views/taskWrk/taskWrk.html
@@ -1,377 +1,524 @@
<!DOCTYPE html>
<html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>浠诲姟绠$悊</title>
- <link rel="stylesheet" href="../../static/wcs/css/element.css">
- <script type="text/javascript" src="../../static/wcs/js/jquery/jquery-3.3.1.min.js"></script>
- <script type="text/javascript" src="../../static/wms/layui/layui.js"></script>
- <script type="text/javascript" src="../../static/wcs/js/common.js"></script>
- <script type="text/javascript" src="../../static/wcs/js/vue.min.js"></script>
- <script type="text/javascript" src="../../static/wcs/js/element.js"></script>
- </head>
+<head>
+ <meta charset="UTF-8">
+ <title>浠诲姟绠$悊</title>
+ <link rel="stylesheet" href="../../static/wcs/css/element.css">
+ <script type="text/javascript" src="../../static/wcs/js/jquery/jquery-3.3.1.min.js"></script>
+ <script type="text/javascript" src="../../static/wms/layui/layui.js"></script>
+ <script type="text/javascript" src="../../static/wcs/js/common.js"></script>
+ <script type="text/javascript" src="../../static/wcs/js/vue.min.js"></script>
+ <script type="text/javascript" src="../../static/wcs/js/element.js"></script>
+</head>
- <body>
- <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;">
- <div style="width: 100%;">
- <el-card class="box-card">
- <el-form :inline="true" :model="tableSearchParam" class="demo-form-inline">
- <el-form-item label="">
- <el-input v-model="tableSearchParam.task_no" placeholder="浠诲姟鍙�"></el-input>
- </el-form-item>
- <el-form-item label="">
- <el-select v-model="tableSearchParam.status" placeholder="浠诲姟鐘舵��">
- <el-option label="鎺ユ敹" value="1"></el-option>
- <el-option label="娲惧彂" value="2"></el-option>
- <el-option label="瀹岀粨" value="3"></el-option>
- <el-option label="鍙栨秷" value="4"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="">
- <el-input v-model="tableSearchParam.wrk_no" placeholder="宸ヤ綔鍙�"></el-input>
- </el-form-item>
- <el-form-item label="">
- <el-date-picker
- v-model="tableSearchParam.datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="datetimerange"
- range-separator="鑷�"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="getTableData">鏌ヨ</el-button>
- <el-button type="primary" @click="resetParam">閲嶇疆</el-button>
- </el-form-item>
- </el-form>
- <el-table ref="singleTable" :data="tableData" style="width: 100%;">
- <el-table-column label="鎿嶄綔" width="100">
- <template slot-scope="scope">
- <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
- <el-button icon="el-icon-more" size="mini" type="primary"></el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item command="showCommand">鏌ョ湅鎸囦护</el-dropdown-item>
- <el-dropdown-item command="changeCommand">淇敼</el-dropdown-item>
- <el-dropdown-item command="assign">娲惧彂</el-dropdown-item>
- <el-dropdown-item command="complete">瀹岀粨</el-dropdown-item>
- <el-dropdown-item command="cancel">鍙栨秷</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- </el-table-column>
- <el-table-column property="taskNo" label="浠诲姟鍙�">
- </el-table-column>
- <el-table-column property="status$" label="浠诲姟鐘舵��">
- </el-table-column>
- <el-table-column property="wrkNo" label="宸ヤ綔鍙�">
- </el-table-column>
- <el-table-column property="createTime$" label="浠诲姟鏃堕棿">
- </el-table-column>
- <el-table-column property="durationTime" label="鎸佺画鏃堕暱">
- </el-table-column>
- <el-table-column property="ioType$" label="浠诲姟绫诲瀷">
- </el-table-column>
- <el-table-column property="startPoint" label="璧风偣浣嶇疆">
- </el-table-column>
- <el-table-column property="targetPoint" label="缁堢偣浣嶇疆">
- </el-table-column>
- <el-table-column property="wrkSts$" label="宸ヤ綔鐘舵��">
- </el-table-column>
- <el-table-column property="barcode" label="鎵樼洏鐮�">
- </el-table-column>
- <el-table-column property="crnNo" label="鍫嗗灈鏈哄彿">
- </el-table-column>
- <el-table-column property="memo" label="澶囨敞">
- </el-table-column>
- </el-table>
+<body>
+<div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;">
+ <div style="width: 100%;">
+ <el-card class="box-card">
+ <el-form :inline="true" :model="tableSearchParam" class="demo-form-inline">
+ <el-form-item label="">
+ <el-input v-model="tableSearchParam.task_no" placeholder="浠诲姟鍙�"></el-input>
+ </el-form-item>
+ <el-form-item label="">
+ <el-select v-model="tableSearchParam.status" placeholder="浠诲姟鐘舵��">
+ <el-option label="鎺ユ敹" value="1"></el-option>
+ <el-option label="娲惧彂" value="2"></el-option>
+ <el-option label="瀹岀粨" value="3"></el-option>
+ <el-option label="鍙栨秷" value="4"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="">
+ <el-input v-model="tableSearchParam.wrk_no" placeholder="宸ヤ綔鍙�"></el-input>
+ </el-form-item>
+ <el-form-item label="">
+ <el-date-picker
+ v-model="tableSearchParam.datetime"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ type="datetimerange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="getTableData">鏌ヨ</el-button>
+ <el-button type="primary" @click="resetParam">閲嶇疆</el-button>
+ <el-button type="primary" @click="addTask">鎵嬪姩娣诲姞浠诲姟</el-button>
+ </el-form-item>
+ </el-form>
+ <el-table ref="singleTable" :data="tableData" style="width: 100%;">
+ <el-table-column label="鎿嶄綔" width="100">
+ <template slot-scope="scope">
+ <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
+ <el-button icon="el-icon-more" size="mini" type="primary"></el-button>
+ <el-dropdown-menu slot="dropdown">
+ <!-- <el-dropdown-item command="showCommand">鏌ョ湅鎸囦护</el-dropdown-item>-->
+ <el-dropdown-item command="returnWorkingCondition">閲嶆柊缁欏爢鍨涙満涓嬪彂浠诲姟</el-dropdown-item>
+ <el-dropdown-item command="changeCommand">淇敼</el-dropdown-item>
+ <el-dropdown-item command="assign">璺宠浆鍒拌緭閫佺嚎涓嬪彂瀹屾垚</el-dropdown-item>
+ <el-dropdown-item command="complete">瀹岀粨</el-dropdown-item>
+ <el-dropdown-item command="cancel">鍙栨秷</el-dropdown-item>
+ <el-dropdown-item command="delete">鍒犻櫎鏃犻渶涓婃姤</el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+ </template>
+ </el-table-column>
+ <el-table-column property="taskNo" label="浠诲姟鍙�">
+ </el-table-column>
+ <el-table-column property="status$" label="浠诲姟鐘舵��">
+ </el-table-column>
+ <el-table-column property="wrkNo" label="宸ヤ綔鍙�">
+ </el-table-column>
+ <el-table-column property="createTime$" label="浠诲姟鏃堕棿">
+ </el-table-column>
+ <el-table-column property="durationTime" label="鎸佺画鏃堕暱">
+ </el-table-column>
+ <el-table-column property="ioType$" label="浠诲姟绫诲瀷">
+ </el-table-column>
+ <el-table-column property="startPoint" label="璧风偣浣嶇疆">
+ </el-table-column>
+ <el-table-column property="targetPoint" label="缁堢偣浣嶇疆">
+ </el-table-column>
+ <el-table-column property="wrkSts$" label="宸ヤ綔鐘舵��">
+ </el-table-column>
+ <el-table-column property="barcode" label="鎵樼洏鐮�">
+ </el-table-column>
+ <el-table-column property="crnNo" label="宸烽亾鍙�">
+ </el-table-column>
+ <el-table-column property="ioPri" label="浼樺厛绾�">
+ </el-table-column>
+ </el-table>
- <div style="margin-top: 10px;">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :current-page="currentPage" :page-sizes="pageSizes" :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper" :total="pageTotal">
- </el-pagination>
- </div>
- </el-card>
- </div>
+ <div style="margin-top: 10px;">
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+ :current-page="currentPage" :page-sizes="pageSizes" :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper" :total="pageTotal">
+ </el-pagination>
+ </div>
+ </el-card>
+ </div>
- <el-dialog :title="taskWrkFormTitle" :visible.sync="taskWrkFormVisible">
- <el-form :model="taskWrkForm">
- <el-form-item label="璧风偣浣嶇疆" :label-width="taskWrkFormLabelWidth">
- <el-input v-model="taskWrkForm.startPoint" autocomplete="off"></el-input>
- </el-form-item>
- <el-form-item label="缁堢偣浣嶇疆" :label-width="taskWrkFormLabelWidth">
- <el-input v-model="taskWrkForm.targetPoint" autocomplete="off"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="taskWrkFormVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="taskWrkFormConfirm">纭� 瀹�</el-button>
- </div>
- </el-dialog>
+ <el-dialog :title="taskWrkFormTitle" :visible.sync="taskWrkFormVisible">
+ <el-form :model="taskWrkForm">
+ <el-form-item label="璧风偣浣嶇疆" :label-width="taskWrkFormLabelWidth">
+ <el-input v-model="taskWrkForm.startPoint" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="缁堢偣浣嶇疆" :label-width="taskWrkFormLabelWidth">
+ <el-input v-model="taskWrkForm.targetPoint" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="taskWrkFormVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="taskWrkFormConfirm">纭� 瀹�</el-button>
+ </div>
+ </el-dialog>
- </div>
- <script>
- var $layui = layui.config({
- base: baseUrl + "/static/wms/layui/lay/modules/"
- }).use(['layer', 'form'], function() {})
+ <el-dialog :title="addTaskFormTitle" :visible.sync="addTaskFormVisible">
+ <el-form :model="addTaskForm">
+ <el-form-item label="浠诲姟鍙�" :label-width="addTaskFormLabelWidth">
+ <el-input v-model="addTaskForm.taskNo" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="浠诲姟绫诲瀷=銆�1锛氬嚭搴撱��2锛氱Щ搴撱��3锛氬叆搴�" :label-width="200">
+ <el-input v-model="addTaskForm.ioType" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="浼樺厛绾�" :label-width="addTaskFormLabelWidth">
+ <el-input v-model="addTaskForm.taskPriority" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="瀹瑰櫒缂栫爜" :label-width="addTaskFormLabelWidth">
+ <el-input v-model="addTaskForm.barcode" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="璧风偣浣嶇疆" :label-width="addTaskFormLabelWidth">
+ <el-input v-model="addTaskForm.startPoint" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="缁堢偣浣嶇疆" :label-width="addTaskFormLabelWidth">
+ <el-input v-model="addTaskForm.targetPoint" autocomplete="off"></el-input>
+ </el-form-item>
+ <el-form-item label="澶囨敞" :label-width="addTaskFormLabelWidth">
+ <el-input v-model="addTaskForm.memo" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="addTaskFormVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="addTaskFormConfirm">纭� 瀹�</el-button>
+ </div>
+ </el-dialog>
- var app = new Vue({
- el: '#app',
- data: {
- tableData: [],
- currentPage: 1,
- pageSizes: [16, 30, 50, 100, 150, 200],
- pageSize: 16,
- pageTotal: 0,
- tableSearchParam: {
- task_no: null,
- status: null,
- wrk_no: null,
- datetime: null,
- },
- taskWrkFormVisible: false,
- taskWrkForm: {},
- taskWrkFormLabelWidth: '80px',
- taskWrkFormTitle: ''
- },
- created() {
- this.init()
- },
- methods: {
- init() {
- let taskNo = getQueryVariable('taskNo')
- let wrkNo = getQueryVariable('wrkNo')
- if (taskNo != false) {
- this.tableSearchParam.task_no = taskNo
- }
- if (wrkNo != false) {
- this.tableSearchParam.wrk_no = wrkNo
- }
+</div>
+<script>
+ var $layui = layui.config({
+ base: baseUrl + "/static/wms/layui/lay/modules/"
+ }).use(['layer', 'form'], function () {
+ })
- this.getTableData()
- },
- getTableData() {
- let that = this;
- let data = JSON.parse(JSON.stringify(this.tableSearchParam))
- data.curr = this.currentPage
- data.limit = this.pageSize
- if (this.tableSearchParam.datetime != null) {
- data.datetime = null
- data.create_time = this.tableSearchParam.datetime[0] + " - " + this.tableSearchParam.datetime[1]
- }
- $.ajax({
- url: baseUrl + "/taskWrk/list/auth",
- headers: {
- 'token': localStorage.getItem('token')
- },
- data: data,
- dataType: 'json',
- contentType: 'application/json;charset=UTF-8',
- method: 'GET',
- success: function(res) {
- if (res.code == 200) {
- that.tableData = res.data.records
- that.pageTotal = res.data.total
- } else if (res.code === 403) {
- top.location.href = baseUrl + "/";
- } else {
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- });
- },
- handleSizeChange(val) {
- console.log(`姣忛〉 ${val} 鏉);
- this.pageSize = val
- this.getTableData()
- },
- handleCurrentChange(val) {
- console.log(`褰撳墠椤�: ${val}`);
- this.currentPage = val
- this.getTableData()
- },
- resetParam() {
- this.tableSearchParam = {
- task_no: null,
- status: null,
- wrk_no: null
- }
- this.getTableData()
- },
- handleCommand(command, row) {
- switch (command) {
- case "showCommand":
- //鏌ョ湅鎸囦护
- this.showCommand(row)
- break;
- case "changeCommand":
- //淇敼鎸囦护
- this.changeCommand(row);
- break
- case "assign":
- //娲惧彂浠诲姟
- this.assignWrk(row)
- break;
- case "complete":
- //瀹岀粨浠诲姟
- this.completeWrk(row)
- break;
- case "cancel":
- //鍙栨秷浠诲姟
- this.cancelWrk(row)
- break;
- }
- },
- showCommand(row) {
- let wrkNo = row.wrkNo == null ? "" : row.wrkNo
- //鏌ョ湅鎸囦护
- $layui.layer.open({
- type: 2,
- title: '鎸囦护绠$悊',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: true,
- content: 'commandManage.html?taskNo=' + row.taskNo + "&wrkNo=" + wrkNo,
- success: function(layero, index) {}
- });
- },
- changeCommand(row) {
- //淇敼鎸囦护
- this.taskWrkFormVisible = true
- this.taskWrkFormTitle = "浠诲姟锛�" + row.taskNo
- this.taskWrkForm = row
- },
- assignWrk(row){
- //娲惧彂浠诲姟
- let that = this
- $.ajax({
- url: baseUrl + "/taskWrk/distribute/auth",
- headers: {
- 'token': localStorage.getItem('token')
- },
- data: {
- taskNo: row.taskNo
- },
- method: 'POST',
- success: function(res) {
- if (res.code == 200) {
- that.$message({
- message: "娲惧彂鎴愬姛",
- type: 'success'
- });
- that.getTableData()
- } else if (res.code === 403) {
- top.location.href = baseUrl + "/";
- } else {
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- });
- },
- completeWrk(row){
- //娲惧彂浠诲姟
- let that = this
- $.ajax({
- url: baseUrl + "/taskWrk/complete/auth",
- headers: {
- 'token': localStorage.getItem('token')
- },
- data: {
- taskNo: row.taskNo
- },
- method: 'POST',
- success: function(res) {
- if (res.code == 200) {
- that.$message({
- message: "瀹岀粨鎴愬姛",
- type: 'success'
- });
- that.getTableData()
- } else if (res.code === 403) {
- top.location.href = baseUrl + "/";
- } else {
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- });
- },
- cancelWrk(row){
- //鍙栨秷浠诲姟
- let that = this
- $.ajax({
- url: baseUrl + "/taskWrk/cancel/auth",
- headers: {
- 'token': localStorage.getItem('token')
- },
- data: {
- taskNo: row.taskNo
- },
- method: 'POST',
- success: function(res) {
- if (res.code == 200) {
- that.$message({
- message: "鍙栨秷鎴愬姛",
- type: 'success'
- });
- that.getTableData()
- } else if (res.code === 403) {
- top.location.href = baseUrl + "/";
- } else {
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- });
- },
- taskWrkFormConfirm() {
- //淇敼鎸囧畾浠诲姟鏁版嵁
- let that = this
- $.ajax({
- url: baseUrl + "/taskWrk/updatePoint/auth",
- headers: {
- 'token': localStorage.getItem('token')
- },
- data: {
- taskNo: this.taskWrkForm.taskNo,
- startPoint: this.taskWrkForm.startPoint,
- targetPoint: this.taskWrkForm.targetPoint,
- },
- method: 'POST',
- success: function(res) {
- if (res.code == 200) {
- that.taskWrkFormVisible = false
- that.$message({
- message: "鏇存柊鎴愬姛",
- type: 'success'
- });
- that.getTableData()
- } else if (res.code === 403) {
- top.location.href = baseUrl + "/";
- } else {
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- });
- }
- }
- })
- </script>
- </body>
+ var app = new Vue({
+ el: '#app',
+ data: {
+ tableData: [],
+ currentPage: 1,
+ pageSizes: [16, 30, 50, 100, 150, 200],
+ pageSize: 16,
+ pageTotal: 0,
+ tableSearchParam: {
+ task_no: null,
+ status: null,
+ wrk_no: null,
+ datetime: null,
+ },
+ taskWrkFormVisible: false,
+ addTaskFormVisible: false,
+ taskWrkForm: {},
+ addTaskForm: {
+ taskNo:"9001",
+ ioType:"0",
+ taskPriority:1,
+ barcode:"10000001",
+ startPoint:"1000",
+ targetPoint:"F-F01-01-01-01",
+ memo:"cs"
+ },
+ taskWrkFormLabelWidth: '80px',
+ addTaskFormLabelWidth: '80px',
+ taskWrkFormTitle: '',
+ addTaskFormTitle: '鎵嬪姩娣诲姞浠诲姟'
+ },
+ created() {
+ this.init()
+ },
+ methods: {
+ init() {
+ let taskNo = getQueryVariable('taskNo')
+ let wrkNo = getQueryVariable('wrkNo')
+ if (taskNo != false) {
+ this.tableSearchParam.task_no = taskNo
+ }
+ if (wrkNo != false) {
+ this.tableSearchParam.wrk_no = wrkNo
+ }
+
+ this.getTableData()
+ },
+ getTableData() {
+ let that = this;
+ let data = JSON.parse(JSON.stringify(this.tableSearchParam))
+ data.curr = this.currentPage
+ data.limit = this.pageSize
+ if (this.tableSearchParam.datetime != null) {
+ data.datetime = null
+ data.create_time = this.tableSearchParam.datetime[0] + " - " + this.tableSearchParam.datetime[1]
+ }
+ $.ajax({
+ url: baseUrl + "/taskWrk/list/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: data,
+ dataType: 'json',
+ contentType: 'application/json;charset=UTF-8',
+ method: 'GET',
+ success: function (res) {
+ if (res.code == 200) {
+ that.tableData = res.data.records
+ that.pageTotal = res.data.total
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ handleSizeChange(val) {
+ console.log(`姣忛〉 ${val} 鏉);
+ this.pageSize = val
+ this.getTableData()
+ },
+ handleCurrentChange(val) {
+ console.log(`褰撳墠椤�: ${val}`);
+ this.currentPage = val
+ this.getTableData()
+ },
+ resetParam() {
+ this.tableSearchParam = {
+ task_no: null,
+ status: null,
+ wrk_no: null
+ }
+ this.getTableData()
+ },
+ addTask() {
+ this.addTaskFormVisible = true
+ },
+ handleCommand(command, row) {
+ switch (command) {
+ case "returnWorkingCondition":
+ //閲嶆柊缁欏爢鍨涙満涓嬪彂浠诲姟
+ this.returnWorkingConditionWrk(row)
+ break;
+ case "showCommand":
+ //鏌ョ湅鎸囦护
+ this.showCommand(row)
+ break;
+ case "changeCommand":
+ //淇敼鎸囦护
+ this.changeCommand(row);
+ break
+ case "assign":
+ //娲惧彂浠诲姟
+ this.assignWrk(row)
+ break;
+ case "complete":
+ //瀹岀粨浠诲姟
+ this.completeWrk(row)
+ break;
+ case "cancel":
+ //鍙栨秷浠诲姟
+ this.cancelWrk(row)
+ break;
+ case "delete":
+ //鍙栨秷浠诲姟
+ this.deleteWrk(row)
+ break;
+ }
+ },
+ showCommand(row) {
+ let wrkNo = row.wrkNo == null ? "" : row.wrkNo
+ //鏌ョ湅鎸囦护
+ $layui.layer.open({
+ type: 2,
+ title: '鎸囦护绠$悊',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: 'commandManage.html?taskNo=' + row.taskNo + "&wrkNo=" + wrkNo,
+ success: function (layero, index) {
+ }
+ });
+ },
+ changeCommand(row) {
+ //淇敼鎸囦护
+ this.taskWrkFormVisible = true
+ this.taskWrkFormTitle = "浠诲姟锛�" + row.taskNo
+ this.taskWrkForm = row
+ },
+ assignWrk(row) {
+ //娲惧彂浠诲姟
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/assign/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ taskNo: row.taskNo
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ that.$message({
+ message: "娲惧彂鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ completeWrk(row) {
+ //瀹屾垚浠诲姟
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/complete/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ taskNo: row.taskNo
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ that.$message({
+ message: "瀹岀粨鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ returnWorkingConditionWrk(row){
+ //閲嶆柊缁欏爢鍨涙満涓嬪彂浠诲姟
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/returnWorkingCondition/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ taskNo: row.taskNo
+ },
+ method: 'POST',
+ success: function(res) {
+ if (res.code == 200) {
+ that.$message({
+ message: "鍙栨秷鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ deleteWrk(row) {
+ //鍙栨秷浠诲姟
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/delete/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ taskNo: row.taskNo
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ that.$message({
+ message: "鍒犻櫎鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ cancelWrk(row) {
+ //鍙栨秷浠诲姟
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/cancel/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ taskNo: row.taskNo
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ that.$message({
+ message: "鍙栨秷鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ taskWrkFormConfirm() {
+ //淇敼鎸囧畾浠诲姟鏁版嵁
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/updatePoint/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ taskNo: this.taskWrkForm.taskNo,
+ startPoint: this.taskWrkForm.startPoint,
+ targetPoint: this.taskWrkForm.targetPoint,
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ that.taskWrkFormVisible = false
+ that.$message({
+ message: "鏇存柊鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ },
+ addTaskFormConfirm() {
+ //淇敼鎸囧畾浠诲姟鏁版嵁
+ let that = this
+ $.ajax({
+ url: baseUrl + "/taskWrk/addTask/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: this.addTaskForm,
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ that.addTaskFormVisible = false
+ that.$message({
+ message: "鏇存柊鎴愬姛",
+ type: 'success'
+ });
+ that.getTableData()
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ that.$message({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ }
+ }
+ })
+</script>
+</body>
</html>
--
Gitblit v1.9.1