From 592e271a58d6e3582d2270471cb357689feb1757 Mon Sep 17 00:00:00 2001
From: ljx120 <10717296+ljx120@user.noreply.gitee.com>
Date: Thu, 9 Jan 2025 17:31:55 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/distribution/detailCus.vue | 22 ++--
pages/distribution/detailSpot.vue | 115 ++++++++++---------
pages/distribution/distribution.vue | 18 ++-
pages/documentary/documentary.vue | 170 +++++++++++++++++++++-------
pages/maintenance/p-details.vue | 51 +++++----
pages/spot/list.vue | 4 +
pages/spot/spot.vue | 2 +-
pages/whiteEmbryo/w-scanCode.vue | 2 -
8 files changed, 251 insertions(+), 133 deletions(-)
diff --git a/pages/distribution/detailCus.vue b/pages/distribution/detailCus.vue
index cc5d36d..3c5919b 100644
--- a/pages/distribution/detailCus.vue
+++ b/pages/distribution/detailCus.vue
@@ -11,6 +11,11 @@
const formItem = ref({ jcps: 0, jcms: 0 } as any)
const list = ref()
+ // 定义 props
+ defineProps<{
+ item ?: string;
+ }>();
+
onLoad(async (option : any) => {
if (option && option.item) {
try {
@@ -58,7 +63,7 @@
os.push(item)
}
})
- postAction('/cos', { sid: form.value.orderItems.id, fabric: form.value.orderItems.fabric, os: os, zt: typeData.value }).then((res : any) => {
+ postAction('/cos', { sid: form.value.orderItems.id, fabric: form.value.orderItems.fabric, os: os, zt: typeData.value,rc:formItem.value.rc}).then((res : any) => {
if (res.code === 200) {
showToast('提交成功!')
uni.redirectTo({
@@ -206,23 +211,18 @@
{{itemSecond.code}}
{{itemSecond.ms}}米
-
+
+
扫一扫
-
-
-
-
-
-
+
+
- import { onLoad } from '@dcloudio/uni-app';
+ import { onLoad, onShow } from '@dcloudio/uni-app';
import { ref } from 'vue';
import { formatDate } from '../../utils/date';
import { getAction, postAction } from '../../common/http';
-import { showToast } from 'vant';
+ import { showToast } from 'vant';
const form = ref({} as any)
const showDialog = ref(false)
@@ -11,16 +11,22 @@ import { showToast } from 'vant';
const formItem = ref({ jcps: 0, jcms: 0 } as any)
const list = ref()
+ // 定义 props
+ defineProps<{
+ item ?: string;
+ }>();
+
onLoad(async (option : any) => {
if (option && option.item) {
try {
form.value = JSON.parse(option.item);
- console.log(form.value);
} catch (error) {
console.error('Failed to parse item JSON:', error);
// 可以选择在这里显示错误消息给用户
}
}
+ })
+ onShow(() => {
getAction('/factory').then((res : any) => {
if (res.code === 200) {
list.value = res.data.map((l : any) => ({ text: l.name, value: l.name }))
@@ -33,43 +39,43 @@ import { showToast } from 'vant';
}
const onSubmit = () => {
- let os=[]
- form.value.fabric.forEach((l:any)=>{
- if(l.bhms1){
- if(l.bhms){
- l.bhms=l.bhms.concat(l.bhms1)
- }else{
- l.bhms=JSON.parse(JSON.stringify(l.bhms1))
+ let os = []
+ form.value.fabric.forEach((l : any) => {
+ if (l.bhms1) {
+ if (l.bhms) {
+ l.bhms = l.bhms.concat(l.bhms1)
+ } else {
+ l.bhms = JSON.parse(JSON.stringify(l.bhms1))
}
- l.phrq=formItem.value.phrq
- l.rc=formItem.value.rc
- let item={
- ms:0,
- ps:0,
- ml:l.name,
- bh:[],
+ l.phrq = formItem.value.phrq
+ l.rc = formItem.value.rc
+ let item = {
+ ms: 0,
+ ps: 0,
+ ml: l.name,
+ bh: [],
}
- l.bhms1.forEach((m:any)=>{
- item.ms+=m.ms*1
+ l.bhms1.forEach((m : any) => {
+ item.ms += m.ms * 1
item.ps++
item.bh.push(m.code)
})
- item.ms=Number(item.ms.toFixed(1))
+ item.ms = Number(item.ms.toFixed(1))
os.push(item)
}
})
- postAction('/ios',{orderId:form.value.id,fabric:form.value.fabric,os:os,zt:typeData.value}).then((res:any)=>{
- if(res.code===200){
+ postAction('/ios', { orderId: form.value.id, fabric: form.value.fabric, os: os, zt: typeData.value, rc: formItem.value.rc }).then((res : any) => {
+ if (res.code === 200) {
showToast('提交成功!')
uni.redirectTo({
- url:'/pages/distribution/distribution'
+ url: '/pages/distribution/distribution'
})
}
})
}
- const typeData=ref()
- const beforeSubmit = (type:any) =>{
- typeData.value=type
+ const typeData = ref()
+ const beforeSubmit = (type : any) => {
+ typeData.value = type
}
//扫一扫
@@ -82,24 +88,27 @@ import { showToast } from 'vant';
bhms.value = []
}
const conScanCode = () => {
- if(form.value.fabric[indexType.value].bhms1){
- form.value.fabric[indexType.value].bhms1=form.value.fabric[indexType.value].bhms1.concat(bhms.value)
- }else{
+ if (form.value.fabric[indexType.value].bhms1) {
+ form.value.fabric[indexType.value].bhms1 = form.value.fabric[indexType.value].bhms1.concat(bhms.value)
+ } else {
form.value.fabric[indexType.value].bhms1 = JSON.parse(JSON.stringify(bhms.value))
}
showDialog.value = false
let jcms = 0
- formItem.value.jcps=0
+ formItem.value.jcps = 0
form.value.fabric.forEach((l : any) => {
- l.bhms1.forEach((k : any) => {
- jcms += k.ms * 1
- formItem.value.jcps++
- })
+ if (l.bhms1) {
+ l.bhms1.forEach((k : any) => {
+ jcms += k.ms * 1
+ formItem.value.jcps++
+ })
+ }
})
formItem.value.jcms = jcms.toFixed(1)
}
function scanCode() {
+ showDialog.value = false
h5ScanCode.value = true;
uni.scanCode({
success: (res) => {
@@ -190,7 +199,7 @@ import { showToast } from 'vant';
谁定
面料编号/米数
-
+
{{item.name}}
@@ -202,33 +211,29 @@ import { showToast } from 'vant';
{{itemSecond.code}}
{{itemSecond.ms}}米
-
+
-
+
扫一扫
-
-
-
-
-
-
-
+
+
+
+
-
+ readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic()" />
+
@@ -237,7 +242,8 @@ import { showToast } from 'vant';
部分配货
-
+
已配全
@@ -260,10 +266,10 @@ import { showToast } from 'vant';
@@ -362,7 +368,8 @@ import { showToast } from 'vant';
border: 1rpx solid #d7d7d7;
border-radius: 10rpx;
}
- .line{
+
+ .line {
border-bottom: 1rpx solid #d7d7d7;
margin-bottom: 10rpx;
}
diff --git a/pages/distribution/distribution.vue b/pages/distribution/distribution.vue
index 568cf5c..8fc2e21 100644
--- a/pages/distribution/distribution.vue
+++ b/pages/distribution/distribution.vue
@@ -83,6 +83,12 @@
l.orderItems.forEach((m : any) => {
let item = statusList.value.find((k : any) => k.status == m.zt)
m.statusColor = item.type
+ m.ypps=0
+ m.wpps=0
+ m.fabric.forEach((k:any)=>{
+ m.ypps+=k.bhms.length
+ m.wpps+=(k.quantity-k.bhms.length)
+ })
})
})
total.value += res.data.total * 1
@@ -97,6 +103,12 @@
list.value.push(l)
let item = statusList.value.find((m : any) => m.status == l.zt)
l.statusColor = item.type
+ l.ypps=0
+ l.wpps=0
+ l.fabric.forEach((m:any)=>{
+ l.ypps+=m.bhms.length
+ l.wpps+=(m.quantity-m.bhms.length)
+ })
})
total.value += res.data.total * 1
loading.value = false;
@@ -287,6 +299,8 @@
{{itemSecond.zt}}
+ 已配货{{itemSecond.ypps}}匹
+ 待配货{{itemSecond.wpps}}匹
@@ -310,6 +324,8 @@
{{item.zt}}
+ 已配货{{item.ypps}}匹
+ 待配货{{item.wpps}}匹
@@ -372,8 +388,8 @@
.grid-item {
border: 1px solid #f2f2f2;
display: flex;
+ flex-direction: column;
align-items: center;
- text-align: center;
justify-content: center;
.grid-container1 {
diff --git a/pages/documentary/documentary.vue b/pages/documentary/documentary.vue
index ad11572..ead1fed 100644
--- a/pages/documentary/documentary.vue
+++ b/pages/documentary/documentary.vue
@@ -1,17 +1,14 @@
-
+
@@ -240,21 +293,21 @@
@click="chooseDate('endDate')" />
-
-
+
-
-
+
+
面料/颜色
@@ -266,16 +319,42 @@
{{item.fabricName}}
{{item.color}}
- {{item.sd}}/{{item.makeUser}}/{{item.belongTo}}
{{item.qty}}/{{item.len}}
- {{item.craft}}
{{item.craftComment.name}}
- {{item.status}}
+ {{item.sd}}/{{item.makeUser}}/{{item.belongTo}}
{{item.qty}}匹/{{item.len}}米
+
+
+ {{item.craft}}
{{item.craftComment.name?item.craftComment.name:item.craftComment}}
+
+
+ {{item.status}}
+
+
+
+
+
+
+
+
+
+
+
+
+
{
- form.value={type:val , evidence: [{}] }
+
+ const onChange = (val : any) => {
+ form.value = { type: val, evidence: [{}] }
}
- const typeChange = (item:any) =>{
- if(item.type==='Select'){
- item.chooses=[{value:''}]
- }else{
- item.chooses=[]
+ const typeChange = (item : any) => {
+ if (item.type === 'Select') {
+ item.chooses = [{ value: '' }]
+ } else {
+ item.chooses = []
}
}
@@ -90,6 +90,14 @@
+
+
+
+ 是
+ 否
+
+
+
@@ -102,17 +110,16 @@
@click.stop="item.chooses.splice(index,1)" v-else />
+
+
+
+ 是
+ 否
+
+
+
-
-
-
- 是
- 否
-
-
-
@@ -125,14 +132,14 @@
-
+
次审核
-
+
次审核
diff --git a/pages/spot/list.vue b/pages/spot/list.vue
index 030bf4c..7e1bf47 100644
--- a/pages/spot/list.vue
+++ b/pages/spot/list.vue
@@ -3,6 +3,7 @@
import { onMounted, ref, watch } from 'vue';
import { getAction } from '../../common/http';
import { formatDate } from '../../utils/date';
+ import { onShow } from '@dcloudio/uni-app';
const form = ref({} as any)
const list = ref([] as any[])
@@ -63,6 +64,9 @@
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
}
})
+ })
+ onShow(()=>{
+ list.value = []
init()
})
diff --git a/pages/spot/spot.vue b/pages/spot/spot.vue
index b65da83..ce0b41b 100644
--- a/pages/spot/spot.vue
+++ b/pages/spot/spot.vue
@@ -266,7 +266,7 @@
label-width="6.5em" />
-
+
diff --git a/pages/whiteEmbryo/w-scanCode.vue b/pages/whiteEmbryo/w-scanCode.vue
index 1c3ad38..4990980 100644
--- a/pages/whiteEmbryo/w-scanCode.vue
+++ b/pages/whiteEmbryo/w-scanCode.vue
@@ -138,8 +138,6 @@ const onClickRight=()=>{
h5ScanCode.value = false;
},
});
- // TODO
-
}
function handleClose() {
h5ScanCode.value = false;