质检完成

This commit is contained in:
ljx120 2025-02-08 16:58:58 +08:00
parent 55d21b4475
commit 82459c47dd
13 changed files with 1391 additions and 226 deletions

View File

@ -9,7 +9,8 @@ export default {
//本地服务
base_scm: 'https://scm.goodsilk.cn/api',
base_scm: 'http://192.168.1.222:7002',
// base_scm: 'https://scm.goodsilk.cn/api',
base_auth:'https://oauth.goodsilk.cn/api',//登录
base_mes:'https://scm.goodsilk.cn/mes',//面料
base_process:'https://scm.goodsilk.cn/mes',//工艺

View File

@ -449,6 +449,18 @@
"bounce": "none"
}
}
},
{
"path" : "pages/colorBlank/resultsQuery",
"style" :
{
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": true,
"app-plus": {
"bounce": "none"
}
}
}
],
"globalStyle": {

View File

@ -1,31 +1,93 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { formatDate } from '../../utils/date';
import { onMounted, ref, watch } from 'vue';
import { formatDate } from '../../utils/date';
import { onLoad } from '@dcloudio/uni-app';
import { getAction, putAction } from '../../common/http';
import { showConfirmDialog, showToast } from 'vant';
const form=ref({ybrq:formatDate(new Date())} as any)
const form = ref({} as any)
const showPicker = ref(false)
const show = ref(false)
const popuList = ref([] as any[])
onMounted(()=>{
const info = JSON.parse(localStorage.getItem('info'))
form.value.jyy=info.userName
const list = ref([] as any[])
const listData = ref([] as any[])
const testItems = ref([] as any[])
const showDialog = ref(false)
const blemlist = ref([] as any[])
// props
defineProps<{
item ?: string;
}>();
onLoad(async (option : any) => {
form.value = JSON.parse(option.item)
form.value.testTime = formatDate(new Date())
for (let i = 0; i < form.value.ps; i++) {
listData.value.push({})
}
if (form.value.status) {
listData.value = form.value.mlxqs
testItems.value = form.value.testItems
} else {
getAction('/testItem').then((res : any) => {
if (res.code === 200) {
testItems.value = res.data.payload
//
testItems.value.forEach((l : any) => {
if (l.type === 'Select') {
l.options.forEach((m : any) => {
if (m.default) {
l.value = m.name
}
})
}
})
}
})
}
getAction('/tracking/getDetail?id=' + form.value.trackingLogId).then((res : any) => {
if (res.code === 200) {
list.value = res.data.details.list
}
})
})
onMounted(() => {
const info = JSON.parse(localStorage.getItem('info'))
form.value.jyy = info.userName
//
getAction('/blemish').then((res : any) => {
if (res.code === 200) {
blemlist.value = res.data
}
})
})
const chooseDate = () => {
show.value = true
}
const onConfirmDate = (val : any) => {
form.value.ybrq = formatDate(val)
form.value.testTime = formatDate(val)
show.value = false
}
const indexData = ref()
//
const choosePic = (type : any, index : any) => {
if (type) {
indexData.value = index
popuList.value = type.options.map((l : any) => ({ value: l.name, text: l.name }))
} else {
indexData.value = -1
popuList.value = [{ value: '普通纸管', text: '普通纸管' }, { value: '抗皱纸管', text: '抗皱纸管' }]
}
showPicker.value = true
}
//
const pickerConfirm = (val : any) => {
if (indexData.value >= 0) {
testItems.value[indexData.value].value = val.selectedValues[0]
} else {
form.value.wrapper = val.selectedValues[0]
}
showPickerCancel()
}
//
@ -34,38 +96,467 @@ import { formatDate } from '../../utils/date';
}
//
const handleOpen = () => {
}
const onClickLeft = () => {
history.back()
}
const h5ScanCode = ref(false);
function scanCode(index : any) {
indexData.value = index
// #ifdef H5
h5ScanCode.value = true;
// #endif
// #ifndef H5
uni.scanCode({
success: (res) => {
uni.showToast({
icon: "none",
title: res.result,
});
},
faile: (err) => {
console.log("err", err);
},
});
// #endif
}
function handleSuccess(res : any) {
h5ScanCode.value = false;
listData.value[indexData.value].code = res
}
function handleFail(err : any) {
uni.showModal({
title: err.errName,
content: err.errMsg,
complete: () => {
h5ScanCode.value = false;
},
});
}
function handleClose() {
h5ScanCode.value = false;
}
//
const ifReturn = ref(false)
const ms = ref()
const zfs = ref()
const yjksms = ref()
const dialogList = ref([] as any[])
const openDialog = (index : any) => {
if (!form.value.width) return showToast('请先填写门幅!')
showDialog.value = true
indexData.value = index
ms.value = listData.value[indexData.value].ms
zfs.value = listData.value[indexData.value].zfs
yjksms.value = listData.value[indexData.value].yjksms
ifReturn.value = listData.value[indexData.value].ifReturn
dialogList.value = listData.value[indexData.value].dialogList ? listData.value[indexData.value].dialogList : []
}
const dialogCancel = () => {
ms.value = ''
zfs.value = ''
yjksms.value = ''
ifReturn.value = false
dialogList.value = []
showDialog.value = false
}
const dialogSubmit = () => {
listData.value[indexData.value] = { ms: ms.value, zfs: zfs.value, yjksms: yjksms.value, ifReturn: ifReturn.value, dialogList: dialogList.value }
if (ifReturn.value) {
listData.value[indexData.value].code = '回修'
}
showDialog.value = false
ms.value = ''
zfs.value = ''
yjksms.value = ''
ifReturn.value = false
dialogList.value = []
}
const showPop = ref(false)
const chooseItem = ref()
const indexType = ref()
const openPopup = (index : any) => {
showPop.value = true
indexType.value = index
chooseItem.value = dialogList.value[index]
}
const popupNext = () => {
indexType.value++
if (indexType.value >= dialogList.value.length) {
dialogList.value.push({})
}
chooseItem.value = dialogList.value[indexType.value]
}
const popupSubmit = () => {
if (!chooseItem.value.wz || !chooseItem.value.kfs || !chooseItem.value.xc) return showToast('请填写完整信息!')
let fs = 100
dialogList.value.forEach((l : any) => {
fs = fs - l.kfs
})
zfs.value = fs
if (form.value.width >= 120) {
if (fs <= 89) {
yjksms.value = (89 - fs) * 0.25
} else {
yjksms.value = 0
}
} else if (form.value.width < 120) {
if (fs <= 91) {
yjksms.value = (91 - fs) * 0.25
} else {
yjksms.value = 0
}
}
showPop.value = false
}
//
const onSubmit = () => {
let tj = false
listData.value.forEach((l : any) => {
if ((!l.ms || !l.code || !l.gcsh) && !l.ifReturn) {
tj = true
}
})
if (tj) return showToast('请填写完整信息!')
showConfirmDialog({
message: '本批面料是否暂存?',
confirmButtonText: '质检完成',
cancelButtonText: '暂存',
})
.then(() => {
let data = []
listData.value.forEach((l : any, j : any) => {
if (l.code == '回修') {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '回修',
})
} else {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '质检完成',
})
}
})
putAction('/testing/test', data).then((res : any) => {
if (res.code === 200) {
uni.navigateBack()
}
})
})
.catch(() => {
let data = []
listData.value.forEach((l : any, j : any) => {
if (l.code == '回修') {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '回修',
})
} else {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '暂存',
})
}
})
putAction('/testing/test', data).then((res : any) => {
if (res.code === 200) {
uni.navigateBack()
}
})
});
}
//
const save = () => {
let data = []
listData.value.forEach((l : any, j : any) => {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '保存',
})
})
putAction('/testing/test', data).then((res : any) => {
if (res.code === 200) {
uni.navigateBack()
}
})
}
const zgshDialog = ref(false)
const shChecked = ref(false)
const listData1 = ref([] as any[])
watch(shChecked, () => {
listData1.value.forEach((l : any) => {
l.checked = shChecked.value
})
})
//
const application = () => {
listData1.value = JSON.parse(JSON.stringify(listData.value))
console.log(listData1.value);
let tj = false
listData1.value.forEach((l : any) => {
if ((!l.ms || !l.code || !l.gcsh) && !l.ifReturn) {
tj = true
}
})
if (tj) return showToast('请填写完整信息!')
zgshDialog.value = true
}
const zgshSubmit = () => {
let data = []
listData1.value.forEach((l : any, j : any) => {
if (l.checked) {
if (l.code == '回修') {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '回修',
})
} else {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '待审核',
})
}
} else {
data.push({
...form.value,
id: form.value.ids[j],
mlxq: l,
testItems: testItems.value,
status: '保存',
})
}
})
putAction('/testing/test', data).then((res : any) => {
if (res.code === 200) {
uni.navigateBack()
}
})
}
</script>
<template>
<view class="flex">
<van-nav-bar title="色胚质检" left-text="返回" left-arrow @click-left="onClickLeft" />
<view class="content">
<van-cell-group inset>
<van-field class="bor" label="验布日期" label-width="5em" colon v-model="form.ybrq" readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
<van-field label="检验员" label-width="5em" colon v-model="form.jyy" readonly/>
<van-field label="面料名称" label-width="5em" colon v-model="form.ybrq" readonly/>
<van-field label="面料颜色" label-width="5em" colon v-model="form.ybrq" readonly/>
<van-field label="工厂" label-width="5em" colon v-model="form.ybrq" readonly/>
<van-field label="工艺" label-width="5em" colon v-model="form.ybrq" readonly/>
<van-field label="工艺要求" label-width="5em" colon v-model="form.ybrq" readonly/>
<van-field class="bor" label="纸管" label-width="5em" colon v-model="form.ybrq" readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic()" />
<van-field class="line" label="姆米" label-width="5em" colon v-model="form.mm" type="number" :rules="[{ required: true, message: '请填写' }]" />
<van-field class="line" label="门幅" label-width="5em" colon v-model="form.mf" type="number" :rules="[{ required: true, message: '请填写' }]" />
</van-cell-group>
<van-form @submit="onSubmit">
<van-cell-group inset>
<van-field class="bor" label="验布日期" label-width="5em" colon v-model="form.testTime" readonly
:rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
<van-field label="检验员" label-width="5em" colon v-model="form.jyy" readonly />
<van-field label="面料名称" label-width="5em" colon v-model="form.fabric" readonly />
<van-field label="面料颜色" label-width="5em" colon v-model="form.color" readonly />
<van-field label="工厂" label-width="5em" colon v-model="form.rc" readonly />
<van-field label="工艺" label-width="5em" colon v-model="form.craft" readonly />
<van-field label="工艺要求" label-width="5em" colon v-model="form.craftCmt.name" readonly />
<van-field class="bor" label="纸管" label-width="5em" colon v-model="form.wrapper" readonly
:rules="[{ required: true, message: '请填写' }]" @click="choosePic()" />
<van-field class="line" label="姆米" label-width="5em" colon v-model="form.momme" type="number"
@input="form.momme=form.momme.replace(/^\D*(\d*(?:\.\d{0,1})?).*$/g, '$1')"
:rules="[{ required: true, message: '请填写' }]" />
<van-field class="line" label="门幅" label-width="5em" colon v-model="form.width" type="number"
@input="form.width=form.width.replace(/^\D*(\d*(?:\.\d{0,1})?).*$/g, '$1')"
:rules="[{ required: true, message: '请填写' }]" />
<view class="grid-container">
<view class="grid-item" v-for="(item,index) in testItems" :key="index">
<van-field :class="item.type=='Text'?'line':'bor'" :label="item.name" label-width="auto"
colon v-model="item.value" :readonly="item.type!='Text'"
:rules="item.necessary?[{ required: true, message: '请填写' }]:[]"
@click="item.type=='Select'?choosePic(item,index):''" />
</view>
</view>
</van-cell-group>
<p>跟单检测项</p>
<view v-for="(item,index) in list" :key="index">
<van-field :label="item.name" label-width="auto" colon v-model="item.value" readonly />
</view>
<view>
<view class="grid-container1">
<view class="grid-item">序号</view>
<view class="grid-item">分数</view>
<view class="grid-item">总米数<br>预计扣损米数</view>
<view class="grid-item">缸差色号</view>
<view class="grid-item">操作</view>
</view>
<view class="grid-container1" v-for="(item,index) in listData" :key="index">
<view class="grid-item">{{index+1}}</view>
<view class="grid-item" @click="openDialog(index)">{{item.zfs}}</view>
<view class="grid-item">{{item.ms}}/{{item.yjksms}}</view>
<view class="grid-item">
<van-field class="line" v-model="item.gcsh" type="digit"
@input="item.gcsh=item.gcsh.replace(/^\d{3}$/)" />
</view>
<view class="grid-item">
<p v-if="item.code">{{item.code}} <van-icon name="cross" @click="item.code=''"></van-icon>
</p>
<van-button v-if="!item.code" type="primary" @click="scanCode(index)">
扫一扫
</van-button>
</view>
</view>
</view>
<van-field class="line" label="备注" label-width="2.5em" colon v-model="form.comment" />
<view style="display: flex;align-items: center;justify-content: space-around;">
<van-button block style="margin: 10rpx;" @click="save">
保存
</van-button>
<van-button block type="warning" style="margin: 10rpx;" @click="application" v-if="form.zt!='待审核'">
申请审核
</van-button>
<van-button block type="primary" native-type="submit" style="margin: 10rpx;">
提交
</van-button>
</view>
</van-form>
</view>
</view>
<van-dialog v-model:show="showDialog" :show-confirm-button="false">
<van-form @submit="dialogSubmit">
<van-field label="是否回修" label-width="6.5em" colon label-align="right">
<template #input>
<van-switch v-model="ifReturn" />
</template>
</van-field>
<van-field label="米数" label-width="6.5em" colon label-align="right" v-model="ms"
:rules="ifReturn?[]:[{ required: true, message: '请填写' }]" class="line">
<template #button></template>
</van-field>
<van-field label="总分数" label-width="6.5em" colon label-align="right" v-model="zfs" readonly
:rules="ifReturn?[]:[{ required: true, message: '请填写' }]">
<template #button></template>
</van-field>
<van-field label="预计扣损米数" label-width="6.5em" colon v-model="yjksms" readonly
:rules="ifReturn?[]:[{ required: true, message: '请填写' }]">
<template #button></template>
</van-field>
<view class="grid-container2">
<view class="grid-item">
<van-icon name="add" color="red" @click="dialogList.push({})" />
</view>
<view class="grid-item">瑕疵</view>
<view class="grid-item">扣分数</view>
<view class="grid-item">位置</view>
</view>
<view class="grid-container2" v-for="(item,index) in dialogList" :key="index">
<view class="grid-item">
<van-icon name="clear" color="red" @click="dialogList.splice(index,1)" />
</view>
<view class="grid-item" @click="openPopup(index)">{{item.xc}}</view>
<view class="grid-item">{{item.kfs}}</view>
<view class="grid-item">{{item.wz}}</view>
</view>
<view class="footer-button">
<van-button size="small" style="width: 25vw;" @click="dialogCancel">
取消
</van-button>
<van-button size="small" native-type="submit" type="success" style="width: 25vw;">
提交
</van-button>
</view>
</van-form>
</van-dialog>
<van-popup v-model:show="showPop" style="width: 80%" round :close-on-click-overlay="false">
<view class="grid-container3">
<view class="grid-item" v-for="(item,index) in blemlist" :key="index">
<p :class="chooseItem.xc==item.name?'xz':'wxz'" @click="chooseItem.xc=item.name">{{item.name}}</p>
</view>
</view>
<p>扣分数:</p>
<view class="grid-container3">
<view class="grid-item" @click="chooseItem.kfs=1">
<p :class="chooseItem.kfs==1?'xz':'wxz'">1</p>
</view>
<view class="grid-item" @click="chooseItem.kfs=2">
<p :class="chooseItem.kfs==2?'xz':'wxz'">2</p>
</view>
<view class="grid-item" @click="chooseItem.kfs=3">
<p :class="chooseItem.kfs==3?'xz':'wxz'">3</p>
</view>
<view class="grid-item" @click="chooseItem.kfs=4">
<p :class="chooseItem.kfs==4?'xz':'wxz'">4</p>
</view>
</view>
<van-field label="位置" label-width="2.5em" colon v-model="chooseItem.wz" class="line" type="number"
@input="chooseItem.wz=chooseItem.wz.replace(/^\D*(\d*(?:\.\d{0,1})?).*$/g, '$1')" />
<view class="footer-button">
<van-button size="small" style="width: 25vw;" @click="popupSubmit">
完成
</van-button>
<van-button size="small" type="success" style="width: 25vw;" @click="popupNext">
下一处
</van-button>
</view>
</van-popup>
<van-dialog v-model:show="zgshDialog">
<view style="margin: 10rpx 5rpx;">
<p style="margin-bottom: 10rpx;">请选择需要主管审核的面料</p>
<view class="grid-container4">
<view class="grid-item"><van-checkbox v-model="shChecked"></van-checkbox></view>
<view class="grid-item">分数</view>
<view class="grid-item">总米数<br>预计扣损米数</view>
<view class="grid-item">操作</view>
</view>
<view class="grid-container4" v-for="(item,index) in listData1" :key="index">
<view class="grid-item">
<van-checkbox v-model="item.checked"></van-checkbox>
</view>
<view class="grid-item" @click="openDialog(index)">{{item.zfs}}</view>
<view class="grid-item">{{item.ms}}/{{item.yjksms}}</view>
<view class="grid-item">{{item.code}}</view>
</view>
</view>
<template #footer>
<view class="footer-button">
<van-button size="small" style="width: 25vw;" @click="zgshDialog=false">
取消
</van-button>
<van-button size="small" type="success" style="width: 25vw;" @click="zgshSubmit">
确认
</van-button>
</view>
</template>
</van-dialog>
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
@close="handleClose"></cshaptx4869-scancode>
<van-calendar v-model:show="show" @confirm="onConfirmDate" :min-date="new Date(2010, 0, 1)"
:max-date="new Date(2050, 0, 31)" />
<!--选择框-->
<van-popup v-model:show="showPicker" round position="bottom" @open="handleOpen">
<van-picker show-toolbar :columns="popuList" @confirm="pickerConfirm" @cancel="showPickerCancel"
v-model="selectValue" ref="pickerRef" />
ref="pickerRef" />
</van-popup>
</template>
@ -75,39 +566,179 @@ import { formatDate } from '../../utils/date';
flex-direction: column;
height: 100vh;
width: 100vw;
}
.van-nav-bar {
width: 100%;
}
.van-nav-bar {
width: 100%;
}
.content {
flex: 1;
padding: 0 20rpx;
}
::v-deep .van-field {
font-size: 16px;
}
::v-deep .van-field__label{
display: flex;
justify-content: space-between;
}
::v-deep .van-button--normal {
padding: 5px 8px;
height: 30px;
}
::v-deep .van-field__control {
.content {
flex: 1;
padding: 0 20rpx;
}
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0 15rpx;
}
.grid-container1 {
font-size: 24rpx;
display: grid;
grid-template-columns: 0.5fr 1fr 1.5fr 1fr 1fr;
padding: 0 15rpx;
.grid-item {
border: 1px solid #f2f2f2;
text-align: center;
font-size: 16px;
}
.bor {
::v-deep .van-field__control {
border: 1px solid #d7d7d7;
white-space: pre-line;
padding: 5rpx;
word-break: break-all;
display: flex;
justify-content: center;
align-items: center;
/*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical;
/*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
/*超出隐藏*/
::v-deep .van-button--normal {
padding: 8rpx 16rpx;
height: 50rpx;
font-size: 24rpx;
}
}
.line{
::v-deep .van-field__control {
border-bottom: 1px solid #d7d7d7;
text-align: center;
font-size: 24rpx !important;
}
}
}
::v-deep .van-field__control {
text-align: center;
font-size: 16px;
}
::v-deep .van-field {
font-size: 16px;
}
::v-deep .van-button--normal {
padding: 5px 8px;
height: 30px;
}
.bor {
::v-deep .van-field__control {
border: 1px solid #d7d7d7;
}
}
.line {
::v-deep .van-field__control {
border-bottom: 1px solid #d7d7d7;
}
}
.grid-container2 {
display: grid;
grid-template-columns: 0.5fr 1.5fr 1fr 1fr;
padding: 0 15rpx;
.grid-item {
border: 1px solid #f2f2f2;
text-align: center;
white-space: pre-line;
padding: 5rpx;
word-break: break-all;
display: flex;
justify-content: center;
align-items: center;
/*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical;
/*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
/*超出隐藏*/
::v-deep .van-button--normal {
padding: 8rpx 16rpx;
height: 50rpx;
font-size: 18rpx;
}
}
}
.grid-container3 {
margin-top: 10px;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
padding: 0 15rpx;
.grid-item {
border: 1rpx solid #73a7dc;
margin: 5rpx;
text-align: center;
white-space: pre-line;
word-break: break-all;
display: flex;
justify-content: center;
align-items: center;
/*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical;
/*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
/*超出隐藏*/
::v-deep .van-button--normal {
padding: 8rpx 16rpx;
height: 50rpx;
font-size: 18rpx;
}
}
}
.xz {
width: 100%;
color: #fff;
background-color: #73a7dc;
}
.wxz {
color: #73a7dc;
}
::v-deep .van-cell {
display: flex;
align-items: center;
}
.footer-button {
margin: 20px;
display: flex;
justify-content: space-around;
}
.grid-container4 {
display: grid;
grid-template-columns: 0.5fr 1fr 1fr 1.5fr;
padding: 0 15rpx;
.grid-item {
border: 1px solid #f2f2f2;
text-align: center;
white-space: pre-line;
padding: 5rpx;
word-break: break-all;
display: flex;
justify-content: center;
align-items: center;
/*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical;
/*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
}
}
</style>

View File

@ -1,12 +1,12 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { getAction, postAction } from '../../common/http';
import { getAction, postAction, putAction } from '../../common/http';
import { formatDate } from '../../utils/date';
import { onShow } from '@dcloudio/uni-app';
import { showToast } from 'vant';
const form = ref({} as any)
const dataItem = ref({ shrq: formatDate(new Date())} as any)
const dataItem = ref({ shrq: formatDate(new Date()) } as any)
const list = ref([] as any[])
const factory = ref([] as any[])
const nameList = ref([] as any[])
@ -69,58 +69,42 @@
const onClickLeft = () => {
history.back()
}
const onClickRight = () =>{
console.log(dataItem.value);
}
const total = ref(0)
const currentPage = ref(1)
const finished = ref(false)
const loading = ref(false);
//
const onLoad = () => {
if (list.value.length < total.value) {
currentPage.value++
init()
} else {
finished.value = true
}
};
function init() {
total.value = 0
getAction('/stockroom/uncheck', { page: currentPage.value, size: 10, ...form.value }).then((res : any) => {
if (res.code === 200) {
res.data.record.forEach((l : any) => {
if (isValidJSON(l.craftComment)) {
l.craftComment = JSON.parse(l.craftComment)
}
if (l.zt === '已出厂') {
l.butonColor = '#ff9e49'
l.status='收货'
}
list.value.push(l)
})
total.value += res.data.total * 1
loading.value = false;
finished.value = false
}
const onClickRight = () => {
uni.navigateTo({
url:'/pages/colorBlank/chemical'
})
}
function isValidJSON(str : any) {
if (typeof str !== 'string') return false; //
try {
JSON.parse(str);
return true;
} catch (e) {
return false;
}
function init() {
getAction('/testing', form.value).then((res : any) => {
if (res.code === 200) {
res.data.forEach((l:any)=>{
let item=list.value.find(m=>m.trackingLogId==l.trackingLogId&&m.fabric==l.fabric&&m.status==l.status)
if(item){
item.len=(item.len*1+l.len*1).toFixed(1)
item.ps++
item.ids.push(l.id)
item.mlxqs.push(l.mlxq)
}else{
l.ids=[l.id]
l.ps=1
l.mlxqs=[l.mlxq]
if(l.zt=='待收货'){
l.ztc='warning'
}else if(l.zt=='待质检'){
l.ztc='primary'
}else if(l.zt=='待审核'){
l.ztc='danger'
}else if(l.zt=='已质检'){
l.ztc='success'
}
list.value.push(l)
}
})
}
})
}
watch(form.value, () => {
list.value = []
init()
@ -137,16 +121,19 @@
//
const pickerConfirm = (val : any) => {
form.value[typeData.value] = val.selectedValues[0]
showPickerCancel()
showPicker.value = false
}
//
const showPickerCancel = () => {
form.value[typeData.value] = ''
showPicker.value = false
}
//
const handleOpen = () => {
if (typeData.value === 'factory') {
popuList.value = factory.value
} else if (typeData.value === 'zt') {
popuList.value = [{ text: '待收货', value: '待收货' }, { text: '待质检', value: '待质检' }, { text: '待审核', value: '待审核' }, { text: '已质检', value: '已质检' }]
} else {
popuList.value = nameList.value
}
@ -248,33 +235,50 @@
const itemList = ref({} as any)
const submit = () => {
console.log(dataItem.value);
// TODO
// postAction('/tracking', { orderId: itemList.value.id, type: itemList.value.type, data: dataItem.value, status: '' }).then((res : any) => {
// if (res.code === 200) {
// showDialog.value = false
// showToast('')
// }
// })
let ids=itemList.value.ids.join(',')
putAction('/testing/receive?ids='+ids+'&date='+dataItem.value.shrq).then((res:any)=>{
if(res.code===200){
showDialog.value = false
list.value = []
init()
}
})
}
//
const toDetile = (item : any) => {
itemList.value = item
if(item.zt=='待收货'){
showDialog.value = true
}else if(item.zt=='待质检'||item.zt=='待审核'){
uni.navigateTo({
url:'/pages/colorBlank/ColorBlankQuality?item='+JSON.stringify(item),
})
}else if(item.zt=='已质检'){
}
}
//
const computing = (list:any) =>{
let total=list.reduce((accumulator:any, currentValue:any) => {
return accumulator + currentValue.ms*1;
}, 0);
return total
}
//
const toDetile = (item:any) =>{
itemList.value=item
showDialog.value = true
const computer = (data:any) =>{
let date1 = new Date();
let date2 = new Date(data);
let time1 = date1.getTime();
let time2 = date2.getTime();
let diffInMs = time1 - time2;
let diffInSeconds = Math.floor(diffInMs / 1000); //
let diffInMinutes = Math.floor(diffInSeconds / 60); //
let diffInHours = Math.floor(diffInMinutes / 60); //
let diffInDays = Math.floor(diffInHours / 24); //
return diffInDays
}
</script>
<template>
<view class="flex">
<van-nav-bar title="色胚质检列表" left-text="返回" left-arrow @click-left="onClickLeft" right-text="新增" @click-right="onClickRight()" />
<van-nav-bar title="色胚质检列表" left-text="返回" left-arrow @click-left="onClickLeft" right-text="新增"
@click-right="onClickRight()" />
<van-cell-group inset style="display: flex;">
<van-field v-model="form.fabric" name="面料名称" label="面料名称" class="bor" colon label-width="5em" readonly
@click="selectChoose" />
@ -292,6 +296,10 @@
<van-field v-model="form.factory" name="面料来源" label="面料来源" colon class="bor" label-width="5em" readonly
@click="choosePic('factory')" />
</van-cell-group>
<van-cell-group inset style="display: flex;">
<van-field v-model="form.zt" name="状态" label="状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态" colon
class="bor" label-width="5em" readonly @click="choosePic('zt')" />
</van-cell-group>
<view class="grid-container">
<view class="grid-item">面料/颜色</view>
<view class="grid-item">谁定/做单人/归属人<br>匹数/米数</view>
@ -299,44 +307,31 @@
<view class="grid-item">状态</view>
</view>
<view class="content">
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<view class="grid-container" v-for="(item,index) in list" :key="index">
<view class="grid-item">
<view class="grid-container1">
<view :class="indexSecond===(item.mls.length-1)?'grid-item2':'grid-item1'"
v-for="(itemSecond,indexSecond) in item.mls" :key="indexSecond">
{{itemSecond.mz}}<br>{{itemSecond.sh}}
</view>
</view>
</view>
<view class="grid-item">
<view class="grid-container1">
<view :class="indexSecond===(item.mls.length-1)?'grid-item2':'grid-item1'"
v-for="(itemSecond,indexSecond) in item.mls" :key="indexSecond">
{{item.sd}}/{{item.makeUser}}/{{item.belongTo}}<br>{{itemSecond.xxs.length}}/{{computing(itemSecond.xxs)}}
</view>
</view>
</view>
<view class="grid-item">
{{item.rc}}
</view>
<view class="grid-item">
<van-button :style="{backgroundColor: item.butonColor,color:'#fff',border:'none'}"
@click="toDetile(item)">{{item.status}}</van-button>
<p style="color: red;">{{item.processes.processes.find(l=>!l.id)?.name}}</p>
</view>
<view class="grid-container" v-for="(item,index) in list" :key="index">
<view class="grid-item">
{{item.fabric}}<br>{{item.color}}
</view>
</van-list>
<view class="grid-item">
{{item.sd}}/{{item.makeUser}}/{{item.belongTo}}<br>{{item.ps}}/{{item.len}}
</view>
<view class="grid-item">
{{item.rc}}
</view>
<view class="grid-item" style="display: flex;flex-direction: column;">
<van-button :type="item.ztc" @click="toDetile(item)">{{item.zt}}</van-button>
<p v-if="item.receiveTime&&item.zt!='已质检'">已入库<span :style="{color: item.receiveTime>=2?'red':''}">{{computer(item.receiveTime)}}</span></p>
</view>
</view>
</view>
</view>
<van-dialog v-model:show="showDialog">
<view style="margin-top: 10rpx;">
<van-cell-group inset>
<van-field v-model="dataItem.shr" name="收货人" label="收货人" colon readonly label-width="5em"
class="bor-n" label-align="right" />
<van-field v-model="dataItem.shrq" name="收货日期" label="收货日期" colon label-width="5em" class="bor"
readonly @click="chooseDate('shrq')" label-align="right" />
<van-field v-model="dataItem.shr" name="收货人" label="收货人" colon readonly label-width="5em" class="bor-n"
label-align="right" />
<van-field v-model="dataItem.shrq" name="收货日期" label="收货日期" colon label-width="5em" class="bor" readonly
@click="chooseDate('shrq')" label-align="right" />
</van-cell-group>
</view>
<template #footer>
@ -401,47 +396,23 @@
.grid-container {
display: grid;
grid-template-columns: 1.5fr 2fr 1.5fr 1fr;
grid-template-columns: 1.5fr 2fr 1.5fr 1.2fr;
padding: 0 15rpx;
.grid-item {
border: 1px solid #f2f2f2;
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
white-space: pre-line;
padding: 5rpx;
word-break: break-all;
display: flex;
justify-content: center;
.grid-container1 {
display: grid;
grid-template-columns: repeat(1, 1fr);
width: 100%;
height: 100%;
.grid-item2 {
display: flex;
white-space: pre-line;
align-items: center;
justify-content: center;
padding: 5rpx;
word-break: break-all;
display: -webkit-box; /*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical; /*设置弹性盒模型子元素的排列方式*/
overflow: hidden; /*超出隐藏*/
}
.grid-item1 {
border-bottom: 1px solid #f2f2f2;
display: flex;
align-items: center;
justify-content: center;
padding: 5rpx;
word-break: break-all;
display: -webkit-box; /*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical; /*设置弹性盒模型子元素的排列方式*/
overflow: hidden; /*超出隐藏*/
}
}
align-items: center;
/*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical;
/*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
/*超出隐藏*/
}
}
@ -539,6 +510,7 @@
height: 30px;
padding: 10px 16px 0;
}
::v-deep .select-model .van-picker__confirm,
.select-model .van-picker__confirm {
height: 30px;
@ -625,6 +597,7 @@
height: 30px;
padding: 10px 16px 0;
}
::v-deep .select-model .van-picker__confirm,
.select-model .van-picker__confirm {
height: 30px;

View File

@ -11,9 +11,9 @@
init()
})
const init = () => {
getAction('/blemish',{page:1,size:100}).then((res : any) => {
getAction('/blemish').then((res : any) => {
if (res.code === 200) {
list.value = res.data.record
list.value = res.data
}
})
}

View File

@ -11,7 +11,7 @@
function init() {
getAction('/testItem').then((res : any) => {
if (res.code === 200) {
list.value = JSON.parse(res.data.payload)
list.value = res.data.payload
}
})
}
@ -19,13 +19,25 @@
history.back()
}
const onClickRight = () => {
list.value.push({ options: [{}] })
list.value.push({ necessary:true,options: [{}] })
}
//
const addxx = (item : any) => {
item.options.push({})
}
const onSubmit = () => {
let tj=true
list.value.forEach((l:any)=>{
if(!l.name||!l.type){
tj=false
}
l.options.forEach((m:any)=>{
if(!m.name||!m.contentType){
tj=false
}
})
})
if(!tj) return showToast('请填完整信息!')
let param = {
id: 1,
payload: JSON.stringify(list.value)

View File

@ -0,0 +1,537 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { getAction, putAction } from '../../common/http';
import { formatDate } from '../../utils/date';
import { onShow } from '@dcloudio/uni-app';
import { showToast } from 'vant';
const form = ref({} as any)
const dataItem = ref({ shrq: formatDate(new Date()) } as any)
const list = ref([] as any[])
const factory = ref([] as any[])
const nameList = ref([] as any[])
onMounted(() => {
getAction('/fabric/info/all').then((res : any) => {
if (res.code === 200) {
res.data.forEach((l : any) => {
let itemMl = mlList.value.find(m => m.text === l.commodity)
if (itemMl) {
let itemMm = itemMl.children.find(m => m.value === l.momme)
if (itemMm) {
itemMm.children.push({ text: l.width + 'cm', value: l.width })
} else {
itemMl.children.push({
text: l.momme + 'mm',
value: l.momme,
children: [{ text: l.width + 'cm', value: l.width }]
})
}
} else {
mlList.value.push({
text: l.commodity,
value: l.commodity,
children: [{ text: l.momme + 'mm', value: l.momme, children: [{ text: l.width + 'cm', value: l.width }] }]
})
}
})
}
})
//
getAction('/v1/user/getNames').then((res : any) => {
if (res.code === 200) {
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
}
})
//
getAction('/factory').then((res : any) => {
if (res.code === 200) {
factory.value = res.data.map((l : any) => ({ text: l.name, value: l.name }))
}
})
})
onShow(() => {
list.value = []
init()
//
uni.getStorage({
key: 'info',
success(res) {
let data = JSON.parse(res.data)
dataItem.value.shr = data.userName
},
fail: (err : any) => {
console.log(err);
}
})
})
const onClickLeft = () => {
history.back()
}
function init() {
getAction('/testing', form.value).then((res : any) => {
if (res.code === 200) {
res.data.forEach((l:any)=>{
let item=list.value.find(m=>m.trackingLogId==l.trackingLogId&&m.fabric==l.fabric&&m.status==l.status)
if(item){
item.len=(item.len*1+l.len*1).toFixed(1)
item.ps++
item.ids.push(l.id)
item.mlxqs.push(l.mlxq)
}else{
l.ids=[l.id]
l.ps=1
l.mlxqs=[l.mlxq]
if(l.zt=='待收货'){
l.ztc='warning'
}else if(l.zt=='待质检'){
l.ztc='primary'
}else if(l.zt=='待审核'){
l.ztc='danger'
}else if(l.zt=='已质检'){
l.ztc='success'
}
list.value.push(l)
}
})
}
})
}
//
const show = ref(false)
const dataType = ref('')
const chooseDate = (val : any) => {
show.value = true
dataType.value = val
}
const onConfirmDate = (val : any) => {
if (dataType.value == 'shrq') {
dataItem.value[dataType.value] = formatDate(val)
} else {
form.value[dataType.value] = formatDate(val)
}
show.value = false
}
const pickerList = ref([])//
const pickerContainerList = ref([])
const showPickerList = ref(false)
const searchValue = ref('')//
const searchIndex = ref(0)//
const mlList = ref([])
//
const selectChoose = () => {
showPickerList.value = true
}
//
const mlmcOpen = () => {
pickerList.value = mlList.value
pickerContainerList.value = pickerList.value
searchValue.value = ''
}
//
const pickerCancel = () => {
showPickerList.value = false
}
//
const selectedValue = ref()
const getSeachList = () => {
searchIndex.value = 0
let reg = new RegExp(searchValue.value)
let arr = []
pickerList.value.forEach(l => {
if (reg.test(l.text)) {
arr.push(l)
}
})
pickerContainerList.value = arr
}
//
const upSearch = () => {
if (searchIndex.value === 0 && pickerContainerList.value.length) {
searchIndex.value = pickerContainerList.value.length - 1
selectedValue.value = [pickerContainerList.value[searchIndex.value].text]
} else if (pickerContainerList.value.length) {
searchIndex.value--
selectedValue.value = [pickerContainerList.value[searchIndex.value].text]
} else {
showToast('没有了!')
}
}
//
const downSearch = () => {
if (pickerContainerList.value.length) {
if (searchIndex.value === pickerContainerList.value.length) {
searchIndex.value = 0
selectedValue.value = [pickerContainerList.value[searchIndex.value].text]
} else {
searchIndex.value++
selectedValue.value = [pickerContainerList.value[searchIndex.value].text]
}
} else {
showToast('没有了!')
}
}
//
const timer = ref()
const searchTo = () => {
if (timer.value) {
clearTimeout(timer.value)
}
timer.value = setTimeout(() => {
getSeachList()
}, 800)
}
const onConfirm = (val : any) => {
form.value.category = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
pickerCancel()
}
</script>
<template>
<view class="flex">
<van-nav-bar title="质检结果查询" left-text="返回" left-arrow @click-left="onClickLeft" />
<van-cell-group style="display: flex;">
<van-field v-model="form.startDate" name="开始时间" label="开始时间" colon class="bor" label-width="5em" readonly
@click="chooseDate('startDate')" :rules="[{ required: true, message: '请填写' }]" />
<van-field v-model="form.endDate" name="截止时间" label="截止时间" colon class="bor" label-width="5em" readonly
@click="chooseDate('endDate')" />
</van-cell-group>
<van-cell-group style="display: flex;">
<van-field v-model="form.category" name="面料名称" label="面料名称" colon class="bor" label-width="5em" readonly
@click="selectChoose('form')" />
<van-field v-model="form.barcode" name="面料编号" label="面料编号" colon class="bor-a" label-width="5em" />
</van-cell-group>
<van-cell-group inset style="display: flex;">
<van-field v-model="form.sd" name="色号" label="色号" colon class="bor-a" label-width="5em" />
<view style="display: flex;align-items: center;justify-content: space-around;width: 100%;">
<van-button style="width: 5em;">重置</van-button>
<van-button type="primary" style="width: 5em;">筛选</van-button>
</view>
</van-cell-group>
<view class="grid-container">
<view class="grid-item">面料名称<br>工艺</view>
<view class="grid-item">色号<br>米数</view>
<view class="grid-item">编号</view>
<view class="grid-item">质检报告</view>
<view class="grid-item">理化报告</view>
</view>
<view class="content">
<view class="grid-container" v-for="(item,index) in list" :key="index">
<view class="grid-item">
{{item.fabric}}<br>{{item.color}}
</view>
<view class="grid-item">
{{item.sd}}/{{item.makeUser}}/{{item.belongTo}}<br>{{item.ps}}/{{item.len}}
</view>
<view class="grid-item">
{{item.rc}}
</view>
<view class="grid-item">
查看
</view>
<view class="grid-item">
查看
</view>
</view>
</view>
</view>
<van-calendar v-model:show="show" @confirm="onConfirmDate" :min-date="new Date(2010, 0, 1)"
:max-date="new Date(2050, 0, 31)" />
<!-- 面料选择框-->
<van-popup v-model:show="showPickerList" position="bottom" @open="mlmcOpen">
<view class="select-model">
<van-picker :columns="pickerContainerList" @cancel="pickerCancel" v-model="selectedValue"
@confirm="onConfirm" />
<view>
<view class="top-select">
<view class="confirm-select">
<p>请选择品种</p>
</view>
<view class="search-box">
<view>
<van-search placeholder="请输入品种名字" v-model="searchValue" label="面料搜索:" background="#ffffff"
@input="searchTo()" :clearable="false" />
</view>
<view class="flex-btn">
<button class="search-btn" @click="upSearch()"></button>
<button class="search-btn" @click="downSearch()"></button>
</view>
</view>
</view>
</view>
</view>
</van-popup>
</template>
<style lang="scss" scoped>
.flex {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
font-size: 24rpx;
overflow-y: hidden;
.van-nav-bar {
width: 100%;
}
.grid-container {
display: grid;
grid-template-columns: 1.5fr 2fr 1.5fr 1.2fr 1.2fr;
padding: 0 15rpx;
.grid-item {
border: 1px solid #f2f2f2;
text-align: center;
white-space: pre-line;
padding: 5rpx;
word-break: break-all;
display: flex;
justify-content: center;
align-items: center;
/*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical;
/*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
/*超出隐藏*/
}
}
.content {
flex: 1;
overflow-y: scroll;
font-size: 24rpx;
}
}
::v-deep .van-cell {
padding: 5px !important;
}
::v-deep .van-field {
font-size: 16px;
}
.bor {
::v-deep .van-field__control {
border: 1px solid #d7d7d7;
text-align: center;
}
::v-deep .van-field__label {
margin: 0;
}
}
.bor-a {
::v-deep .van-field__control {
border-bottom: 1px solid #d7d7d7;
text-align: center;
}
::v-deep .van-field__label {
margin: 0;
}
}
::v-deep .van-button--normal {
padding: 5px 8px;
height: 30px;
font-size: 22rpx;
}
::v-deep .van-field__control {
text-align: center;
font-size: 16px;
}
.footer-button {
margin: 20rpx;
display: flex;
justify-content: space-around;
}
/*面料选择搜索框*/
.select-model {
position: relative;
}
.confirm-select {
width: 100%;
}
.confirm-select>p {
text-align: center;
}
.confirm-select>button {
border: none;
background-color: #ffffff;
color: #388aed;
margin: 10px 30px 0 0;
}
.top-select {
position: absolute;
top: 30px;
left: 0;
right: 0;
margin: auto;
z-index: 999;
}
::v-deep .select-model .van-picker__toolbar {
height: 66px;
align-items: flex-start;
/*justify-content: flex-end;*/
}
::v-deep .select-model .van-picker__cancel,
.select-model .van-picker__confirm {
height: 30px;
padding: 10px 16px 0;
}
::v-deep .select-model .van-picker__confirm,
.select-model .van-picker__confirm {
height: 30px;
padding: 10px 16px 0;
}
.search-btn {
padding: 1px 8px;
border: none;
background-color: #388aed;
color: #ffffff;
margin-left: 5px;
height: 30px;
line-height: 25px;
}
.search-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding-top: 15px;
padding-bottom: 5px;
position: relative;
background-color: #fff;
}
.van-search {
background-color: #f7f7f8;
}
.ml-search-jump {
padding: 3px 10px;
background-color: #388aed;
color: #ffffff;
border: none;
margin-left: 10px;
}
.flex-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
/*面料选择搜索框*/
.select-model {
position: relative;
}
.confirm-select {
width: 100%;
}
.confirm-select>p {
text-align: center;
}
.confirm-select>button {
border: none;
background-color: #ffffff;
color: #388aed;
margin: 10px 30px 0 0;
}
.top-select {
position: absolute;
top: 30px;
left: 0;
right: 0;
margin: auto;
z-index: 999;
}
::v-deep .select-model .van-picker__toolbar {
height: 66px;
align-items: flex-start;
/*justify-content: flex-end;*/
}
::v-deep .select-model .van-picker__cancel,
.select-model .van-picker__confirm {
height: 30px;
padding: 10px 16px 0;
}
::v-deep .select-model .van-picker__confirm,
.select-model .van-picker__confirm {
height: 30px;
padding: 10px 16px 0;
}
.search-btn {
padding: 1px 8px;
border: none;
background-color: #388aed;
color: #ffffff;
margin-left: 5px;
height: 30px;
line-height: 25px;
}
.search-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding-top: 15px;
padding-bottom: 5px;
position: relative;
background-color: #fff;
}
.van-search {
background-color: #f7f7f8;
}
.ml-search-jump {
padding: 3px 10px;
background-color: #388aed;
color: #ffffff;
border: none;
margin-left: 10px;
}
.flex-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -207,7 +207,6 @@
text-align: center;
justify-content: center;
word-break: break-all;
display: -webkit-box; /*将对象转为弹性盒模型展示*/
-webkit-box-orient: vertical; /*设置弹性盒模型子元素的排列方式*/
overflow: hidden;
}

