质检完成
This commit is contained in:
parent
55d21b4475
commit
82459c47dd
@ -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_auth:'https://oauth.goodsilk.cn/api',//登录
|
||||||
base_mes:'https://scm.goodsilk.cn/mes',//面料
|
base_mes:'https://scm.goodsilk.cn/mes',//面料
|
||||||
base_process:'https://scm.goodsilk.cn/mes',//工艺
|
base_process:'https://scm.goodsilk.cn/mes',//工艺
|
||||||
|
12
pages.json
12
pages.json
@ -449,6 +449,18 @@
|
|||||||
"bounce": "none"
|
"bounce": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/colorBlank/resultsQuery",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"disableScroll": true,
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -1,31 +1,93 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import { formatDate } from '../../utils/date';
|
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 showPicker = ref(false)
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const popuList = ref([] as any[])
|
const popuList = ref([] as any[])
|
||||||
|
const list = ref([] as any[])
|
||||||
onMounted(()=>{
|
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'))
|
const info = JSON.parse(localStorage.getItem('info'))
|
||||||
form.value.jyy=info.userName
|
form.value.jyy = info.userName
|
||||||
|
//获取瑕疵项
|
||||||
|
getAction('/blemish').then((res : any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
blemlist.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const chooseDate = () => {
|
const chooseDate = () => {
|
||||||
show.value = true
|
show.value = true
|
||||||
}
|
}
|
||||||
const onConfirmDate = (val : any) => {
|
const onConfirmDate = (val : any) => {
|
||||||
form.value.ybrq = formatDate(val)
|
form.value.testTime = formatDate(val)
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const indexData = ref()
|
||||||
//选择框事件
|
//选择框事件
|
||||||
const choosePic = (type : any, index : any) => {
|
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
|
showPicker.value = true
|
||||||
}
|
}
|
||||||
//选择框确认
|
//选择框确认
|
||||||
const pickerConfirm = (val : any) => {
|
const pickerConfirm = (val : any) => {
|
||||||
|
if (indexData.value >= 0) {
|
||||||
|
testItems.value[indexData.value].value = val.selectedValues[0]
|
||||||
|
} else {
|
||||||
|
form.value.wrapper = val.selectedValues[0]
|
||||||
|
}
|
||||||
showPickerCancel()
|
showPickerCancel()
|
||||||
}
|
}
|
||||||
//取消
|
//取消
|
||||||
@ -39,33 +101,462 @@ import { formatDate } from '../../utils/date';
|
|||||||
const onClickLeft = () => {
|
const onClickLeft = () => {
|
||||||
history.back()
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<van-nav-bar title="色胚质检" left-text="返回" left-arrow @click-left="onClickLeft" />
|
<van-nav-bar title="色胚质检" left-text="返回" left-arrow @click-left="onClickLeft" />
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<van-cell-group inset>
|
<van-form @submit="onSubmit">
|
||||||
<van-field class="bor" label="验布日期" label-width="5em" colon v-model="form.ybrq" readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
|
<van-cell-group inset>
|
||||||
<van-field label="检验员" label-width="5em" colon v-model="form.jyy" readonly/>
|
<van-field class="bor" label="验布日期" label-width="5em" colon v-model="form.testTime" readonly
|
||||||
<van-field 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.ybrq" readonly/>
|
<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.fabric" readonly />
|
||||||
<van-field label="工艺" label-width="5em" colon v-model="form.ybrq" readonly/>
|
<van-field label="面料颜色" label-width="5em" colon v-model="form.color" readonly />
|
||||||
<van-field label="工艺要求" label-width="5em" colon v-model="form.ybrq" readonly/>
|
<van-field label="工厂" label-width="5em" colon v-model="form.rc" readonly />
|
||||||
<van-field class="bor" label="纸管" label-width="5em" colon v-model="form.ybrq" readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic()" />
|
<van-field label="工艺" label-width="5em" colon v-model="form.craft" readonly />
|
||||||
<van-field class="line" label="姆米" label-width="5em" colon v-model="form.mm" type="number" :rules="[{ required: true, message: '请填写' }]" />
|
<van-field label="工艺要求" label-width="5em" colon v-model="form.craftCmt.name" readonly />
|
||||||
<van-field class="line" label="门幅" label-width="5em" colon v-model="form.mf" type="number" :rules="[{ required: true, message: '请填写' }]" />
|
<van-field class="bor" label="纸管" label-width="5em" colon v-model="form.wrapper" readonly
|
||||||
</van-cell-group>
|
: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>
|
||||||
</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)"
|
<van-calendar v-model:show="show" @confirm="onConfirmDate" :min-date="new Date(2010, 0, 1)"
|
||||||
:max-date="new Date(2050, 0, 31)" />
|
:max-date="new Date(2050, 0, 31)" />
|
||||||
|
|
||||||
<!--选择框-->
|
<!--选择框-->
|
||||||
<van-popup v-model:show="showPicker" round position="bottom" @open="handleOpen">
|
<van-popup v-model:show="showPicker" round position="bottom" @open="handleOpen">
|
||||||
<van-picker show-toolbar :columns="popuList" @confirm="pickerConfirm" @cancel="showPickerCancel"
|
<van-picker show-toolbar :columns="popuList" @confirm="pickerConfirm" @cancel="showPickerCancel"
|
||||||
v-model="selectValue" ref="pickerRef" />
|
ref="pickerRef" />
|
||||||
</van-popup>
|
</van-popup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -75,39 +566,179 @@ import { formatDate } from '../../utils/date';
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
.van-nav-bar {
|
.van-nav-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
::v-deep .van-field {
|
|
||||||
font-size: 16px;
|
.grid-container {
|
||||||
}
|
display: grid;
|
||||||
::v-deep .van-field__label{
|
grid-template-columns: 1fr 1fr;
|
||||||
display: flex;
|
padding: 0 15rpx;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
|
||||||
::v-deep .van-button--normal {
|
.grid-container1 {
|
||||||
padding: 5px 8px;
|
font-size: 24rpx;
|
||||||
height: 30px;
|
display: grid;
|
||||||
}
|
grid-template-columns: 0.5fr 1fr 1.5fr 1fr 1fr;
|
||||||
::v-deep .van-field__control {
|
padding: 0 15rpx;
|
||||||
|
|
||||||
|
.grid-item {
|
||||||
|
border: 1px solid #f2f2f2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
white-space: pre-line;
|
||||||
}
|
padding: 5rpx;
|
||||||
.bor {
|
word-break: break-all;
|
||||||
::v-deep .van-field__control {
|
display: flex;
|
||||||
border: 1px solid #d7d7d7;
|
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 {
|
::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>
|
</style>
|
@ -1,12 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from 'vue';
|
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 { formatDate } from '../../utils/date';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import { showToast } from 'vant';
|
import { showToast } from 'vant';
|
||||||
|
|
||||||
const form = ref({} as any)
|
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 list = ref([] as any[])
|
||||||
const factory = ref([] as any[])
|
const factory = ref([] as any[])
|
||||||
const nameList = ref([] as any[])
|
const nameList = ref([] as any[])
|
||||||
@ -69,58 +69,42 @@
|
|||||||
const onClickLeft = () => {
|
const onClickLeft = () => {
|
||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
const onClickRight = () =>{
|
const onClickRight = () => {
|
||||||
console.log(dataItem.value);
|
uni.navigateTo({
|
||||||
}
|
url:'/pages/colorBlank/chemical'
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValidJSON(str : any) {
|
function init() {
|
||||||
if (typeof str !== 'string') return false; // 确保输入是一个字符串
|
getAction('/testing', form.value).then((res : any) => {
|
||||||
try {
|
if (res.code === 200) {
|
||||||
JSON.parse(str);
|
res.data.forEach((l:any)=>{
|
||||||
return true;
|
let item=list.value.find(m=>m.trackingLogId==l.trackingLogId&&m.fabric==l.fabric&&m.status==l.status)
|
||||||
} catch (e) {
|
if(item){
|
||||||
return false;
|
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, () => {
|
watch(form.value, () => {
|
||||||
list.value = []
|
list.value = []
|
||||||
init()
|
init()
|
||||||
@ -137,16 +121,19 @@
|
|||||||
//选择框确认
|
//选择框确认
|
||||||
const pickerConfirm = (val : any) => {
|
const pickerConfirm = (val : any) => {
|
||||||
form.value[typeData.value] = val.selectedValues[0]
|
form.value[typeData.value] = val.selectedValues[0]
|
||||||
showPickerCancel()
|
showPicker.value = false
|
||||||
}
|
}
|
||||||
//取消
|
//取消
|
||||||
const showPickerCancel = () => {
|
const showPickerCancel = () => {
|
||||||
|
form.value[typeData.value] = ''
|
||||||
showPicker.value = false
|
showPicker.value = false
|
||||||
}
|
}
|
||||||
//弹窗开启事件
|
//弹窗开启事件
|
||||||
const handleOpen = () => {
|
const handleOpen = () => {
|
||||||
if (typeData.value === 'factory') {
|
if (typeData.value === 'factory') {
|
||||||
popuList.value = factory.value
|
popuList.value = factory.value
|
||||||
|
} else if (typeData.value === 'zt') {
|
||||||
|
popuList.value = [{ text: '待收货', value: '待收货' }, { text: '待质检', value: '待质检' }, { text: '待审核', value: '待审核' }, { text: '已质检', value: '已质检' }]
|
||||||
} else {
|
} else {
|
||||||
popuList.value = nameList.value
|
popuList.value = nameList.value
|
||||||
}
|
}
|
||||||
@ -248,33 +235,50 @@
|
|||||||
const itemList = ref({} as any)
|
const itemList = ref({} as any)
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
console.log(dataItem.value);
|
let ids=itemList.value.ids.join(',')
|
||||||
// TODO
|
putAction('/testing/receive?ids='+ids+'&date='+dataItem.value.shrq).then((res:any)=>{
|
||||||
// postAction('/tracking', { orderId: itemList.value.id, type: itemList.value.type, data: dataItem.value, status: '等待' }).then((res : any) => {
|
if(res.code===200){
|
||||||
// if (res.code === 200) {
|
showDialog.value = false
|
||||||
// showDialog.value = false
|
list.value = []
|
||||||
// showToast('更新成功!')
|
init()
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//计算米数
|
|
||||||
const computing = (list:any) =>{
|
|
||||||
let total=list.reduce((accumulator:any, currentValue:any) => {
|
|
||||||
return accumulator + currentValue.ms*1;
|
|
||||||
}, 0);
|
|
||||||
return total
|
|
||||||
}
|
|
||||||
//工序详情
|
//工序详情
|
||||||
const toDetile = (item:any) =>{
|
const toDetile = (item : any) => {
|
||||||
itemList.value=item
|
itemList.value = item
|
||||||
showDialog.value = true
|
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 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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="flex">
|
<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-cell-group inset style="display: flex;">
|
||||||
<van-field v-model="form.fabric" name="面料名称" label="面料名称" class="bor" colon label-width="5em" readonly
|
<van-field v-model="form.fabric" name="面料名称" label="面料名称" class="bor" colon label-width="5em" readonly
|
||||||
@click="selectChoose" />
|
@click="selectChoose" />
|
||||||
@ -292,6 +296,10 @@
|
|||||||
<van-field v-model="form.factory" name="面料来源" label="面料来源" colon class="bor" label-width="5em" readonly
|
<van-field v-model="form.factory" name="面料来源" label="面料来源" colon class="bor" label-width="5em" readonly
|
||||||
@click="choosePic('factory')" />
|
@click="choosePic('factory')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
<van-cell-group inset style="display: flex;">
|
||||||
|
<van-field v-model="form.zt" name="状态" label="状 态" colon
|
||||||
|
class="bor" label-width="5em" readonly @click="choosePic('zt')" />
|
||||||
|
</van-cell-group>
|
||||||
<view class="grid-container">
|
<view class="grid-container">
|
||||||
<view class="grid-item">面料/颜色</view>
|
<view class="grid-item">面料/颜色</view>
|
||||||
<view class="grid-item">谁定/做单人/归属人<br>匹数/米数</view>
|
<view class="grid-item">谁定/做单人/归属人<br>匹数/米数</view>
|
||||||
@ -299,44 +307,31 @@
|
|||||||
<view class="grid-item">状态</view>
|
<view class="grid-item">状态</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<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-container" v-for="(item,index) in list" :key="index">
|
<view class="grid-item">
|
||||||
<view class="grid-item">
|
{{item.fabric}}<br>{{item.color}}
|
||||||
<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>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-dialog v-model:show="showDialog">
|
<van-dialog v-model:show="showDialog">
|
||||||
<view style="margin-top: 10rpx;">
|
<view style="margin-top: 10rpx;">
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<van-field v-model="dataItem.shr" name="收货人" label="收货人" colon readonly label-width="5em"
|
<van-field v-model="dataItem.shr" name="收货人" label="收货人" colon readonly label-width="5em" class="bor-n"
|
||||||
class="bor-n" label-align="right" />
|
label-align="right" />
|
||||||
<van-field v-model="dataItem.shrq" name="收货日期" label="收货日期" colon label-width="5em" class="bor"
|
<van-field v-model="dataItem.shrq" name="收货日期" label="收货日期" colon label-width="5em" class="bor" readonly
|
||||||
readonly @click="chooseDate('shrq')" label-align="right" />
|
@click="chooseDate('shrq')" label-align="right" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</view>
|
</view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -401,47 +396,23 @@
|
|||||||
|
|
||||||
.grid-container {
|
.grid-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1.5fr 2fr 1.5fr 1fr;
|
grid-template-columns: 1.5fr 2fr 1.5fr 1.2fr;
|
||||||
padding: 0 15rpx;
|
padding: 0 15rpx;
|
||||||
|
|
||||||
.grid-item {
|
.grid-item {
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
align-items: center;
|
white-space: pre-line;
|
||||||
|
padding: 5rpx;
|
||||||
|
word-break: break-all;
|
||||||
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
.grid-container1 {
|
/*将对象转为弹性盒模型展示*/
|
||||||
display: grid;
|
-webkit-box-orient: vertical;
|
||||||
grid-template-columns: repeat(1, 1fr);
|
/*设置弹性盒模型子元素的排列方式*/
|
||||||
width: 100%;
|
overflow: hidden;
|
||||||
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; /*超出隐藏*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,6 +510,7 @@
|
|||||||
height: 30px;
|
height: 30px;
|
||||||
padding: 10px 16px 0;
|
padding: 10px 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .select-model .van-picker__confirm,
|
::v-deep .select-model .van-picker__confirm,
|
||||||
.select-model .van-picker__confirm {
|
.select-model .van-picker__confirm {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@ -625,6 +597,7 @@
|
|||||||
height: 30px;
|
height: 30px;
|
||||||
padding: 10px 16px 0;
|
padding: 10px 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .select-model .van-picker__confirm,
|
::v-deep .select-model .van-picker__confirm,
|
||||||
.select-model .van-picker__confirm {
|
.select-model .van-picker__confirm {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
const init = () => {
|
const init = () => {
|
||||||
getAction('/blemish',{page:1,size:100}).then((res : any) => {
|
getAction('/blemish').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
list.value = res.data.record
|
list.value = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
function init() {
|
function init() {
|
||||||
getAction('/testItem').then((res : any) => {
|
getAction('/testItem').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
list.value = JSON.parse(res.data.payload)
|
list.value = res.data.payload
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -19,13 +19,25 @@
|
|||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
const onClickRight = () => {
|
const onClickRight = () => {
|
||||||
list.value.push({ options: [{}] })
|
list.value.push({ necessary:true,options: [{}] })
|
||||||
}
|
}
|
||||||
//新增选项
|
//新增选项
|
||||||
const addxx = (item : any) => {
|
const addxx = (item : any) => {
|
||||||
item.options.push({})
|
item.options.push({})
|
||||||
}
|
}
|
||||||
const onSubmit = () => {
|
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 = {
|
let param = {
|
||||||
id: 1,
|
id: 1,
|
||||||
payload: JSON.stringify(list.value)
|
payload: JSON.stringify(list.value)
|
||||||
|
537
pages/colorBlank/resultsQuery.vue
Normal file
537
pages/colorBlank/resultsQuery.vue
Normal 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>
|
@ -207,7 +207,6 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
display: -webkit-box; /*将对象转为弹性盒模型展示*/
|
|
||||||
-webkit-box-orient: vertical; /*设置弹性盒模型子元素的排列方式*/
|
-webkit-box-orient: vertical; /*设置弹性盒模型子元素的排列方式*/
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@
|
|||||||
<van-icon name="cross" color="red" @click="bhms.splice(indexSecond,1)" />
|
<van-icon name="cross" color="red" @click="bhms.splice(indexSecond,1)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="a-c">
|
<view class="a-c" v-if="zt!='已配全'">
|
||||||
<van-button type="primary" @click="upScanCode(index)">
|
<van-button type="primary" @click="upScanCode(index)">
|
||||||
扫一扫
|
扫一扫
|
||||||
</van-button>
|
</van-button>
|
||||||
@ -258,7 +258,7 @@
|
|||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
</cshaptx4869-scancode>
|
</cshaptx4869-scancode>
|
||||||
|
|
||||||
<view>
|
<view v-if="zt!='已配全'">
|
||||||
<van-field v-model="formItem.phrq" name="配货日期" label="配货日期" colon class="bor" label-width="5em"
|
<van-field v-model="formItem.phrq" name="配货日期" label="配货日期" colon class="bor" label-width="5em"
|
||||||
readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
|
readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
|
||||||
<van-field v-model="formItem.rc" name="染厂选择" label="染厂选择" colon class="bor" label-width="5em"
|
<van-field v-model="formItem.rc" name="染厂选择" label="染厂选择" colon class="bor" label-width="5em"
|
||||||
@ -269,7 +269,7 @@
|
|||||||
label-width="5em" />
|
label-width="5em" />
|
||||||
</view>
|
</view>
|
||||||
</van-cell-group>
|
</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 round block type="primary" native-type="submit" @click="beforeSubmit('部分配货')">
|
||||||
部分配货
|
部分配货
|
||||||
</van-button>
|
</van-button>
|
||||||
|
@ -240,7 +240,7 @@
|
|||||||
<van-icon name="cross" color="red" @click="bhms.splice(indexSecond,1)" />
|
<van-icon name="cross" color="red" @click="bhms.splice(indexSecond,1)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="a-c">
|
<view class="a-c" v-if="form.zt!='已配全'">
|
||||||
<van-button type="primary" @click="upScanCode(index)">
|
<van-button type="primary" @click="upScanCode(index)">
|
||||||
扫一扫
|
扫一扫
|
||||||
</van-button>
|
</van-button>
|
||||||
|
@ -102,11 +102,6 @@ const ListData =ref([
|
|||||||
name:'跟单列表',
|
name:'跟单列表',
|
||||||
type:'tracking',
|
type:'tracking',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path:'../Delivery/Delivery',
|
|
||||||
name:'待收货列表',
|
|
||||||
type:'blemish',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path:'../colorBlank/colorBlank',
|
path:'../colorBlank/colorBlank',
|
||||||
name:'色胚质检列表',
|
name:'色胚质检列表',
|
||||||
@ -128,15 +123,20 @@ const ListData =ref([
|
|||||||
type:'blemish',
|
type:'blemish',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:'../colorBlank/ColorBlankQuality',
|
path:'../colorBlank/resultsQuery',
|
||||||
name:'色胚质检',
|
name:'质检结果查询',
|
||||||
type:'blemish',
|
type:'blemish',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path:'../colorBlank/chemical',
|
// path:'../colorBlank/ColorBlankQuality',
|
||||||
name:'理化报告',
|
// name:'色胚质检',
|
||||||
type:'blemish',
|
// type:'blemish',
|
||||||
}
|
// },
|
||||||
|
// {
|
||||||
|
// path:'../colorBlank/chemical',
|
||||||
|
// name:'理化报告',
|
||||||
|
// type:'blemish',
|
||||||
|
// }
|
||||||
|
|
||||||
] as any[])
|
] as any[])
|
||||||
|
|
||||||
|
@ -19,13 +19,25 @@
|
|||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
const onClickRight = () => {
|
const onClickRight = () => {
|
||||||
list.value.push({ options: [{}] })
|
list.value.push({necessary:true, options: [{}] })
|
||||||
}
|
}
|
||||||
//新增选项
|
//新增选项
|
||||||
const addxx = (item : any) => {
|
const addxx = (item : any) => {
|
||||||
item.options.push({})
|
item.options.push({})
|
||||||
}
|
}
|
||||||
const onSubmit = () => {
|
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 = {
|
let param = {
|
||||||
id: 1,
|
id: 1,
|
||||||
payload: JSON.stringify(list.value)
|
payload: JSON.stringify(list.value)
|
||||||
|
@ -12,20 +12,8 @@
|
|||||||
|
|
||||||
const statusList = ref([
|
const statusList = ref([
|
||||||
{ status: "待审核", code: "UnCheck", type: "warning",path:'/pages/spot/audit' },
|
{ status: "待审核", code: "UnCheck", type: "warning",path:'/pages/spot/audit' },
|
||||||
{ status: "待主管审核", code: "UnCheckByLeader", type: "primary" },
|
{ status: "已通过", code: "Checked", type: "primary",path:'/pages/spot/pass' },
|
||||||
{ status: "待跟单员审核", code: "UnCheckByCharger", type: "success" },
|
{ status: "已驳回", code: "Canceled", type: "danger" },
|
||||||
{ 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" }
|
|
||||||
])
|
])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user