This commit is contained in:
Teng 2025-11-19 10:03:15 +08:00
parent 0dcbf8424f
commit fab9abe1ca
3 changed files with 111 additions and 52 deletions

View File

@ -2091,7 +2091,7 @@
directiveName: '' // directiveName
}))
}))
console.log("wtf",res.result.serviceList)
console.log("wtf",res)
res.result.serviceList.forEach((res : any) => {
timearr.value[res.positioning].children[res.positioningLong] = res;
})

View File

@ -157,4 +157,13 @@ export const getGysList = () => {
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGysList`,
method: 'get'
})
}
}
//改价
export const editPrice = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editPrice`,
method: 'post',
data: params,
})
}

View File

@ -39,7 +39,7 @@
<view style="width: 100%;margin-top: 50rpx;font-size: 30rpx;">
采购单价:
<text style="color: #888888;">
1.50
{{ gaijia }}
</text>
</view>
@ -47,17 +47,17 @@
<view style="font-size: 30rpx;margin-bottom: 10rpx;">
到货单价
</view>
<view class="gray-input">
¥1500.00
<view class="gray-input" style="width: 410rpx;">
¥ {{ gaijia }}
</view>
</view>
<view style="position: absolute;right: 30rpx;bottom: 30rpx;">
<view style="display: flex;">
<view
<view @click="opengaijia=false"
style="width: 160rpx;height: 75rpx;background-color: #ebeced;color: #888888;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;">
取消
</view>
<view
<view @click="dogaijia"
style="width: 160rpx;height: 75rpx;;color: #0385FA;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;border: 1rpx solid #0385FA;background: linear-gradient(to bottom,#E9F4FF,#CAE0F9);margin: 0 40rpx;">
确定
</view>
@ -66,50 +66,50 @@
</view>
<view class="jianhuo-jianpan" style="right: -40rpx;bottom: 150rpx;">
<view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('1')">
1
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('2')">
2
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('3')">
3
</view>
</view>
<view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('4')">
4
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('5')">
5
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('6')">
6
</view>
</view>
<view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('7')">
7
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('8')">
8
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('9')">
9
</view>
</view>
<view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('AC')">
AC
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('0')">
0
</view>
<view class="gray-button-jianpan">
<view class="gray-button-jianpan" @click="press('.')">
.
</view>
</view>
@ -378,7 +378,6 @@
</view>
</view>
<view class="photowall-other-one" v-if="topbuttontarget==1">
<view
style="width: 100%;height: 70%;display: flex;flex-direction: column;justify-content: center;align-items: center;background-color:#fafdff ;border: 1rpx solid #78B1EB;border-radius: 30rpx;">
<image style="width: 70rpx;height: 70rpx;margin-bottom: 5rpx;"
@ -641,10 +640,10 @@
随行单
</view>
</view>
<view :class="lefttarget==1?`contain-right-button`: `contain-right-button-bad`"
style="border-color: #D9DADC;box-shadow: 0 1rpx 3rpx #D9DADC;">
<view :class="!Number(plsbuy[lefttarget]?.status)?`contain-right-button`: `contain-right-button-bad`"
style="border-color: #D9DADC;box-shadow: 0 1rpx 3rpx #D9DADC;" @click="bebad">
<image class="buttont-img"
:src="`/static/index/warehouse/procurement/picking/bebad${lefttarget==1?``:`target`}.png`" />
:src="`/static/index/warehouse/procurement/picking/bebad${!Number(plsbuy[lefttarget]?.status)?``:`target`}.png`" />
<view class="button-font">
作废
</view>
@ -1077,7 +1076,7 @@
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, onUnmounted } from 'vue';
import { queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getCgrLis, getGysList, upload } from './api/lunpan.js'
import { queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getCgrLis, getGysList, upload, editPrice } from './api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import calendar from '@/component/public/calendar.vue'
import superpicker from '@/component/public/superpicker.vue'
@ -1088,6 +1087,52 @@
const opengaijia = ref(false);
const openjianhuo = ref(false);
const opendata = ref(false);
const gaijia = ref("");
//
const dogaijia = () => {
// console.log("????",showvalue.value.id,gaijia.value)
editPrice({ id: showvalue.value.id, arrivalPrice: gaijia.value }).then((res) => {
// console.log("", showvalue.value.id,gaijia.value)
// console.log("res", res)
if (res.code == 200) {
showvalue.value.arrivalPrice = gaijia.value;
opengaijia.value = false;
}
})
}
//
function press(k : string) {
if (k === 'AC') {
gaijia.value = ''
return
}
//
if (k === '.') {
if (!gaijia.value.includes('.')) {
gaijia.value = gaijia.value === '' ? '0.' : gaijia.value + '.'
}
return
}
//
if (/^\d$/.test(k)) {
//
if (gaijia.value.includes('.')) {
const [i, d] = gaijia.value.split('.')
if ((d || '').length < 2) gaijia.value += k
return
}
// 4
let intPart = gaijia.value
if (intPart === '0') intPart = '' // 01
if (intPart.length < 4) gaijia.value = intPart + k
}
}
//
const gysclick = (res : any) => {
console.log("///", res);
@ -1107,6 +1152,7 @@
const opengaijiaclick = () => {
opengaijia.value = true;
gaijia.value = (showvalue.value.arrivalPrice ? showvalue.value.arrivalPrice : showvalue.value.procurementPrice).toString()
donghuaopo.value = false;
setTimeout(() => {
donghuaopo.value = true;
@ -1242,6 +1288,7 @@
const opencgr = ref(false);
const opengys = ref(false);
const cgrlist = ref([]);
const gyslist = ref([]);
@ -1315,7 +1362,7 @@
queryCgdList(plzinfo).then((res : any) => {
plsbuy.value.push(...res.result.records)
alltotal.value = res.result.total
// console.log("zzzz", res.result.total)
console.log("请购单数据呢???", res)
if (res.result.records.length) {
form.cgdId = plsbuy.value[0].id
queryInvo();
@ -1361,13 +1408,7 @@
// console.log("!!!!",form)
queryCgdInfoList(form).then(res => {
InvoicingList.value = []
console.log("数据呢", res.result.records)
if (res.result.records.length == 1) {
InvoicingList.value.push(...res.result.records);
InvoicingList.value.push(...res.result.records);
InvoicingList.value.push(...res.result.records);
InvoicingList.value.push(...res.result.records);
}
// console.log("", res.result.records)
InvoicingList.value.push(...res.result.records);
if (form.pageNo) {
clickmiddle(0);
@ -1452,21 +1493,21 @@
}
const moreindex = ref(-1);
const zuofeiindex = ref(-1);
const openmore = (index : number) => {
zuofeiindex.value = index;
if (plsbuy.value[index].cgdType == '9') {
setTimeout(() => {
uni.showToast({
title: '该采购单已作废',
icon: 'error', //
duration: 2000
})
}, 300)
// const openmore = (index : number) => {
// zuofeiindex.value = index;
// if (plsbuy.value[index].cgdType == '9') {
// setTimeout(() => {
// uni.showToast({
// title: '',
// icon: 'error', //
// duration: 2000
// })
// }, 300)
} else {
moreindex.value = index;
}
}
// } else {
// moreindex.value = index;
// }
// }
const shareShow = ref(false);
const deletedownisopacity = ref(false)
const share = () => {
@ -1497,13 +1538,20 @@
const badshow = ref(false);
const donghuacs = ref(false)
const bebad = () => {
badshow.value = true;
moreindex.value = -1;
donghuacs.value = false;
setTimeout(() => donghuacs.value = true, 50)
// console.log("ceshi",Number(plsbuy.value[lefttarget.value]?.status))
// console.log("right?",plsbuy.value[lefttarget.value])
if (!Number(plsbuy.value[lefttarget.value]?.status) && plsbuy.value.length) {
badshow.value = true;
moreindex.value = -1;
donghuacs.value = false;
setTimeout(() => donghuacs.value = true, 50)
}
// return
}
const zuofei = () => {
voidedCgdMain({ id: plsbuy.value[zuofeiindex.value].id }).then((res : any) => {
voidedCgdMain({ id: plsbuy.value[lefttarget.value].id }).then((res : any) => {
// console.log("res", res)
if (res.success) {
uni.showToast({
@ -1989,6 +2037,7 @@
color: #888888;
text-align: center;
font-size: 25rpx;
overflow: hidden;
}
.middle-heng-father {
@ -2909,10 +2958,11 @@
// width: 100rpx;
padding: 0 30rpx;
letter-spacing: 10rpx;
height: 100rpx;
border: 1rpx solid #CBCFD0;
display: flex;
justify-content: center;
justify-content: flex-end;
align-items: center;
padding-left: 40rpx;
margin-right: 10rpx;