|
@@ -3,22 +3,36 @@
|
|
|
<div>
|
|
|
<BaseHeaderLayout :leftSpan="12">
|
|
|
<template slot="left">
|
|
|
- <ws-button class="but" type="primary" @click="handlestatus(1)">
|
|
|
+ <!-- <ws-button class="but" type="primary" @click="handlestatus(1)">
|
|
|
执行中</ws-button
|
|
|
>
|
|
|
<ws-button class="but" @click="handlestatus(2)">已完成</ws-button>
|
|
|
- <ws-button class="but" @click="handlestatus('')">全部任务</ws-button>
|
|
|
+ <ws-button class="but" @click="handlestatus('')">全部任务</ws-button> -->
|
|
|
</template>
|
|
|
<template slot="right">
|
|
|
+ <span style="width: 70px; display: inline-block;color: #8890B1;">状态:</span>
|
|
|
+ <ws-select
|
|
|
+ v-model="searchTypeText"
|
|
|
+ placeholder=""
|
|
|
+ class="typeselect"
|
|
|
+ @change="selecttaskType"
|
|
|
+ :value="searchType"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in taskTypeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ style="color: #8890B1;"
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
<ws-input
|
|
|
- v-model="warehouseName"
|
|
|
+ v-model="searchKeyWord"
|
|
|
placeholder="可按移库任务编号、发货库和收货库查找"
|
|
|
clearable
|
|
|
maxlength="500"
|
|
|
type="input"
|
|
|
></ws-input>
|
|
|
- <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
|
|
|
- <!-- <div > -->
|
|
|
<ws-button class="find" type="primary" @click="lookUp()"
|
|
|
><img
|
|
|
width="16"
|
|
@@ -61,9 +75,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="weightIn" label="入库量(吨)">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="stockReturn" label="退库量(吨)">
|
|
|
+ <el-table-column prop="stockReturnCount" label="退库量(吨)">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="transportLoss" label="运输损耗(吨)">
|
|
|
+ <template scope="scope">
|
|
|
+ {{ scope.row.weight - scope.row.weightIn - scope.row.stockReturnCount}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="publisher" label="发布者"> </el-table-column>
|
|
|
<el-table-column prop="taskStatus" label="状态">
|
|
@@ -144,11 +161,9 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { outdelete, moveList } from '@/model/tasksport/index'
|
|
|
-import { downloadFile } from '@/utils/batchDown'
|
|
|
+import { moveList,movestates} from '@/model/tasksport/index'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
-import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
|
export default {
|
|
|
name: 'viewSpareMoney',
|
|
|
components: {
|
|
@@ -180,22 +195,23 @@ export default {
|
|
|
gainList: [],
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
- searchType: 3,
|
|
|
- searchTypeText: '未完成',
|
|
|
+ searchType: 1,
|
|
|
+ searchTypeText: '待审核',
|
|
|
searchKeyWord: '',
|
|
|
contractType: 2,
|
|
|
taskTypeKey: 3,
|
|
|
- sendWarehouse: '',
|
|
|
- receiveWarehouse: '',
|
|
|
moveTaskNo: '',
|
|
|
- // 提交类型
|
|
|
- submitType: true,
|
|
|
size: 10,
|
|
|
spanArr: [],
|
|
|
- warehouseName: '',
|
|
|
+ taskTypeList: [
|
|
|
+ { value: '待审核', type: 1 },
|
|
|
+ { value: '执行中', type: 3 },
|
|
|
+ { value: '已驳回', type: 2 },
|
|
|
+ { value: '已完成', type: 4 },
|
|
|
+ { value: '全部任务', type: '' },
|
|
|
+ ],
|
|
|
deptBudgetTotal: 0,
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
- deptCircularPage: {},
|
|
|
historyList: [],
|
|
|
pickerBeginDateBefore: {
|
|
|
disabledDate: (time) => {
|
|
@@ -209,54 +225,21 @@ export default {
|
|
|
this.getList()
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
- // mounted(){
|
|
|
- // this.getList()
|
|
|
- // },
|
|
|
+
|
|
|
methods: {
|
|
|
//查找
|
|
|
lookUp() {
|
|
|
this.currentPage = 1
|
|
|
this.getList()
|
|
|
},
|
|
|
- deleteclick(row) {
|
|
|
- var text = ''
|
|
|
- if (
|
|
|
- (row.taskTypeKey == 3 && row.inOutType == '移库出库') ||
|
|
|
- (row.taskTypeKey == 4 && row.inOutType == '销售出库')
|
|
|
- ) {
|
|
|
- text = '相同任务编号的任务将一并删除且不可恢复,是否确定删除?'
|
|
|
- } else {
|
|
|
- text = `运输任务删除后不可恢复,是否确定删除?`
|
|
|
- }
|
|
|
- //cancelButtonClass: "btn-custom-cancel"
|
|
|
- this.$confirm(text, {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- outdelete({
|
|
|
- id: row.id,
|
|
|
- relevanceId: row.relevanceId,
|
|
|
- inOutFlag: row.inOutFlag,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- return false
|
|
|
- })
|
|
|
- },
|
|
|
getList() {
|
|
|
moveList({
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
taskTypeKey: this.taskTypeKey,
|
|
|
+ searchType : this.searchType,
|
|
|
searchKeyWord: this.searchKeyWord,
|
|
|
- id: this.id,
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
@@ -279,21 +262,22 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
+ selecttaskType(e) {
|
|
|
+ for (var i = 0; i < this.taskTypeList.length; i++) {
|
|
|
+ if (this.taskTypeList[i].value == e) {
|
|
|
+ this.searchType = this.taskTypeList[i].type
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
getSpanArr(data) {
|
|
|
let that = this
|
|
|
-
|
|
|
//页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
|
|
|
-
|
|
|
that.spanArr = []
|
|
|
-
|
|
|
that.pos = 0
|
|
|
-
|
|
|
//遍历数据
|
|
|
-
|
|
|
data.forEach((item, index) => {
|
|
|
//判断是否是第一项
|
|
|
-
|
|
|
// if (index === 0) {
|
|
|
// this.spanArr.push(1)
|
|
|
// this.pos = 0
|
|
@@ -308,7 +292,7 @@ export default {
|
|
|
this.spanArr.push(1)
|
|
|
this.pos = index
|
|
|
}
|
|
|
- // }
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
dateFormat(fmt, date) {
|
|
@@ -348,9 +332,9 @@ export default {
|
|
|
},
|
|
|
editClick(row) {
|
|
|
var status = ''
|
|
|
- if (row.status == '待审核' || row.status == '已完成') {
|
|
|
+ if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
|
|
|
status = '执行中'
|
|
|
- } else if (row.status == '执行中') {
|
|
|
+ } else if (row.taskStatus == '执行中') {
|
|
|
status = '已完成'
|
|
|
}
|
|
|
//cancelButtonClass: "btn-custom-cancel"
|
|
@@ -360,7 +344,7 @@ export default {
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- editstatus({ id: row.id })
|
|
|
+ movestates({ id: row.id })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.$notify.success({
|
|
@@ -377,19 +361,7 @@ export default {
|
|
|
return false
|
|
|
})
|
|
|
},
|
|
|
- selecttaskType(e) {
|
|
|
- for (var i = 0; i < this.taskTypeList.length; i++) {
|
|
|
- if (this.taskTypeList[i].value == e) {
|
|
|
- this.searchType = this.taskTypeList[i].type
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- handleExamine(row) {
|
|
|
- this.$router.push({
|
|
|
- name: 'salesContractExamine',
|
|
|
- query: { id: row.id },
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
// 关闭 dialog时 处理文件url 初始化upload组件
|
|
|
handleCloe() {
|
|
|
this.dialogViewSpareMoney = false
|
|
@@ -401,10 +373,7 @@ export default {
|
|
|
this.historyList = response
|
|
|
})
|
|
|
},
|
|
|
- find() {
|
|
|
- this.currentPage = 1
|
|
|
- this.getList()
|
|
|
- },
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -477,4 +446,32 @@ export default {
|
|
|
.el-pagination {
|
|
|
text-align: center;
|
|
|
}
|
|
|
+.el-select{
|
|
|
+ width: 30%;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+//状态样式
|
|
|
+.executory,
|
|
|
+.inExecution,
|
|
|
+.done {
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ display: inline-block;
|
|
|
+ border-radius: 50%;
|
|
|
+ position: relative;
|
|
|
+ top: -1px;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+.executory {
|
|
|
+ background: #ff9f24;
|
|
|
+}
|
|
|
+.inExecution {
|
|
|
+ background: #5878e8;
|
|
|
+}
|
|
|
+.done {
|
|
|
+ background: #50cad4;
|
|
|
+}
|
|
|
+/deep/.typeselect .el-input__inner{
|
|
|
+ color: #8890B1;
|
|
|
+}
|
|
|
</style>
|