跟单
This commit is contained in:
parent
a64e943929
commit
592e271a58
@ -11,6 +11,11 @@
|
|||||||
const formItem = ref({ jcps: 0, jcms: 0 } as any)
|
const formItem = ref({ jcps: 0, jcms: 0 } as any)
|
||||||
const list = ref()
|
const list = ref()
|
||||||
|
|
||||||
|
// 定义 props
|
||||||
|
defineProps<{
|
||||||
|
item ?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
onLoad(async (option : any) => {
|
onLoad(async (option : any) => {
|
||||||
if (option && option.item) {
|
if (option && option.item) {
|
||||||
try {
|
try {
|
||||||
@ -58,7 +63,7 @@
|
|||||||
os.push(item)
|
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) {
|
if (res.code === 200) {
|
||||||
showToast('提交成功!')
|
showToast('提交成功!')
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
@ -206,23 +211,18 @@
|
|||||||
{{itemSecond.code}}<br>{{itemSecond.ms}}米
|
{{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.bhms.splice(indexSecond,1)" />
|
||||||
</view>
|
</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 type="primary" @click="upScanCode(index)">
|
||||||
扫一扫
|
扫一扫
|
||||||
</van-button>
|
</van-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
</cshaptx4869-scancode>
|
</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>
|
|
||||||
|
|
||||||
<view v-if="form.orderItems.zt!='已配全'">
|
<view v-if="form.orderItems.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"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { formatDate } from '../../utils/date';
|
import { formatDate } from '../../utils/date';
|
||||||
import { getAction, postAction } from '../../common/http';
|
import { getAction, postAction } from '../../common/http';
|
||||||
@ -11,16 +11,22 @@ import { showToast } from 'vant';
|
|||||||
const formItem = ref({ jcps: 0, jcms: 0 } as any)
|
const formItem = ref({ jcps: 0, jcms: 0 } as any)
|
||||||
const list = ref()
|
const list = ref()
|
||||||
|
|
||||||
|
// 定义 props
|
||||||
|
defineProps<{
|
||||||
|
item ?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
onLoad(async (option : any) => {
|
onLoad(async (option : any) => {
|
||||||
if (option && option.item) {
|
if (option && option.item) {
|
||||||
try {
|
try {
|
||||||
form.value = JSON.parse(option.item);
|
form.value = JSON.parse(option.item);
|
||||||
console.log(form.value);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to parse item JSON:', error);
|
console.error('Failed to parse item JSON:', error);
|
||||||
// 可以选择在这里显示错误消息给用户
|
// 可以选择在这里显示错误消息给用户
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
onShow(() => {
|
||||||
getAction('/factory').then((res : any) => {
|
getAction('/factory').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
list.value = res.data.map((l : any) => ({ text: l.name, value: l.name }))
|
list.value = res.data.map((l : any) => ({ text: l.name, value: l.name }))
|
||||||
@ -58,7 +64,7 @@ import { showToast } from 'vant';
|
|||||||
os.push(item)
|
os.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
postAction('/ios',{orderId:form.value.id,fabric:form.value.fabric,os:os,zt:typeData.value}).then((res:any)=>{
|
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) {
|
if (res.code === 200) {
|
||||||
showToast('提交成功!')
|
showToast('提交成功!')
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
@ -91,15 +97,18 @@ import { showToast } from 'vant';
|
|||||||
let jcms = 0
|
let jcms = 0
|
||||||
formItem.value.jcps = 0
|
formItem.value.jcps = 0
|
||||||
form.value.fabric.forEach((l : any) => {
|
form.value.fabric.forEach((l : any) => {
|
||||||
|
if (l.bhms1) {
|
||||||
l.bhms1.forEach((k : any) => {
|
l.bhms1.forEach((k : any) => {
|
||||||
jcms += k.ms * 1
|
jcms += k.ms * 1
|
||||||
formItem.value.jcps++
|
formItem.value.jcps++
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
formItem.value.jcms = jcms.toFixed(1)
|
formItem.value.jcms = jcms.toFixed(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
function scanCode() {
|
function scanCode() {
|
||||||
|
showDialog.value = false
|
||||||
h5ScanCode.value = true;
|
h5ScanCode.value = true;
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
@ -202,33 +211,29 @@ import { showToast } from 'vant';
|
|||||||
</view>
|
</view>
|
||||||
<view v-for="(itemSecond,indexSecond) in item.bhms1" :key="indexSecond" class="box">
|
<view v-for="(itemSecond,indexSecond) in item.bhms1" :key="indexSecond" class="box">
|
||||||
{{itemSecond.code}}<br>{{itemSecond.ms}}米
|
{{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>
|
||||||
<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 type="primary" @click="upScanCode(index)">
|
||||||
扫一扫
|
扫一扫
|
||||||
</van-button>
|
</van-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
<cshaptx4869-scancode v-if="h5ScanCode" @success="handleSuccess" @fail="handleFail"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
</cshaptx4869-scancode>
|
</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>
|
|
||||||
|
|
||||||
<view v-if="form.zt!='已配全'">
|
<view v-if="form.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"
|
||||||
readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic" />
|
readonly :rules="[{ required: true, message: '请填写' }]" @click="choosePic()" />
|
||||||
<van-field v-model="formItem.jcps" name="进厂匹数" label="进厂匹数" colon label-width="5em" class="bor-n"
|
<van-field v-model="formItem.jcps" name="进厂匹数" label="进厂匹数" colon label-width="5em"
|
||||||
readonly />
|
class="bor-n" readonly />
|
||||||
<van-field v-model="formItem.jcms" name="进厂米数" label="进厂米数" colon class="bor-n" readonly
|
<van-field v-model="formItem.jcms" name="进厂米数" label="进厂米数" colon class="bor-n" readonly
|
||||||
label-width="5em" />
|
label-width="5em" />
|
||||||
</view>
|
</view>
|
||||||
@ -237,7 +242,8 @@ import { showToast } from 'vant';
|
|||||||
<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>
|
||||||
<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>
|
</van-button>
|
||||||
</view>
|
</view>
|
||||||
@ -260,10 +266,10 @@ import { showToast } from 'vant';
|
|||||||
</view>
|
</view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<view class="footer-button">
|
<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>
|
||||||
<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>
|
</van-button>
|
||||||
</view>
|
</view>
|
||||||
@ -362,6 +368,7 @@ import { showToast } from 'vant';
|
|||||||
border: 1rpx solid #d7d7d7;
|
border: 1rpx solid #d7d7d7;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
border-bottom: 1rpx solid #d7d7d7;
|
border-bottom: 1rpx solid #d7d7d7;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
|
@ -83,6 +83,12 @@
|
|||||||
l.orderItems.forEach((m : any) => {
|
l.orderItems.forEach((m : any) => {
|
||||||
let item = statusList.value.find((k : any) => k.status == m.zt)
|
let item = statusList.value.find((k : any) => k.status == m.zt)
|
||||||
m.statusColor = item.type
|
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
|
total.value += res.data.total * 1
|
||||||
@ -97,6 +103,12 @@
|
|||||||
list.value.push(l)
|
list.value.push(l)
|
||||||
let item = statusList.value.find((m : any) => m.status == l.zt)
|
let item = statusList.value.find((m : any) => m.status == l.zt)
|
||||||
l.statusColor = item.type
|
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
|
total.value += res.data.total * 1
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -287,6 +299,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="grid-item" @click="toDetile(item,itemSecond)">
|
<view class="grid-item" @click="toDetile(item,itemSecond)">
|
||||||
<van-button :type="itemSecond.statusColor">{{itemSecond.zt}}</van-button>
|
<van-button :type="itemSecond.statusColor">{{itemSecond.zt}}</van-button>
|
||||||
|
<p>已配货{{itemSecond.ypps}}匹</p>
|
||||||
|
<p>待配货{{itemSecond.wpps}}匹</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -310,6 +324,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="grid-item" @click="toDetile(item)">
|
<view class="grid-item" @click="toDetile(item)">
|
||||||
<van-button :type="item.statusColor">{{item.zt}}</van-button>
|
<van-button :type="item.statusColor">{{item.zt}}</van-button>
|
||||||
|
<p>已配货{{item.ypps}}匹</p>
|
||||||
|
<p>待配货{{item.wpps}}匹</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -372,8 +388,8 @@
|
|||||||
.grid-item {
|
.grid-item {
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.grid-container1 {
|
.grid-container1 {
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import { getAction } from '../../common/http';
|
import { getAction, postAction } 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({jcrq:formatDate(new Date()),yjccts:5} as any)
|
||||||
const list = ref([] as any[])
|
const list = ref([] as any[])
|
||||||
const statusList = ref([
|
const factory = ref([] as any[])
|
||||||
{ status: "部分配货", type: "warning" },
|
|
||||||
{ status: "待配货", type: "primary" },
|
|
||||||
{ status: "已配全", type: "success" },
|
|
||||||
])
|
|
||||||
const nameList = ref([] as any[])
|
const nameList = ref([] as any[])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -46,10 +43,27 @@
|
|||||||
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
|
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(() => {
|
onShow(() => {
|
||||||
list.value = []
|
list.value = []
|
||||||
init()
|
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 = () => {
|
const onClickLeft = () => {
|
||||||
@ -76,7 +90,18 @@
|
|||||||
getAction('/tracking', { page: currentPage.value, size: 10, ...form.value }).then((res : any) => {
|
getAction('/tracking', { page: currentPage.value, size: 10, ...form.value }).then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
res.data.record.forEach((l : any) => {
|
res.data.record.forEach((l : any) => {
|
||||||
|
if (isValidJSON(l.craftComment)) {
|
||||||
l.craftComment = JSON.parse(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)
|
list.value.push(l)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -87,6 +112,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, () => {
|
watch(form.value, () => {
|
||||||
list.value = []
|
list.value = []
|
||||||
init()
|
init()
|
||||||
@ -111,8 +154,10 @@
|
|||||||
}
|
}
|
||||||
//弹窗开启事件
|
//弹窗开启事件
|
||||||
const handleOpen = () => {
|
const handleOpen = () => {
|
||||||
if (typeData.value === 'zt') {
|
if (typeData.value === 'factory') {
|
||||||
popuList.value = [{ text: '待配货', value: '待配货' }, { text: '部分配货', value: '部分配货' }, { text: '已配全', value: '已配全' }]
|
popuList.value = factory.value
|
||||||
|
} else if (typeData.value === 'status') {
|
||||||
|
popuList.value = [{ text: '待进厂', value: '待进厂' }, { text: '进行中', value: '进行中' }, { text: '待出厂', value: '待出厂' }, { text: '已出厂', value: '已出厂' }]
|
||||||
} else {
|
} else {
|
||||||
popuList.value = nameList.value
|
popuList.value = nameList.value
|
||||||
}
|
}
|
||||||
@ -125,27 +170,14 @@
|
|||||||
dataType.value = val
|
dataType.value = val
|
||||||
}
|
}
|
||||||
const onConfirmDate = (val : any) => {
|
const onConfirmDate = (val : any) => {
|
||||||
|
if(dataType.value=='jcrq'){
|
||||||
|
dataItem.value[dataType.value]= formatDate(val)
|
||||||
|
}else{
|
||||||
form.value[dataType.value] = formatDate(val)
|
form.value[dataType.value] = formatDate(val)
|
||||||
|
}
|
||||||
show.value = false
|
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,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const pickerList = ref([])//面料数据
|
const pickerList = ref([])//面料数据
|
||||||
const pickerContainerList = ref([])
|
const pickerContainerList = ref([])
|
||||||
@ -218,19 +250,40 @@
|
|||||||
}, 800)
|
}, 800)
|
||||||
}
|
}
|
||||||
const onConfirm = (val : any) => {
|
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()
|
pickerCancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
const butonColor = ref(['#611987', '#611987', '#e54077', '#63b911', '#036fb8', '#ff9e49', '#fa7cff', '#f39b77', '#4fcdff', '#e54077', '#036fb8', '#ffc404', '#63b911', '#9cdd1c', '#9cdd1c',])
|
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 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>
|
</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" />
|
||||||
<van-cell-group inset style="display: flex;">
|
<van-cell-group inset style="display: flex;">
|
||||||
<van-field v-model="form.makeUser" 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('makeUser')" />
|
@click="choosePic('factory')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
|
||||||
<van-cell-group inset style="display: flex;">
|
<van-cell-group inset style="display: flex;">
|
||||||
@ -240,21 +293,21 @@
|
|||||||
@click="chooseDate('endDate')" />
|
@click="chooseDate('endDate')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell-group inset style="display: flex;">
|
<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" />
|
@click="selectChoose" />
|
||||||
<van-field v-model="form.makeUser" name="做单人员" label="做单人员" colon class="bor" label-width="5em" readonly
|
<van-field v-model="form.makeUser" name="做单人员" label="做单人员" colon class="bor" label-width="5em" readonly
|
||||||
@click="choosePic('makeUser')" />
|
@click="choosePic('makeUser')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell-group inset style="display: flex;">
|
<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.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
|
<van-field v-model="form.belongTo" name="归属人员" label="归属人员" colon class="bor" label-width="5em" readonly
|
||||||
@click="choosePic('makeUser')" />
|
@click="choosePic('belongTo')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell-group inset style="display: flex;">
|
<van-cell-group inset style="display: flex;">
|
||||||
<van-field v-model="form.color" name="谁定" label="谁 定" colon
|
<van-field v-model="form.sd" name="谁定" label="谁 定" colon
|
||||||
class="bor" label-width="5em" />
|
class="bor-a" label-width="5em" />
|
||||||
<van-field v-model="form.zt" name="订单状态" label="订单状态" colon class="bor" label-width="5em" readonly
|
<van-field v-model="form.status" name="订单状态" label="订单状态" colon class="bor" label-width="5em" readonly
|
||||||
@click="choosePic('zt')" />
|
@click="choosePic('status')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<view class="grid-container">
|
<view class="grid-container">
|
||||||
<view class="grid-item">面料/颜色</view>
|
<view class="grid-item">面料/颜色</view>
|
||||||
@ -266,16 +319,42 @@
|
|||||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
<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">{{item.fabricName}}<br>{{item.color}}</view>
|
<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">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</van-list>
|
</van-list>
|
||||||
</view>
|
</view>
|
||||||
</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-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"
|
||||||
@ -378,12 +457,19 @@
|
|||||||
::v-deep .van-button--normal {
|
::v-deep .van-button--normal {
|
||||||
padding: 5px 8px;
|
padding: 5px 8px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .van-field__control {
|
::v-deep .van-field__control {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-button {
|
||||||
|
margin: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
/*面料选择搜索框*/
|
/*面料选择搜索框*/
|
||||||
.select-model {
|
.select-model {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -90,6 +90,14 @@
|
|||||||
</van-checkbox-group>
|
</van-checkbox-group>
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</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>
|
||||||
<template v-if="item.type=='Select'">
|
<template v-if="item.type=='Select'">
|
||||||
<view v-for="(itemSecond,indexSecond) in item.chooses" :key="indexSecond">
|
<view v-for="(itemSecond,indexSecond) in item.chooses" :key="indexSecond">
|
||||||
@ -102,18 +110,17 @@
|
|||||||
@click.stop="item.chooses.splice(index,1)" v-else />
|
@click.stop="item.chooses.splice(index,1)" v-else />
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</view>
|
<van-field name="是否必填" label="是否必填" colon label-width="6em">
|
||||||
</template>
|
|
||||||
<van-field name="是否必填" label="是否必填" colon label-width="6em"
|
|
||||||
:rules="[{ required: true, message: '请填写' }]">
|
|
||||||
<template #input>
|
<template #input>
|
||||||
<van-radio-group v-model="form.necessary" direction="horizontal">
|
<van-radio-group v-model="itemSecond.necessary" direction="horizontal">
|
||||||
<van-radio :name="true">是</van-radio>
|
<van-radio :name="true">是</van-radio>
|
||||||
<van-radio :name="false">否</van-radio>
|
<van-radio :name="false">否</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
<!-- 特殊 -->
|
<!-- 特殊 -->
|
||||||
<view v-if="form.type=='Special'">
|
<view v-if="form.type=='Special'">
|
||||||
<van-field name="后续操作" label="后续操作" colon label-width="6em">
|
<van-field name="后续操作" label="后续操作" colon label-width="6em">
|
||||||
@ -125,14 +132,14 @@
|
|||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
<van-field v-model="form.externalOrderAlert" name="订单超过" label="订单超过" type="number" colon label-width="6em"
|
<van-field v-model="form.externalOrderAlert" name="订单超过" label="订单超过" type="number" colon
|
||||||
:rules="[{ required: true, message: '请填写上传项名称' }]">
|
label-width="6em" :rules="[{ required: true, message: '请填写上传项名称' }]">
|
||||||
<template #button>
|
<template #button>
|
||||||
次审核
|
次审核
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
<van-field v-model="form.internalOrderAlert" name="现货超过" label="现货超过" type="number" colon label-width="6em"
|
<van-field v-model="form.internalOrderAlert" name="现货超过" label="现货超过" type="number" colon
|
||||||
:rules="[{ required: true, message: '请填写上传项名称' }]">
|
label-width="6em" :rules="[{ required: true, message: '请填写上传项名称' }]">
|
||||||
<template #button>
|
<template #button>
|
||||||
次审核
|
次审核
|
||||||
</template>
|
</template>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import { getAction } from '../../common/http';
|
import { getAction } from '../../common/http';
|
||||||
import { formatDate } from '../../utils/date';
|
import { formatDate } from '../../utils/date';
|
||||||
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const form = ref({} as any)
|
const form = ref({} as any)
|
||||||
const list = ref([] as any[])
|
const list = ref([] as any[])
|
||||||
@ -63,6 +64,9 @@
|
|||||||
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
|
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
onShow(()=>{
|
||||||
|
list.value = []
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@
|
|||||||
label-width="6.5em" />
|
label-width="6.5em" />
|
||||||
<!-- <van-field v-model="item.storageQuantity" name="库存匹数" label="库存匹数" colon label-width="6.5em"
|
<!-- <van-field v-model="item.storageQuantity" name="库存匹数" label="库存匹数" colon label-width="6.5em"
|
||||||
readonly /> -->
|
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>
|
</view>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</view>
|
</view>
|
||||||
|
@ -138,8 +138,6 @@ const onClickRight=()=>{
|
|||||||
h5ScanCode.value = false;
|
h5ScanCode.value = false;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// TODO
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
h5ScanCode.value = false;
|
h5ScanCode.value = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user