|
|
@@ -8,8 +8,13 @@
|
|
|
</template>
|
|
|
</uni-nav-bar>
|
|
|
<view class="top-wrapper">
|
|
|
- <uni-section class="dimension">
|
|
|
- <uni-data-select v-model="dimension" :clear="false" :localdata="dimensionList"></uni-data-select>
|
|
|
+ <uni-section class="dimension" v-if="obtain == '仓库'">
|
|
|
+ <uni-data-select @change="(e)=>onchange(e)" v-model="dimension" :clear="false"
|
|
|
+ :localdata="dimensionList"></uni-data-select>
|
|
|
+ </uni-section>
|
|
|
+ <uni-section v-else>
|
|
|
+ <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchKey" placeholder="关键字">
|
|
|
+ </uni-easyinput>
|
|
|
</uni-section>
|
|
|
<button class="search_btn" @click="getData({})">搜索</button>
|
|
|
<image class="menu_icon" @click="handleSearch" src="~@/static/pda/menu.svg"></image>
|
|
|
@@ -26,15 +31,91 @@
|
|
|
</view>
|
|
|
<view class="listBox-con">
|
|
|
<view class="listBox-bottom">
|
|
|
- <view> <text>编码:</text> <text class="value">{{ item.code }}</text> </view>
|
|
|
- <view> <text>名称:</text> <text class="value">{{ item.name }}</text> </view>
|
|
|
- <view> <text>型号:</text> <text class="value">{{ item.modelType }}</text> </view>
|
|
|
- <view> <text>规格:</text> <text class="value">{{ item.specification }}</text> </view>
|
|
|
- <view> <text>计量单位:</text> <text class="value">{{ item.measuringUnit }}</text>
|
|
|
+ <view>
|
|
|
+ <text>{{!fieldShow?'编码':'物品编码'}}:</text>
|
|
|
+ <text class="value">{{ item.code }}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>{{!fieldShow?'名称':'物品名称'}}:</text>
|
|
|
+ <text class="value">{{ item.name }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s">
|
|
|
+ <text>牌号:</text>
|
|
|
+ <text class="value">{{ item.brandNum }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s">
|
|
|
+ <text>型号:</text>
|
|
|
+ <text class="value">{{ item.categoryModel }}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>规格:</text>
|
|
|
+ <text class="value">{{ item.specification }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s" v-if="dimension == 3">
|
|
|
+ <text>批次号:</text>
|
|
|
+ <text class="value">{{ item.batchNo }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s">
|
|
|
+ <text>级别:</text>
|
|
|
+ <text class="value">{{ item.level }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s" v-if="fieldShow">
|
|
|
+ <text>计量数量:</text>
|
|
|
+ <text class="value">{{ item.measureQuantity }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s" v-if="fieldShow">
|
|
|
+ <text>计量单位:</text>
|
|
|
+ <text class="value">{{ item.measureUnit }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s">
|
|
|
+ <text>重量:</text>
|
|
|
+ <text class="value">{{ item.weight }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s">
|
|
|
+ <text>重量单位:</text>
|
|
|
+ <text class="value">{{ item.weightUnit }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s">
|
|
|
+ <text>分类:</text>
|
|
|
+ <text class="value">{{ item.categoryLevelPath }}</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="dimension == 3">
|
|
|
+ <text>包装编码:</text>
|
|
|
+ <text class="value">{{ item.packageNo }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s" v-if="dimension == 3">
|
|
|
+ <text>包装数量:</text>
|
|
|
+ <text class="value">{{ item.packingQuantity }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="label-s" v-if="dimension == 3">
|
|
|
+ <text>包装单位:</text>
|
|
|
+ <text class="value">{{ item.packingUnit }}</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="dimension == 3 || dimension == 4">
|
|
|
+ <text>发货条码:</text>
|
|
|
+ <text class="value">{{ item.barcodes }}</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="dimension == 4">
|
|
|
+ <text>物料编码:</text>
|
|
|
+ <text class="value">{{ item.no }}</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="dimension == 3 || dimension == 4">
|
|
|
+ <text>物料代号:</text>
|
|
|
+ <text class="value">{{ item.materielDesignation }}</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="dimension == 3 || dimension == 4">
|
|
|
+ <text>客户代号:</text>
|
|
|
+ <text class="value">{{ item.clientCode }}</text>
|
|
|
</view>
|
|
|
- <view> <text>重量单位:</text> <text class="value">{{ item.weightUnit }}</text> </view>
|
|
|
- <view> <text>分类:</text> <text class="value">{{ item.categoryLevelPath }}</text>
|
|
|
+ <view v-if="dimension == 3 || dimension == 4">
|
|
|
+ <text>刻码:</text>
|
|
|
+ <text class="value">{{ item.engrave }}</text>
|
|
|
</view>
|
|
|
+ <view v-if="dimension == 3 || dimension == 4">
|
|
|
+ <text>仓库:</text>
|
|
|
+ <text class="value">{{ item.warehouseName }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -51,13 +132,13 @@
|
|
|
<view class="selBtn">选择( {{ checkListLen }} )</view>
|
|
|
</u-button>
|
|
|
</view>
|
|
|
- <prodctScreen ref="screen" @succeed="getData" />
|
|
|
+ <screenAccess :dataSources="obtain =='主数据'?'1':'0'" ref="screen" @succeed="getData" />
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import prodctScreen from './productScreen.vue'
|
|
|
+ import screenAccess from './screenAccess.vue'
|
|
|
import {
|
|
|
getInventoryTotalAPI
|
|
|
} from '@/api/wms/index.js'
|
|
|
@@ -70,7 +151,13 @@
|
|
|
getInventoryDetails,
|
|
|
getMaterielDetails,
|
|
|
} from '@/api/repair'
|
|
|
+ import {
|
|
|
+ getList
|
|
|
+ } from '@/api/classifyManage/itemInformation.js'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ screenAccess
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
tableList: [],
|
|
|
@@ -83,7 +170,7 @@
|
|
|
isEnd: false,
|
|
|
detailsData: {},
|
|
|
checkedkList: [],
|
|
|
- searchVal: '',
|
|
|
+ searchKey: '',
|
|
|
selectType: '1', // 1 单选 2 多选
|
|
|
dimensionList: [{
|
|
|
value: '4',
|
|
|
@@ -104,17 +191,18 @@
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- components: {
|
|
|
- prodctScreen
|
|
|
- },
|
|
|
computed: {
|
|
|
checkListLen() {
|
|
|
return this.checkedkList.length;
|
|
|
},
|
|
|
+ // 物品字段
|
|
|
+ fieldShow() {
|
|
|
+ return this.obtain == '仓库';
|
|
|
+ },
|
|
|
},
|
|
|
onLoad(params) {
|
|
|
this.obtain = params.obtain || '主数据';
|
|
|
- this.selectType = params.selectType || '1'
|
|
|
+ this.selectType = params.selectType || '1';
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getTreeList();
|
|
|
@@ -123,22 +211,26 @@
|
|
|
methods: {
|
|
|
// 获取页面数据
|
|
|
getData(parameter = {}) {
|
|
|
- // this.isEnd = false
|
|
|
- // this.pageNum = 1
|
|
|
let data = parameter;
|
|
|
if (!data.scroll) {
|
|
|
this.isEnd = false;
|
|
|
this.pageNum = 1;
|
|
|
- this.accessoriesList = [];
|
|
|
+ this.tableList = [];
|
|
|
} else {
|
|
|
delete data.scroll;
|
|
|
}
|
|
|
if (this.obtain == '仓库') {
|
|
|
this.changeDimension(this.dimension, parameter);
|
|
|
} else {
|
|
|
-
|
|
|
+ let obj = this.$refs.screen.mainForm || {};
|
|
|
+ // 查询主数据
|
|
|
+ this.warehouseData(obj);
|
|
|
}
|
|
|
},
|
|
|
+ onchange(e) {
|
|
|
+ this.dimension = e;
|
|
|
+ this.getData({});
|
|
|
+ },
|
|
|
handleSearch() {
|
|
|
this.$refs.screen.open();
|
|
|
},
|
|
|
@@ -146,6 +238,38 @@
|
|
|
backAdd() {
|
|
|
uni.navigateBack();
|
|
|
},
|
|
|
+ // 主数据
|
|
|
+ warehouseData(data = {}) {
|
|
|
+ let form = {
|
|
|
+ ...data,
|
|
|
+ searchKey: this.searchKey,
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ size: 15,
|
|
|
+ categoryLevelId: this.categoryLevelId
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ getList(form).then((res) => {
|
|
|
+ let list = res.list.map((el) => {
|
|
|
+ el.categoryModel = el.modelType;
|
|
|
+ el.categoryName = el.name;
|
|
|
+ el.categoryCode = el.code;
|
|
|
+ return el;
|
|
|
+ });
|
|
|
+ if (this.pageNum == 1) {
|
|
|
+ this.tableList = list;
|
|
|
+ } else {
|
|
|
+ this.tableList.push(...list);
|
|
|
+ }
|
|
|
+ this.pageNum += 1
|
|
|
+ this.isEnd = this.tableList.length >= res.count;
|
|
|
+ uni.hideLoading();
|
|
|
+ }).then((e) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
// 仓库数据
|
|
|
changeDimension(dimension, parameter = {}) {
|
|
|
if (this.isEnd) {
|
|
|
@@ -178,7 +302,7 @@
|
|
|
} else {
|
|
|
this.tableList.push(...list);
|
|
|
}
|
|
|
- this.pageNum += 1
|
|
|
+ this.pageNum += 1;
|
|
|
this.isEnd = this.tableList.length >= res.count;
|
|
|
uni.hideLoading();
|
|
|
resolve();
|