View File

@ -247,7 +247,7 @@
<van-icon name="cross" color="red" @click="bhms.splice(indexSecond,1)" />
</view>
</view>
<view class="a-c">
<view class="a-c" v-if="zt!='已配全'">
<van-button type="primary" @click="upScanCode(index)">
扫一扫
</van-button>
@ -258,7 +258,7 @@
@close="handleClose">
</cshaptx4869-scancode>
<view>
<view v-if="zt!='已配全'">
<van-field v-model="formItem.phrq" name="配货日期" label="配货日期" colon class="bor" label-width="5em"
readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
<van-field v-model="formItem.rc" name="染厂选择" label="染厂选择" colon class="bor" label-width="5em"
@ -269,7 +269,7 @@
label-width="5em" />
</view>
</van-cell-group>
<view style="margin: 16px;display: flex;">
<view style="margin: 16px;display: flex;" v-if="zt!='已配全'">
<van-button round block type="primary" native-type="submit" @click="beforeSubmit('部分配货')">
部分配货
</van-button>

View File

@ -240,7 +240,7 @@
<van-icon name="cross" color="red" @click="bhms.splice(indexSecond,1)" />
</view>
</view>
<view class="a-c">
<view class="a-c" v-if="form.zt!='已配全'">
<van-button type="primary" @click="upScanCode(index)">
扫一扫
</van-button>

