From 3878c57a2bd710295931303ea85439a596838dfd Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 05 九月 2023 16:01:31 +0800
Subject: [PATCH] 小程序
---
minipro_standard/pages/plannedDistribution/plannedDistribution.vue | 401 ++-----
minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue | 71 +
minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue | 12
minipro_standard/util/api/PlanningAPI.js | 2
minipro_standard/pages/workbench/workbench.vue | 58 -
minipro_standard/pages_adjust/pages/outboundList/outboundList.vue | 475 +++++---
minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue | 380 +++++--
minipro_standard/pages_adjust/pages/transferList/transferList.vue | 480 +++-----
minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue | 97 +
minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue | 463 +++++---
minipro_standard/util/api/materialStorage.js | 6
minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue | 267 +---
minipro_standard/pages.json | 2
minipro_standard/util/api/index.js | 10
minipro_standard/pages/plannedProgress/plannedProgress.vue | 156 --
minipro_standard/components/Search.vue | 3
minipro_standard/pages/planDetails/planDetails.vue | 13
minipro_standard/pages/allocation/allocation.vue | 122 +
minipro_standard/pages_adjust/components/Warehouse.vue | 99 +
19 files changed, 1,612 insertions(+), 1,505 deletions(-)
diff --git a/minipro_standard/components/Search.vue b/minipro_standard/components/Search.vue
index 347b379..082e02b 100644
--- a/minipro_standard/components/Search.vue
+++ b/minipro_standard/components/Search.vue
@@ -3,7 +3,7 @@
<view class="search_box">
<view class="search_input">
<image src="@/static/ic_search@2x.png" alt="">
- <input v-model="text" @keyup.enter="searchInput()" type="text" :placeholder="placeholder" />
+ <input v-model="text" @confirm="searchInput()" type="text" :placeholder="placeholder" />
</view>
<view class="search_operation" v-if="isShow">
<view class="search_operation_w"></view>
@@ -66,7 +66,6 @@
display: flex;
align-items: center;
.zhanwei {
- height: 180rpx;
background: #ffffff;
}
.content {
diff --git a/minipro_standard/pages.json b/minipro_standard/pages.json
index b334926..aea06b7 100644
--- a/minipro_standard/pages.json
+++ b/minipro_standard/pages.json
@@ -182,7 +182,7 @@
{
"path": "pages/warehousingDetails/warehousingDetails",
"style": {
- "navigationBarTitleText": "鍏ュ簱璇︽儏",
+ "navigationBarTitleText": "杞簱璇︽儏",
"enablePullDownRefresh": false
}
},
diff --git a/minipro_standard/pages/allocation/allocation.vue b/minipro_standard/pages/allocation/allocation.vue
index 43022fc..cda34f5 100644
--- a/minipro_standard/pages/allocation/allocation.vue
+++ b/minipro_standard/pages/allocation/allocation.vue
@@ -21,7 +21,7 @@
<u-icon name="arrow-right" color="#999999"></u-icon>
</view>
</view>
- <view class="fp_list_item" @click="show = true">
+ <view class="fp_list_item" @click="show1 = true">
<view class="fp_list_item_left">
<text>鐢熶骇璁惧</text>
</view>
@@ -36,10 +36,20 @@
<text>鐢熶骇浜哄憳</text>
</view>
<view class="fp_list_item_right">
- <u-checkbox-group v-model="form.personnelId" v-show="personnelData.length > 0">
- <u-checkbox :name="item.id" v-for="(item, index) in personnelData" :key="index" activeColor="#4275FC">{{item.text}}</u-checkbox>
- </u-checkbox-group>
- <view class="wu" v-show="personnelData.length === 0">
+ <template v-if="personnelData.length > 0">
+ <u-checkbox-group
+ placement="column"
+ @change="checkboxChange">
+ <u-checkbox
+ :customStyle="{marginBottom: '16rpx'}"
+ v-for="(item, index) in personnelData"
+ :key="index"
+ :label="item.text"
+ :name="item.id">
+ </u-checkbox>
+ </u-checkbox-group>
+ </template>
+ <view class="wu" v-else>
<text>鏆傛棤鏁版嵁</text>
</view>
</view>
@@ -52,17 +62,19 @@
<!-- 閫夋嫨鏃ユ湡 -->
<u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
<!-- 閫夋嫨璁惧 -->
- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show = false" keyName="label"></u-picker>
+ <u-picker :show="show1" :columns="equipment" @confirm="confirm" @cancel="show1 = false" keyName="text"></u-picker>
</view>
</template>
<script>
import { gsdate } from '@/util/utils.js'
+ import { distributeById, getFindAll, getDeviceByCondition } from '@/util/api/PlanningAPI'
export default {
data() {
return {
- show: false,
- columns: [[{ label: '璁惧涓�' }]],
+ id: null,
+ show1: false,
+ checkboxValue1: [],
form: {
num: '', // 鐢熶骇鏁伴噺
startTime: gsdate(new Date()), // 寮�濮嬫椂闂�
@@ -70,25 +82,79 @@
equipmentName: '', // 璁惧鍚嶇О
personnelId: [] // 浜哄憳id
},
+ isOpenDate: false,
+ equipment: [], // 璁惧鏁版嵁
personnelData: [], // 浜哄憳鏁版嵁
timeShow: false
};
},
onLoad(option) {
this.form.num = option.num
+ this.id = option.jhid
+ this.getDeviceByConditions()
},
methods: {
+ checkboxChange(ids) {
+ this.form.personnelId = ids;
+ },
go() {
uni.navigateBack({ delta: 1 });
},
+ // 纭閫夋嫨璁惧
confirm(val) {
- this.form.equipmentName = val.value[0].label
- this.form.equipmentId = 1
- this.show = false
+ this.form.equipmentId = val.value[0].id
+ this.form.equipmentName = val.value[0].text
+ this.personnelData = []
+ getFindAll({
+ deviceId: this.form.equipmentId
+ }).then(res => {
+ if (res.code === 200 && res.data && res.data.length !== 0) {
+ this.form.personnelId = []
+ let arr = []
+ res.data.forEach((item) => {
+ arr.push({ text: item.dmodel.name + '-' + item.umodel.name, id: item.userId })
+ })
+ this.personnelData = arr
+ }
+ this.show1 = false
+ })
},
timeConfirm(val) {
this.form.startTime = val[0]
this.timeShow = false
+ },
+ // 鎻愪氦鍒嗛厤
+ submit() {
+ if (!this.form.num) return uni.showToast({ title: '璁″垝鐢熶骇鏁伴噺涓嶈兘涓虹┖锛�', icon: 'none', duration: 2000 });
+ if (!this.form.startTime) return uni.showToast({ title: '璁″垝寮�濮嬫棩鏈熶笉鑳戒负绌猴紒', icon: 'none', duration: 2000 });
+ distributeById({
+ planId: this.id,
+ planNum: this.form.num,
+ planDate: this.form.startTime,
+ proGroupId: this.form.equipmentId,
+ proUserList: this.form.personnelId
+ }).then(res => {
+ if (res.code === 200) {
+ uni.showToast({ title: '鍒嗛厤鎴愬姛', icon: 'success', duration: 2000, mask: true });
+ setTimeout(() => {
+ uni.navigateBack({ delta: 1 });
+ }, 2000)
+ }
+ })
+ },
+ // 鏌ヨ璁惧
+ getDeviceByConditions() {
+ getDeviceByCondition({})
+ .then(res => {
+ if (res.code === 200) {
+ this.equipment = []
+ let arr = []
+ res.data.forEach((element) => {
+ arr.push({ text: element.code + '-' + element.name, id: element.id, checked: false })
+ })
+ this.equipment.push(arr)
+ }
+ })
}
}
}
@@ -113,7 +179,7 @@
border-bottom: 1rpx solid #ececec;
.fp_list_item_left {
flex-shrink: 0;
- margin-bottom: 20rpx;
+ margin-bottom: 40rpx;
display: flex;
align-items: center;
text {
@@ -122,9 +188,21 @@
font-weight: 400;
}
}
- .fp_list_item_right {
+ .fp_list_item_right::v-deep {
display: flex;
- align-items: center;
+ flex-direction: column;
+ .u-checkbox-group--row {
+ display: flex;
+ flex-direction: column;
+ }
+ .fp_list_item_right_dis {
+ display: flex;
+ align-items: center;
+ margin-bottom: 20rpx;
+ &:last-child {
+ margin-bottom: 0 !important;
+ }
+ }
.wu {
width: 100%;
margin: 30rpx 0;
@@ -134,22 +212,6 @@
text {
font-size: 26rpx;
color: black;
- }
- }
- .van-checkbox {
- margin-right: 5rpx !important;
- margin-top: 10rpx !important;
- &:nth-child(1) {
- margin-top: 0 !important;
- }
- &:nth-child(2) {
- margin-top: 0 !important;
- }
- &:nth-child(3) {
- margin-top: 0 !important;
- }
- .van-checkbox__label {
- color: black !important;
}
}
.black {
diff --git a/minipro_standard/pages/planDetails/planDetails.vue b/minipro_standard/pages/planDetails/planDetails.vue
index 9d3f17f..adabec2 100644
--- a/minipro_standard/pages/planDetails/planDetails.vue
+++ b/minipro_standard/pages/planDetails/planDetails.vue
@@ -122,7 +122,7 @@
<view class="details_timeline_item" v-if="item.materialDate">
<view class="activedian" v-if="!item.produceDate"></view>
<view class="dian" :class="{ 'active': !item.produceDate }"></view>
- <view class="x" :style="{ height: item.materialList.length === 1 ? '2.1rem' : 1.2 * item.materialList.length + 'rem' }"></view>
+ <view class="x"></view>
<view class="details_timeline_item_zw"></view>
<view class="details_timeline_item_left">
<text :class="{'active_font': !item.produceDate}">鎶曟枡</text>
@@ -162,16 +162,23 @@
</template>
<script>
+ import { queryByID } from '@/util/api/PlanningAPI'
+
export default {
data() {
return {
+ id: null,
info: {}
};
+ },
+ onLoad(option) {
+ this.id = option.id
+ this.queryByIDs()
},
methods: {
// 鑾峰彇璇︽儏
queryByIDs() {
- queryByID(this.$route.query.id)
+ queryByID(this.id)
.then(res => {
if (res.code === 200) {
this.info = res.data
@@ -445,7 +452,7 @@
top: 30rpx;
left: 29rpx;
width: 1rpx;
- height: 165rpx;
+ height: calc(100% + 60rpx);
border-right: 1rpx dashed #CCCCCC;
}
.dian {
diff --git a/minipro_standard/pages/plannedDistribution/plannedDistribution.vue b/minipro_standard/pages/plannedDistribution/plannedDistribution.vue
index de67bb9..b78ec83 100644
--- a/minipro_standard/pages/plannedDistribution/plannedDistribution.vue
+++ b/minipro_standard/pages/plannedDistribution/plannedDistribution.vue
@@ -1,14 +1,21 @@
<template>
<view class="content">
<view class="content_search">
- <Search @searchInput="searchInput" @submit="submit" @reset="reset" placeholder="鎼滅储鐗╂枡鍚嶇О/缂栫爜"></Search>
- <view class="content_search_x"></view>
+ <Search @searchInput="searchInput" placeholder="鎼滅储鐗╂枡鍚嶇О/缂栫爜"></Search>
+ <view class="content_search_x" v-if="tagList.length > 0"></view>
<LabelSelection :TagList="tagList" :isShow="true" @change="clickTag" />
</view>
- <view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
+ <view class="content_total" :style="{top: top}">鍏眥{search.total}}鏉℃暟鎹�</view>
<view class="content_list">
- <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
- <view class="fp_list_item" v-for="(item, i) in lists" :key="item.id" @click="clickItem(i)">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
+ <view class="fp_list_item" v-for="(item, i) in list" :key="item.id" @click="clickItem(i)">
<view class="fp_list_item_header">
<u-checkbox :checked="item.isActive"></u-checkbox>
<text v-if="item.mmodel">{{item.mmodel.name}}</text>
@@ -44,7 +51,7 @@
</view>
<view class="fp_zw"></view>
<view class="fp_footer">
- <view class="fp_footer_button" @click="submit">鍒嗛厤(1)</view>
+ <view class="fp_footer_button" @click="submit">鍒嗛厤</view>
</view>
</view>
</template>
@@ -52,158 +59,27 @@
<script>
import Search from '@/components/Search.vue'
import LabelSelection from '@/components/LabelSelection.vue'
+ import { getList, getSelfList } from '@/util/api/PlanningAPI'
export default {
components: { Search, LabelSelection },
data() {
return {
height: '',
top: '',
- listData: {
+ isLoading: false,
+ search: {
+ gxId: '',
capacity: 10,
page: 0,
total: 0,
- startDate: '',
- endDate: '',
- procedureIds: [],
- departIds: '',
mixParam: '',
- cateIds: []
+ first: true // 鐢ㄤ簬鍒ゆ柇鏄惁鏄涓�娆¤繘鍏ラ〉闈�
},
- tagList: [
- {
- id: '',
- name: '娉ㄥ皠',
- num: '0'
- },
- {
- id: '0',
- name: '鐑х粨',
- num: '0'
- },
- {
- id: '1,4',
- name: '鐒婃帴',
- num: '0'
- }
- ],
- data: [], // 宸ュ簭鏁版嵁
- factoryList: [],
- finished: true,
+ tagList: [],
+ finished: false,
loading: false,
refreshing: false,
- timeShow: false,
- lists: [
- {
- id: 1,
- status: 0,
- urgent: 1,
- num: 100,
- isActive: false,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 2,
- status: 0,
- urgent: 1,
- num: 100,
- isActive: false,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 3,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- isActive: false,
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 4,
- status: 0,
- urgent: 1,
- num: 100,
- isActive: false,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 5,
- status: 0,
- urgent: 1,
- num: 100,
- isActive: false,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- }
- ]
+ list: []
};
},
onReady() {
@@ -215,192 +91,129 @@
}).exec()
})
},
+ onLoad() {
+ this.getLists()
+ },
methods: {
+ // 涓嬫媺鍒锋柊
+ onRefresh() {
+ if (this.isLoading) return
+ this.isLoading = true
+ this.search.page = 0
+ this.list = []
+ this.finished = false
+ this.getLists()
+ },
// 鐐瑰嚮褰撳墠椤�
clickItem(i) {
- this.lists.forEach((item, index) => {
+ this.list.forEach((item, index) => {
item.isActive = i === index;
})
},
- // 璺宠浆
- jump(item) {
- uni.navigateTo({
- url: `/pages/planDetails/planDetails?id=${item.id}`
- })
- },
- // 鑾峰彇澶撮儴缁勪欢楂樺害
- getHeight(height) {
- this.height = height
- },
- // 閲嶇疆
- reset() {
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.listData.mixParam = ''
- this.listData.startDate = ''
- this.listData.endDate = ''
- this.listData.procedureIds = []
- if (this.factoryList.length > 0) {
- this.listData.departIds = this.factoryList[0].id
- }
- if (this.data.length > 0) {
- this.data.forEach(item => { item.isActive = false })
- }
- // this.getLists()
- // this.pageCounts()
- },
- // 鏃ユ湡纭畾
- timeConfirm(val) {
- this.listData.startDate = val[0]
- this.listData.endDate = val[val.length - 1]
- this.timeShow = false
- },
- // 鍒囨崲宸ュ巶
- changeTags(i, id) {
- this.listData.departIds = id
- this.getWorkingProcedures(id)
- this.factoryList.forEach((item, index) => {
- if (index === i) {
- item.isActive = true
- } else {
- item.isActive = false
- }
- })
- },
- // 鎵撳紑鏃ユ湡鎻掍欢
- openDate() {
- this.timeShow = true
- },
// 鎼滅储
- searchInput(val) {
- this.listData.mixParam = val
- this.listData.page = 0
+ searchInput(e) {
+ this.search.mixParam = e
+ this.search.page = 0
+ this.list = []
this.finished = false
- this.lists = []
this.getLists()
},
- // 鐐瑰嚮鏍囩鎼滅储
- clickTag(ids) {
- this.listData.cateIds = ids
- this.listData.page = 0
+ // 鐐瑰嚮
+ clickTag(id) {
+ this.search.gxId = id
+ this.list = []
+ this.search.page = 0
this.finished = false
- this.lists = []
- // this.getLists()
+ this.getLists()
},
- // 鑾峰彇鍒楄〃缁熻
- pageCounts() {
- pageCount({
- factoryId: this.listData.departIds,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- statusList: this.listData.cateIds
- }).then(res => {
- if (res.code === 200 && res.data) {
- this.tagList[0].num = res.data.allNum.toString()
- this.tagList[1].num = res.data.startNum.toString()
- this.tagList[2].num = res.data.ingNum.toString()
- this.tagList[3].num = res.data.endNum.toString()
- }
- })
- },
- // 鑾峰彇宸ュ巶鏁版嵁
- getOrganizations() {
- getOrganization({
- type: 1
- }).then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = i === 0;
- })
- if (res.data.length > 0) {
- this.factoryList = res.data
- this.listData.departIds = this.factoryList[0].id
- this.listData.procedureIds = ''
- this.finished = false
- this.getWorkingProcedures(this.factoryList[0].id)
- this.getLists()
- this.pageCounts()
- }
- }
- })
- },
- // 鑾峰彇宸ュ簭鏁版嵁
- getWorkingProcedures(orgId) {
- this.data = []
- getWorkingProcedure({ orgId })
- .then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = false;
- })
- this.data = res.data
- }
- })
- },
+ // 鍒嗛厤
submit() {
let data;
- this.lists.forEach(item => {
+ this.list.forEach((item) => {
if (item.isActive) {
data = item
}
})
if (!data) {
- uni.showToast({ title: '鑷冲皯閫夋嫨涓�椤硅鍒掞紒', duration: 2000 });
+ uni.showToast({ title: '鑷冲皯閫夋嫨涓�椤硅鍒掞紒', icon: 'none', duration: 2000 });
return
}
uni.navigateTo({
url: `/pages/allocation/allocation?gxid=${data.procedureId}&jhid=${data.id}&num=${data.workorderDistributNum ? data.num - data.workorderDistributNum : data.num}`
- })
+ });
+ },
+ // 鑾峰彇褰撳墠鐢ㄦ埛鎵�鍒嗛厤鐨勫伐搴�
+ async getWorkingProcedures() {
+ let res = await getSelfList({})
+ if (res.code === 200 && res.data.length > 0) {
+ let arr = []
+ res.data.forEach((item) => {
+ arr.push({ name: item.name, id: item.id })
+ })
+ this.search.gxId = arr[0].id
+ this.tagList = arr
+ return true
+ }
+ return false
},
// 鑾峰彇璁″垝鍒楄〃鏁版嵁
- getLists() {
- console.log('getLists')
+ async getLists() {
if (!this.finished) {
this.loading = true
- this.listData.page = this.listData.page++
- getList({
- capacity: this.listData.capacity,
- model: {
- mixParam: this.listData.mixParam,
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- factoryId: this.listData.departIds,
- statusList: this.listData.cateIds
- },
- page: this.listData.page,
- sorts: [
- {
- direction: 'ASC',
- property: 'publishDate'
+ this.search.page = this.search.page += 1
+ if (this.search.first) { // 濡傛灉鏄涓�娆★紝鍏堣姹傚伐搴�
+ await this.getWorkingProcedures()
+ let res = await getList({
+ capacity: this.search.capacity,
+ page: this.search.page,
+ model: {
+ mixParam: this.search.mixParam,
+ procedureId: this.search.gxId,
+ statusList: [1, 4]
}
- ]
- }).then(res => {
+ })
+ this.isLoading = false
this.loading = false
- this.listData.total = res.data.total
if (this.refreshing) {
- this.lists = []
+ this.list = []
this.refreshing = false;
}
if (res.code === 200 && res.data.records.length !== 0) {
- if (this.lists.length === 0) {
- this.lists = res.data.records
- } else {
- this.lists.push(...res.data.records)
- }
+ this.search.total = res.data.total
+ res.data.records.forEach((item) => {
+ item.isActive = false
+ })
+ this.list.push(...res.data.records)
} else {
- this.finished = true
+ this.finished = true;
}
- }).catch(err => {
- this.loading = false
- this.finished = true
+ this.search.first = false
+ } else {
+ let res = await getList({
+ capacity: this.search.capacity,
+ page: this.search.page,
+ model: {
+ mixParam: this.search.mixParam,
+ procedureId: this.search.gxId,
+ statusList: [1, 4]
+ }
+ })
+ this.isLoading = false
if (this.refreshing) {
- this.lists = []
+ this.list = []
this.refreshing = false;
}
- })
+ this.loading = false
+ if (res.code === 200 && res.data.records.length !== 0) {
+ res.data.records.forEach((item) => {
+ item.isActive = false
+ })
+ this.list.push(...res.data.records)
+ this.search.total = res.data.total
+ } else {
+ this.finished = true;
+ }
+ }
}
}
}
@@ -583,7 +396,7 @@
z-index: 99;
}
.fp_zw {
- height: 150px;
+ height: calc(98rpx + env(safe-area-inset-bottom));
}
.fp_footer {
width: 100%;
diff --git a/minipro_standard/pages/plannedProgress/plannedProgress.vue b/minipro_standard/pages/plannedProgress/plannedProgress.vue
index a36f4a1..5b72386 100644
--- a/minipro_standard/pages/plannedProgress/plannedProgress.vue
+++ b/minipro_standard/pages/plannedProgress/plannedProgress.vue
@@ -34,7 +34,14 @@
</view>
<view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
<view class="content_list">
- <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
<view class="content_list_item" v-for="item in lists" :key="item.id" @click="jump(item)">
<view class="content_list_item_top">
<view class="content_list_item_top_left">
@@ -102,6 +109,9 @@
<script>
import Search from '@/components/Search.vue'
import LabelSelection from '@/components/LabelSelection.vue'
+ import { getList, pageCount } from '@/util/api/PlanningAPI'
+ import { getWorkingProcedure, getOrganization } from '@/util/api'
+ import { gsdate } from '@/util/utils.js'
export default {
components: { Search, LabelSelection },
data() {
@@ -117,7 +127,7 @@
procedureIds: [],
departIds: '',
mixParam: '',
- cateIds: []
+ cateIds: null
},
tagList: [
{
@@ -142,118 +152,13 @@
}
],
data: [], // 宸ュ簭鏁版嵁
- factoryList: [],
+ factoryList: [], // 宸ュ巶
finished: true,
loading: false,
refreshing: false,
timeShow: false,
- lists: [
- {
- id: 1,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 2,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 3,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 4,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 5,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- }
- ]
+ lists: [],
+ isLoading: false
};
},
onReady() {
@@ -265,7 +170,15 @@
}).exec()
})
},
+ onLoad() {
+ this.getLists()
+ this.getOrganizations()
+ },
methods: {
+ // 鍒囨崲宸ュ簭
+ changeTag(i) {
+ this.data[i].isActive = !this.data[i].isActive
+ },
// 璺宠浆
jump(item) {
uni.navigateTo({
@@ -275,6 +188,14 @@
// 鑾峰彇澶撮儴缁勪欢楂樺害
getHeight(height) {
this.height = height
+ },
+ // 涓嬫媺鍒锋柊
+ async onRefresh() {
+ if (this.isLoading) return;
+ this.isLoading = true;
+ await this.getLists()
+ await this.pageCounts()
+ this.isLoading = false;
},
// 閲嶇疆
reset() {
@@ -291,8 +212,8 @@
if (this.data.length > 0) {
this.data.forEach(item => { item.isActive = false })
}
- // this.getLists()
- // this.pageCounts()
+ this.getLists()
+ this.pageCounts()
},
// 鏃ユ湡纭畾
timeConfirm(val) {
@@ -330,7 +251,7 @@
this.listData.page = 0
this.finished = false
this.lists = []
- // this.getLists()
+ this.getLists()
},
// 鑾峰彇鍒楄〃缁熻
pageCounts() {
@@ -395,15 +316,14 @@
this.listData.page = 0
this.finished = false
this.lists = []
- // this.getLists()
- // this.pageCounts()
+ this.getLists()
+ this.pageCounts()
},
// 鑾峰彇璁″垝鍒楄〃鏁版嵁
getLists() {
- console.log('getLists')
if (!this.finished) {
this.loading = true
- this.listData.page = this.listData.page++
+ this.listData.page = this.listData.page += 1
getList({
capacity: this.listData.capacity,
model: {
@@ -412,7 +332,7 @@
endDate: this.listData.endDate,
procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
factoryId: this.listData.departIds,
- statusList: this.listData.cateIds
+ statusList: this.listData.cateIds ? this.listData.cateIds.split(',') : []
},
page: this.listData.page,
sorts: [
diff --git a/minipro_standard/pages/workbench/workbench.vue b/minipro_standard/pages/workbench/workbench.vue
index fa678a3..22d9e44 100644
--- a/minipro_standard/pages/workbench/workbench.vue
+++ b/minipro_standard/pages/workbench/workbench.vue
@@ -31,68 +31,18 @@
computed: mapState([
'Menu'
]),
- onReady() {
- console.log(this.Menu)
- },
data() {
return {
- list: [
- {
- icon: require('@/static/logo@2x.png'),
- label: '娴嬭瘯'
- },
- {
- icon: require('@/static/logo@2x.png'),
- label: '娴嬭瘯'
- },
- {
- icon: require('@/static/logo@2x.png'),
- label: '娴嬭瘯'
- },
- {
- icon: require('@/static/logo@2x.png'),
- label: '娴嬭瘯'
- },
- {
- icon: require('@/static/logo@2x.png'),
- label: '娴嬭瘯'
- },
- {
- icon: require('@/static/logo@2x.png'),
- label: '娴嬭瘯'
- }
- ]
+
};
},
onLoad() {
uni.hideTabBar()
- // uni.login({
- // success: data => {
- // this.wxLogin(data.code)
- // },
- // fail: err => {
- // uni.$u.toast(err)
- // }
- // })
},
methods: {
-
- // wxLogin(code) {
- // wxEmpower({code})
- // .then(res => {
- // this.openId = res.openid
- // if (res.userInfo) {
- // this.$store.commit('SETTOKEN', res.userInfo.token)
- // this.$store.commit('SETUSERINFO', res.userInfo)
- // uni.navigateTo({
- // url:'/pages/projectList/projectList'
- // })
- // }
- // })
- // .catch(err => {
- // uni.$u.toast(err)
- // })
- // }
+ jump(row) {
+ console.log(row)
+ }
}
}
</script>
diff --git a/minipro_standard/pages_adjust/components/Warehouse.vue b/minipro_standard/pages_adjust/components/Warehouse.vue
index 9911c53..f957f10 100644
--- a/minipro_standard/pages_adjust/components/Warehouse.vue
+++ b/minipro_standard/pages_adjust/components/Warehouse.vue
@@ -5,57 +5,106 @@
</view>
<view class="content">
<view class="content_search">
- <u-search :showAction="false" placeholder="璇疯緭鍏ヤ粨搴撳悕绉�" v-model="keyword"></u-search>
+ <u-search :showAction="false" placeholder="璇疯緭鍏ヤ粨搴撳悕绉�" v-model="form.name" @search="searchInput"></u-search>
</view>
- <div class="content_total">鍏眥{total}}鏉℃暟鎹�</div>
- <view class="content_list">
- <u-list @scrolltolower="scrolltolower">
- <u-list-item v-for="(item, index) in indexList" :key="index">
- <div class="content_list_item" @click="getVal(item)">
+ <div class="content_total">鍏眥{form.total}}鏉℃暟鎹�</div>
+ <scroll-view
+ class="content_list"
+ @scrolltolower="getList"
+ scroll-y>
+ <!-- <u-list @scrolltolower="scrolltolower"> -->
+ <!-- <u-list-item > -->
+ <div class="content_list_item"v-for="(item, index) in list" :key="index" @click="getVal(item)">
<div class="content_list_item_name">
- <span style="color: #03AF76;">[DTFHNE]</span>
- <!-- <span style="color: #03AF76;" v-if="item.tmodel.label == 'APPLIANCE_ONTEST'">[{{ item.tmodel.code }}]</span>
+ <span style="color: #03AF76;" v-if="item.tmodel.label == 'APPLIANCE_ONTEST'">[{{ item.tmodel.code }}]</span>
<span style="color: #305ED5;" v-if="item.tmodel.label == 'APPLIANCE_MIX'">[{{ item.tmodel.code }}]</span>
- <span style="color: #F5A400;" v-if="item.tmodel.label == 'APPLIANCE_OFFTEST'">[{{ item.tmodel.code }}]</span> -->
- <!-- <span style="color: red;" v-if="item.tmodel.label == 'APPLIANCE_USELESS'">[{{ item.tmodel.code }}]</span> -->
+ <span style="color: #F5A400;" v-if="item.tmodel.label == 'APPLIANCE_OFFTEST'">[{{ item.tmodel.code }}]</span>
+ <span style="color: red;" v-if="item.tmodel.label == 'APPLIANCE_USELESS'">[{{ item.tmodel.code }}]</span>
<span>{{item.name}}</span>
</div>
</div>
- </u-list-item>
- </u-list>
- </view>
+ <!-- </u-list-item>
+ </u-list> -->
+ </scroll-view>
</view>
</u-popup>
</template>
<script>
+ import { warehouseList } from '@/util/api/WorkOrderAPI'
+
export default {
props: {
- show: Boolean
+ show: Boolean,
+ systemDicDataId: {
+ type: String,
+ default: ''
+ }
},
data() {
return {
- keyword: '',
- total: 0,
- indexList: []
+ form: {
+ capacity: 50,
+ page: 0,
+ total: 0,
+ name: '',
+ },
+ list: [],
+ loading: false,
+ finished: false,
+ refreshing: false
};
},
methods: {
+ searchInput() {
+ this.form.page = 0
+ this.finished = false
+ this.list = []
+ this.getList()
+ },
getVal(item) {
this.$emit('value', item)
},
open() {
- this.indexList = []
- this.loadmore()
+ this.form.page = 0
+ this.finished = false
+ this.list = []
+ this.getList()
},
scrolltolower() {
- this.loadmore()
+ this.getList()
},
- loadmore() {
- for (let i = 0; i < 20; i++) {
- this.indexList.push({
- id: i,
- name: `浠撳簱${i}`
+ getList() {
+ if (!this.finished) {
+ this.loading = true;
+ this.form.page = this.form.page += 1
+ warehouseList({
+ capacity: this.form.capacity,
+ page: this.form.page,
+ model: {
+ systemDicDataId: this.systemDicDataId,
+ name: this.form.name,
+ status: 1
+ }
+ }).then(res => {
+ if (this.refreshing) {
+ this.list = []
+ this.refreshing = false;
+ }
+ this.loading = false;
+ if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
+ this.form.total = res.data.total
+ this.list.push(...res.data.records)
+ } else {
+ this.finished = true;
+ }
+ }).catch(err => {
+ this.loading = false;
+ this.finished = true;
+ if (this.refreshing) {
+ this.list = []
+ this.refreshing = false;
+ }
})
}
},
diff --git a/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue b/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
index 83ffa40..692c60e 100644
--- a/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
+++ b/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
@@ -25,7 +25,14 @@
</view>
<view class="content_total" :style="{top: top}">鍏眥{controlData.total}}鏉℃暟鎹�</view>
<view class="content_list">
- <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
<view class="content_list_item" v-for="(item, i) in list" :key="i">
<view class="content_list_item_top">
<view class="content_list_item_top_left">
@@ -36,11 +43,11 @@
</view>
</view>
<view class="content_list_item_sx">
- <text v-if="item.qualityType == 0" class="green">鍚堟牸 | </text>
- <text v-if="item.qualityType == 1" class="yellow">涓嶈壇 | </text>
- <text v-if="item.qualityType == 2" class="red">鎶ュ簾 | </text>
- <text>{{ item.procedureName ? item.procedureName : '-' }} | </text>
- <text>{{ item.batch ? item.batch : '-' }}</text>
+ <text v-if="item.qualityType == 0" class="green">鍚堟牸 | </text>
+ <text v-if="item.qualityType == 1" class="yellow">涓嶈壇 | </text>
+ <text v-if="item.qualityType == 2" class="red">鎶ュ簾 | </text>
+ <text> {{ item.procedureName ? item.procedureName : '-' }} |</text>
+ <text> {{ item.batch ? item.batch : '-' }}</text>
</view>
<!-- item涓婚淇℃伅閮ㄥ垎 -->
<view class="content_list_item_content">
@@ -71,7 +78,8 @@
<script>
import Search from '@/components/Search.vue'
- import { orderTyepToStr } from '@/util/constData.js'
+ import { getwStockExtList } from "@/util/api/materialStorage"
+
export default {
components: {
Search
@@ -80,6 +88,7 @@
return {
height: '',
top: '',
+ isLoading: false,
controlData: {
finished: false,
loading: false,
@@ -96,7 +105,8 @@
materialName: '',
groupType: '3'
},
- list: []
+ list: [],
+ refreshing: false
};
},
onReady() {
@@ -108,20 +118,28 @@
}).exec()
})
},
+ onLoad() {
+ this.getLists()
+ },
methods: {
+ onRefresh() {
+ this.isLoading = true
+ this.controlData.page = 0;
+ this.controlData.finished = false;
+ this.list = [];
+ this.getLists()
+ },
changeGroup(i) {
this.groupTypes[i].isActive = !this.groupTypes[i].isActive;
this.data.groupType = this.groupTypes[i].id
for (const index in this.groupTypes) {
if (index != i) {
- // console.log(index, i)
const item = this.groupTypes[index]
item.isActive = false
}
}
},
tyepToStr(type) {
- // <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
for (const item of this.orderType) {
if (item.id == type) {
return item.name
@@ -135,182 +153,87 @@
url: `/pages/planDetails/planDetails?id=${item.id}`
})
},
+ // 鑾峰彇璁″垝鍒楄〃鏁版嵁
+ getLists() {
+ if (!this.controlData.finished) {
+ this.controlData.loading = true;
+ this.controlData.page = this.controlData.page += 1;
+ getwStockExtList({
+ capacity: this.controlData.capacity,
+ model: {
+ materialOrBatch: this.data.materialName,
+ groupType: this.data.groupType,
+ greaterZero: 1
+ },
+ page: this.controlData.page,
+ sorts: [
+ {
+ direction: "ASC",
+ property: "publishDate",
+ }
+ ]
+ }).then((res) => {
+ this.isLoading = false
+ if (this.refreshing) {
+ this.list = []
+ this.refreshing = false;
+ }
+ this.controlData.loading = false;
+ this.controlData.total = res.data.total;
+ if (res.code === 200) {
+ if (res.data.records.length < this.controlData.capacity) {
+ this.controlData.finished = true;
+ }
+ if (this.controlData.page === 1) {
+ this.list = res.data.records;
+ } else {
+ this.list.push(...res.data.records)
+ }
+ }
+ })
+ .catch((err) => {
+ this.isLoading = false
+ this.controlData.loading = false;
+ this.controlData.finished = true;
+ if (this.refreshing) {
+ this.list = []
+ this.refreshing = false;
+ }
+ })
+ } else {
+ this.isLoading = false
+ }
+ },
// 鑾峰彇澶撮儴缁勪欢楂樺害
getHeight(height) {
this.height = height
},
// 閲嶇疆
reset() {
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.listData.mixParam = ''
- this.listData.startDate = ''
- this.listData.endDate = ''
- this.listData.procedureIds = []
- if (this.factoryList.length > 0) {
- this.listData.departIds = this.factoryList[0].id
- }
- if (this.data.length > 0) {
- this.data.forEach(item => {
- item.isActive = false
- })
- }
- // this.getLists()
- // this.pageCounts()
- },
- // 鏃ユ湡纭畾
- timeConfirm(val) {
- this.listData.startDate = val[0]
- this.listData.endDate = val[val.length - 1]
- this.timeShow = false
- },
- // 鍒囨崲宸ュ巶
- changeTags(i, id) {
- this.listData.departIds = id
- this.getWorkingProcedures(id)
- this.factoryList.forEach((item, index) => {
- if (index === i) {
- item.isActive = true
- } else {
- item.isActive = false
- }
+ this.controlData.page = 0;
+ this.data.groupType = '3'
+ this.controlData.finished = false;
+ this.groupTypes.forEach((item, index) => {
+ item.isActive = index === 0;
})
- },
- // 鎵撳紑鏃ユ湡鎻掍欢
- openDate() {
- this.timeShow = true
+ this.data.materialName = ''
+ this.list = [];
+ this.getLists();
},
// 鎼滅储
searchInput(val) {
- this.listData.mixParam = val
- this.listData.page = 0
- this.finished = false
- this.lists = []
+ this.data.materialName = val;
+ this.controlData.page = 0;
+ this.controlData.finished = false;
+ this.list = [];
this.getLists()
- },
- // 鐐瑰嚮鏍囩鎼滅储
- clickTag(ids) {
- this.listData.cateIds = ids
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- },
- // 鑾峰彇鍒楄〃缁熻
- pageCounts() {
- pageCount({
- factoryId: this.listData.departIds,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- statusList: this.listData.cateIds
- }).then(res => {
- if (res.code === 200 && res.data) {
- this.tagList[0].num = res.data.allNum.toString()
- this.tagList[1].num = res.data.startNum.toString()
- this.tagList[2].num = res.data.ingNum.toString()
- this.tagList[3].num = res.data.endNum.toString()
- }
- })
- },
- // 鑾峰彇宸ュ巶鏁版嵁
- getOrganizations() {
- getOrganization({
- type: 1
- }).then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = i === 0;
- })
- if (res.data.length > 0) {
- this.factoryList = res.data
- this.listData.departIds = this.factoryList[0].id
- this.listData.procedureIds = ''
- this.finished = false
- this.getWorkingProcedures(this.factoryList[0].id)
- this.getLists()
- this.pageCounts()
- }
- }
- })
- },
- // 鑾峰彇宸ュ簭鏁版嵁
- getWorkingProcedures(orgId) {
- this.data = []
- getWorkingProcedure({
- orgId
- })
- .then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = false;
- })
- this.data = res.data
- }
- })
},
// 鎼滅储寮规鎻愪氦
submit() {
- let pmodelOrgId = []
- this.data.forEach((item) => {
- if (item.isActive) {
- pmodelOrgId.push(item.id)
- }
- })
- this.listData.procedureIds = pmodelOrgId
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- // this.pageCounts()
- },
- // 鑾峰彇璁″垝鍒楄〃鏁版嵁
- getLists() {
- console.log('getLists')
- if (!this.finished) {
- this.loading = true
- this.listData.page = this.listData.page++
- getList({
- capacity: this.listData.capacity,
- model: {
- mixParam: this.listData.mixParam,
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- factoryId: this.listData.departIds,
- statusList: this.listData.cateIds
- },
- page: this.listData.page,
- sorts: [{
- direction: 'ASC',
- property: 'publishDate'
- }]
- }).then(res => {
- this.loading = false
- this.listData.total = res.data.total
- if (this.refreshing) {
- this.lists = []
- this.refreshing = false;
- }
- if (res.code === 200 && res.data.records.length !== 0) {
- if (this.lists.length === 0) {
- this.lists = res.data.records
- } else {
- this.lists.push(...res.data.records)
- }
- } else {
- this.finished = true
- }
- }).catch(err => {
- this.loading = false
- this.finished = true
- if (this.refreshing) {
- this.lists = []
- this.refreshing = false;
- }
- })
- }
+ this.controlData.page = 0;
+ this.controlData.finished = false;
+ this.list = [];
+ this.getLists();
}
}
}
diff --git a/minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue b/minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue
index 8899d5c..413f853 100644
--- a/minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue
+++ b/minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue
@@ -74,6 +74,8 @@
import { documentType } from '@/util/constData.js'
import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
import Warehouse from '../../components/Warehouse.vue'
+ import { createZK } from '@/util/api/agencyAPI'
+
export default {
components: {
SelectMultipleMaterial,
@@ -127,15 +129,15 @@
getValue(val) {
if (this.view.status === 'c') {
this.data.exWarehouse = val.name
- this.data.exWarehouseId = val.id || 1
- this.data.outUserId = val.managerId || 3
+ this.data.exWarehouseId = val.id
+ this.data.outUserId = val.managerId
} else if (this.view.status === 'r') {
this.data.warehousingWarehouseName = val.name
- this.data.warehousingWarehouse = val.id || 2
- this.data.inUserId = val.managerId || 4
+ this.data.warehousingWarehouse = val.id
+ this.data.inUserId = val.managerId
this.view.warehouseQualityType = val.tmodel.label
}
- view.Warehouse = false
+ this.view.Warehouse = false
},
// 纭鍗曟嵁绫诲瀷
onConfirm(val) {
diff --git a/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue b/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
index 100f272..8689680 100644
--- a/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
+++ b/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
@@ -16,7 +16,7 @@
<view style="margin-top: 0 " class="content_list_item_content_item">
<view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
<view class="content_list_item_content_item_nr" v-if="data.billType">
- {{ orderTyepToStr(data.billType) }}
+ {{ seeText(data.billType) }}
</view>
</view>
<view class="content_list_item_content_item">
@@ -114,24 +114,88 @@
</template>
<script>
- import { orderTyepToStr } from '@/util/constData.js'
-
+ import {
+ orderTyepToStr
+ } from '@/util/constData.js'
+ import {
+ getBoundDetail,
+ cancelBound
+ } from '@/util/api/materialStorage'
+
export default {
data() {
return {
- data: {},
- types: [
- { name: '鍏ㄩ儴', id: '', isActive: true },
- { name: '閲囪喘璁㈠崟', id: '0', isActive: false },
- { name: '鐢熶骇宸ュ崟', id: '1', isActive: false },
- { name: '閿�鍞鍗�', id: '2', isActive: false },
- { name: '杞簱鍗�', id: '3', isActive: false },
- { name: '鐩樼偣鍗�', id: '4', isActive: false },
+ id: null,
+ data: {
+ code: "",
+ createName: "",
+ planDate: "",
+ dealDate: "",
+ status: 0,
+ originType: 0,
+ originCode: "",
+ updateName: "",
+ updateMobile: "",
+ updateTime: "",
+ warehouseName: "",
+ warehouseCode: "",
+ outPlandate: "",
+ inPlandate: "",
+ woutboundDetailsWait: [],
+ woutboundDetailsOut: []
+ },
+ types: [{
+ name: '鍏ㄩ儴',
+ id: '',
+ isActive: true
+ },
+ {
+ name: '閲囪喘璁㈠崟',
+ id: '0',
+ isActive: false
+ },
+ {
+ name: '鐢熶骇宸ュ崟',
+ id: '1',
+ isActive: false
+ },
+ {
+ name: '閿�鍞鍗�',
+ id: '2',
+ isActive: false
+ },
+ {
+ name: '杞簱鍗�',
+ id: '3',
+ isActive: false
+ },
+ {
+ name: '鐩樼偣鍗�',
+ id: '4',
+ isActive: false
+ },
],
materailArray: []
};
},
+ onLoad(option) {
+ this.id = option.id
+ getBoundDetail({
+ id: option.id
+ })
+ .then(res => {
+ this.data = res.data
+ if (this.data.status === 1) {
+ this.materailArray.push(...this.data.woutboundDetailsOut)
+ } else {
+ this.materailArray.push(...this.data.woutboundDetailsWait)
+ }
+ })
+ },
methods: {
+ seeText(id) {
+ return orderTyepToStr(id)
+ },
tyepToStr(type) {
// <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
for (const item of this.types) {
@@ -142,10 +206,17 @@
return '-'
},
submit() {
-
+
},
cancel() {
-
+ cancelBound({ id: this.id })
+ .then(res => {
+ uni.showToast({ title: '鍙栨秷鎴愬姛', icon: 'success', duration: 2000 });
+ uni.navigateBack({ delta: 1 });
+ })
+ .catch(err => {
+ uni.showToast({ title: err.message, icon: 'error', duration: 2000 });
+ })
}
}
}
diff --git a/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue b/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
index 5aeff0b..dea0345 100644
--- a/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
+++ b/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
@@ -1,17 +1,18 @@
<template>
<view class="content">
<view class="content_search">
- <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
- placeholder="鎼滅储鍑哄簱鍗曞彿/鍑哄簱浠撳簱">
+ <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true" placeholder="鎼滅储鍑哄簱鍗曞彿/鍑哄簱浠撳簱">
<template v-slot:content>
<view class="Search_item">
<view class="Search_item_label">璁″垝鏃ユ湡</view>
<view class="Search_item_content" @click="openDate">
- <view class="Search_item_content_a" :style="listData.startDate ? 'color: #000' : ''">
- {{ listData.startDate ? listData.startDate : '寮�濮嬫棩鏈�'}}</view>
+ <view class="Search_item_content_a" :style="listData.planDateStart ? 'color: #000' : ''">
+ {{ listData.planDateStart ? listData.planDateStart : '寮�濮嬫棩鏈�'}}
+ </view>
<text>-</text>
- <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">
- {{ listData.endDate ? listData.endDate : '缁撴潫鏃ユ湡'}}</view>
+ <view class="Search_item_content_a" :style="listData.planDateEnd ? 'color: #000' : ''">
+ {{ listData.planDateEnd ? listData.planDateEnd : '缁撴潫鏃ユ湡'}}
+ </view>
</view>
</view>
<view class="Search_item">
@@ -19,7 +20,7 @@
<view class="Search_item_content">
<view class="tag">
<view class="tag_item" :class="{'tag_active': item.isActive}" v-for="(item, i) in types"
- :key="item.id" @click="changeTags(i)">{{item.name}}</view>
+ :key="item.id" @click="changeTags(i)">{{item.name}}</view>
</view>
</view>
</view>
@@ -30,7 +31,14 @@
</view>
<view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
<view class="content_list">
- <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
<view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
<!-- item澶撮儴瑙嗗浘 -->
<view class="content_list_item_top">
@@ -49,7 +57,8 @@
<view class="content_list_item_content_item">
<view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
<view class="content_list_item_content_item_nr">
- {{ orderTyepToStr(item.billType) }}
+ <!-- orderTyepToStr(item.billType) -->
+ {{ seeText(item.billType) }}
</view>
</view>
<view class="content_list_item_content_item">
@@ -81,14 +90,21 @@
</scroll-view>
</view>
<!-- 閫夋嫨鏃ユ湡 -->
- <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
+ <u-calendar mode="range" :show="timeShow" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
+ @confirm="timeConfirm"></u-calendar>
</view>
</template>
<script>
import Search from '@/components/Search.vue'
import LabelSelection from '@/components/LabelSelection.vue'
- import { orderTyepToStr } from '@/util/constData.js'
+ import {
+ orderTyepToStr
+ } from '@/util/constData.js'
+ import {
+ getBoundList,
+ pageCount
+ } from "@/util/api/materialStorage"
export default {
components: {
Search,
@@ -98,6 +114,8 @@
return {
height: '',
top: '',
+ minDate: new Date('2021-01-31'),
+ maxDate: new Date(),
listData: {
capacity: 10,
page: 0,
@@ -106,60 +124,157 @@
planDateStart: "",
code: "",
originType: "",
- status: ""
+ status: "",
},
- types: [
- { name: '杞﹂棿棰嗘枡', id: '1', isActive: false },
- { name: '鏈哄彴澶囨枡', id: '2', isActive: false },
- { name: '杞﹂棿杞簱', id: '3', isActive: false },
- { name: '瀹屽伐鍏ュ簱', id: '4', isActive: false },
- { name: '璁″垝棰嗘枡', id: '5', isActive: false },
- { name: '澶栧崗棰嗘枡', id: '6', isActive: false },
- { name: '澶栧崗瀹屽伐杞簱', id: '7', isActive: false },
- { name: '浜у搧鍏ュ簱', id: '8', isActive: false },
- { name: '浜у搧杞簱', id: '9', isActive: false },
- { name: '璁╂鏀捐鍏ュ簱', id: '10', isActive: false },
- { name: '璁╂鏀捐杞簱', id: '11', isActive: false },
- { name: '瀹㈣繑杩斾慨棰嗘枡', id: '12', isActive: false },
- { name: '瀹㈣繑杩斾慨鍏ュ簱', id: '13', isActive: false },
- { name: '璺ㄧ粍缁囪浆搴�', id: '14', isActive: false },
- { name: '宸ュ簭鎶ュ簾', id: '15', isActive: false },
- { name: '瀹㈤��杩斾慨棰嗘枡', id: '16', isActive: false },
- { name: '瀹㈤��杩斾慨鍏ュ簱', id: '17', isActive: false },
- { name: '閿�鍞嚭搴�', id: '18', isActive: false },
- { name: '璁╂閿�鍞�', id: '19', isActive: false },
- { name: '宸ュ崟鎶曟枡', id: '20', isActive: false },
- { name: '浠撳簱鎶ュ簾', id: '21', isActive: false },
- { name: '瀹㈤��妫�楠岄鏂�', id: '22', isActive: false },
- { name: '瀹㈣繑妫�楠岄鏂�', id: '23', isActive: false },
- { name: '搴撳瓨璋冩暣', id: '28', isActive: false },
- { name: '搴熷搧鍏ュ簱', id: '30', isActive: false }
- ],
- tagList: [
- {
- id: "",
- name: "鍏ㄩ儴",
- num: '0',
+ types: [{
+ name: '杞﹂棿棰嗘枡',
+ id: '1',
+ isActive: false
},
{
- id: "0",
- name: "寰呭嚭搴�",
- num: '0',
+ name: '鏈哄彴澶囨枡',
+ id: '2',
+ isActive: false
},
{
- id: "1",
- name: "宸插嚭搴�",
- num: "0",
+ name: '杞﹂棿杞簱',
+ id: '3',
+ isActive: false
},
{
- id: "2",
- name: "宸插彇娑�",
- num: "0",
+ name: '瀹屽伐鍏ュ簱',
+ id: '4',
+ isActive: false
+ },
+ {
+ name: '璁″垝棰嗘枡',
+ id: '5',
+ isActive: false
+ },
+ {
+ name: '澶栧崗棰嗘枡',
+ id: '6',
+ isActive: false
+ },
+ {
+ name: '澶栧崗瀹屽伐杞簱',
+ id: '7',
+ isActive: false
+ },
+ {
+ name: '浜у搧鍏ュ簱',
+ id: '8',
+ isActive: false
+ },
+ {
+ name: '浜у搧杞簱',
+ id: '9',
+ isActive: false
+ },
+ {
+ name: '璁╂鏀捐鍏ュ簱',
+ id: '10',
+ isActive: false
+ },
+ {
+ name: '璁╂鏀捐杞簱',
+ id: '11',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑杩斾慨棰嗘枡',
+ id: '12',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑杩斾慨鍏ュ簱',
+ id: '13',
+ isActive: false
+ },
+ {
+ name: '璺ㄧ粍缁囪浆搴�',
+ id: '14',
+ isActive: false
+ },
+ {
+ name: '宸ュ簭鎶ュ簾',
+ id: '15',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��杩斾慨棰嗘枡',
+ id: '16',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��杩斾慨鍏ュ簱',
+ id: '17',
+ isActive: false
+ },
+ {
+ name: '閿�鍞嚭搴�',
+ id: '18',
+ isActive: false
+ },
+ {
+ name: '璁╂閿�鍞�',
+ id: '19',
+ isActive: false
+ },
+ {
+ name: '宸ュ崟鎶曟枡',
+ id: '20',
+ isActive: false
+ },
+ {
+ name: '浠撳簱鎶ュ簾',
+ id: '21',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��妫�楠岄鏂�',
+ id: '22',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑妫�楠岄鏂�',
+ id: '23',
+ isActive: false
+ },
+ {
+ name: '搴撳瓨璋冩暣',
+ id: '28',
+ isActive: false
+ },
+ {
+ name: '搴熷搧鍏ュ簱',
+ id: '30',
+ isActive: false
}
],
- data: [], // 宸ュ簭鏁版嵁
- factoryList: [],
- finished: true,
+ tagList: [{
+ id: "",
+ name: "鍏ㄩ儴",
+ num: '0',
+ },
+ {
+ id: "0",
+ name: "寰呭嚭搴�",
+ num: '0',
+ },
+ {
+ id: "1",
+ name: "宸插嚭搴�",
+ num: "0",
+ },
+ {
+ id: "2",
+ name: "宸插彇娑�",
+ num: "0",
+ }
+ ],
+ finished: false,
+ isLoading: false,
loading: false,
refreshing: false,
timeShow: false,
@@ -175,20 +290,53 @@
}).exec()
})
},
+ onLoad() {
+ this.getLists()
+ this.getPageCount()
+ this.listData.page = 0
+ },
methods: {
+ onRefresh() {
+ this.isLoading = true
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getPageCount()
+ },
+ seeText(id) {
+ return orderTyepToStr(id)
+ },
+ // 缁熻鏁版嵁
+ getPageCount() {
+ pageCount({
+ type: 0,
+ codeOrHouse: this.listData.code,
+ planDateEnd: this.listData.planDateEnd,
+ planDateStart: this.listData.planDateStart,
+ billType: this.listData.originType
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.tagList[0].num = res.data.allNum.toString()
+ this.tagList[1].num = res.data.startNum.toString()
+ this.tagList[2].num = res.data.endNum.toString()
+ this.tagList[3].num = res.data.cancelNum.toString()
+ }
+ })
+ },
tyepToStr(type) {
- // <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
- for (const item of this.orderType) {
- if (item.id == type) {
- return item.name
+ for (const item of this.types) {
+ if (parseInt(item.id) === type) {
+ return item.name;
}
}
return '-'
},
- // 璺宠浆
+ // 璺宠浆璇︽儏
jump(item) {
uni.navigateTo({
- url: `/pages/planDetails/planDetails?id=${item.id}`
+ url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${item.id}`
})
},
// 鑾峰彇澶撮儴缁勪欢楂樺害
@@ -197,41 +345,35 @@
},
// 閲嶇疆
reset() {
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.listData.mixParam = ''
- this.listData.startDate = ''
- this.listData.endDate = ''
- this.listData.procedureIds = []
- if (this.factoryList.length > 0) {
- this.listData.departIds = this.factoryList[0].id
- }
- if (this.data.length > 0) {
- this.data.forEach(item => {
- item.isActive = false
- })
- }
- // this.getLists()
- // this.pageCounts()
+ this.listData.code = '';
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.listData.planDateEnd = ''
+ this.listData.planDateStart = ''
+ this.listData.originType = ''
+ this.types.forEach((item) => {
+ item.isActive = false
+ })
+ this.getLists();
+ this.getPageCount()
},
// 鏃ユ湡纭畾
timeConfirm(val) {
- this.listData.startDate = val[0]
- this.listData.endDate = val[val.length - 1]
+ this.listData.planDateEnd = val[val.length - 1]
+ this.listData.planDateStart = val[0]
this.timeShow = false
},
- // 鍒囨崲宸ュ巶
- changeTags(i, id) {
- this.listData.departIds = id
- this.getWorkingProcedures(id)
- this.factoryList.forEach((item, index) => {
- if (index === i) {
- item.isActive = true
- } else {
+ // 鍒囨崲宸ュ簭
+ changeTags(i) {
+ this.types[i].isActive = !this.types[i].isActive;
+ listData.originType = this.types[i].id
+ for (const index in this.types) {
+ if (index != i) {
+ const item = this.types[index]
item.isActive = false
}
- })
+ }
},
// 鎵撳紑鏃ユ湡鎻掍欢
openDate() {
@@ -239,133 +381,72 @@
},
// 鎼滅储
searchInput(val) {
- this.listData.mixParam = val
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.getLists()
+ this.listData.code = val;
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getPageCount()
},
// 鐐瑰嚮鏍囩鎼滅储
clickTag(ids) {
- this.listData.cateIds = ids
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- },
- // 鑾峰彇鍒楄〃缁熻
- pageCounts() {
- pageCount({
- factoryId: this.listData.departIds,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- statusList: this.listData.cateIds
- }).then(res => {
- if (res.code === 200 && res.data) {
- this.tagList[0].num = res.data.allNum.toString()
- this.tagList[1].num = res.data.startNum.toString()
- this.tagList[2].num = res.data.ingNum.toString()
- this.tagList[3].num = res.data.endNum.toString()
- }
- })
- },
- // 鑾峰彇宸ュ巶鏁版嵁
- getOrganizations() {
- getOrganization({
- type: 1
- }).then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = i === 0;
- })
- if (res.data.length > 0) {
- this.factoryList = res.data
- this.listData.departIds = this.factoryList[0].id
- this.listData.procedureIds = ''
- this.finished = false
- this.getWorkingProcedures(this.factoryList[0].id)
- this.getLists()
- this.pageCounts()
- }
- }
- })
- },
- // 鑾峰彇宸ュ簭鏁版嵁
- getWorkingProcedures(orgId) {
- this.data = []
- getWorkingProcedure({
- orgId
- })
- .then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = false;
- })
- this.data = res.data
- }
- })
+ this.listData.status = ids
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists()
},
// 鎼滅储寮规鎻愪氦
submit() {
- let pmodelOrgId = []
- this.data.forEach((item) => {
- if (item.isActive) {
- pmodelOrgId.push(item.id)
- }
- })
- this.listData.procedureIds = pmodelOrgId
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- // this.pageCounts()
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getPageCount()
},
// 鑾峰彇璁″垝鍒楄〃鏁版嵁
getLists() {
- console.log('getLists')
if (!this.finished) {
- this.loading = true
- this.listData.page = this.listData.page++
- getList({
+ this.loading = true;
+ this.listData.page = this.listData.page += 1;
+ getBoundList({
capacity: this.listData.capacity,
model: {
- mixParam: this.listData.mixParam,
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- factoryId: this.listData.departIds,
- statusList: this.listData.cateIds
+ type: 0,
+ codeOrHouse: this.listData.code,
+ planDateEnd: this.listData.planDateEnd,
+ planDateStart: this.listData.planDateStart,
+ status: this.listData.status,
+ billType: this.listData.originType
},
page: this.listData.page,
sorts: [{
- direction: 'ASC',
- property: 'publishDate'
- }]
- }).then(res => {
- this.loading = false
- this.listData.total = res.data.total
- if (this.refreshing) {
- this.lists = []
- this.refreshing = false;
- }
- if (res.code === 200 && res.data.records.length !== 0) {
- if (this.lists.length === 0) {
- this.lists = res.data.records
+ direction: "ASC",
+ property: "publishDate",
+ }, ],
+ }).then((res) => {
+ this.loading = false;
+ this.listData.total = res.data.total;
+ if (res.code === 200) {
+ if (this.listData.page === 1) {
+ this.lists = res.data.records;
} else {
- this.lists.push(...res.data.records)
+ if (this.lists.length === res.data.total) {
+ this.finished = true;
+ return
+ }
+ this.lists.push(...res.data.records);
}
- } else {
- this.finished = true
}
+ }).finally(() => {
+ this.loading = false;
+ this.isLoading = false
}).catch(err => {
- this.loading = false
- this.finished = true
- if (this.refreshing) {
- this.lists = []
- this.refreshing = false;
- }
+ this.finished = true;
+ this.loading = false;
})
+ } else {
+ this.isLoading = false
}
}
}
diff --git a/minipro_standard/pages_adjust/pages/transferList/transferList.vue b/minipro_standard/pages_adjust/pages/transferList/transferList.vue
index 411c87c..e2903f8 100644
--- a/minipro_standard/pages_adjust/pages/transferList/transferList.vue
+++ b/minipro_standard/pages_adjust/pages/transferList/transferList.vue
@@ -1,17 +1,18 @@
<template>
<view class="content">
<view class="content_search">
- <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
- placeholder="鎼滅储杞簱鍗曞彿">
+ <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true" placeholder="鎼滅储杞簱鍗曞彿">
<template v-slot:content>
<view class="Search_item">
<view class="Search_item_label">璁″垝鏃ユ湡</view>
<view class="Search_item_content" @click="openDate">
- <view class="Search_item_content_a" :style="listData.startDate ? 'color: #000' : ''">
- {{ listData.startDate ? listData.startDate : '寮�濮嬫棩鏈�'}}</view>
+ <view class="Search_item_content_a" :style="listData.outPlanDateStart ? 'color: #000' : ''">
+ {{ listData.outPlanDateStart ? listData.outPlanDateStart : '寮�濮嬫棩鏈�'}}
+ </view>
<text>-</text>
- <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">
- {{ listData.endDate ? listData.endDate : '缁撴潫鏃ユ湡'}}</view>
+ <view class="Search_item_content_a" :style="listData.outPlanDateEnd ? 'color: #000' : ''">
+ {{ listData.outPlanDateEnd ? listData.outPlanDateEnd : '缁撴潫鏃ユ湡'}}
+ </view>
</view>
</view>
<view class="Search_item">
@@ -30,7 +31,14 @@
</view>
<view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
<view class="content_list">
- <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
<view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
<!-- item澶撮儴瑙嗗浘 -->
<view class="content_list_item_top">
@@ -95,13 +103,20 @@
</scroll-view>
</view>
<!-- 閫夋嫨鏃ユ湡 -->
- <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
+ <u-calendar
+ :show="timeShow"
+ mode="range"
+ @close="timeShow = false"
+ :minDate="minDate"
+ :maxDate="maxDate"
+ @confirm="timeConfirm"></u-calendar>
</view>
</template>
<script>
import Search from '@/components/Search.vue'
import LabelSelection from '@/components/LabelSelection.vue'
+ import { getTransferList, ZKPageCount } from "@/util/api/materialStorage";
export default {
components: {
Search,
@@ -111,23 +126,20 @@
return {
height: '',
top: '',
+ isLoading: false,
listData: {
capacity: 10,
page: 0,
total: 0,
- startDate: '',
- endDate: '',
- procedureIds: [],
- departIds: '',
- mixParam: '',
- cateIds: []
+ outPlanDateEnd: "",
+ outPlanDateStart: "",
+ code: "",
+ type: "",
+ status: ""
},
- types: [
- // { name: '鍏ㄩ儴', id: '', isActive: false },
- // { name: '杞﹂棿棰嗘枡', id: '1', isActive: false },
- // { name: '杞﹂棿澶囨枡', id: '2', isActive: false },
- // { name: '鍏朵粬', id: '3', isActive: false },
- {
+ minDate: new Date('2021-01-31'),
+ maxDate: new Date(),
+ types: [{
name: '杞﹂棿棰嗘枡',
id: '1',
isActive: false
@@ -218,25 +230,78 @@
isActive: false
}
],
- orderType: [
- { name: '杞﹂棿棰嗘枡', id: 1 },
- { name: '璁″垝棰嗘枡', id: 2 },
- { name: '鏈哄彴澶囨枡', id: 3 },
- { name: '瀹屽伐鍏ュ簱', id: 4 },
- { name: '杞﹂棿杞簱', id: 5 },
- { name: '澶栧崗棰嗘枡杞簱', id: 6 },
- { name: '澶栧崗瀹屽伐杞簱', id: 7 },
- { name: '浜у搧鍏ュ簱', id: 8 },
- { name: '浜у搧杞簱', id: 9 },
- { name: '璁╂鏀捐鍏ュ簱', id: 10 },
- { name: '璁╂鏀捐杞簱', id: 11 },
- { name: '瀹㈣繑杩斾慨棰嗘枡', id: 12 },
- { name: '瀹㈣繑杩斾慨鍏ュ簱', id: 13 },
- { name: '璺ㄧ粍缁囪浆搴�', id: 14 },
- { name: '宸ュ簭鎶ュ簾', id: 15 },
- { name: '瀹㈤��杩斾慨棰嗘枡', id: 16 },
- { name: '瀹㈤��杩斾慨鍏ュ簱', id: 17 },
- { name: '搴熷搧鍏ュ簱', id: 30 }
+ orderType: [{
+ name: '杞﹂棿棰嗘枡',
+ id: 1
+ },
+ {
+ name: '璁″垝棰嗘枡',
+ id: 2
+ },
+ {
+ name: '鏈哄彴澶囨枡',
+ id: 3
+ },
+ {
+ name: '瀹屽伐鍏ュ簱',
+ id: 4
+ },
+ {
+ name: '杞﹂棿杞簱',
+ id: 5
+ },
+ {
+ name: '澶栧崗棰嗘枡杞簱',
+ id: 6
+ },
+ {
+ name: '澶栧崗瀹屽伐杞簱',
+ id: 7
+ },
+ {
+ name: '浜у搧鍏ュ簱',
+ id: 8
+ },
+ {
+ name: '浜у搧杞簱',
+ id: 9
+ },
+ {
+ name: '璁╂鏀捐鍏ュ簱',
+ id: 10
+ },
+ {
+ name: '璁╂鏀捐杞簱',
+ id: 11
+ },
+ {
+ name: '瀹㈣繑杩斾慨棰嗘枡',
+ id: 12
+ },
+ {
+ name: '瀹㈣繑杩斾慨鍏ュ簱',
+ id: 13
+ },
+ {
+ name: '璺ㄧ粍缁囪浆搴�',
+ id: 14
+ },
+ {
+ name: '宸ュ簭鎶ュ簾',
+ id: 15
+ },
+ {
+ name: '瀹㈤��杩斾慨棰嗘枡',
+ id: 16
+ },
+ {
+ name: '瀹㈤��杩斾慨鍏ュ簱',
+ id: 17
+ },
+ {
+ name: '搴熷搧鍏ュ簱',
+ id: 30
+ }
],
tagList: [{
id: "",
@@ -262,120 +327,13 @@
id: "3",
name: "宸插彇娑�",
num: "12",
- }
+ },
],
- data: [], // 宸ュ簭鏁版嵁
- factoryList: [],
- finished: true,
+ finished: false,
loading: false,
refreshing: false,
timeShow: false,
- lists: [{
- id: 1,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 2,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 3,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 4,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- },
- {
- id: 5,
- status: 0,
- urgent: 1,
- num: 100,
- batch: '11111',
- planDate: '2023-08-29',
- mmodel: {
- name: '宸ュ簭璁″垝',
- code: 'fbdseasafghb'
- },
- usermodel: {
- realname: '璁″垝浜哄憳'
- },
- pmodel: {
- name: '宸ュ簭璁″垝'
- },
- fmodel: {
- name: '宸ュ巶'
- }
- }
- ]
+ lists: []
};
},
onReady() {
@@ -386,6 +344,10 @@
that.top = `${rect.height}px`
}).exec()
})
+ },
+ onLoad() {
+ this.getLists();
+ this.getZKPageCount()
},
methods: {
tyepToStr(type) {
@@ -400,8 +362,17 @@
// 璺宠浆
jump(item) {
uni.navigateTo({
- url: `/pages/planDetails/planDetails?id=${item.id}`
+ url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.id}`
})
+ },
+ // 涓嬫媺鍒锋柊浼樺寲椤甸潰
+ onRefresh() {
+ this.isLoading = true
+ this.finished = false;
+ this.listData.page = 0
+ this.loading = true;
+ this.getLists();
+ this.getZKPageCount()
},
// 鑾峰彇澶撮儴缁勪欢楂樺害
getHeight(height) {
@@ -409,41 +380,56 @@
},
// 閲嶇疆
reset() {
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.listData.mixParam = ''
- this.listData.startDate = ''
- this.listData.endDate = ''
- this.listData.procedureIds = []
- if (this.factoryList.length > 0) {
- this.listData.departIds = this.factoryList[0].id
- }
- if (this.data.length > 0) {
- this.data.forEach(item => {
- item.isActive = false
- })
- }
- // this.getLists()
- // this.pageCounts()
+ this.listData.code = '';
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.listData.type = ''
+ this.listData.outPlanDateEnd = ''
+ this.listData.outPlanDateStart = ''
+ this.types.forEach((item) => {
+ item.isActive = false
+ })
+ this.getLists()
+ this.getZKPageCount()
},
+ // 缁熻鎬绘暟
+ getZKPageCount() {
+ ZKPageCount({
+ code: this.listData.code,
+ outPlanDateEnd: this.listData.outPlanDateEnd,
+ outPlanDateStart: this.listData.outPlanDateStart,
+ type: this.listData.type
+ }).then(res => {
+ if (res.code === 200) {
+ this.tagList[0].num = res.data.allNum
+ this.tagList[1].num = res.data.startNum
+ this.tagList[2].num = res.data.outNum
+ this.tagList[3].num = res.data.inNum
+ this.tagList[4].num = res.data.cancelNum
+ }
+ })
+ },
+ loadData() {
+ this.getLists()
+ },
+
// 鏃ユ湡纭畾
timeConfirm(val) {
- this.listData.startDate = val[0]
- this.listData.endDate = val[val.length - 1]
+ this.listData.outPlanDateStart = val[0]
+ this.listData.outPlanDateEnd = val[val.length - 1]
this.timeShow = false
},
// 鍒囨崲宸ュ巶
- changeTags(i, id) {
- this.listData.departIds = id
- this.getWorkingProcedures(id)
- this.factoryList.forEach((item, index) => {
- if (index === i) {
- item.isActive = true
- } else {
+ changeTags(i) {
+ this.types[i].isActive = !this.types[i].isActive;
+ this.listData.type = this.types[i].id
+ for (const index in this.types) {
+ if (index != i) {
+ const item = this.types[index]
item.isActive = false
}
- })
+ }
},
// 鎵撳紑鏃ユ湡鎻掍欢
openDate() {
@@ -451,133 +437,79 @@
},
// 鎼滅储
searchInput(val) {
- this.listData.mixParam = val
+ this.listData.code = val
this.listData.page = 0
this.finished = false
this.lists = []
this.getLists()
+ this.getZKPageCount()
},
// 鐐瑰嚮鏍囩鎼滅储
clickTag(ids) {
- this.listData.cateIds = ids
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- },
- // 鑾峰彇鍒楄〃缁熻
- pageCounts() {
- pageCount({
- factoryId: this.listData.departIds,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- statusList: this.listData.cateIds
- }).then(res => {
- if (res.code === 200 && res.data) {
- this.tagList[0].num = res.data.allNum.toString()
- this.tagList[1].num = res.data.startNum.toString()
- this.tagList[2].num = res.data.ingNum.toString()
- this.tagList[3].num = res.data.endNum.toString()
- }
- })
- },
- // 鑾峰彇宸ュ巶鏁版嵁
- getOrganizations() {
- getOrganization({
- type: 1
- }).then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = i === 0;
- })
- if (res.data.length > 0) {
- this.factoryList = res.data
- this.listData.departIds = this.factoryList[0].id
- this.listData.procedureIds = ''
- this.finished = false
- this.getWorkingProcedures(this.factoryList[0].id)
- this.getLists()
- this.pageCounts()
- }
- }
- })
- },
- // 鑾峰彇宸ュ簭鏁版嵁
- getWorkingProcedures(orgId) {
- this.data = []
- getWorkingProcedure({
- orgId
- })
- .then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = false;
- })
- this.data = res.data
- }
- })
+ this.listData.status = ids
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists()
},
// 鎼滅储寮规鎻愪氦
submit() {
- let pmodelOrgId = []
- this.data.forEach((item) => {
- if (item.isActive) {
- pmodelOrgId.push(item.id)
- }
- })
- this.listData.procedureIds = pmodelOrgId
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- // this.pageCounts()
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getZKPageCount()
},
// 鑾峰彇璁″垝鍒楄〃鏁版嵁
getLists() {
- console.log('getLists')
if (!this.finished) {
- this.loading = true
- this.listData.page = this.listData.page++
- getList({
+ this.loading = true;
+ this.listData.page = this.listData.page += 1;
+ getTransferList({
capacity: this.listData.capacity,
model: {
- mixParam: this.listData.mixParam,
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- factoryId: this.listData.departIds,
- statusList: this.listData.cateIds
+ code: this.listData.code,
+ outPlanDateEnd: this.listData.outPlanDateEnd,
+ outPlanDateStart: this.listData.outPlanDateStart,
+ type: this.listData.type,
+ status: this.listData.status
},
page: this.listData.page,
sorts: [{
- direction: 'ASC',
- property: 'publishDate'
- }]
- }).then(res => {
- this.loading = false
- this.listData.total = res.data.total
+ direction: "ASC",
+ property: "publishDate",
+ }, ],
+ })
+ .then((res) => {
+ this.isLoading = false
if (this.refreshing) {
this.lists = []
this.refreshing = false;
}
- if (res.code === 200 && res.data.records.length !== 0) {
- if (this.lists.length === 0) {
- this.lists = res.data.records
- } else {
- this.lists.push(...res.data.records)
+ this.loading = false;
+ this.listData.total = res.data.total;
+ if (res.code === 200) {
+ if (res.data.records.length < this.listData.capacity) {
+ this.finished = true;
}
- } else {
- this.finished = true
+ if (this.listData.page === 1) {
+ this.lists = res.data.records;
+ } else {
+ this.lists.push(...res.data.records);
+ }
}
- }).catch(err => {
- this.loading = false
- this.finished = true
+ })
+ .catch((err) => {
+ this.isLoading = false
+ this.loading = false;
+ this.finished = true;
if (this.refreshing) {
this.lists = []
this.refreshing = false;
}
})
+ } else {
+ this.isLoading = false
}
}
}
diff --git a/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue b/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
index 95f001b..2aa3d23 100644
--- a/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
+++ b/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
@@ -1,131 +1,287 @@
<template>
- <view class="content">
+ <view class="content2">
<view class="order-message">
<view class="content_list_item_top">
<view class="content_list_item_top_left">
- <!--<text>鍏ュ簱鍗曞彿锛�</text>-->
+ <!-- <text>杞簱鍗曞彿锛�</text>-->
<text>{{ data.code }}</text>
</view>
<view class="content_list_item_top_right">
- <text class="warning" v-if="data.status === 0">寰呭叆搴�</text>
- <text class="green" v-else-if="data.status === 1">宸插叆搴�</text>
- <text class="info" v-else-if="data.status === 2">宸插彇娑�</text>
+ <text class="created" v-if="data.status === 0">寰呭嚭搴�</text>
+ <text class="warning" v-else-if="data.status === 1">宸插嚭搴�</text>
+ <text class="green" v-else-if="data.status == 2">宸插叆搴�</text>
+ <text class="info" v-else-if="data.status === 3">宸插彇娑�</text>
</view>
</view>
+ <!-- item涓婚淇℃伅閮ㄥ垎 -->
<view class="content_list_item_content">
- <view class="content_list_item_content_item">
+ <view style="margin-top: 0 " class="content_list_item_content_item">
<view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
<view class="content_list_item_content_item_nr">
- {{ orderTyepToStr(data.billType) }}
+ {{ tyepToStr(data.type) }}
</view>
</view>
<view class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">鍏ヨ揣浠撳簱锛�</view>
+ <view class="content_list_item_content_item_label">杞嚭缁勭粐锛�</view>
<view class="content_list_item_content_item_nr">
- {{ data.warehouseCode + ' | ' + data.warehouseName }}
+ {{ data.outDepartName }}
</view>
</view>
<view class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">璁″垝鏃ユ湡锛�</view>
+ <view class="content_list_item_content_item_label">杞叆缁勭粐锛�</view>
<view class="content_list_item_content_item_nr">
- {{ data.planDate }}
+ {{ data.inDepartName }}
</view>
</view>
<view class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">鏉ユ簮绫诲瀷锛�</view>
+ <view class="content_list_item_content_item_label">杞嚭浠撳簱锛�</view>
<view class="content_list_item_content_item_nr">
- {{ tyepToStr(data.originType) }}
+ {{ data.outWarehouseName }}
</view>
</view>
<view class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">鏉ユ簮鍗曞彿锛�</view>
+ <view class="content_list_item_content_item_label">杞嚭浠撶鍛橈細</view>
<view class="content_list_item_content_item_nr">
- {{ data.originCode ? data.originCode : '-' }}
+ {{ data.outUserName }}
</view>
</view>
- <view v-if="data.updateName" class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">鎿嶄綔浜猴細</view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">杞叆浠撳簱锛�</view>
<view class="content_list_item_content_item_nr">
- {{ data.updateName + ' - ' + data.updateMobile }}
+ {{ data.inWarehouseName }}
</view>
</view>
- <view v-if="data.updateTime" class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">鎿嶄綔鏃堕棿锛�</view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">杞叆浠撶鍛橈細</view>
<view class="content_list_item_content_item_nr">
- {{ data.updateTime }}
+ {{ data.inUserName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">璁″垝杞嚭鏃ユ湡锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ data.outPlandate }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">璁″垝杞叆鏃ユ湡锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ data.inPlandate }}
</view>
</view>
</view>
- </view>
- <!-- 杞簱鐗╂枡 -->
- <view class="title">
- <text class="title-prefix"></text>
- <text>{{ data.status==1 ? '宸插叆搴撶墿鏂�' : '寰呭叆搴撶墿鏂�' }}</text>
- </view>
- <view class="material-content">
- <view class="item-style" v-for="(item, index) in materailArray" :key="index">
- <view class="item-title-style">
- <text style="font-weight: 500;">{{ item.materialName + ' | ' + item.materialCode}}</text>
+ <!-- 杞簱鐗╂枡 -->
+ <view class="material-title">
+ <view class="title">
+ <text class="title-prefix"></text>
+ <text>杞簱鐗╂枡</text>
</view>
- <view class="item-content-style">
- <view class="content_list_item_content_item">
- <text class="content_list_item_content_item_label">鎵规鍙凤細</text>
- <text class="content_list_item_content_item_nr">{{ item.batch || '-' }}</text>
+ </view>
+ <view class="material-content">
+ <view class="item-style" v-for="(item, index) in data.wtransferDetailList" :key="index">
+ <view class="item-title-style">
+ <text style="font-weight: 500;">{{ item.materialName + ' | ' + item.materialCode}}</text>
</view>
- <view class="content_list_item_content_item">
- <text class="content_list_item_content_item_label">鏁伴噺锛�</text>
- <text class="content_list_item_content_item_nr">{{ item.doneNum + item.unitName }}</text>
- </view>
- <view class="content_list_item_content_item">
- <text class="content_list_item_content_item_label">宸ュ簭锛�</text>
- <text class="content_list_item_content_item_nr">{{ item.procedureName || '-' }}</text>
- </view>
- <view class="content_list_item_content_item">
- <view class="content_list_item_content_item_label">璐ㄩ噺锛�</view>
- <view class="content_list_item_content_item_nr">
- <text v-if="item.qualityType == 0" class="green">鍚堟牸</text>
- <text v-else-if="item.qualityType == 1" class="yellow">涓嶈壇</text>
- <text v-else-if="item.qualityType == 2" class="red">鎶ュ簾</text>
- <text v-else>-</text>
+ <view class="item-content-style">
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">鎵规鍙凤細</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.batch }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">宸ュ簭锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.procedureName || '-' }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">璐ㄩ噺锛�</view>
+ <view class="content_list_item_content_item_nr">
+ <text v-if="item.qualityType==0" class="green">鍚堟牸</text>
+ <text v-else-if="item.qualityType==1" class="yellow">涓嶈壇</text>
+ <text v-else-if="item.qualityType==2" class="red">鎶ュ簾</text>
+ <text v-else>-</text>
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">璁″垝杞簱鏁伴噺锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.outPlannum + item.unitName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">瀹為檯杞嚭鏁伴噺锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.outActnum + item.unitName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">瀹為檯杞叆鏁伴噺锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.inActnum + item.unitName }}
+ </view>
</view>
</view>
- <view class="content_list_item_content_item">
- <text class="content_list_item_content_item_label">鍏ュ簱璐т綅锛�</text>
- <text
- class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
- </view>
</view>
</view>
</view>
- <view v-if="data.status === 0" style="height:94rpx"></view>
- <view v-if="data.status === 0" class="bottom-button">
- <button class="button button-cancel" @click="submit">鍘诲叆搴�</button>
- <!-- <button class="button button-cancel" @click="cancel">鍙栨秷</button> -->
+ <view v-if="(data.status === 0 || data.status === 1) && show" style="background:#F7F7F7; height:94rpx"></view>
+ <view v-if="(data.status === 0 || data.status === 1) && show" class="bottom-button">
+ <button class="button" @click="submit">{{ data.status === 0 ? '鍘诲嚭搴�' : '鍘诲叆搴�' }}</button>
</view>
</view>
</template>
<script>
- import { orderTyepToStr } from '@/util/constData.js'
+ import {
+ wTransferExtDetail
+ } from '@/util/api/materialStorage'
export default {
data() {
return {
- types: [
- { name: '鍏ㄩ儴', id: '', isActive: true },
- { name: '閲囪喘璁㈠崟', id: '0', isActive: false },
- { name: '鐢熶骇宸ュ崟', id: '1', isActive: false },
- { name: '閿�鍞鍗�', id: '2', isActive: false },
- { name: '杞簱鍗�', id: '3', isActive: false },
- { name: '鐩樼偣鍗�', id: '4', isActive: false },
+ types: [{
+ name: '鍏ㄩ儴',
+ id: '',
+ isActive: true
+ },
+ {
+ name: '閲囪喘璁㈠崟',
+ id: '0',
+ isActive: false
+ },
+ {
+ name: '鐢熶骇宸ュ崟',
+ id: '1',
+ isActive: false
+ },
+ {
+ name: '閿�鍞鍗�',
+ id: '2',
+ isActive: false
+ },
+ {
+ name: '杞簱鍗�',
+ id: '3',
+ isActive: false
+ },
+ {
+ name: '鐩樼偣鍗�',
+ id: '4',
+ isActive: false
+ },
],
- data: {}
+ data: {
+ code: "",
+ status: 0,
+ outDepartName: "",
+ inDepartName: "",
+ outWarehouseName: "",
+ inWarehouseName: "",
+ outPlandate: "",
+ inPlandate: "",
+ wtransferDetailList: []
+ },
+ orderType: [{
+ name: '杞﹂棿棰嗘枡',
+ id: 1
+ },
+ {
+ name: '璁″垝棰嗘枡',
+ id: 2
+ },
+ {
+ name: '鏈哄彴澶囨枡',
+ id: 3
+ },
+ {
+ name: '瀹屽伐鍏ュ簱',
+ id: 4
+ },
+ {
+ name: '杞﹂棿杞簱',
+ id: 5
+ },
+ {
+ name: '澶栧崗棰嗘枡杞簱',
+ id: 6
+ },
+ {
+ name: '澶栧崗瀹屽伐杞簱',
+ id: 7
+ },
+ {
+ name: '鎴愬搧鍏ュ簱',
+ id: 8
+ },
+ {
+ name: '鎴愬搧杞簱',
+ id: 9
+ },
+ {
+ name: '璁╂鏀捐鍏ュ簱',
+ id: 10
+ },
+ {
+ name: '璁╂鏀捐杞簱',
+ id: 11
+ },
+ {
+ name: '瀹㈣繑杩斾慨棰嗘枡',
+ id: 12
+ },
+ {
+ name: '瀹㈣繑杩斾慨鍏ュ簱',
+ id: 13
+ },
+ {
+ name: '璺ㄧ粍缁囪浆搴�',
+ id: 14
+ },
+ {
+ name: '宸ュ簭鎶ュ簾',
+ id: 15
+ },
+ {
+ name: '瀹㈤��杩斾慨棰嗘枡',
+ id: 16
+ },
+ {
+ name: '瀹㈤��杩斾慨鍏ュ簱',
+ id: 17
+ }
+ ],
+ show: false
};
},
+ onLoad(option) {
+ wTransferExtDetail(option.id)
+ .then(res => {
+ this.data = res.data
+ if (res.data.inUserId == this.$store.state.userInfo.id) {
+ this.show = true
+ }
+ })
+ },
methods: {
+ // 璺宠浆鍑哄簱鍏ュ簱
+ submit() {
+ if (this.data.status === 0) { // 鍑哄簱
+ console.log('鍑哄簱')
+ // router.push({ name: 'issueOperation', query: { id: route.query.id, type: 7 } })
+ } else if (this.data.status === 1) { // 鍏ュ簱
+ if (this.data.type === 3) { // 澶囨枡纭
+ console.log('澶囨枡纭')
+ // router.push({ name: 'orderStock', query: { id: route.query.id, status: data.value.status, next: 1 } })
+ return
+ }
+ console.log('鍏ュ簱')
+ // router.push({ name: 'warehousing', query: { id: route.query.id, type: 7 } })
+ }
+ },
tyepToStr(type) {
- // <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
- for (const item of this.types) {
- if (parseInt(item.id) === this.type) {
+ for (const item of this.orderType) {
+ if (item.id == type) {
return item.name
}
}
@@ -136,25 +292,27 @@
</script>
<style lang="scss" scoped>
- .content {
+ .content2 {
background: white;
.order-message {
- padding: 30rpx;
+ padding-top: 30rpx;
+ // padding: 30rpx;
display: flex;
flex-direction: column;
// border-bottom: 1rpx solid #ececec;
.content_list_item_top {
+ padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
.content_list_item_top_left {
display: flex;
+ align-items: center;
- // align-items: center;
- text {
+ span {
font-size: 32rpx;
font-weight: 500;
color: #333333;
@@ -183,7 +341,13 @@
}
}
+ .material-title {
+ // background-color: #f7f7f7;
+ margin-top: 10rpx;
+ }
+
.content_list_item_content {
+ margin: 0 30rpx;
padding: 24rpx 30rpx;
background: #f7f7f7;
border-radius: 16rpx;
@@ -192,16 +356,17 @@
justify-content: space-between;
margin-top: 32rpx;
- .content_list_item_content_item:first-child {
- margin-top: 0;
- }
-
.content_list_item_content_item {
width: 100%;
display: flex;
- align-items: center;
margin-top: 24rpx;
+ // &:nth-child(1) {
+ // margin-top: 0 !important;
+ // }
+ // &:nth-child(2) {
+ // margin-top: 0 !important;
+ // }
.content_list_item_content_item_label {
font-size: 24rpx;
font-weight: 400;
@@ -220,11 +385,11 @@
}
.title {
- background-color: #f7f7f7;
- padding: 30rpx;
+ height: 32rpx;
+ margin-left: 30rpx;
+ padding-top: 40rpx;
+ padding-bottom: 24rpx;
font-size: 30rpx;
- display: flex;
- align-items: center;
.title-prefix {
display: inline-block;
@@ -237,43 +402,36 @@
}
.material-content {
- padding: 30rpx;
-
.item-style {
width: initial;
- border-bottom: 1rpx solid #ececec;
- margin-top: 30rpx;
-
- &:first-child {
- margin-top: 0 !important;
- }
+ border-bottom: 1rpx solid #ECECEC;
+ padding-bottom: 30rpx;
&:last-child {
border: none;
}
.item-title-style {
+ padding: 0 30rpx;
+ margin-top: 30rpx;
margin-bottom: 12rpx;
font-size: 30rpx;
}
.item-content-style {
- // padding: 24rpx 30rpx;
- // background-color: #f7f7f7;
- // border-radius: 16rpx;
+ margin: 0 30rpx;
+ background-color: #f7f7f7;
+ border-radius: 16rpx;
display: flex;
flex-wrap: wrap;
- padding-bottom: 30rpx;
justify-content: space-between;
-
- &:last-child {
- padding-bottom: 0;
- }
+ padding: 1rpx 1rpx 30rpx 1rpx;
.content_list_item_content_item {
width: 100%;
display: flex;
margin-top: 24rpx;
+ margin-left: 24rpx;
.content_list_item_content_item_label {
font-size: 24rpx;
@@ -300,30 +458,16 @@
width: 100%;
bottom: 0;
height: 188rpx;
- display: flex;
- justify-content: space-between;
-
- .button-action {
- background: #fff;
- color: $nav-color;
- }
-
- .button-cancel {
- background: $nav-color;
- color: #FFFFFF;
- }
.button {
margin: 32rpx 32rpx 68rpx 32rpx;
height: 88rpx;
- /*width: 668rpx;*/
- // width: 334rpx;
+ font-size: 30rpx;
+ width: calc(100% - 64rpx);
border: none;
border-radius: 8rpx;
- box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.08);
- display: flex;
- align-items: center;
- justify-content: center;
+ background-color: $nav-color;
+ color: #fff;
}
}
}
diff --git a/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue b/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
index 3f94b84..d184e6e 100644
--- a/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
+++ b/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
@@ -3,7 +3,6 @@
<view class="order-message">
<view class="content_list_item_top">
<view class="content_list_item_top_left">
- <!--<text>鍏ュ簱鍗曞彿锛�</text>-->
<text>{{ data.code }}</text>
</view>
<view class="content_list_item_top_right">
@@ -16,7 +15,7 @@
<view class="content_list_item_content_item">
<view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
<view class="content_list_item_content_item_nr" v-if="data.billType">
- {{ orderTyepToStr(data.billType) }}
+ {{ seeText(data.billType) }}
</view>
</view>
<view class="content_list_item_content_item">
@@ -79,7 +78,8 @@
</view>
<view class="content_list_item_content_item">
<text class="content_list_item_content_item_label">鍏ュ簱璐т綅锛�</text>
- <text class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
+ <text
+ class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
</view>
</view>
</view>
@@ -96,9 +96,15 @@
import {
orderTyepToStr
} from '@/util/constData.js'
+ import {
+ getBoundDetail,
+ cancelBound
+ } from '@/util/api/materialStorage'
+
export default {
data() {
return {
+ id: null,
types: [{
name: '鍏ㄩ儴',
id: '',
@@ -130,13 +136,46 @@
isActive: false
},
],
- data: {},
+ data: {
+ code: "",
+ createName: "",
+ planDate: "",
+ dealDate: "",
+ status: 0,
+ originType: 0,
+ originCode: "",
+ updateName: "",
+ updateMobile: "",
+ updateTime: "",
+ warehouseName: "",
+ warehouseCode: "",
+ outPlandate: "",
+ inPlandate: "",
+ woutboundDetailsWait: [],
+ woutboundDetailsOut: []
+ },
materailArray: []
};
},
+ onLoad(option) {
+ this.id = option.id
+ getBoundDetail({
+ id: option.id
+ })
+ .then(res => {
+ this.data = res.data
+ if (this.data.status === 1) {
+ this.materailArray.push(...this.data.woutboundDetailsOut)
+ } else {
+ this.materailArray.push(...this.data.woutboundDetailsWait)
+ }
+ })
+ },
methods: {
+ seeText(id) {
+ return orderTyepToStr(id)
+ },
tyepToStr(type) {
- // <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
for (const item of this.types) {
if (parseInt(item.id) === this.type) {
return item.name
@@ -146,6 +185,28 @@
},
submit() {
+ },
+ cancel() {
+ cancelBound({
+ id: this.id
+ })
+ .then(res => {
+ uni.showToast({
+ title: '鍙栨秷鎴愬姛',
+ icon: 'success',
+ duration: 2000
+ });
+ uni.navigateBack({
+ delta: 1
+ });
+ })
+ .catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: 'error',
+ duration: 2000
+ });
+ })
}
}
}
diff --git a/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue b/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
index 0649278..8999981 100644
--- a/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
+++ b/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
@@ -1,17 +1,18 @@
<template>
<view class="content">
<view class="content_search">
- <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
- placeholder="鎼滅储鍏ュ簱鍗曞彿/鍏ュ簱浠撳簱">
+ <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true" placeholder="鎼滅储鍏ュ簱鍗曞彿/鍏ュ簱浠撳簱">
<template v-slot:content>
<view class="Search_item">
<view class="Search_item_label">璁″垝鏃ユ湡</view>
<view class="Search_item_content" @click="openDate">
- <view class="Search_item_content_a" :style="listData.startDate ? 'color: #000' : ''">
- {{ listData.startDate ? listData.startDate : '寮�濮嬫棩鏈�'}}</view>
+ <view class="Search_item_content_a" :style="listData.planDateStart ? 'color: #000' : ''">
+ {{ listData.planDateStart ? listData.planDateStart : '寮�濮嬫棩鏈�'}}
+ </view>
<text>-</text>
- <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">
- {{ listData.endDate ? listData.endDate : '缁撴潫鏃ユ湡'}}</view>
+ <view class="Search_item_content_a" :style="listData.planDateEnd ? 'color: #000' : ''">
+ {{ listData.planDateEnd ? listData.planDateEnd : '缁撴潫鏃ユ湡'}}
+ </view>
</view>
</view>
<view class="Search_item">
@@ -30,7 +31,14 @@
</view>
<view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
<view class="content_list">
- <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
<view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
<!-- item澶撮儴瑙嗗浘 -->
<view class="content_list_item_top">
@@ -49,7 +57,7 @@
<view class="content_list_item_content_item">
<view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
<view class="content_list_item_content_item_nr">
- {{ orderTyepToStr(item.billType) }}
+ {{ seeText(item.billType) }}
</view>
</view>
<view class="content_list_item_content_item">
@@ -81,14 +89,21 @@
</scroll-view>
</view>
<!-- 閫夋嫨鏃ユ湡 -->
- <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
+ <u-calendar :show="timeShow" mode="range" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
+ @confirm="timeConfirm"></u-calendar>
</view>
</template>
<script>
import Search from '@/components/Search.vue'
import LabelSelection from '@/components/LabelSelection.vue'
- import { orderTyepToStr } from '@/util/constData.js'
+ import {
+ orderTyepToStr
+ } from '@/util/constData.js'
+ import {
+ getBoundList,
+ pageCount
+ } from "@/util/api/materialStorage";
export default {
components: {
Search,
@@ -98,6 +113,9 @@
return {
height: '',
top: '',
+ minDate: new Date('2021-01-31'),
+ maxDate: new Date(),
+ isLoading: false,
listData: {
capacity: 10,
page: 0,
@@ -106,60 +124,146 @@
planDateStart: "",
code: "",
originType: "",
- status: ""
+ status: "",
},
- types: [
- { name: '杞﹂棿棰嗘枡', id: '1', isActive: false },
- { name: '鏈哄彴澶囨枡', id: '2', isActive: false },
- { name: '杞﹂棿杞簱', id: '3', isActive: false },
- { name: '瀹屽伐鍏ュ簱', id: '4', isActive: false },
- { name: '璁″垝棰嗘枡', id: '5', isActive: false },
- { name: '澶栧崗棰嗘枡', id: '6', isActive: false },
- { name: '澶栧崗瀹屽伐杞簱', id: '7', isActive: false },
- { name: '浜у搧鍏ュ簱', id: '8', isActive: false },
- { name: '浜у搧杞簱', id: '9', isActive: false },
- { name: '璁╂鏀捐鍏ュ簱', id: '10', isActive: false },
- { name: '璁╂鏀捐杞簱', id: '11', isActive: false },
- { name: '瀹㈣繑杩斾慨棰嗘枡', id: '12', isActive: false },
- { name: '瀹㈣繑杩斾慨鍏ュ簱', id: '13', isActive: false },
- { name: '璺ㄧ粍缁囪浆搴�', id: '14', isActive: false },
- { name: '宸ュ簭鎶ュ簾', id: '15', isActive: false },
- { name: '瀹㈤��杩斾慨棰嗘枡', id: '16', isActive: false },
- { name: '瀹㈤��杩斾慨鍏ュ簱', id: '17', isActive: false },
- { name: '閿�鍞嚭搴�', id: '18', isActive: false },
- { name: '璁╂閿�鍞�', id: '19', isActive: false },
- { name: '宸ュ崟鎶曟枡', id: '20', isActive: false },
- { name: '浠撳簱鎶ュ簾', id: '21', isActive: false },
- { name: '瀹㈤��妫�楠岄鏂�', id: '22', isActive: false },
- { name: '瀹㈣繑妫�楠岄鏂�', id: '23', isActive: false },
- { name: '搴撳瓨璋冩暣', id: '28', isActive: false },
- { name: '搴熷搧鍏ュ簱', id: '30', isActive: false }
- ],
- tagList: [
- {
- id: "",
- name: "鍏ㄩ儴",
- num: '0',
+ types: [{
+ name: '杞﹂棿棰嗘枡',
+ id: '1',
+ isActive: false
},
{
- id: "0",
- name: "寰呭嚭搴�",
- num: '0',
+ name: '鏈哄彴澶囨枡',
+ id: '2',
+ isActive: false
},
{
- id: "1",
- name: "宸插嚭搴�",
- num: "0",
+ name: '杞﹂棿杞簱',
+ id: '3',
+ isActive: false
},
{
- id: "2",
- name: "宸插彇娑�",
- num: "0",
+ name: '瀹屽伐鍏ュ簱',
+ id: '4',
+ isActive: false
+ },
+ {
+ name: '璁″垝棰嗘枡',
+ id: '5',
+ isActive: false
+ },
+ {
+ name: '澶栧崗棰嗘枡',
+ id: '6',
+ isActive: false
+ },
+ {
+ name: '澶栧崗瀹屽伐杞簱',
+ id: '7',
+ isActive: false
+ },
+ {
+ name: '浜у搧鍏ュ簱',
+ id: '8',
+ isActive: false
+ },
+ {
+ name: '浜у搧杞簱',
+ id: '9',
+ isActive: false
+ },
+ {
+ name: '璁╂鏀捐鍏ュ簱',
+ id: '10',
+ isActive: false
+ },
+ {
+ name: '璁╂鏀捐杞簱',
+ id: '11',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑杩斾慨棰嗘枡',
+ id: '12',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑杩斾慨鍏ュ簱',
+ id: '13',
+ isActive: false
+ },
+ {
+ name: '璺ㄧ粍缁囪浆搴�',
+ id: '14',
+ isActive: false
+ },
+ {
+ name: '宸ュ簭鎶ュ簾',
+ id: '15',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��杩斾慨棰嗘枡',
+ id: '16',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��杩斾慨鍏ュ簱',
+ id: '17',
+ isActive: false
+ },
+ {
+ name: '宸ュ崟浜у嚭',
+ id: '24',
+ isActive: false
+ },
+ {
+ name: '閲囪喘鍏ュ簱',
+ id: '25',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��妫�楠屽叆搴�',
+ id: '26',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑妫�楠屽叆搴�',
+ id: '27',
+ isActive: false
+ },
+ {
+ name: '搴撳瓨璋冩暣',
+ id: '28',
+ isActive: false
+ },
+ {
+ name: '搴熷搧鍏ュ簱',
+ id: '30',
+ isActive: false
}
],
- data: [], // 宸ュ簭鏁版嵁
- factoryList: [],
- finished: true,
+ tagList: [{
+ id: "",
+ name: "鍏ㄩ儴",
+ num: "0",
+ },
+ {
+ id: "0",
+ name: "寰呭叆搴�",
+ num: "0",
+ },
+ {
+ id: "1",
+ name: "宸插叆搴�",
+ num: "0",
+ },
+ {
+ id: "2",
+ name: "宸插彇娑�",
+ num: "0",
+ }
+ ],
+ finished: false,
loading: false,
refreshing: false,
timeShow: false,
@@ -175,11 +279,25 @@
}).exec()
})
},
+ onLoad() {
+ this.getLists()
+ this.getPageCount()
+ },
methods: {
+ onRefresh() {
+ this.isLoading = true
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists()
+ this.getPageCount()
+ },
+ seeText(id) {
+ return orderTyepToStr(id)
+ },
tyepToStr(type) {
- // <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
- for (const item of this.orderType) {
- if (item.id == type) {
+ for (const item of this.types) {
+ if (parseInt(item.id) === type) {
return item.name
}
}
@@ -188,7 +306,7 @@
// 璺宠浆
jump(item) {
uni.navigateTo({
- url: `/pages/planDetails/planDetails?id=${item.id}`
+ url: `/pages_adjust/pages/warehousingDetails1/warehousingDetails1?id=${item.id}`
})
},
// 鑾峰彇澶撮儴缁勪欢楂樺害
@@ -197,41 +315,95 @@
},
// 閲嶇疆
reset() {
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.listData.mixParam = ''
- this.listData.startDate = ''
- this.listData.endDate = ''
- this.listData.procedureIds = []
- if (this.factoryList.length > 0) {
- this.listData.departIds = this.factoryList[0].id
- }
- if (this.data.length > 0) {
- this.data.forEach(item => {
- item.isActive = false
+ this.listData.code = '';
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.types.forEach((item) => {
+ item.isActive = false
+ })
+ this.listData.originType = ''
+ this.listData.planDateEnd = ''
+ this.listData.planDateStart = ''
+ this.getLists();
+ this.getPageCount()
+ },
+ // 缁熻鏁版嵁
+ getPageCount() {
+ pageCount({
+ type: 1,
+ codeOrHouse: this.listData.code,
+ planDateEnd: this.listData.planDateEnd,
+ planDateStart: this.listData.planDateStart,
+ billType: this.listData.originType
+ }).then(res => {
+ if (res.code === 200) {
+ this.tagList[0].num = res.data.allNum.toString()
+ this.tagList[1].num = res.data.startNum.toString()
+ this.tagList[2].num = res.data.endNum.toString()
+ this.tagList[3].num = res.data.cancelNum.toString()
+ }
+ })
+ },
+ // 鑾峰彇璁″垝鍒楄〃鏁版嵁
+ getLists() {
+ if (!this.finished) {
+ this.loading = true;
+ this.listData.page = this.listData.page += 1;
+ getBoundList({
+ capacity: this.listData.capacity,
+ model: {
+ type: 1,
+ codeOrHouse: this.listData.code,
+ planDateEnd: this.listData.planDateEnd,
+ planDateStart: this.listData.planDateStart,
+ status: this.listData.status,
+ billType: this.listData.originType
+ },
+ page: this.listData.page,
+ sorts: [{
+ direction: "ASC",
+ property: "publishDate",
+ }]
})
+ .then((res) => {
+ this.loading = false;
+ this.listData.total = res.data.total;
+ if (res.code === 200) {
+ if (res.data.records.length < this.listData.capacity) {
+ this.finished = true;
+ }
+ if (this.listData.page === 1) {
+ this.lists = res.data.records;
+ } else {
+ this.lists.push(...res.data.records);
+ }
+ }
+ })
+ .finally(() => {
+ this.loading = false;
+ this.isLoading = false
+ })
+ } else {
+ this.isLoading = false
}
- // this.getLists()
- // this.pageCounts()
},
// 鏃ユ湡纭畾
timeConfirm(val) {
- this.listData.startDate = val[0]
- this.listData.endDate = val[val.length - 1]
+ this.listData.planDateStart = val[0]
+ this.listData.planDateEnd = val[val.length - 1]
this.timeShow = false
},
- // 鍒囨崲宸ュ巶
- changeTags(i, id) {
- this.listData.departIds = id
- this.getWorkingProcedures(id)
- this.factoryList.forEach((item, index) => {
- if (index === i) {
- item.isActive = true
- } else {
+ // 鍒囨崲鍗曟嵁绫诲瀷
+ changeTags(i) {
+ this.types[i].isActive = !this.types[i].isActive;
+ this.listData.originType = this.types[i].id
+ for (const index in this.types) {
+ if (index != i) {
+ const item = this.types[index]
item.isActive = false
}
- })
+ }
},
// 鎵撳紑鏃ユ湡鎻掍欢
openDate() {
@@ -239,19 +411,20 @@
},
// 鎼滅储
searchInput(val) {
- this.listData.mixParam = val
- this.listData.page = 0
- this.finished = false
- this.lists = []
- this.getLists()
+ this.listData.code = val;
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getPageCount()
},
// 鐐瑰嚮鏍囩鎼滅储
clickTag(ids) {
- this.listData.cateIds = ids
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
+ this.listData.status = ids
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists()
},
// 鑾峰彇鍒楄〃缁熻
pageCounts() {
@@ -270,103 +443,13 @@
}
})
},
- // 鑾峰彇宸ュ巶鏁版嵁
- getOrganizations() {
- getOrganization({
- type: 1
- }).then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = i === 0;
- })
- if (res.data.length > 0) {
- this.factoryList = res.data
- this.listData.departIds = this.factoryList[0].id
- this.listData.procedureIds = ''
- this.finished = false
- this.getWorkingProcedures(this.factoryList[0].id)
- this.getLists()
- this.pageCounts()
- }
- }
- })
- },
- // 鑾峰彇宸ュ簭鏁版嵁
- getWorkingProcedures(orgId) {
- this.data = []
- getWorkingProcedure({
- orgId
- })
- .then(res => {
- if (res.code === 200 && res.data && res.data.length !== 0) {
- res.data.forEach((item, i) => {
- item.isActive = false;
- })
- this.data = res.data
- }
- })
- },
// 鎼滅储寮规鎻愪氦
submit() {
- let pmodelOrgId = []
- this.data.forEach((item) => {
- if (item.isActive) {
- pmodelOrgId.push(item.id)
- }
- })
- this.listData.procedureIds = pmodelOrgId
- this.listData.page = 0
- this.finished = false
- this.lists = []
- // this.getLists()
- // this.pageCounts()
- },
- // 鑾峰彇璁″垝鍒楄〃鏁版嵁
- getLists() {
- console.log('getLists')
- if (!this.finished) {
- this.loading = true
- this.listData.page = this.listData.page++
- getList({
- capacity: this.listData.capacity,
- model: {
- mixParam: this.listData.mixParam,
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
- procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
- factoryId: this.listData.departIds,
- statusList: this.listData.cateIds
- },
- page: this.listData.page,
- sorts: [{
- direction: 'ASC',
- property: 'publishDate'
- }]
- }).then(res => {
- this.loading = false
- this.listData.total = res.data.total
- if (this.refreshing) {
- this.lists = []
- this.refreshing = false;
- }
- if (res.code === 200 && res.data.records.length !== 0) {
- if (this.lists.length === 0) {
- this.lists = res.data.records
- } else {
- this.lists.push(...res.data.records)
- }
- } else {
- this.finished = true
- }
- }).catch(err => {
- this.loading = false
- this.finished = true
- if (this.refreshing) {
- this.lists = []
- this.refreshing = false;
- }
- })
- }
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getPageCount()
}
}
}
diff --git a/minipro_standard/util/api/PlanningAPI.js b/minipro_standard/util/api/PlanningAPI.js
index f68a57c..11bcdd7 100644
--- a/minipro_standard/util/api/PlanningAPI.js
+++ b/minipro_standard/util/api/PlanningAPI.js
@@ -48,7 +48,7 @@
// }
// 鏍规嵁ID鍙戝竷璁″垝
-export function getWorkingProcedure (data) {
+export function publishById (data) {
return request.post('/ext/plansExt/publishById', data)
}
// export function publishById(data: any): Promise<any> {
diff --git a/minipro_standard/util/api/index.js b/minipro_standard/util/api/index.js
index dfd23bc..e99feee 100644
--- a/minipro_standard/util/api/index.js
+++ b/minipro_standard/util/api/index.js
@@ -47,4 +47,14 @@
// 寰俊閫�鍑虹櫥褰�
export function wxLoginOut(data) {
return http.post('/system/wxLoginOut', data)
+}
+
+// 鏌ヨ褰撳墠鐢ㄦ埛鎵�鏈変富缁勭粐涓嬬殑宸ュ簭
+export function getWorkingProcedure(data) {
+ return http.post('/ext/proceduresExt/productesGroup', data)
+}
+
+// 鏌ヨ褰撳墠鐢ㄦ埛鎵�鏈変富缁勭粐涓嬬殑宸ュ簭
+export function getOrganization(data) {
+ return http.post('/ext/departmentExt/getDepartmentListByConditon', data)
}
\ No newline at end of file
diff --git a/minipro_standard/util/api/materialStorage.js b/minipro_standard/util/api/materialStorage.js
index aa85e99..206c323 100644
--- a/minipro_standard/util/api/materialStorage.js
+++ b/minipro_standard/util/api/materialStorage.js
@@ -49,7 +49,7 @@
// 鎻愪氦杞簱鍗曞嚭鍏ュ簱
export function inOutSubmit(params) {
- return http.get('/ext/wTransferExt/wTransferForInOutUpload', { params })
+ return request.get('/ext/wTransferExt/wTransferForInOutUpload', { params })
}
// export function inOutSubmit(params: any): Promise<any> {
// return httpRequest({
@@ -89,7 +89,7 @@
* @returns
*/
export function getBoundDetail(params) {
- return http.get('/ext/wOutboundExt/findById', { params })
+ return request.get('/ext/wOutboundExt/findById', { params })
}
// export function getBoundDetail(params: any): Promise<any> {
// return httpRequest({
@@ -104,7 +104,7 @@
* @returns
*/
export function cancelBound(params) {
- return http.get('/ext/wOutboundExt/cancel', { params })
+ return request.get('/ext/wOutboundExt/cancel', { params })
}
// export function cancelBound(params: any): Promise<any> {
// return httpRequest({
--
Gitblit v1.9.3