跟单
This commit is contained in:
parent
a64e943929
commit
592e271a58
@ -11,6 +11,11 @@
|
||||
const formItem = ref({ jcps: 0, jcms: 0 } as any)
|
||||
const list = ref()
|
||||
|
||||
// 定义 props
|
||||
defineProps<{
|
||||
item ?: string;
|
||||
}>();
|
||||
|
||||
onLoad(async (option : any) => {
|
||||
if (option && option.item) {
|
||||
try {
|
||||
@ -58,7 +63,7 @@
|
||||
os.push(item)
|
||||
}
|
||||
})
|
||||
postAction('/cos', { sid: form.value.orderItems.id, fabric: form.value.orderItems.fabric, os: os, zt: typeData.value }).then((res : any) => {
|
||||
postAction('/cos', { sid: form.value.orderItems.id, fabric: form.value.orderItems.fabric, os: os, zt: typeData.value,rc:formItem.value.rc}).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
showToast('提交成功!')
|
||||
uni.redirectTo({
|
||||
@ -206,23 +211,18 @@
|
||||
{{itemSecond.code}}<br>{{itemSecond.ms}}米
|
||||
<van-icon name="cross" color="red" @click="item.bhms.splice(indexSecond,1)" />
|
||||
</view>
|
||||
<view class="a-c" v-if="form.orderItems.zt!='已配全'">
|
||||
|
||||
<view class="a-c" v-if="form.orderItems.zt!='已配全'&&(item.bhms?item.bhms1?item.bhms.length+item.bhms1.length<item.qty:item.bhms.length<item.qty:item.bhms1?item.bhms1.length<item.qty:true)" >
|
||||
<van-button type="primary" @click="upScanCode(index)">
|
||||
扫一扫
|
||||
</van-button>
|
||||
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
||||
@close="handleClose">
|
||||
</cshaptx4869-scancode>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.phrq" class="line">
|
||||
<van-field v-model="item.phrq" name="配货日期" label="配货日期" colon class="bor" label-width="5em"
|
||||
readonly/>
|
||||
<van-field v-model="item.rc" name="染厂选择" label="染厂选择" colon class="bor" label-width="5em"
|
||||
readonly/>
|
||||
</view>
|
||||
</template>
|
||||
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
||||
@close="handleClose">
|
||||
</cshaptx4869-scancode>
|
||||
|
||||
<view v-if="form.orderItems.zt!='已配全'">
|
||||
<van-field v-model="formItem.phrq" name="配货日期" label="配货日期" colon class="bor" label-width="5em"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
import { formatDate } from '../../utils/date';
|
||||
import { getAction, postAction } from '../../common/http';
|
||||
import { showToast } from 'vant';
|
||||
import { showToast } from 'vant';
|
||||
|
||||
const form = ref({} as any)
|
||||
const showDialog = ref(false)
|
||||
@ -11,16 +11,22 @@ import { showToast } from 'vant';
|
||||
const formItem = ref({ jcps: 0, jcms: 0 } as any)
|
||||
const list = ref()
|
||||
|
||||
// 定义 props
|
||||
defineProps<{
|
||||
item ?: string;
|
||||
}>();
|
||||
|
||||
onLoad(async (option : any) => {
|
||||
if (option && option.item) {
|
||||
try {
|
||||
form.value = JSON.parse(option.item);
|
||||
console.log(form.value);
|
||||
} catch (error) {
|
||||
console.error('Failed to parse item JSON:', error);
|
||||
// 可以选择在这里显示错误消息给用户
|
||||
}
|
||||
}
|
||||
})
|
||||
onShow(() => {
|
||||
getAction('/factory').then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
list.value = res.data.map((l : any) => ({ text: l.name, value: l.name }))
|
||||
@ -33,43 +39,43 @@ import { showToast } from 'vant';
|
||||
}
|
||||
|
||||
const onSubmit = () => {
|
||||
let os=[]
|
||||
form.value.fabric.forEach((l:any)=>{
|
||||
if(l.bhms1){
|
||||
if(l.bhms){
|
||||
l.bhms=l.bhms.concat(l.bhms1)
|
||||
}else{
|
||||
l.bhms=JSON.parse(JSON.stringify(l.bhms1))
|
||||
let os = []
|
||||
form.value.fabric.forEach((l : any) => {
|
||||
if (l.bhms1) {
|
||||
if (l.bhms) {
|
||||
l.bhms = l.bhms.concat(l.bhms1)
|
||||
} else {
|
||||
l.bhms = JSON.parse(JSON.stringify(l.bhms1))
|
||||
}
|
||||
l.phrq=formItem.value.phrq
|
||||
l.rc=formItem.value.rc
|
||||
let item={
|
||||
ms:0,
|
||||
ps:0,
|
||||
ml:l.name,
|
||||
bh:[],
|
||||
l.phrq = formItem.value.phrq
|
||||
l.rc = formItem.value.rc
|
||||
let item = {
|
||||
ms: 0,
|
||||
ps: 0,
|
||||
ml: l.name,
|
||||
bh: [],
|
||||
}
|
||||
l.bhms1.forEach((m:any)=>{
|
||||
item.ms+=m.ms*1
|
||||
l.bhms1.forEach((m : any) => {
|
||||
item.ms += m.ms * 1
|
||||
item.ps++
|
||||
item.bh.push(m.code)
|
||||
})
|
||||
item.ms=Number(item.ms.toFixed(1))
|
||||
item.ms = Number(item.ms.toFixed(1))
|
||||
os.push(item)
|
||||
}
|
||||
})
|
||||
postAction('/ios',{orderId:form.value.id,fabric:form.value.fabric,os:os,zt:typeData.value}).then((res:any)=>{
|
||||
if(res.code===200){
|
||||
postAction('/ios', { orderId: form.value.id, fabric: form.value.fabric, os: os, zt: typeData.value, rc: formItem.value.rc }).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
showToast('提交成功!')
|
||||
uni.redirectTo({
|
||||
url:'/pages/distribution/distribution'
|
||||
url: '/pages/distribution/distribution'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const typeData=ref()
|
||||
const beforeSubmit = (type:any) =>{
|
||||
typeData.value=type
|
||||
const typeData = ref()
|
||||
const beforeSubmit = (type : any) => {
|
||||
typeData.value = type
|
||||
}
|
||||
|
||||
//扫一扫
|
||||
@ -82,24 +88,27 @@ import { showToast } from 'vant';
|
||||
bhms.value = []
|
||||
}
|
||||
const conScanCode = () => {
|
||||
if(form.value.fabric[indexType.value].bhms1){
|
||||
form.value.fabric[indexType.value].bhms1=form.value.fabric[indexType.value].bhms1.concat(bhms.value)
|
||||
}else{
|
||||
if (form.value.fabric[indexType.value].bhms1) {
|
||||
form.value.fabric[indexType.value].bhms1 = form.value.fabric[indexType.value].bhms1.concat(bhms.value)
|
||||
} else {
|
||||
form.value.fabric[indexType.value].bhms1 = JSON.parse(JSON.stringify(bhms.value))
|
||||
}
|
||||
showDialog.value = false
|
||||
let jcms = 0
|
||||
formItem.value.jcps=0
|
||||
formItem.value.jcps = 0
|
||||
form.value.fabric.forEach((l : any) => {
|
||||
l.bhms1.forEach((k : any) => {
|
||||
jcms += k.ms * 1
|
||||
formItem.value.jcps++
|
||||
})
|
||||
if (l.bhms1) {
|
||||
l.bhms1.forEach((k : any) => {
|
||||
jcms += k.ms * 1
|
||||
formItem.value.jcps++
|
||||
})
|
||||
}
|
||||
})
|
||||
formItem.value.jcms = jcms.toFixed(1)
|
||||
}
|
||||
|
||||
function scanCode() {
|
||||
showDialog.value = false
|
||||
h5ScanCode.value = true;
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
@ -190,7 +199,7 @@ import { showToast } from 'vant';
|
||||
<view class="grid-item">谁定</view>
|
||||
<view class="grid-item">面料编号/米数</view>
|
||||
</view>
|
||||
|
||||
|
||||
<template v-for="(item,index) in form.fabric" :key="index">
|
||||
<view class="grid-container">
|
||||
<view class="grid-item">{{item.name}}</view>
|
||||
@ -202,33 +211,29 @@ import { showToast } from 'vant';
|
||||
</view>
|
||||
<view v-for="(itemSecond,indexSecond) in item.bhms1" :key="indexSecond" class="box">
|
||||
{{itemSecond.code}}<br>{{itemSecond.ms}}米
|
||||
<van-icon name="cross" color="red" @click="item.bhms.splice(indexSecond,1)" />
|
||||
<van-icon name="cross" color="red" @click="item.bhms1.splice(indexSecond,1)" />
|
||||
</view>
|
||||
<view class="a-c" v-if="form.zt!='已配全'">
|
||||
<view class="a-c"
|
||||
v-if="form.zt!='已配全'&&(item.bhms?item.bhms1?item.bhms.length+item.bhms1.length<item.quantity:item.bhms.length<item.quantity:item.bhms1?item.bhms1.length<item.quantity:true)">
|
||||
<van-button type="primary" @click="upScanCode(index)">
|
||||
扫一扫
|
||||
</van-button>
|
||||
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
||||
@close="handleClose">
|
||||
</cshaptx4869-scancode>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.phrq" class="line">
|
||||
<van-field v-model="item.phrq" name="配货日期" label="配货日期" colon class="bor" label-width="5em"
|
||||
readonly/>
|
||||
<van-field v-model="item.rc" name="染厂选择" label="染厂选择" colon class="bor" label-width="5em"
|
||||
readonly />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
||||
@close="handleClose">
|
||||
</cshaptx4869-scancode>
|
||||
|
||||
<view v-if="form.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"
|
||||
readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic" />
|
||||
<van-field v-model="formItem.jcps" name="进厂匹数" label="进厂匹数" colon label-width="5em" class="bor-n"
|
||||
readonly />
|
||||
readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic()" />
|
||||
<van-field v-model="formItem.jcps" name="进厂匹数" label="进厂匹数" colon label-width="5em"
|
||||
class="bor-n" readonly />
|
||||
<van-field v-model="formItem.jcms" name="进厂米数" label="进厂米数" colon class="bor-n" readonly
|
||||
label-width="5em" />
|
||||
</view>
|
||||
@ -237,7 +242,8 @@ import { showToast } from 'vant';
|
||||
<van-button round block type="primary" native-type="submit" @click="beforeSubmit('部分配货')">
|
||||
部分配货
|
||||
</van-button>
|
||||
<van-button round block type="primary" native-type="submit" @click="beforeSubmit('已配全')" style="margin-left: 15px;">
|
||||
<van-button round block type="primary" native-type="submit" @click="beforeSubmit('已配全')"
|
||||
style="margin-left: 15px;">
|
||||
已配全
|
||||
</van-button>
|
||||
</view>
|
||||
@ -260,10 +266,10 @@ import { showToast } from 'vant';
|
||||
</view>
|
||||
<template #footer>
|
||||
<view class="footer-button">
|
||||
<van-button plain size="small" native-type="button" style="width: 25vw;" @click="conScanCode">
|
||||
<van-button size="small" style="width: 25vw;" @click="conScanCode">
|
||||
扫描结束
|
||||
</van-button>
|
||||
<van-button size="small" type="success" native-type="submit" style="width: 25vw;" @click="scanCode">
|
||||
<van-button size="small" type="success" style="width: 25vw;" @click="scanCode">
|
||||
继续扫码
|
||||
</van-button>
|
||||
</view>
|
||||
@ -362,7 +368,8 @@ import { showToast } from 'vant';
|
||||
border: 1rpx solid #d7d7d7;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.line{
|
||||
|
||||
.line {
|
||||
border-bottom: 1rpx solid #d7d7d7;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
@ -83,6 +83,12 @@
|
||||
l.orderItems.forEach((m : any) => {
|
||||
let item = statusList.value.find((k : any) => k.status == m.zt)
|
||||
m.statusColor = item.type
|
||||
m.ypps=0
|
||||
m.wpps=0
|
||||
m.fabric.forEach((k:any)=>{
|
||||
m.ypps+=k.bhms.length
|
||||
m.wpps+=(k.quantity-k.bhms.length)
|
||||
})
|
||||
})
|
||||
})
|
||||
total.value += res.data.total * 1
|
||||
@ -97,6 +103,12 @@
|
||||
list.value.push(l)
|
||||
let item = statusList.value.find((m : any) => m.status == l.zt)
|
||||
l.statusColor = item.type
|
||||
l.ypps=0
|
||||
l.wpps=0
|
||||
l.fabric.forEach((m:any)=>{
|
||||
l.ypps+=m.bhms.length
|
||||
l.wpps+=(m.quantity-m.bhms.length)
|
||||
})
|
||||
})
|
||||
total.value += res.data.total * 1
|
||||
loading.value = false;
|
||||
@ -287,6 +299,8 @@
|
||||
</view>
|
||||
<view class="grid-item" @click="toDetile(item,itemSecond)">
|
||||
<van-button :type="itemSecond.statusColor">{{itemSecond.zt}}</van-button>
|
||||
<p>已配货{{itemSecond.ypps}}匹</p>
|
||||
<p>待配货{{itemSecond.wpps}}匹</p>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -310,6 +324,8 @@
|
||||
</view>
|
||||
<view class="grid-item" @click="toDetile(item)">
|
||||
<van-button :type="item.statusColor">{{item.zt}}</van-button>
|
||||
<p>已配货{{item.ypps}}匹</p>
|
||||
<p>待配货{{item.wpps}}匹</p>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -372,8 +388,8 @@
|
||||
.grid-item {
|
||||
border: 1px solid #f2f2f2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
|
||||
.grid-container1 {
|
||||
|
@ -1,17 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { getAction } from '../../common/http';
|
||||
import { getAction, postAction } 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({jcrq:formatDate(new Date()),yjccts:5} as any)
|
||||
const list = ref([] as any[])
|
||||
const statusList = ref([
|
||||
{ status: "部分配货", type: "warning" },
|
||||
{ status: "待配货", type: "primary" },
|
||||
{ status: "已配全", type: "success" },
|
||||
])
|
||||
const factory = ref([] as any[])
|
||||
const nameList = ref([] as any[])
|
||||
|
||||
onMounted(() => {
|
||||
@ -46,10 +43,27 @@
|
||||
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.gdy = data.userName
|
||||
},
|
||||
fail: (err : any) => {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const onClickLeft = () => {
|
||||
@ -75,8 +89,19 @@
|
||||
total.value = 0
|
||||
getAction('/tracking', { page: currentPage.value, size: 10, ...form.value }).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
res.data.record.forEach((l:any)=>{
|
||||
l.craftComment=JSON.parse(l.craftComment)
|
||||
res.data.record.forEach((l : any) => {
|
||||
if (isValidJSON(l.craftComment)) {
|
||||
l.craftComment = JSON.parse(l.craftComment)
|
||||
}
|
||||
if(l.status==='待进厂'){
|
||||
l.butonColor=butonColor.value[0]
|
||||
}else if(l.status==='待出厂'){
|
||||
l.butonColor=butonColor.value[1]
|
||||
}else if(l.status==='已出厂'){
|
||||
l.butonColor=butonColor.value[2]
|
||||
}else{
|
||||
l.butonColor=butonColor.value[getRandomIntInclusive(3,14)]
|
||||
}
|
||||
list.value.push(l)
|
||||
})
|
||||
|
||||
@ -86,6 +111,24 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getRandomIntInclusive(min, max) {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min; // 包括最大值
|
||||
}
|
||||
|
||||
|
||||
function isValidJSON(str : any) {
|
||||
if (typeof str !== 'string') return false; // 确保输入是一个字符串
|
||||
try {
|
||||
JSON.parse(str);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
watch(form.value, () => {
|
||||
list.value = []
|
||||
@ -111,8 +154,10 @@
|
||||
}
|
||||
//弹窗开启事件
|
||||
const handleOpen = () => {
|
||||
if (typeData.value === 'zt') {
|
||||
popuList.value = [{ text: '待配货', value: '待配货' }, { text: '部分配货', value: '部分配货' }, { text: '已配全', value: '已配全' }]
|
||||
if (typeData.value === 'factory') {
|
||||
popuList.value = factory.value
|
||||
} else if (typeData.value === 'status') {
|
||||
popuList.value = [{ text: '待进厂', value: '待进厂' }, { text: '进行中', value: '进行中' }, { text: '待出厂', value: '待出厂' }, { text: '已出厂', value: '已出厂' }]
|
||||
} else {
|
||||
popuList.value = nameList.value
|
||||
}
|
||||
@ -125,25 +170,12 @@
|
||||
dataType.value = val
|
||||
}
|
||||
const onConfirmDate = (val : any) => {
|
||||
form.value[dataType.value] = formatDate(val)
|
||||
show.value = false
|
||||
}
|
||||
|
||||
//详情
|
||||
const toDetile = (item : any, item2 : any) => {
|
||||
if (item.lx === 1) {
|
||||
let a = { customOrder: item.customOrder, orderItems: item2 }
|
||||
let url = './detailCus' + '?' + 'item=' + JSON.stringify(a)
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
})
|
||||
} else if (item.lx === 2) {
|
||||
let url = './detailSpot' + '?' + 'item=' + JSON.stringify(item)
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
})
|
||||
if(dataType.value=='jcrq'){
|
||||
dataItem.value[dataType.value]= formatDate(val)
|
||||
}else{
|
||||
form.value[dataType.value] = formatDate(val)
|
||||
}
|
||||
|
||||
show.value = false
|
||||
}
|
||||
|
||||
|
||||
@ -218,19 +250,40 @@
|
||||
}, 800)
|
||||
}
|
||||
const onConfirm = (val : any) => {
|
||||
form.value.category = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
||||
form.value.fabric = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
||||
pickerCancel()
|
||||
}
|
||||
|
||||
const butonColor = ref(['#611987', '#611987', '#e54077', '#63b911', '#036fb8', '#ff9e49', '#fa7cff', '#f39b77', '#4fcdff', '#e54077', '#036fb8', '#ffc404', '#63b911', '#9cdd1c', '#9cdd1c',])
|
||||
|
||||
const showDialog = ref(false)
|
||||
const itemList = ref({} as any)
|
||||
|
||||
const toDetile = (item : any) => {
|
||||
if (item.status === '待进厂') {
|
||||
showDialog.value = true
|
||||
itemList.value=item
|
||||
}
|
||||
}
|
||||
|
||||
const butonColor = ref(['#611987','#611987','#e54077','#63b911','#036fb8','#ff9e49','#fa7cff','#f39b77','#4fcdff','#e54077','#036fb8','#ffc404','#63b911','#9cdd1c','#9cdd1c',])
|
||||
const submit = () =>{
|
||||
if(!dataItem.value.yjccts) return showToast('请填写预计出厂天数!')
|
||||
dataItem.value.zt=itemList.value.status
|
||||
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('更新成功!')
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="flex">
|
||||
<van-nav-bar title="跟单系统" left-text="返回" left-arrow @click-left="onClickLeft" />
|
||||
<van-cell-group inset style="display: flex;">
|
||||
<van-field v-model="form.makeUser" name="选择工厂" label="选择工厂" colon class="bor" label-width="5em" readonly
|
||||
@click="choosePic('makeUser')" />
|
||||
<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;">
|
||||
@ -240,21 +293,21 @@
|
||||
@click="chooseDate('endDate')" />
|
||||
</van-cell-group>
|
||||
<van-cell-group inset style="display: flex;">
|
||||
<van-field v-model="form.ml" name="面料名称" label="面料名称" class="bor" colon label-width="5em"
|
||||
<van-field v-model="form.fabric" name="面料名称" label="面料名称" class="bor" colon label-width="5em" readonly
|
||||
@click="selectChoose" />
|
||||
<van-field v-model="form.makeUser" name="做单人员" label="做单人员" colon class="bor" label-width="5em" readonly
|
||||
@click="choosePic('makeUser')" />
|
||||
</van-cell-group>
|
||||
<van-cell-group inset style="display: flex;">
|
||||
<van-field v-model="form.color" name="颜色色号" label="颜色色号" colon class="bor-a" label-width="5em" />
|
||||
<van-field v-model="form.zt" name="归属人员" label="归属人员" colon class="bor" label-width="5em" readonly
|
||||
@click="choosePic('makeUser')" />
|
||||
<van-field v-model="form.belongTo" name="归属人员" label="归属人员" colon class="bor" label-width="5em" readonly
|
||||
@click="choosePic('belongTo')" />
|
||||
</van-cell-group>
|
||||
<van-cell-group inset style="display: flex;">
|
||||
<van-field v-model="form.color" name="谁定" label="谁 定" colon
|
||||
class="bor" label-width="5em" />
|
||||
<van-field v-model="form.zt" name="订单状态" label="订单状态" colon class="bor" label-width="5em" readonly
|
||||
@click="choosePic('zt')" />
|
||||
<van-field v-model="form.sd" name="谁定" label="谁 定" colon
|
||||
class="bor-a" label-width="5em" />
|
||||
<van-field v-model="form.status" name="订单状态" label="订单状态" colon class="bor" label-width="5em" readonly
|
||||
@click="choosePic('status')" />
|
||||
</van-cell-group>
|
||||
<view class="grid-container">
|
||||
<view class="grid-item">面料/颜色</view>
|
||||
@ -266,16 +319,42 @@
|
||||
<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">{{item.fabricName}}<br>{{item.color}}</view>
|
||||
<view class="grid-item">{{item.sd}}/{{item.makeUser}}/{{item.belongTo}}<br>{{item.qty}}/{{item.len}}</view>
|
||||
<view class="grid-item">{{item.craft}}<br>{{item.craftComment.name}}</view>
|
||||
<view class="grid-item">
|
||||
<van-button :style="{backgroundColor: butonColor[ Math.floor(Math.random() * 15) + 1],color:'#fff'}">{{item.status}}</van-button>
|
||||
{{item.sd}}/{{item.makeUser}}/{{item.belongTo}}<br>{{item.qty}}匹/{{item.len}}米
|
||||
</view>
|
||||
<view class="grid-item">
|
||||
{{item.craft}}<br>{{item.craftComment.name?item.craftComment.name:item.craftComment}}
|
||||
</view>
|
||||
<view class="grid-item">
|
||||
<van-button
|
||||
:style="{backgroundColor: item.butonColor,color:'#fff'}"
|
||||
@click="toDetile(item)">{{item.status}}</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-dialog v-model:show="showDialog">
|
||||
<view style="margin-top: 10rpx;">
|
||||
<van-cell-group inset>
|
||||
<van-field v-model="dataItem.gdy" name="跟单员" label="跟单员" colon readonly label-width="6.5em" class="bor-n" label-align="right"/>
|
||||
<van-field v-model="dataItem.jcrq" name="进厂日期" label="进厂日期" colon label-width="6.5em" class="bor" readonly @click="chooseDate('jcrq')" label-align="right"/>
|
||||
<van-field v-model="dataItem.yjccts" name="预计出厂天数" label="预计出厂天数" type="digit" colon label-width="6.5em" class="bor-a" label-align="right"/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
<template #footer>
|
||||
<view class="footer-button">
|
||||
<van-button plain size="small" style="width: 25vw;" @click="showDialog=false">
|
||||
取消
|
||||
</van-button>
|
||||
<van-button size="small" type="success" style="width: 25vw;" @click="submit">
|
||||
提交
|
||||
</van-button>
|
||||
</view>
|
||||
</template>
|
||||
</van-dialog>
|
||||
|
||||
<!--选择框-->
|
||||
<van-popup v-model:show="showPicker" round position="bottom" @open="handleOpen">
|
||||
<van-picker show-toolbar :columns="popuList" @confirm="pickerConfirm" @cancel="showPickerCancel"
|
||||
@ -378,12 +457,19 @@
|
||||
::v-deep .van-button--normal {
|
||||
padding: 5px 8px;
|
||||
height: 30px;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
::v-deep .van-field__control {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-button {
|
||||
margin: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
/*面料选择搜索框*/
|
||||
.select-model {
|
||||
position: relative;
|
||||
|
@ -4,7 +4,7 @@
|
||||
import { showToast } from 'vant';
|
||||
|
||||
|
||||
const form = ref({type:'Normal', evidence: [{ chooses: [{}] }] } as any)
|
||||
const form = ref({ type: 'Normal', evidence: [{ chooses: [{}] }] } as any)
|
||||
const showPicker = ref(false)
|
||||
const popuList = ref([] as any[])
|
||||
const dataType = ref('' as any)
|
||||
@ -31,15 +31,15 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const onChange = (val:any) =>{
|
||||
form.value={type:val , evidence: [{}] }
|
||||
|
||||
const onChange = (val : any) => {
|
||||
form.value = { type: val, evidence: [{}] }
|
||||
}
|
||||
const typeChange = (item:any) =>{
|
||||
if(item.type==='Select'){
|
||||
item.chooses=[{value:''}]
|
||||
}else{
|
||||
item.chooses=[]
|
||||
const typeChange = (item : any) => {
|
||||
if (item.type === 'Select') {
|
||||
item.chooses = [{ value: '' }]
|
||||
} else {
|
||||
item.chooses = []
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -90,6 +90,14 @@
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="是否必填" label="是否必填" colon label-width="6em">
|
||||
<template #input>
|
||||
<van-radio-group v-model="item.necessary" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
<template v-if="item.type=='Select'">
|
||||
<view v-for="(itemSecond,indexSecond) in item.chooses" :key="indexSecond">
|
||||
@ -102,17 +110,16 @@
|
||||
@click.stop="item.chooses.splice(index,1)" v-else />
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="是否必填" label="是否必填" colon label-width="6em">
|
||||
<template #input>
|
||||
<van-radio-group v-model="itemSecond.necessary" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</view>
|
||||
</template>
|
||||
<van-field name="是否必填" label="是否必填" colon label-width="6em"
|
||||
:rules="[{ required: true, message: '请填写' }]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="form.necessary" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</view>
|
||||
<!-- 特殊 -->
|
||||
<view v-if="form.type=='Special'">
|
||||
@ -125,14 +132,14 @@
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-model="form.externalOrderAlert" name="订单超过" label="订单超过" type="number" colon label-width="6em"
|
||||
:rules="[{ required: true, message: '请填写上传项名称' }]">
|
||||
<van-field v-model="form.externalOrderAlert" name="订单超过" label="订单超过" type="number" colon
|
||||
label-width="6em" :rules="[{ required: true, message: '请填写上传项名称' }]">
|
||||
<template #button>
|
||||
次审核
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-model="form.internalOrderAlert" name="现货超过" label="现货超过" type="number" colon label-width="6em"
|
||||
:rules="[{ required: true, message: '请填写上传项名称' }]">
|
||||
<van-field v-model="form.internalOrderAlert" name="现货超过" label="现货超过" type="number" colon
|
||||
label-width="6em" :rules="[{ required: true, message: '请填写上传项名称' }]">
|
||||
<template #button>
|
||||
次审核
|
||||
</template>
|
||||
|
@ -3,6 +3,7 @@
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { getAction } from '../../common/http';
|
||||
import { formatDate } from '../../utils/date';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
|
||||
const form = ref({} as any)
|
||||
const list = ref([] as any[])
|
||||
@ -63,6 +64,9 @@
|
||||
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
|
||||
}
|
||||
})
|
||||
})
|
||||
onShow(()=>{
|
||||
list.value = []
|
||||
init()
|
||||
})
|
||||
|
||||
|
@ -266,7 +266,7 @@
|
||||
label-width="6.5em" />
|
||||
<!-- <van-field v-model="item.storageQuantity" name="库存匹数" label="库存匹数" colon label-width="6.5em"
|
||||
readonly /> -->
|
||||
<van-field v-model="item.belongTo" name="订单归属人" label="订单归属人" colon label-width="6.5em" />
|
||||
<van-field v-model="item.belongTo" name="订单归属人" label="订单归属人" colon label-width="6.5em" readonly/>
|
||||
</view>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
@ -138,8 +138,6 @@ const onClickRight=()=>{
|
||||
h5ScanCode.value = false;
|
||||
},
|
||||
});
|
||||
// TODO
|
||||
|
||||
}
|
||||
function handleClose() {
|
||||
h5ScanCode.value = false;
|
||||
|
Loading…
Reference in New Issue
Block a user