View File

@ -102,11 +102,6 @@ const ListData =ref([
name:'跟单列表',
type:'tracking',
},
{
path:'../Delivery/Delivery',
name:'待收货列表',
type:'blemish',
},
{
path:'../colorBlank/colorBlank',
name:'色胚质检列表',
@ -128,15 +123,20 @@ const ListData =ref([
type:'blemish',
},
{
path:'../colorBlank/ColorBlankQuality',
name:'色胚质检',
path:'../colorBlank/resultsQuery',
name:'质检结果查询',
type:'blemish',
},
{
path:'../colorBlank/chemical',
name:'理化报告',
type:'blemish',
}
// {
// path:'../colorBlank/ColorBlankQuality',
// name:'',
// type:'blemish',
// },
// {
// path:'../colorBlank/chemical',
// name:'',
// type:'blemish',
// }
] as any[])

View File

@ -19,13 +19,25 @@
history.back()
}
const onClickRight = () => {
list.value.push({ options: [{}] })
list.value.push({necessary:true, options: [{}] })
}
//
const addxx = (item : any) => {
item.options.push({})
}
const onSubmit = () => {
let tj=true
list.value.forEach((l:any)=>{
if(!l.name){
tj=false
}
l.options.forEach((m:any)=>{
if(!m.name){
tj=false
}
})
})
if(!tj) return showToast('请填完整信息!')
let param = {
id: 1,
payload: JSON.stringify(list.value)

View File

@ -12,20 +12,8 @@
const statusList = ref([
{ status: "待审核", code: "UnCheck", type: "warning",path:'/pages/spot/audit' },
{ status: "待主管审核", code: "UnCheckByLeader", type: "primary" },
{ status: "待跟单员审核", code: "UnCheckByCharger", type: "success" },
{ status: "已通过(待配货)", code: "Checked", type: "primary",path:'/pages/spot/pass' },
{ status: "取消审核中", code: "Canceling", type: "primary" },
{ status: "已取消", code: "Canceled", type: "danger" },
{ status: "被驳回", code: "Rejected", type: "danger" },
{ status: "部分配货", code: "Allocating", type: "warning" },
{ status: "已配完(待进厂)", code: "Allocated", type: "success" },
{ status: "已进厂", code: "Processing", type: "primary" },
{ status: "已出厂(待收货)", code: "Processed", type: "success" },
{ status: "待质检", code: "UnTested", type: "warning" },
{ status: "已质检(待入库)", code: "Testing", type: "primary" },
{ status: "已质检(待入库)", code: "Tested", type: "primary" },
{ status: "已入库", code: "Storage", type: "success" }
{ status: "已通过", code: "Checked", type: "primary",path:'/pages/spot/pass' },
{ status: "已驳回", code: "Canceled", type: "danger" },
])
onMounted(() => {