This commit is contained in:
parent
24f8ef58ff
commit
f4ffbe2689
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="box" v-for="(v,i) in list" :key='i' :class="act==i?'act':''" @click="act=i">
|
<view class="box" v-for="(v,i) in list" :key='i' >
|
||||||
<view>
|
<view>
|
||||||
<text class="tit">{{v.comName}}</text>
|
<text class="tit">{{v.comName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -50,15 +50,15 @@
|
||||||
<text></text>
|
<text></text>
|
||||||
<view>销售单位</view>
|
<view>销售单位</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="scrollxhdw" :style="Math.ceil(list.length / 2)>4?'height:400rpx':'height:'+ (Math.ceil(list.length / 2)*100)+'rpx'">
|
<scroll-view scroll-y="true" class="scrollxhdw" :show-scrollbar="false" :style="Math.ceil(list.length / 2)>4?'height:400rpx':'height:'+ (Math.ceil(list.length / 2)*100)+'rpx'">
|
||||||
<view class="xhdw">
|
<view class="xhdw">
|
||||||
<view v-for="(v,i) in list " :key='i' :class="i==dwact?'act':''" @click="dwact = i;qita = v.text">{{v.text}}</view>
|
<view v-for="(v,i) in list " :key='i' :class="i==dwact?'act':''" @click="dwact = i;qita = v.text">{{v.text}}</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<view class="qit">
|
<view class="qit" style="width: 518rpx;">
|
||||||
<text>其它</text>
|
<text>其它</text>
|
||||||
<view>
|
<view style="width: 430rpx;">
|
||||||
<input type="text" v-model="qita" @blur="blur">
|
<input type="text" v-model="qita" @blur="blur">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
<view v-for="(v,i) in materialTypeList" @click="checkMaterialType(v.materialTypeId)">{{v.typeName}}</view>
|
<view v-for="(v,i) in materialTypeList" @click="checkMaterialType(v.materialTypeId)">{{v.typeName}}</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<scroll-view class="scrollviews" scroll-y="true" scroll-with-animation @scrolltolower="scrolltolower"
|
<scroll-view class="scrollviews" scroll-y="true" scroll-with-animation @scrolltolower="scrolltolower"
|
||||||
:style="{ height:`calc(100vh - ${uni.getStorageSync('moveHeight') + 160}px )`}">
|
:style="{ height:`calc(100vh - ${uni.getStorageSync('moveHeight') + 145}px )`}">
|
||||||
<view class="lists" v-for="(v,i) in listarr" :key="i">
|
<view class="lists" v-for="(v,i) in listarr" :key="i">
|
||||||
<view class="zuo">
|
<view class="zuo">
|
||||||
<image :src="v.materialImg?orgObj.orgNetUrl+v.materialImg:'https://www.focusnu.com/media/default/PICNULL.png'" mode="aspectFill"></image>
|
<image :src="v.materialImg?orgObj.orgNetUrl+v.materialImg:'https://www.focusnu.com/media/default/PICNULL.png'" mode="aspectFill"></image>
|
||||||
|
|
@ -135,6 +135,7 @@
|
||||||
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;margin-top: 30rpx;">
|
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;margin-top: 30rpx;">
|
||||||
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="list.length>0" />
|
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="list.length>0" />
|
||||||
</view>
|
</view>
|
||||||
|
<view style="height: 20px;"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<view class="botfiexd">
|
<view class="botfiexd">
|
||||||
|
|
@ -170,7 +171,7 @@
|
||||||
const status = ref('loadmore')
|
const status = ref('loadmore')
|
||||||
onLoad((e)=>{
|
onLoad((e)=>{
|
||||||
orgObj.value = JSON.parse(e.orgObj);
|
orgObj.value = JSON.parse(e.orgObj);
|
||||||
console.log('orgObj.value-->',orgObj.value);
|
// console.log('orgObj.value-->',orgObj.value);
|
||||||
getMaterialType();//获取分类信息
|
getMaterialType();//获取分类信息
|
||||||
// getMaterialInfo();//获取物料信息
|
// getMaterialInfo();//获取物料信息
|
||||||
gettimearr()
|
gettimearr()
|
||||||
|
|
@ -190,6 +191,13 @@
|
||||||
}
|
}
|
||||||
const queding = (e)=>{
|
const queding = (e)=>{
|
||||||
if(e=='dw'){
|
if(e=='dw'){
|
||||||
|
if(qita.value == ""){
|
||||||
|
uni.showToast({
|
||||||
|
title:'请输入单位',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
let obj={
|
let obj={
|
||||||
salesUnit:qita.value,
|
salesUnit:qita.value,
|
||||||
id:listarr.value[index.value].id,
|
id:listarr.value[index.value].id,
|
||||||
|
|
@ -270,7 +278,7 @@
|
||||||
stringShow.value +=item
|
stringShow.value +=item
|
||||||
stringShow.value = stringShow.value.replace(/^(\d+)\.(\d{0,2}).*/, '$1.$2')
|
stringShow.value = stringShow.value.replace(/^(\d+)\.(\d{0,2}).*/, '$1.$2')
|
||||||
stringShow.value = formatStr(stringShow.value)
|
stringShow.value = formatStr(stringShow.value)
|
||||||
// console.log(stringShow.value)
|
// // console.log(stringShow.value)
|
||||||
}
|
}
|
||||||
function formatStr(val) {
|
function formatStr(val) {
|
||||||
if (!val) return ''
|
if (!val) return ''
|
||||||
|
|
@ -291,8 +299,8 @@
|
||||||
const clickTab = (e,v)=>{
|
const clickTab = (e,v)=>{
|
||||||
if(current.value == e){return}
|
if(current.value == e){return}
|
||||||
current.value = e
|
current.value = e
|
||||||
scrollLeft.value = e*70;
|
scrollLeft.value = (e-2)*70;
|
||||||
console.log('item', e);
|
// console.log('item', e,v);
|
||||||
listarr.value = [];
|
listarr.value = [];
|
||||||
pageNo.value = 1;
|
pageNo.value = 1;
|
||||||
checkMaterialType(v.materialTypeId);
|
checkMaterialType(v.materialTypeId);
|
||||||
|
|
@ -305,9 +313,11 @@
|
||||||
openId: openId
|
openId: openId
|
||||||
}
|
}
|
||||||
getSuppliersMaterialType(obj).then(res=>{
|
getSuppliersMaterialType(obj).then(res=>{
|
||||||
console.log('1--->',res);
|
// console.log('1--->',res);
|
||||||
materialTypeList.value = res.result;
|
materialTypeList.value = res.result;
|
||||||
|
setTimeout(()=>{
|
||||||
clickTab(0,res.result[0])
|
clickTab(0,res.result[0])
|
||||||
|
},50)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const sxlist = ref([])
|
const sxlist = ref([])
|
||||||
|
|
@ -342,7 +352,7 @@
|
||||||
const chongzhi = (k,d)=>{
|
const chongzhi = (k,d)=>{
|
||||||
sxlist.value.forEach(item=>{
|
sxlist.value.forEach(item=>{
|
||||||
item.children.forEach(e=>{
|
item.children.forEach(e=>{
|
||||||
console.log(d,e.id)
|
// console.log(d,e.id)
|
||||||
if(k==0){
|
if(k==0){
|
||||||
e.flag = false
|
e.flag = false
|
||||||
}
|
}
|
||||||
|
|
@ -360,7 +370,7 @@
|
||||||
sxlist.value.forEach(item=>{
|
sxlist.value.forEach(item=>{
|
||||||
item.children.forEach(e=>{
|
item.children.forEach(e=>{
|
||||||
if(e.flag){
|
if(e.flag){
|
||||||
console.log(e)
|
// console.log(e)
|
||||||
// checkMaterialType(e.id)
|
// checkMaterialType(e.id)
|
||||||
chaxn(e.id)
|
chaxn(e.id)
|
||||||
}
|
}
|
||||||
|
|
@ -371,7 +381,7 @@
|
||||||
const chaxn = (e)=>{
|
const chaxn = (e)=>{
|
||||||
materialTypeList.value.forEach((item,i)=>{
|
materialTypeList.value.forEach((item,i)=>{
|
||||||
if(item.id==e){
|
if(item.id==e){
|
||||||
console.log(item.id,e)
|
// console.log(item.id,e)
|
||||||
clickTab(i,materialTypeList.value[i])
|
clickTab(i,materialTypeList.value[i])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -397,18 +407,18 @@
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
pageNo:pageNo.value
|
pageNo:pageNo.value
|
||||||
}
|
}
|
||||||
console.log('getMaterialInfo-obj--->', obj);
|
// console.log('getMaterialInfo-obj--->', obj);
|
||||||
getSuppliersMaterialInfo(obj).then(res=>{
|
getSuppliersMaterialInfo(obj).then(res=>{
|
||||||
console.log('2--->',res);
|
// console.log('2--->',res);
|
||||||
listarr.value.push(...res.result.records)
|
listarr.value.push(...res.result.records)
|
||||||
status.value = (res.result.total == listarr.value.length ? 'nomore' : 'loadmore')
|
status.value = (res.result.total == listarr.value.length ? 'nomore' : 'loadmore')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//选中物料分类
|
//选中物料分类
|
||||||
const checkMaterialType = (checkId)=>{
|
const checkMaterialType = (checkId)=>{
|
||||||
console.log('checkId--->',checkId);
|
// console.log('checkId--->',checkId);
|
||||||
materialTypeId.value = checkId;
|
materialTypeId.value = checkId;
|
||||||
console.log('materialTypeId.value>',materialTypeId.value);
|
// console.log('materialTypeId.value>',materialTypeId.value);
|
||||||
getMaterialInfo();
|
getMaterialInfo();
|
||||||
}
|
}
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
|
|
@ -480,13 +490,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.qit{
|
.qit{
|
||||||
width: 540rpx;
|
width: 466rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 20rpx auto;
|
margin: 20rpx auto;
|
||||||
view{
|
view{
|
||||||
width: 450rpx;
|
width: 355rpx;
|
||||||
height: 81rpx;
|
height: 81rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
border: 1px solid #A9B1C0;
|
border: 1px solid #A9B1C0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue