'合并'
This commit is contained in:
parent
2747b32521
commit
d39a6367bc
12
pages.json
12
pages.json
|
|
@ -159,18 +159,10 @@
|
|||
"path" : "pages/Warehouse/warehome"
|
||||
},
|
||||
{
|
||||
"path" : "pages/procurement/authorization",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
"path" : "pages/procurement/authorization"
|
||||
},
|
||||
{
|
||||
"path" : "pages/procurement/addtory",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
"path" : "pages/procurement/addtory"
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -27,22 +27,28 @@
|
|||
|
||||
</view>
|
||||
<view class="list">
|
||||
<toryitem :pddlist="pddlist" @scrolltolower="scrolltolower" :status="status"></toryitem>
|
||||
<toryitem :pddlist="pddlist" @scrolltolower="scrolltolower" :pddType="pddobj?.pddType" :status="status" @tabitem="tabitem" @right="right"></toryitem>
|
||||
</view>
|
||||
<view class="submit">
|
||||
<view class="submit" v-if="pddobj.pddType=='1'">
|
||||
<view>取消盘点</view>
|
||||
<view>提交盘点单</view>
|
||||
<view @click="subitshowing">提交盘点单</view>
|
||||
</view>
|
||||
<errorshow :show="openerror" :font="errmsg" @close="openerror=false" />
|
||||
<pddsub :show="subitshow" :pddobj="pddobj" @close="subitshow=false"></pddsub>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import { queryPddInfoList } from './api/lunpan.js'
|
||||
import { onShow, onLoad, onHide, onPageScroll} from "@dcloudio/uni-app"
|
||||
import { queryPddInfoList,editPddInfo } from './api/lunpan.js'
|
||||
import toryitem from './common/toryitem.vue'
|
||||
import pddsub from './common/pddsub.vue'
|
||||
const leftscrolltop = ref(0)
|
||||
const pddobj = ref({})
|
||||
const openerror = ref(false)
|
||||
const errmsg = ref('');
|
||||
const subitshow = ref(false)
|
||||
// "pddType": "1" 可以操作
|
||||
const selectType = ref(0)
|
||||
const changetype = (index : number) => {
|
||||
|
|
@ -53,7 +59,10 @@
|
|||
setTimeout(() => {
|
||||
leftscrolltop.value = 0
|
||||
}, 50)
|
||||
selectType.value = index
|
||||
selectType.value = index;
|
||||
pageNo.value = 1;
|
||||
pddlist.value = [];
|
||||
pandian();
|
||||
}
|
||||
onLoad((e)=>{
|
||||
console.log(JSON.parse(e.pddobj))
|
||||
|
|
@ -73,7 +82,23 @@
|
|||
queryPddInfoList(obj).then(res=>{
|
||||
console.log(res)
|
||||
pddlist.value.push(...res.result.records);
|
||||
status.value = (res.result.total == pddlist.value.length ? 'nomore' : 'loadmore')
|
||||
status.value = (res.result.total == pddlist.value.length ? 'nomore' : 'loadmore');
|
||||
let s = Math.ceil(res.result.total / 3);
|
||||
pddlist.value.forEach((item,i)=>{
|
||||
item.picPatharr = [];
|
||||
item.zk = false;
|
||||
item.yczk=false;
|
||||
item.bz=false;
|
||||
item.pz=false;
|
||||
|
||||
if(item.picPath!=''&&item.picPath!=null){
|
||||
item.picPatharr = item.picPath.split(",");
|
||||
item.picPatharr = item.picPatharr.filter(item => item !== '');
|
||||
}
|
||||
if(Math.ceil((i + 1) / 3) == s && s>2){
|
||||
item.dczk = true;
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const scrolltolower = () =>{
|
||||
|
|
@ -82,6 +107,53 @@
|
|||
pageNo.value++;
|
||||
pandian()
|
||||
}
|
||||
const tabitem = (i,v) =>{
|
||||
pddlist.value[i] = v;
|
||||
}
|
||||
const right = (e,i)=>{
|
||||
let obj = {
|
||||
id:e.id,
|
||||
dqkcsl:e.dqkcsl,
|
||||
pdsl:e.pdsl,
|
||||
content:e.content,
|
||||
picPath:e.picPath
|
||||
}
|
||||
editPddInfo(obj).then(res=>{
|
||||
if(res.success){
|
||||
res.result.zk = false;
|
||||
res.result.yczk=false;
|
||||
res.result.bz=false;
|
||||
res.result.pz=false;
|
||||
res.result.picPatharr = [];
|
||||
if(res.result.picPath!=''&&res.result.picPath!=null){
|
||||
res.result.picPatharr = res.result.picPath.split(",");
|
||||
res.result.picPatharr = res.result.picPatharr.filter(item => item !== '');
|
||||
}
|
||||
pddlist.value[i] = res.result;
|
||||
uni.removeStorage({ key: 'valitem'})
|
||||
}else{
|
||||
errmsg.value = res.message;
|
||||
openerror.value = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
const subitshowing = ()=>{
|
||||
let obj = {
|
||||
pddId:pddobj.value.id,
|
||||
paramType:4,
|
||||
pageNo:-1,
|
||||
pageSize:10
|
||||
}
|
||||
console.log(obj)
|
||||
queryPddInfoList(obj).then(res=>{
|
||||
if(res.result.total == 0){
|
||||
subitshow.value = true;
|
||||
}else{
|
||||
errmsg.value = '有未完成的盘点信息,不能提交盘点单';
|
||||
openerror.value = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
|
|||
|
|
@ -386,3 +386,17 @@ export const queryPddInfoList = (params) => {
|
|||
data: params,
|
||||
})
|
||||
}
|
||||
export const editPddInfo = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/pdd/editPddInfo`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const submitPddMain = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/pdd/submitPddMain`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,484 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="mengban" v-if="show" @click="emit('close')"></view>
|
||||
<view class="box guodu" :class="show?'':'unclass'" :style="showbox?'z-index:999':'z-index:-2'">
|
||||
<view class="left-selecttype">
|
||||
<view :class="selectType===index?`selecttype-target`: `selecttype`"
|
||||
v-for="(item,index) in tagsarray" @click="changetype(index)">
|
||||
{{ item }}
|
||||
</view>
|
||||
<view class="heng-blue" :style="{ left: `${selectType === 0 ? 18 : 18 + selectType * 30}%` }">
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="scol" @scrolltolower="scrolltolower()" enable-back-to-top enable-flex :scroll-top="scrolltop" @scroll="scroll">
|
||||
<view>
|
||||
<view class="items guodu" v-for="(v,i) in pddlist" :key='i' :class="{'itembord0':v.zk==true,'dczk':v.dczk==true&&v.zk==true}">
|
||||
<view class="speitem guodu">
|
||||
<view class="imgs">
|
||||
<image :src="v?.materialImg?serverUrl+v?.materialImg:'/static/index/procurement/k.png'"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
<view class="cardp">
|
||||
<view v-if="v.categoryName">{{v.categoryName}}</view>
|
||||
<view v-if="v.typeName">{{v.typeName}}</view>
|
||||
<view v-if="v.medicationName">{{v.medicationName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wuli">
|
||||
<view class="tite">{{v?.materialName}}</view>
|
||||
<view class="cot">
|
||||
<text>物料编码:</text>
|
||||
{{v?.materialNo}}
|
||||
</view>
|
||||
<view class="cot">
|
||||
<text>物料单位:</text>
|
||||
{{v?.materialUnits}}
|
||||
</view>
|
||||
<view class="cot" style="white-space: nowrap;display: block;overflow: hidden;text-overflow: ellipsis;height: 1.5vw;">
|
||||
<text style="display: inline-block;">规格型号:</text>{{v?.specificationModel}}
|
||||
</view>
|
||||
<view class="wltwo">
|
||||
<view>
|
||||
<view>{{v?.dqkcsl}}</view>
|
||||
<text>库存数量</text>
|
||||
</view>
|
||||
<view class="dot">
|
||||
<view style="text-align: right;">{{v?.pdsl?v?.pdsl:'--'}}</view>
|
||||
<text>盘点数量</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chae">
|
||||
<!-- pdType 1:b/ 2:r -->
|
||||
<view :class="{b:v?.pdType==1,r:v?.pdType==2&&v?.cesl>0}">{{v?.pdType==2&&v?.cesl>0?'-':''}}{{v?.cesl!=null?v?.cesl:'--'}}</view>
|
||||
<text>差额</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="submit">
|
||||
<view>取消</view>
|
||||
<view @click="subits">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
<errorshow :show="openerror" :font="errmsg" @close="openerror=false" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import { queryPddInfoList,editPddInfo,submitPddMain } from '../api/lunpan.js'
|
||||
const selectType = ref(0);
|
||||
const scrolltop = ref(0);
|
||||
const tagsarray = ref(["全部", "盘盈", "盘亏"]);
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/');
|
||||
const emit = defineEmits([ 'close' , 'tabitem' ,'right' ]);
|
||||
const errmsg = ref('');
|
||||
const openerror = ref(false)
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean
|
||||
},
|
||||
pddobj:{
|
||||
type:Object
|
||||
}
|
||||
});
|
||||
const showbox = ref(false)
|
||||
watch(
|
||||
()=>props.show,
|
||||
()=>{
|
||||
if(props.show){
|
||||
pandian();
|
||||
setTimeout(()=>{
|
||||
showbox.value = true;
|
||||
},50)
|
||||
}else{
|
||||
setTimeout(() => {
|
||||
showbox.value = false;
|
||||
}, 400)
|
||||
}})
|
||||
const pageNo = ref(1);
|
||||
const pddlist = ref([]);
|
||||
const status = ref('loadmore');
|
||||
const pandian = ()=>{
|
||||
let obj = {
|
||||
pddId:props.pddobj.id,
|
||||
paramType:selectType.value==0?'':selectType.value,
|
||||
pageNo:pageNo.value,
|
||||
pageSize:10
|
||||
}
|
||||
console.log(obj)
|
||||
queryPddInfoList(obj).then(res=>{
|
||||
console.log(res)
|
||||
pddlist.value.push(...res.result.records);
|
||||
status.value = (res.result.total == pddlist.value.length ? 'nomore' : 'loadmore');
|
||||
})
|
||||
}
|
||||
const changetype = (index : number) => {
|
||||
if (selectType.value == index ) {
|
||||
return
|
||||
}
|
||||
scrolltop.value = top.value;
|
||||
setTimeout(() => {
|
||||
scrolltop.value = 0
|
||||
}, 50)
|
||||
selectType.value = index;
|
||||
|
||||
pageNo.value = 1;
|
||||
pddlist.value = [];
|
||||
pandian();
|
||||
}
|
||||
const top = ref(0)
|
||||
const scroll = (e) => {
|
||||
top.value = e.detail.scrollTop;
|
||||
}
|
||||
const scrolltolower = () => {
|
||||
if(status.value == 'loading' || status.value == 'nomore'){return}
|
||||
status.value = 'loading'
|
||||
pageNo.value++;
|
||||
pandian()
|
||||
}
|
||||
const subits = ()=>{
|
||||
submitPddMain({id:props.pddobj.id}).then(res=>{
|
||||
if(res.success){
|
||||
uni.showToast({
|
||||
icon:'success',
|
||||
title:res.message
|
||||
})
|
||||
emit('close');
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
})
|
||||
}else{
|
||||
errmsg.value = res.message;
|
||||
openerror.value = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.unclass {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.submit{
|
||||
width: 100%;
|
||||
height: 3.2vw;
|
||||
margin-top: 0.4vw;
|
||||
padding-right: 2vw;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
view{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
&:nth-child(1){
|
||||
width: 7.1vw;
|
||||
height: 3.2vw;
|
||||
background: #F8F8F8;
|
||||
border-radius: 1.6vw;
|
||||
border: 1px solid #E5E5E5;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: #555555;
|
||||
}
|
||||
&:nth-child(2){
|
||||
width: 7.1vw;
|
||||
height: 3.2vw;
|
||||
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
|
||||
border-radius: 1.6vw;
|
||||
border: 1px solid rgba(3,133,250,0.34);
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: #1083F8;
|
||||
margin-left: 0.7vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scol{
|
||||
width: 102%;
|
||||
height: 33.4vw;
|
||||
display: flex;
|
||||
margin-top: 0.6vw;
|
||||
.items {
|
||||
width: 30.5vw;
|
||||
height: 16vw;
|
||||
background: rgba(249, 249, 249, 1);
|
||||
border-radius: 1.6vw;
|
||||
display: inline-block;
|
||||
margin: 0 0.8vw 0.5vw 0;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
top: 0;
|
||||
|
||||
|
||||
.chae {
|
||||
width: 4vw;
|
||||
height: 4vw;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 1vw 2vw 0 0;
|
||||
|
||||
view {
|
||||
font-weight: bold;
|
||||
font-size: 1.8vw;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1vw;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.r {
|
||||
color: #FF5757;
|
||||
}
|
||||
|
||||
.b {
|
||||
color: rgba(16, 131, 248, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.pandian {
|
||||
width: 3.3vw;
|
||||
height: 3.3vw;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
image {
|
||||
width: 1.7vw;
|
||||
height: 1.7vw;
|
||||
}
|
||||
}
|
||||
|
||||
.wuli {
|
||||
width: 18vw;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 12vw;
|
||||
top: 0;
|
||||
|
||||
.wltwo {
|
||||
width: 11vw;
|
||||
height: 3.7vw;
|
||||
display: flex;
|
||||
margin-top: 1.2vw;
|
||||
justify-content: space-between;
|
||||
|
||||
>view {
|
||||
// min-width: 5vw;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
align-items: left;
|
||||
padding: 0 1vw;
|
||||
|
||||
view {
|
||||
font-weight: bold;
|
||||
font-size: 1.7vw;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1.2vw;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.dot::after {
|
||||
content: '';
|
||||
width: 1px;
|
||||
height: 3.3vw;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-right: 1px solid rgba(230, 230, 230, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.cot {
|
||||
width: 18vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
color: rgba(85, 85, 85, 1);
|
||||
margin-top: 0.2vw;
|
||||
|
||||
text {
|
||||
color: rgba(153, 153, 153, 1);
|
||||
font-size: 1.2vw;
|
||||
font-weight: 300;
|
||||
}
|
||||
}
|
||||
|
||||
.tite {
|
||||
width: 13vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
height: 2vw;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
margin: 1.3vw 0 1.2vw 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.speitem {
|
||||
width: 12vw;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
.cardp {
|
||||
width: 12vw;
|
||||
height: 4vw;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
view {
|
||||
min-width: 5vw;
|
||||
height: 1.8vw;
|
||||
border-radius: 0.9vw;
|
||||
border: 1px solid #D2D2D2;
|
||||
margin: 0.5vw 0 0 0.5vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 0.8vw;
|
||||
color: #555555;
|
||||
padding: 0 0.25vw;
|
||||
|
||||
&:nth-child(1),
|
||||
&:nth-child(2) {
|
||||
max-width: 5.5vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
line-height: 1.8vw;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.imgs {
|
||||
width: 9.8vw;
|
||||
height: 9.8vw;
|
||||
background: #F8F8F8;
|
||||
border-radius: 1.1vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0.8vw auto 0;
|
||||
|
||||
>image {
|
||||
width: 8.8vw;
|
||||
height: 7.5vw;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.left-selecttype {
|
||||
width: 450rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
padding-right: 30rpx;
|
||||
padding-left: 15rpx;
|
||||
position: relative;
|
||||
left: -2vw;
|
||||
|
||||
.heng-blue {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 25rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #1083F8;
|
||||
transition: 0.3s all ease;
|
||||
|
||||
}
|
||||
|
||||
.selecttype {
|
||||
width: 33.3%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #999999;
|
||||
font-size: 31rpx;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.selecttype-target {
|
||||
width: 33.3%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #222222;
|
||||
font-size: 31rpx;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.box{
|
||||
width: 66.2vw;
|
||||
height: 43.5vw;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(163,167,182,0.16);
|
||||
border-radius: 16rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
z-index: 999;
|
||||
padding:1.5vw 2vw;
|
||||
}
|
||||
.mengban{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #EFF0F4;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0.6;
|
||||
z-index: 200;
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<scroll-view scroll-y="true" class="itembox" scroll-with-animation @scrolltolower="scrolltolower()"
|
||||
enable-back-to-top enable-flex :scroll-top="scrolltop" @scroll="scroll">
|
||||
<defaultr cont="暂无数据" v-if="pddlist.length==0 && listflag" style="position: absolute;width: 10vw;height: 10vw;"></defaultr>
|
||||
<view class="items guodu" v-for="(v,i) in pddlist" :key='i' :class="{'itembord0':v.zk==true}">
|
||||
<view class="items guodu" v-for="(v,i) in pddlist" :key='i' :class="{'itembord0':v.zk==true,'dczk':v.dczk==true&&v.zk==true}">
|
||||
<view class="speitem guodu">
|
||||
<view class="imgs">
|
||||
<image :src="v?.materialImg?serverUrl+v?.materialImg:'/static/index/procurement/k.png'"
|
||||
|
|
@ -27,9 +27,8 @@
|
|||
<text>物料单位:</text>
|
||||
{{v?.materialUnits}}
|
||||
</view>
|
||||
<view class="cot" style="white-space: nowrap;">
|
||||
<text>规格型号:</text>
|
||||
{{v?.specificationModel}}
|
||||
<view class="cot" style="white-space: nowrap;display: block;overflow: hidden;text-overflow: ellipsis;height: 1.5vw;">
|
||||
<text style="display: inline-block;">规格型号:</text>{{v?.specificationModel}}
|
||||
</view>
|
||||
<view class="wltwo">
|
||||
<view>
|
||||
|
|
@ -44,31 +43,31 @@
|
|||
</view>
|
||||
<view class="chae">
|
||||
<!-- pdType 1:b/ 2:r -->
|
||||
<view :class="{b:v?.pdType==1,r:v?.pdType==2}">{{v?.pdType==2?'-':''}}{{v?.cesl!=null?v?.cesl:'--'}}</view>
|
||||
<view :class="{b:v?.pdType==1,r:v?.pdType==2&&v?.cesl>0}">{{v?.pdType==2&&v?.cesl>0?'-':''}}{{v?.cesl!=null?v?.cesl:'--'}}</view>
|
||||
<text>差额</text>
|
||||
</view>
|
||||
<view class="pandian" @click="zhankai(v,i)">
|
||||
<image :src="v.zk?'/static/index/procurement/pd1.png':'/static/index/procurement/pd0.png'" mode="aspectFill" v-if="v.pdType==null"></image>
|
||||
<image :src="v.zk?'/static/index/procurement/pd1.png':'/static/index/procurement/pd0.png'" mode="aspectFill" v-if="v.pdType==null||v?.cesl==0"></image>
|
||||
<!-- <image src="/static/index/procurement/pd1.png" mode="aspectFill" v-if="v.pdType==null && v.cesl!=null"></image> -->
|
||||
<image :src="v.zk?'/static/index/procurement/pd5.png':'/static/index/procurement/pd2.png'" mode="aspectFill" v-if="v.pdType == 1"></image>
|
||||
<image :src="v.zk?'/static/index/procurement/pd4.png':'/static/index/procurement/pd3.png'" mode="aspectFill" v-if="v.pdType == 2"></image>
|
||||
<image :src="v.zk?'/static/index/procurement/pd4.png':'/static/index/procurement/pd3.png'" mode="aspectFill" v-if="v.pdType == 2&&v?.cesl>0"></image>
|
||||
</view>
|
||||
<view class="tan guodu" :class="v.zk?'':'itemhei0'">
|
||||
<view class="tbox guodu" :class="v.zk?'':'itemhei0'" :style="v.zk?'':'overflow: hidden'">
|
||||
<torytor :show="v.yczk" :tb="v.dqkcsl" @pddjjnum="pddjjnum" :idex="i"></torytor>
|
||||
<torytor :show="v.yczk" :tb="v.dqkcsl" @pddjjnum="pddjjnum" :pdsl="v.pdsl" :idex="i" :pddType='pddType'></torytor>
|
||||
<view class="bpq" v-show="v.yczk">
|
||||
<view class="bp b" @click="v.bz = !v.bz;v.pz = false">
|
||||
<image src="/static/index/procurement/th.png" mode="aspectFill"></image>
|
||||
备注
|
||||
<text class="r" v-if="v.content">1</text>
|
||||
<text :class="{r:v.pdType == 2&&v?.cesl>0,g:v.pdType == 1}" v-if="v.content">1</text>
|
||||
</view>
|
||||
<view class="bp p" @click="v.pz = !v.pz;v.bz = false">
|
||||
|
||||
<image src="/static/index/procurement/xj.png" mode="aspectFill"></image>
|
||||
拍照
|
||||
<text class="g">5</text>
|
||||
<text :class="{r:v.pdType == 2&&v?.cesl>0,g:v.pdType == 1}" v-if="v.picPatharr?.length>0">{{v?.picPatharr?.length}}</text>
|
||||
</view>
|
||||
<view class="qued">
|
||||
<view class="qued" @click="config(v,i)" v-if="pddType=='1'">
|
||||
确定
|
||||
</view>
|
||||
<view class="triangle-leftbz" v-if="v.bz">
|
||||
|
|
@ -79,31 +78,33 @@
|
|||
</view>
|
||||
<view class="gray-bgc guodu" :class="v.bz?'':'itemhei0'">
|
||||
<view class="textare" v-if="v.bz">
|
||||
<textarea v-model="v.model" placeholder="请输入备注" maxlength="200"></textarea>
|
||||
<textarea v-model="v.content" placeholder="请输入备注" maxlength="200" :disabled="pddType!='1'"></textarea>
|
||||
</view>
|
||||
<view class="submit" v-if="v.bz">
|
||||
<view>取消</view>
|
||||
<view>确定</view>
|
||||
<view @click="v.bz = false">{{pddType=='1'?'取消':'关闭'}}</view>
|
||||
<view @click="v.bz = false" v-if="pddType=='1'">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gray-pgc guodu" :class="v.pz?'':'itemhei0'">
|
||||
<view class="pztit" v-if="v.pz">拍照:</view>
|
||||
<view class="zpj" v-if="v.pz">
|
||||
<view class="zpk">
|
||||
<image :src="'/static/zhanwei.png'" mode="aspectFill" style="width: 2.1vw;height: 2.1vw;">
|
||||
</image>
|
||||
<view @click.stop="open=1">
|
||||
<view class="zpk" v-for="(p,o) in v?.picPatharr" :key="o" @click="previewImage(v,p,o)">
|
||||
<image :src="serverUrl+p" mode="aspectFill"></image>
|
||||
<!-- <image :src="'/static/zhanwei.png'" mode="aspectFill" style="width: 2.1vw;height: 2.1vw;">
|
||||
</image> -->
|
||||
<view @click.stop="open=1;del(v,o)">
|
||||
<image src="/static/x.png" mode="aspectFill" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="clkpz" >
|
||||
<view class="clkpz" @click="uplod(v,i)" v-if="v.picPatharr?.length<6&&pddType == 1">
|
||||
<image src="/static/index/procurement/xjpz.png" mode="aspectFill"></image>
|
||||
<text>点击拍照上传</text>
|
||||
<text>点击拍照上传 </text>
|
||||
</view>
|
||||
<defaultr cont="暂无图片" v-if="v?.picPatharr.length==0&&pddType!='1'" style="position: absolute;width: 10vw;height: 10vw;"></defaultr>
|
||||
</view>
|
||||
<view class="submit" v-if="v.pz">
|
||||
<view>取消</view>
|
||||
<view @click="config(v,i)">确定</view>
|
||||
<view @click="v.pz = false">{{pddType=='1'?'取消':'关闭'}}</view>
|
||||
<view v-if="pddType=='1'" @click="v.pz = false">确定</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
|
@ -116,7 +117,7 @@
|
|||
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="pddlist.length>6" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
<tanchuang :show="open==1" font="是否删除此图片" @back="open = 0" @right="del()"> </tanchuang>
|
||||
<tanchuang :show="open==1" font="是否删除此图片" @back="open = 0" @right="del1()"> </tanchuang>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -128,42 +129,37 @@
|
|||
import defaultr from '../components/default.vue'
|
||||
const open = ref(0)
|
||||
const scrolltop = ref(0)
|
||||
const list = ref([]);
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const emit = defineEmits([ 'scrolltolower' , 'tabitem' ,'right' ])
|
||||
const props = defineProps({
|
||||
pddlist: {
|
||||
type: Array
|
||||
},
|
||||
status: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
pddType:{
|
||||
type:String
|
||||
}
|
||||
})
|
||||
const listflag = ref(false)
|
||||
onMounted(() => {
|
||||
nextTick(()=>{
|
||||
props.pddlist.forEach(item=>{
|
||||
item.zk = false;
|
||||
item.yczk=false;
|
||||
item.bz=false;
|
||||
item.model='';
|
||||
item.pz=false;
|
||||
item.ce = '';
|
||||
})
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(()=>{
|
||||
listflag.value = true;
|
||||
},1000)
|
||||
// for (let i = 0; i < 20; i++) {
|
||||
// list.value.push({ zk: false, yczk: false, bz: false, model: '', pz: false })
|
||||
// }
|
||||
},1000)
|
||||
})
|
||||
const valitem = ref({});
|
||||
const valindex = ref(-1);
|
||||
const zhankai = (v, i) => {
|
||||
let s = Math.ceil((i + 1) / 3);
|
||||
console.log(s)
|
||||
if(valindex.value !=i && valindex.value > -1 &&uni.getStorageSync('valitem')){
|
||||
emit('tabitem',valindex.value,uni.getStorageSync('valitem'))
|
||||
}
|
||||
valindex.value = i;
|
||||
scrolltop.value = top.value;
|
||||
v.zk = !v.zk;
|
||||
if (v.zk) {
|
||||
uni.setStorageSync('valitem', v);
|
||||
setTimeout(() => {
|
||||
v.yczk = v.zk;
|
||||
}, 200)
|
||||
|
|
@ -202,12 +198,94 @@
|
|||
console.log(e)
|
||||
}
|
||||
const config = (e,i) =>{
|
||||
// 没点确认情况下把pdsl,cesl ,pdType 归 null 需要加字段
|
||||
if(e.content==''||e.content==null){
|
||||
uni.showToast({
|
||||
icon:'error',
|
||||
title:"请填写备注!"
|
||||
})
|
||||
return
|
||||
}
|
||||
emit('right',e,i)
|
||||
}
|
||||
const emit = defineEmits([ 'scrolltolower' ])
|
||||
const scrolltolower = () => {
|
||||
emit('scrolltolower')
|
||||
}
|
||||
// 上传
|
||||
const albumlist = ref([])
|
||||
const uplod = (v,i) => {
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera'], //从相册选择
|
||||
success: (e) => {
|
||||
let ar = JSON.stringify(e.tempFilePaths)
|
||||
uni.compressImage({
|
||||
src: JSON.parse(ar)[0],
|
||||
quality: 60,
|
||||
success: res => {
|
||||
sxdupld(res.tempFilePath,v)
|
||||
// v.picPatharr.push(res.tempFilePath);
|
||||
// console.log(v.picPatharr)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
const sxdupld = (e,v) => {
|
||||
let now = new Date();
|
||||
let year = now.getFullYear();
|
||||
let month = now.getMonth() + 1;
|
||||
uni.uploadFile({
|
||||
url: uni.getStorageSync('serverUrl') + '/sys/common/upload',
|
||||
filePath: e,
|
||||
name: 'file',
|
||||
formData: {
|
||||
biz: year + '/' + month + '/pddPic'
|
||||
},
|
||||
header: {
|
||||
'X-Access-Token': uni.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
const data = JSON.parse(res.data);
|
||||
console.log(v)
|
||||
v.picPatharr.push(data.message);
|
||||
shuzhi(v)
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
}
|
||||
const previewImage = (arr,p,i) => {
|
||||
let u = []
|
||||
arr.picPatharr.forEach(e => {
|
||||
u.push(serverUrl.value + e)
|
||||
})
|
||||
uni.previewImage({
|
||||
current: i,
|
||||
urls: u,
|
||||
showmenu: false,
|
||||
longPressActions: {
|
||||
itemList: [],
|
||||
}
|
||||
})
|
||||
}
|
||||
const shuzhi = (v)=>{
|
||||
v.picPath = '';
|
||||
v.picPatharr.forEach((e,i)=>{
|
||||
v.picPath+= e+','
|
||||
})
|
||||
}
|
||||
const picv = ref({});
|
||||
const pici = ref(0);
|
||||
const del=(v,o)=>{
|
||||
picv.value = v;
|
||||
pici.value = o;
|
||||
}
|
||||
const del1=()=>{
|
||||
picv.value.picPatharr.splice(pici.value,1);
|
||||
open.value = 0
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
@ -226,7 +304,9 @@
|
|||
border-radius: 1.6vw 1.6vw 0 0 !important;
|
||||
z-index: 25 !important;
|
||||
}
|
||||
|
||||
.dczk{
|
||||
top: -17vw !important;
|
||||
}
|
||||
.itemhei0 {
|
||||
height: 0vw !important;
|
||||
z-index: 27 !important;
|
||||
|
|
@ -241,6 +321,7 @@
|
|||
margin: 0 0.8vw 0.5vw 0;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
top: 0;
|
||||
|
||||
.tan {
|
||||
position: absolute;
|
||||
|
|
@ -332,16 +413,20 @@
|
|||
bottom: 3.6vw;
|
||||
left: 1vw;
|
||||
overflow: hidden;
|
||||
>.submit{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.zpj {
|
||||
>.zpj {
|
||||
width: 100%;
|
||||
height: 20vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
min-height: 1vw;
|
||||
max-height: 19.5vw;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr ;
|
||||
padding: 0 1.6vw;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.zpk {
|
||||
>.zpk {
|
||||
width: 12.6vw;
|
||||
height: 6.4vw;
|
||||
margin-top: 0.3vw;
|
||||
|
|
@ -351,6 +436,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F9F9F9;
|
||||
overflow: hidden;
|
||||
view {
|
||||
width: 1.6vw;
|
||||
height: 1.6vw;
|
||||
|
|
@ -363,9 +449,13 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
image{
|
||||
width: 12.6vw;
|
||||
height: 6.4vw;
|
||||
}
|
||||
}
|
||||
|
||||
.clkpz {
|
||||
>.clkpz {
|
||||
width: 12.6vw;
|
||||
height: 6.4vw;
|
||||
background: #FAFDFF;
|
||||
|
|
@ -376,7 +466,6 @@
|
|||
align-items: center;
|
||||
margin-top: 0.3vw;
|
||||
flex-direction: column;
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 0.7vw;
|
||||
|
|
@ -489,6 +578,7 @@
|
|||
position: absolute;
|
||||
right: -0.5vw;
|
||||
top: 0;
|
||||
background: #555555;
|
||||
}
|
||||
|
||||
.g {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="jiajian">
|
||||
<view class="jiajian" >
|
||||
<view class="jj" @click="jjnum(-1)" @longpress="handleTouchStart(-1)" @touchend="handleTouchEnd">
|
||||
-
|
||||
</view>
|
||||
|
|
@ -48,10 +48,7 @@
|
|||
import { queryQld } from '../api/lunpan.js'
|
||||
const stringShow = ref("0000");
|
||||
const relNumber = ref(0);
|
||||
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9,0, "AC", "AE"];
|
||||
onMounted(()=>{
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
})
|
||||
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9,0, "AC", "AE"];
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean
|
||||
|
|
@ -61,11 +58,29 @@
|
|||
},
|
||||
idex:{
|
||||
type:Number
|
||||
},
|
||||
pdsl:{
|
||||
type:Number
|
||||
},
|
||||
pddType:{
|
||||
type:String
|
||||
}
|
||||
});
|
||||
watch(()=>props.show,
|
||||
()=>{
|
||||
if(props.show==true){
|
||||
relNumber.value =props.pdsl?props.pdsl:0;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
isZero.value = false
|
||||
}else{
|
||||
relNumber.value =0;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
}
|
||||
})
|
||||
const emit = defineEmits([ 'pddjjnum' ])
|
||||
const isZero = ref(false);
|
||||
const clickKuai = (item : any, index : number) => {
|
||||
if(props.pddType!='1'){return}
|
||||
if (item == "AE") {
|
||||
relNumber.value = props.tb;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
|
|
@ -100,6 +115,7 @@
|
|||
}
|
||||
const InteroutId = ref(null)
|
||||
const handleTouchStart = (e:number)=> {
|
||||
if(props.pddType!='1'){return}
|
||||
Interval(e)
|
||||
}
|
||||
const handleTouchEnd=()=> {
|
||||
|
|
@ -112,6 +128,7 @@
|
|||
}, 120);
|
||||
}
|
||||
const jjnum = (e:number)=>{
|
||||
if(props.pddType!='1'){return}
|
||||
let num = 9999;
|
||||
if(num<=relNumber.value&&e==1){relNumber.value = num; return}
|
||||
if(relNumber.value<=0&&e==-1){relNumber.value = 0; return}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="right-button" @click="addnew">
|
||||
<view class="right-button" @click="addshow = true">
|
||||
<image src="/static/index/requestform/addnew.png" />
|
||||
<view>
|
||||
新增
|
||||
|
|
@ -518,18 +518,12 @@
|
|||
const openmessage = ref(false)
|
||||
const addnew = () =>{
|
||||
addPddMain({nuId:uni.getStorageSync('nuId')}).then((res:any)=>{
|
||||
// console.log("res",res)
|
||||
console.log("res",res.result)
|
||||
if(res.success){
|
||||
addshow.value = false
|
||||
chongzhi()
|
||||
uni.navigateTo({url:'/pages/procurement/addtory'})
|
||||
// setTimeout(()=>{
|
||||
// uni.showToast({
|
||||
// title: `新增成功`,
|
||||
// icon: 'none', // 'none' 表示不带图标
|
||||
// duration: 2000
|
||||
// })
|
||||
// },50)
|
||||
chongzhi();
|
||||
let pddobj = res.result
|
||||
uni.navigateTo({url:'/pages/procurement/addtory?pddobj='+JSON.stringify(pddobj)})
|
||||
}else{
|
||||
openmessage.value = true
|
||||
errormessage.value = res.message
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
{
|
||||
"hash": "63b19973",
|
||||
"configHash": "f0a71f11",
|
||||
"lockfileHash": "e88c1aa2",
|
||||
"browserHash": "b680c5d4",
|
||||
"optimized": {},
|
||||
"hash": "9e248234",
|
||||
"configHash": "17f5f5b6",
|
||||
"lockfileHash": "285de26d",
|
||||
"browserHash": "e1e4bd36",
|
||||
"optimized": {
|
||||
"solarlunar": {
|
||||
"src": "../../../../../node_modules/solarlunar/lib/solarlunar.min.js",
|
||||
"file": "solarlunar.js",
|
||||
"fileHash": "3b92690a",
|
||||
"needsInterop": true
|
||||
}
|
||||
},
|
||||
"chunks": {}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -574,7 +574,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
)
|
||||
]);
|
||||
}
|
||||
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/camera.nvue"]]);
|
||||
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/camera.nvue"]]);
|
||||
export {
|
||||
camera as default
|
||||
};
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
)
|
||||
]);
|
||||
}
|
||||
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/fullcamera.nvue"]]);
|
||||
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/fullcamera.nvue"]]);
|
||||
export {
|
||||
fullcamera as default
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue