|
@@ -3,9 +3,9 @@
|
|
|
<div class="container-wrap">
|
|
|
<div style="display: flex;justify-content: space-between;align-items: center;padding: 2px 0">
|
|
|
<div>
|
|
|
- <span @click="typeClick(4)" :style="{color: type === 4 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新人工盘点</span>
|
|
|
+ <!-- <span @click="typeClick(4)" :style="{color: type === 4 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新人工盘点</span>
|
|
|
<span style="padding: 0 10px">|</span>
|
|
|
- <span @click="typeClick(3)" :style="{color: type === 3 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新自动盘点</span>
|
|
|
+ <span @click="typeClick(3)" :style="{color: type === 3 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新自动盘点</span> -->
|
|
|
</div>
|
|
|
<div>
|
|
|
<Button @click="more" style="margin-right: 10px">更多记录>></Button>
|
|
@@ -18,7 +18,7 @@
|
|
|
<div class="container">
|
|
|
<div class="tabs">
|
|
|
<div
|
|
|
- @click="tabClick(index, item.value)"
|
|
|
+ @click="tabClick(index, item.text)"
|
|
|
:class="tabsIndex === index ? 'active' : ''"
|
|
|
class="tab-item"
|
|
|
v-for="(item, index) in tabs"
|
|
@@ -34,7 +34,7 @@
|
|
|
全部
|
|
|
</Button>
|
|
|
</div>
|
|
|
- <div class="filter-item" v-for="(item, index) in data.purposeList" :key="index">
|
|
|
+ <div class="filter-item" v-for="(item, index) in purposeList" :key="index">
|
|
|
<Button
|
|
|
:type="menuIndex === index ? 'primary' : 'default'"
|
|
|
style="min-width: 90px;"
|
|
@@ -47,21 +47,21 @@
|
|
|
<RadioGroup v-model="params.checkResult" @on-change="stateChange">
|
|
|
<Radio label="">
|
|
|
全部
|
|
|
- <span style="color: #3F92F9">({{ (data.normalCount + data.errorCount) || 0 }})</span>
|
|
|
+ <span style="color: #3F92F9">({{ (normalCount + errorCount) || 0 }})</span>
|
|
|
</Radio>
|
|
|
<Radio :label="1">
|
|
|
盘点结果一致
|
|
|
- <span style="color: #3F92F9">({{ data.normalCount || 0 }})</span>
|
|
|
+ <span style="color: #3F92F9">({{ normalCount || 0 }})</span>
|
|
|
</Radio>
|
|
|
<Radio :label="0">
|
|
|
盘点结果不一致
|
|
|
- <span style="color: #f11111">({{ data.errorCount || 0 }})</span>
|
|
|
+ <span style="color: #f11111">({{ errorCount || 0 }})</span>
|
|
|
</Radio>
|
|
|
</RadioGroup>
|
|
|
</div>
|
|
|
<!-- 表格 -->
|
|
|
<div class="table-content">
|
|
|
- <my-table :data="data.checkRecordDetialList && data.checkRecordDetialList.list" :border="true" :tooltip="false" :columns="columns" :isShowFilter="false" :table-page="params" @on-change="changePage"></my-table>
|
|
|
+ <my-table :data="data" :border="true" :isShowPage="false" :tooltip="false" :columns="columns" :isShowFilter="false" :table-page="params" @on-change="changePage"></my-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<tag-form v-model="show" :form-data="currentData"></tag-form>
|
|
@@ -73,6 +73,7 @@ import { GetCheckRecordDetailList } from '@/api/stock'
|
|
|
import MyTable from '_c/my-table/my-table'
|
|
|
import TagForm from '@/view/store-manage/store-manage/tag-form'
|
|
|
import { GetTechnologyTypList } from '@/api/baseData'
|
|
|
+import axios from 'axios'
|
|
|
export default {
|
|
|
name: 'material_pay_detail',
|
|
|
components: {
|
|
@@ -83,6 +84,8 @@ export default {
|
|
|
return {
|
|
|
show: false,
|
|
|
currentData: {},
|
|
|
+ normalCount: 0,
|
|
|
+ errorCount: 0,
|
|
|
recordId: '',
|
|
|
type: 4,
|
|
|
technologyType: '',
|
|
@@ -90,9 +93,9 @@ export default {
|
|
|
tabsIndex: 0,
|
|
|
menuIndex: '',
|
|
|
titleData: {},
|
|
|
- data: {
|
|
|
- checkRecordDetialList: {}
|
|
|
- },
|
|
|
+ data: [],
|
|
|
+ dataCopy:[],
|
|
|
+ purposeList:[],
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
@@ -191,7 +194,7 @@ export default {
|
|
|
],
|
|
|
params: {
|
|
|
pageIndex: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 10000,
|
|
|
total: 0
|
|
|
}
|
|
|
}
|
|
@@ -213,45 +216,89 @@ export default {
|
|
|
},
|
|
|
/* 用途点击 */
|
|
|
menuTabClick (index = '', item = '') {
|
|
|
+ console.log(item)
|
|
|
this.menuIndex = index
|
|
|
- this.params.pageIndex = 1
|
|
|
+ // this.params.pageIndex = 1
|
|
|
this.params.purpose = item
|
|
|
- this.getList()
|
|
|
+ this.searchFn()
|
|
|
},
|
|
|
/* 单选框切换 */
|
|
|
stateChange () {
|
|
|
this.params.pageIndex = 1
|
|
|
- this.getList()
|
|
|
+ this.searchFn()
|
|
|
},
|
|
|
/* 选项卡切换 */
|
|
|
tabClick (index, value) {
|
|
|
- this.data = {
|
|
|
- allStockCheckPageList: {}
|
|
|
- }
|
|
|
+ // this.data = {
|
|
|
+ // allStockCheckPageList: {}
|
|
|
+ // }
|
|
|
this.tabsIndex = index
|
|
|
this.params.pageIndex = 1
|
|
|
this.params.isCountEqual = ''
|
|
|
this.technologyType = value
|
|
|
- this.getList()
|
|
|
+ console.log(this.technologyType)
|
|
|
+ this.searchFn()
|
|
|
},
|
|
|
changePage (pageIndex) {
|
|
|
this.params.pageIndex = pageIndex
|
|
|
this.getList()
|
|
|
},
|
|
|
- getList () {
|
|
|
- /* 盘点记录 */
|
|
|
- GetCheckRecordDetailList({
|
|
|
- ...this.params,
|
|
|
- technologyType: this.technologyType,
|
|
|
- type: this.type,
|
|
|
- recordId: this.recordId
|
|
|
- }).then(res => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.data = res.result
|
|
|
- this.params.total = res.result.checkRecordDetialList.totalCount
|
|
|
+ searchFn(){
|
|
|
+ const v = this
|
|
|
+ v.data = []
|
|
|
+ v.array = []
|
|
|
+ v.normalCount = 0
|
|
|
+ v.errorCount = 0
|
|
|
+ v.dataCopy.map(item => {
|
|
|
+ if(v.params.purpose && v.params.purpose != item.purpose) return
|
|
|
+ if(v.technologyType != '全部' && v.technologyType && v.technologyType != item.categoryName) return
|
|
|
+ if(item.result === '正常'){
|
|
|
+ v.normalCount++
|
|
|
+ }else{
|
|
|
+ v.errorCount++
|
|
|
}
|
|
|
+ if(v.params.checkResult === 1 && item.result != '正常') return
|
|
|
+ if(v.params.checkResult === 0 && item.result == '正常') return
|
|
|
+
|
|
|
+ v.data.push(item)
|
|
|
})
|
|
|
},
|
|
|
+ getList () {
|
|
|
+ /* 盘点记录 */
|
|
|
+ const v = this
|
|
|
+ axios
|
|
|
+ .post('/cloudApi/stockWater/inventoryDetails', {
|
|
|
+ recordId:this.recordId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ v.dataCopy = res.data.data
|
|
|
+ v.data = res.data.data
|
|
|
+ v.dataCopy.map(item => {
|
|
|
+ if(item.result === '正常'){
|
|
|
+ v.normalCount++
|
|
|
+ }else{
|
|
|
+ v.errorCount++
|
|
|
+ }
|
|
|
+ if(v.purposeList.indexOf(item.purpose) == -1){
|
|
|
+ v.purposeList.push(item.purpose)
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ v.params.total = res.data.length
|
|
|
+ })
|
|
|
+ // GetCheckRecordDetailList({
|
|
|
+ // ...this.params,
|
|
|
+ // technologyType: this.technologyType,
|
|
|
+ // type: this.type,
|
|
|
+ // recordId: this.recordId
|
|
|
+ // }).then(res => {
|
|
|
+ // if (res.code === 0) {
|
|
|
+ // this.data = res.result
|
|
|
+ // this.params.total = res.result.checkRecordDetialList.totalCount
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
getTechnologyTypList () {
|
|
|
GetTechnologyTypList().then(res => {
|
|
|
if (res.code === 0) {
|