定做单
This commit is contained in:
parent
8559019904
commit
85e23229be
@ -4,6 +4,13 @@
|
|||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-ios"
|
"type" : "uni-app:app-ios"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mp-weixin" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"type" : "uniCloud"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -4,14 +4,17 @@
|
|||||||
import { getAction } from '../../common/http';
|
import { getAction } from '../../common/http';
|
||||||
import { showToast } from 'vant';
|
import { showToast } from 'vant';
|
||||||
|
|
||||||
const formList = ref([] as any[])
|
const craftList = ref([] as any[])
|
||||||
const otherList = ref([] as any[])
|
const otherList = ref([] as any[])
|
||||||
|
const hasTex = ref('' as any)
|
||||||
|
const nameList = ref([] as any[])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'info',
|
key: 'info',
|
||||||
success(res) {
|
success(res) {
|
||||||
let data = JSON.parse(res.data)
|
let data = JSON.parse(res.data)
|
||||||
form.value.supplier = data.userName
|
form.value.customOrder.makeUser = data.userName
|
||||||
|
form.value.customOrder.belongTo = data.userName
|
||||||
},
|
},
|
||||||
fail: (err : any) => {
|
fail: (err : any) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@ -19,7 +22,7 @@
|
|||||||
})
|
})
|
||||||
getAction('/fabric/craft/info').then((res : any) => {
|
getAction('/fabric/craft/info').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
formList.value = res.data
|
craftList.value = res.data.map((l : any) => ({ value: l.name, text: l.name }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getAction('/fabric/info/all').then((res : any) => {
|
getAction('/fabric/info/all').then((res : any) => {
|
||||||
@ -47,15 +50,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getAction('/color/list').then((res : any) => {
|
getAction('/v1/user/getNames').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
nameList.value = res.data.map((l : any) => ({ value: l, text: l }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getAction('/extraOption').then((res : any) => {
|
getAction('/extraOption').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
otherList.value = JSON.parse(res.data.payload)
|
otherList.value = JSON.parse(res.data.payload)
|
||||||
console.log(otherList.value);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -68,7 +70,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const form = ref({ fabrics: [{processes:[{}]}] } as any)
|
const form = ref({ customOrder: { makeTime: formatDate(new Date()) }, orderItems: [{ fabric: [{}] }] } as any)
|
||||||
const showPicker = ref(false)
|
const showPicker = ref(false)
|
||||||
const typeData = ref()
|
const typeData = ref()
|
||||||
const popuList = ref([] as any[])
|
const popuList = ref([] as any[])
|
||||||
@ -79,16 +81,22 @@
|
|||||||
const searchValue = ref('')//查询的值
|
const searchValue = ref('')//查询的值
|
||||||
const searchIndex = ref(0)//查询到的数组
|
const searchIndex = ref(0)//查询到的数组
|
||||||
const mlList = ref([])
|
const mlList = ref([])
|
||||||
|
const indexData = ref()
|
||||||
//选择框事件
|
//选择框事件
|
||||||
const choosePic = (type : any) => {
|
const choosePic = (type : any, index : any) => {
|
||||||
showPicker.value = true
|
showPicker.value = true
|
||||||
typeData.value = type
|
typeData.value = type
|
||||||
|
indexData.value = index
|
||||||
}
|
}
|
||||||
//选择框确认
|
//选择框确认
|
||||||
const pickerConfirm = (val : any) => {
|
const pickerConfirm = (val : any) => {
|
||||||
if (typeData.value === 'level') {
|
if (typeData.value === 'craft') {
|
||||||
|
form.value.orderItems[indexData.value][typeData.value] = val.selectedValues[0]
|
||||||
|
} else if (typeData.value === 'hasTex') {
|
||||||
|
hasTex.value = val.selectedOptions[0].text
|
||||||
|
form.value.customOrder[typeData.value] = val.selectedOptions[0].value
|
||||||
} else {
|
} else {
|
||||||
form.value[typeData.value] = val.selectedValues[0]
|
form.value.customOrder[typeData.value] = val.selectedValues[0]
|
||||||
}
|
}
|
||||||
showPickerCancel()
|
showPickerCancel()
|
||||||
}
|
}
|
||||||
@ -98,23 +106,29 @@
|
|||||||
}
|
}
|
||||||
//弹窗开启事件
|
//弹窗开启事件
|
||||||
const handleOpen = () => {
|
const handleOpen = () => {
|
||||||
if (typeData.value === 'supplier') {
|
if (typeData.value === 'craft') {
|
||||||
popuList.value = []
|
popuList.value = craftList.value
|
||||||
} else if (typeData.value === 'level') {
|
} else if (typeData.value === 'hasTex') {
|
||||||
popuList.value = []
|
popuList.value = [{ value: 'true', text: '含税' }, { value: 'false', text: '不含税' }]
|
||||||
|
} else if (typeData.value === 'belongTo') {
|
||||||
|
popuList.value = nameList.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const chooseDate = () => {
|
|
||||||
|
const chooseDate = (type : any) => {
|
||||||
|
typeData.value = type
|
||||||
show.value = true
|
show.value = true
|
||||||
}
|
}
|
||||||
//日期选择
|
//日期选择
|
||||||
const onConfirmDate = (val : any) => {
|
const onConfirmDate = (val : any) => {
|
||||||
form.value.createTime = formatDate(val)
|
form.value.customOrder[typeData.value] = formatDate(val)
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
//选择面料
|
//选择面料
|
||||||
const selectChoose = () => {
|
const selectChoose = (index : any, indexSecond : any) => {
|
||||||
|
indexData.value = index
|
||||||
|
typeData.value = indexSecond
|
||||||
showPickerList.value = true
|
showPickerList.value = true
|
||||||
}
|
}
|
||||||
//面料开启
|
//面料开启
|
||||||
@ -178,9 +192,30 @@
|
|||||||
}, 800)
|
}, 800)
|
||||||
}
|
}
|
||||||
const onConfirm = (val : any) => {
|
const onConfirm = (val : any) => {
|
||||||
form.value.fabricName = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
form.value.orderItems[indexData.value].fabric[typeData.value].name = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
||||||
pickerCancel()
|
pickerCancel()
|
||||||
}
|
}
|
||||||
|
const activeIds = ref([1, 2]);
|
||||||
|
const activeIndex = ref(0);
|
||||||
|
const items = [
|
||||||
|
{
|
||||||
|
text: '浙江',
|
||||||
|
children: [
|
||||||
|
{ text: '杭州', id: 1 },
|
||||||
|
{ text: '温州', id: 2 },
|
||||||
|
{ text: '宁波', id: 3, },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '江苏',
|
||||||
|
children: [
|
||||||
|
{ text: '南京', id: 4 },
|
||||||
|
{ text: '无锡', id: 5 },
|
||||||
|
{ text: '徐州', id: 6 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{ text: '福建', },
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -189,73 +224,78 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<van-form @submit="onSubmit">
|
<van-form @submit="onSubmit">
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<van-field v-model="form.createTime" name="客户名称" label="客户名称" colon class="bor" label-width="5em"
|
<van-field v-model="form.customOrder.customerName" name="客户名称" label="客户名称" colon class="bor"
|
||||||
readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
|
label-width="5em" readonly :rules="[{ required: true, message: '请填写' }]"
|
||||||
<van-field v-model="form.createTime" name="做单日期" label="做单日期" colon label-width="5em" readonly
|
@click="chooseDate()" />
|
||||||
:rules="[{ required: true, message: '请填写' }]" class="bor-n" />
|
<van-field v-model="form.customOrder.makeTime" name="做单日期" label="做单日期" colon label-width="5em"
|
||||||
<van-field v-model="form.supplier" name="订单归属" label="订单归属" colon label-width="5em"
|
readonly :rules="[{ required: true, message: '请填写' }]" class="bor-n" />
|
||||||
:rules="[{ required: true, message: '请填写' }]" />
|
<van-field v-model="form.customOrder.belongTo" name="订单归属" label="订单归属" colon label-width="5em"
|
||||||
<van-field v-model="form.supplier" name="做单人员" label="做单人员" colon label-width="5em"
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor"
|
||||||
|
@click="choosePic('belongTo')" />
|
||||||
|
<van-field v-model="form.customOrder.makeUser" name="做单人员" label="做单人员" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
||||||
<van-field v-model="form.fabricName" name="谁定" label="谁定" colon
|
<van-field v-model="form.customOrder.sd" name="谁定" label="谁定" colon
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
||||||
<van-field v-model="form.fabricName" name="是否含税" label="是否含税" colon
|
<van-field v-model="hasTex" name="是否含税" label="是否含税" colon
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
||||||
@click="choosePic('')" />
|
@click="choosePic('hasTex')" />
|
||||||
<view class="a-b">
|
<view class="a-b">
|
||||||
<van-button type="primary" @click="form.fabrics.push({})">面料添加</van-button>
|
<van-button type="primary" @click="form.orderItems.push({})">面料添加</van-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card" v-for="(item,index) in form.fabrics" :key="index">
|
<view class="card" v-for="(item,index) in form.orderItems" :key="index">
|
||||||
<view style="text-align: end;">
|
<view style="text-align: end;">
|
||||||
<van-icon name="cross" @click="form.fabrics.splice(index,1)"/>
|
<van-icon name="cross" @click="form.orderItems.splice(index,1)" />
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="form.fabricName" name="颜色色号" label="颜色色号" colon
|
<van-field v-model="item.color" name="颜色色号" label="颜色色号" colon
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
||||||
<van-field v-model="form.fabricName" name="工艺名称" label="工艺名称" colon
|
<van-field v-model="item.craft" name="工艺名称" label="工艺名称" colon
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
||||||
@click="choosePic('')" />
|
@click="choosePic('craft',index)" />
|
||||||
<view v-for="(itemSecond,indexSecond) in item.processes" :key="index">
|
<view v-for="(itemSecond,indexSecond) in item.fabric" :key="index">
|
||||||
<view class="a-c">
|
<view class="a-c">
|
||||||
<van-icon name="add" color="red" size="25" v-if="index===0"
|
<van-icon name="add" color="red" size="25" v-if="index===0"
|
||||||
@click="form.processes.push({})" />
|
@click="item.fabric.push({})" />
|
||||||
<van-icon name="clear" color="red" size="25" v-if="index!=0"
|
<van-icon name="clear" color="red" size="25" v-if="index!=0"
|
||||||
@click="form.processes.splice(index,1)" />
|
@click="item.fabric.splice(index,1)" />
|
||||||
<van-field v-model="form.ml" name="面料名称" label="面料名称" colon readonly label-width="5em"
|
<van-field v-model="itemSecond.name" name="面料名称" label="面料名称" colon readonly
|
||||||
@click="selectChoose" class="bor" />
|
label-width="5em" @click="selectChoose(index,indexSecond)" class="bor" />
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="item.ml" name="需求米数" label="需求米数" type="number" colon
|
<van-field v-model="itemSecond.len" name="需求米数" label="需求米数" type="number" colon
|
||||||
label-width="6.5em" />
|
label-width="6.5em" />
|
||||||
<van-field v-model="item.ml" name="需求匹数" label="需求匹数" colon label-width="6.5em" readonly />
|
<van-field v-model="itemSecond.qty" name="需求匹数" label="需求匹数" colon label-width="6.5em"
|
||||||
|
readonly />
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="form.fabricName" name="订单单价" label="订单单价" colon
|
<van-field v-model="item.price" name="订单单价" label="订单单价" colon
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
||||||
<van-field v-model="form.fabricName" name="工艺要求" label="工艺要求" colon
|
<van-field v-model="item.craftComment" name="工艺要求" label="工艺要求" colon
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
||||||
@click="choosePic('')" />
|
@click="choosePic('craftComment')" />
|
||||||
<van-field v-model="form.fabricName" name="有效门幅" label="有效门幅" colon label-width="5em" />
|
<van-field v-model="item.width" name="有效门幅" label="有效门幅" colon label-width="5em" />
|
||||||
<van-field v-model="form.fabricName" name="全门幅" label="全门幅" colon label-width="5em" />
|
<van-field v-model="item.expecetWidth" name="全门幅" label="全门幅" colon label-width="5em" />
|
||||||
<p>其他要求</p>
|
<p>其他要求</p>
|
||||||
<view v-for="(item,index) in otherList" :key="index">
|
<view v-for="(item,index) in otherList" :key="index">
|
||||||
<van-field v-model="form.fabricName" :name="item.name" :label="item.name" colon
|
<van-field v-model="item.value" :name="item.name" :label="item.name" colon
|
||||||
:rules="item.necessary?[{ required: true, message: '请填写' }]:[]" label-width="5em"
|
:rules="item.necessary?[{ required: true, message: '请填写' }]:[]" label-width="5em"
|
||||||
readonly class="bor" @click="choosePic('')" />
|
readonly class="bor" @click="choosePic('')" />
|
||||||
</view>
|
</view>
|
||||||
<p style="text-align: center;margin: 10rpx 0;color: #02a7f0;" @click="form.fabrics.push({})">复制新增</p>
|
<p style="text-align: center;margin: 10rpx 0;color: #02a7f0;" @click="form.fabrics.push({})">
|
||||||
|
复制新增</p>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-field v-model="form.supplier" name="总米数" label="总米数" colon label-width="5em"
|
<van-field v-model="form.customOrder.totalLen" name="总米数" label="总米数" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
||||||
<van-field v-model="form.supplier" name="总匹数" label="总匹数" colon label-width="5em"
|
<van-field v-model="form.customOrder.totalQty" name="总匹数" label="总匹数" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
||||||
<van-field v-model="form.supplier" name="订单总额" label="订单总额" colon label-width="5em"
|
<van-field v-model="form.customOrder.currency" name="订单总额" label="订单总额" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
||||||
<van-field v-model="form.supplier" name="交货日期" label="交货日期" colon label-width="5em"
|
<van-field v-model="form.customOrder.finishDate" name="交货日期" label="交货日期" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor" @click="chooseDate()" />
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor"
|
||||||
<van-field v-model="form.supplier" name="客户备注" label="客户备注" colon label-width="5em"
|
@click="chooseDate('finishDate')" />
|
||||||
|
<van-field v-model="form.customOrder.customerComment" name="客户备注" label="客户备注" colon
|
||||||
|
label-width="5em" :rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
||||||
|
<van-field v-model="form.customOrder.interComment" name="内部备注" label="内部备注" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n" />
|
||||||
<van-field v-model="form.supplier" name="内部备注" label="内部备注" colon label-width="5em"
|
|
||||||
:rules="[{ required: true, message: '请填写' }]" readonly class="bor-n"/>
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<view style="margin: 16px;">
|
<view style="margin: 16px;">
|
||||||
<van-button round block type="primary" native-type="submit">
|
<van-button round block type="primary" native-type="submit">
|
||||||
@ -271,8 +311,10 @@
|
|||||||
|
|
||||||
<!--选择框-->
|
<!--选择框-->
|
||||||
<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-tree-select v-if="typeData==='craftComment'" v-model:active-id="activeIds"
|
||||||
ref="pickerRef" />
|
v-model:main-active-index="activeIndex" :items="items" />
|
||||||
|
<van-picker show-toolbar :columns="popuList" @confirm="pickerConfirm" @cancel="showPickerCancel" ref="pickerRef"
|
||||||
|
v-else />
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
<!-- 面料选择框-->
|
<!-- 面料选择框-->
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import { putAction } from '../../common/http';
|
||||||
|
import { showToast } from 'vant';
|
||||||
|
|
||||||
|
|
||||||
onLoad((option : any) => {
|
onLoad((option : any) => {
|
||||||
@ -12,6 +14,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const form = ref({} as any)
|
const form = ref({} as any)
|
||||||
|
|
||||||
|
const submit = () =>{
|
||||||
|
let url='/interOrder/check/'+form.value.id+'?comment='+form.value.comment
|
||||||
|
putAction(url,form.value.fabric).then((res:any)=>{
|
||||||
|
if(res.code===200){
|
||||||
|
showToast('审核通过!')
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const reject = () =>{
|
||||||
|
let url='/interOrder/reject/'+form.value.id
|
||||||
|
putAction(url).then((res:any)=>{
|
||||||
|
if(res.code===200){
|
||||||
|
showToast('驳回成功!')
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -19,10 +40,10 @@
|
|||||||
<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-cell-group inset>
|
||||||
<van-field v-model="form.orderNo" name="需求单号" label="需求单号" colon label-width="5em" readonly />
|
<van-field v-model="form.id" name="需求单号" label="需求单号" colon label-width="5em" readonly />
|
||||||
<van-field v-model="form.orderTime" name="做单日期" label="做单日期" colon class="bor" label-width="5em"
|
<van-field v-model="form.makeTime" name="做单日期" label="做单日期" colon class="bor" label-width="5em"
|
||||||
readonly />
|
readonly />
|
||||||
<van-field v-model="form.createUser" name="做单人" label="做单人" colon label-width="5em" readonly />
|
<van-field v-model="form.makeUser" name="做单人" label="做单人" colon label-width="5em" readonly />
|
||||||
<van-field v-model="form.color" name="颜色色号" label="颜色色号" colon readonly label-width="5em" />
|
<van-field v-model="form.color" name="颜色色号" label="颜色色号" colon readonly label-width="5em" />
|
||||||
<van-field v-model="form.craft" name="工艺" label="工艺" colon readonly label-width="5em" class="bor" />
|
<van-field v-model="form.craft" name="工艺" label="工艺" colon readonly label-width="5em" class="bor" />
|
||||||
<view class="a-b">
|
<view class="a-b">
|
||||||
@ -35,24 +56,24 @@
|
|||||||
<view class="grid-item">谁定</view>
|
<view class="grid-item">谁定</view>
|
||||||
<view class="grid-item">操作</view>
|
<view class="grid-item">操作</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-container" v-for="(item,index) in form.fabrics" :key="index">
|
<view class="grid-container" v-for="(item,index) in form.fabric" :key="index">
|
||||||
<view class="grid-item">{{item.name}}</view>
|
<view class="grid-item">{{item.name}}</view>
|
||||||
<view class="grid-item">
|
<view class="grid-item">
|
||||||
<van-field v-model="item.quantity" class="bor" type="number" />
|
<van-field v-model="item.quantity" class="bor" type="number" />
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-item">{{item.storageQuantity}}</view>
|
<view class="grid-item">{{item.storageQuantity}}</view>
|
||||||
<view class="grid-item">{{item.belongTo}}</view>
|
<view class="grid-item">{{item.belongTo}}</view>
|
||||||
<view class="grid-item" style="color: red;" @click="form.fabrics.splice(index,1)">删除</view>
|
<view class="grid-item" style="color: red;" @click="form.fabric.splice(index,1)">删除</view>
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="form.comment" name="备注" label="备注" colon label-width="5em" readonly/>
|
<van-field v-model="form.comment" name="备注" label="备注" colon label-width="5em"/>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<view style="margin: 16px;display: flex;align-items: center;justify-content: space-between;">
|
<view style="margin: 16px;display: flex;align-items: center;justify-content: space-between;">
|
||||||
<van-button round block type="danger">
|
<van-button round block type="danger" @click="reject">
|
||||||
取消
|
驳回
|
||||||
</van-button>
|
</van-button>
|
||||||
|
|
||||||
<van-button round block type="primary">
|
<van-button round block type="primary" @click="submit">
|
||||||
提交
|
通过
|
||||||
</van-button>
|
</van-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -8,7 +8,25 @@
|
|||||||
const list = ref([] as any[])
|
const list = ref([] as any[])
|
||||||
const colorList = ref([] as any[])
|
const colorList = ref([] as any[])
|
||||||
const nameList = ref([] as any[])
|
const nameList = ref([] as any[])
|
||||||
const status = ref()
|
|
||||||
|
const statusList = ref([
|
||||||
|
{ status: "待审核", code: "UnCheck", type: "warning",path:'/pages/spot/audit' },
|
||||||
|
{ status: "待主管审核", code: "UnCheckByLeader", type: "primary" },
|
||||||
|
{ status: "待跟单员审核", code: "UnCheckByCharger", type: "success" },
|
||||||
|
{ status: "已通过(待配货)", code: "Checked", type: "primary",path:'/pages/spot/pass' },
|
||||||
|
{ status: "取消审核中", code: "Canceling", type: "primary" },
|
||||||
|
{ status: "已取消", code: "Canceled", type: "danger" },
|
||||||
|
{ status: "被驳回", code: "Rejected", type: "danger" },
|
||||||
|
{ status: "部分配货", code: "Allocating", type: "warning" },
|
||||||
|
{ status: "已配完(待进厂)", code: "Allocated", type: "success" },
|
||||||
|
{ status: "已进厂", code: "Processing", type: "primary" },
|
||||||
|
{ status: "已出厂(待收货)", code: "Processed", type: "success" },
|
||||||
|
{ status: "待质检", code: "UnTested", type: "warning" },
|
||||||
|
{ status: "已质检(待入库)", code: "Testing", type: "primary" },
|
||||||
|
{ status: "已质检(待入库)", code: "Tested", type: "primary" },
|
||||||
|
{ status: "已入库", code: "Storage", type: "success" }
|
||||||
|
])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getAction('/fabric/info/all').then((res : any) => {
|
getAction('/fabric/info/all').then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@ -78,10 +96,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
getAction('/order/internal', { page: currentPage.value, size: 10, ...form.value }).then((res : any) => {
|
getAction('/interOrder', { 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) => {
|
||||||
list.value.push(l)
|
list.value.push(l)
|
||||||
|
let item =statusList.value.find((m:any)=>m.status==l.status)
|
||||||
|
l.statusColor=item.type
|
||||||
|
|
||||||
})
|
})
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -177,12 +198,7 @@
|
|||||||
}
|
}
|
||||||
//选择框确认
|
//选择框确认
|
||||||
const pickerConfirm = (val : any) => {
|
const pickerConfirm = (val : any) => {
|
||||||
if (typeData.value === 'status') {
|
|
||||||
status.value = val.selectedOptions[0].text
|
|
||||||
form.value[typeData.value] = val.selectedOptions[0].value
|
|
||||||
} else {
|
|
||||||
form.value[typeData.value] = val.selectedValues[0]
|
form.value[typeData.value] = val.selectedValues[0]
|
||||||
}
|
|
||||||
showPicker.value = false
|
showPicker.value = false
|
||||||
}
|
}
|
||||||
//取消
|
//取消
|
||||||
@ -196,23 +212,23 @@
|
|||||||
popuList.value = colorList.value
|
popuList.value = colorList.value
|
||||||
} else if (typeData.value === 'status') {
|
} else if (typeData.value === 'status') {
|
||||||
popuList.value = [
|
popuList.value = [
|
||||||
{ text: "待审核", value: "UnCheck" },
|
{ text: "待审核", value: "待审核" },
|
||||||
{ text: "待主管审核", value: "UnCheckByLeader" },
|
{ text: "待主管审核", value: "待主管审核" },
|
||||||
{ text: "待跟单员审核", value: "UnCheckByCharger", },
|
{ text: "待跟单员审核", value: "待跟单员审核", },
|
||||||
{ text: "已通过(待配货)", value: "Checked" },
|
{ text: "已通过(待配货)", value: "已通过(待配货)" },
|
||||||
{ text: "取消审核中", value: "Canceling" },
|
{ text: "取消审核中", value: "取消审核中" },
|
||||||
{ text: "已取消", value: "Canceled" },
|
{ text: "已取消", value: "已取消" },
|
||||||
{ text: "被驳回", value: "Rejected" },
|
{ text: "被驳回", value: "被驳回" },
|
||||||
{ text: "部分配货", value: "Allocating" },
|
{ text: "部分配货", value: "部分配货" },
|
||||||
{ text: "已配完(待进厂)", value: "Allocated", },
|
{ text: "已配完(待进厂)", value: "已配完(待进厂)", },
|
||||||
{ text: "已进厂", value: "Processing" },
|
{ text: "已进厂", value: "已进厂" },
|
||||||
{ text: "已出厂(待收货)", value: "Processed", },
|
{ text: "已出厂(待收货)", value: "已出厂(待收货)", },
|
||||||
{ text: "待质检", value: "UnTested" },
|
{ text: "待质检", value: "待质检" },
|
||||||
{ text: "已质检(待入库)", value: "Testing" },
|
{ text: "已质检(待入库)", value: "已质检(待入库)" },
|
||||||
{ text: "已质检(待入库)", value: "Tested" },
|
{ text: "已质检(待入库)", value: "已质检(待入库)" },
|
||||||
{ text: "已入库", value: "Storage", },
|
{ text: "已入库", value: "已入库", },
|
||||||
]
|
]
|
||||||
} else if (typeData.value === 'orderUser') {
|
} else if (typeData.value === 'makeUser') {
|
||||||
popuList.value = nameList.value
|
popuList.value = nameList.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,34 +244,9 @@
|
|||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusList = ref([
|
|
||||||
{ status: "待审核", code: "UnCheck", type: "warning",path:'/pages/spot/audit' },
|
|
||||||
{ status: "待主管审核", code: "UnCheckByLeader", type: "primary" },
|
|
||||||
{ status: "待跟单员审核", code: "UnCheckByCharger", type: "success" },
|
|
||||||
{ status: "已通过(待配货)", code: "Checked", type: "primary",path:'/pages/spot/pass' },
|
|
||||||
{ status: "取消审核中", code: "Canceling", type: "primary" },
|
|
||||||
{ status: "已取消", code: "Canceled", type: "danger" },
|
|
||||||
{ status: "被驳回", code: "Rejected", type: "danger" },
|
|
||||||
{ status: "部分配货", code: "Allocating", type: "warning" },
|
|
||||||
{ status: "已配完(待进厂)", code: "Allocated", type: "success" },
|
|
||||||
{ status: "已进厂", code: "Processing", type: "primary" },
|
|
||||||
{ status: "已出厂(待收货)", code: "Processed", type: "success" },
|
|
||||||
{ status: "待质检", code: "UnTested", type: "warning" },
|
|
||||||
{ status: "已质检(待入库)", code: "Testing", type: "primary" },
|
|
||||||
{ status: "已质检(待入库)", code: "Tested", type: "primary" },
|
|
||||||
{ status: "已入库", code: "Storage", type: "success" }
|
|
||||||
])
|
|
||||||
const statusColor = ref()
|
|
||||||
//状态字典
|
|
||||||
function ztShow(status : any) {
|
|
||||||
let item = statusList.value.find((l : any) => l.code === status)
|
|
||||||
statusColor.value = item.type
|
|
||||||
return item.status
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const gotoLink= (item:any) =>{
|
const gotoLink= (item:any) =>{
|
||||||
let a = statusList.value.find((l : any) => l.code === item.status)
|
let a = statusList.value.find((l : any) => l.status === item.status)
|
||||||
let url=a.path+'?'+'item='+JSON.stringify(item)
|
let url=a.path+'?'+'item='+JSON.stringify(item)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:url,
|
url:url,
|
||||||
@ -278,12 +269,12 @@
|
|||||||
@click="selectChoose" /> -->
|
@click="selectChoose" /> -->
|
||||||
<van-field v-model="form.color" name="颜色筛选" label="颜色筛选" colon class="bor" label-width="5em" readonly
|
<van-field v-model="form.color" name="颜色筛选" label="颜色筛选" colon class="bor" label-width="5em" readonly
|
||||||
@click="choosePic('color')" />
|
@click="choosePic('color')" />
|
||||||
<van-field v-model="status" 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('status')" />
|
@click="choosePic('status')" />
|
||||||
</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.orderUser" 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('orderUser')" />
|
@click="choosePic('makeUser')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<view class="grid-container">
|
<view class="grid-container">
|
||||||
<view class="grid-item">日期/颜色</view>
|
<view class="grid-item">日期/颜色</view>
|
||||||
@ -294,25 +285,25 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<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">{{formatDate(item.orderTime)}}<br>{{item.color}}</view>
|
<view class="grid-item">{{formatDate(item.makeTime)}}<br>{{item.color}}</view>
|
||||||
<view class="grid-item">
|
<view class="grid-item">
|
||||||
<view class="grid-container1">
|
<view class="grid-container1">
|
||||||
<view :class="indexSecond===(item.fabrics.length-1)?'grid-item2':'grid-item1'"
|
<view :class="indexSecond===(item.fabric.length-1)?'grid-item2':'grid-item1'"
|
||||||
v-for="(itemSecond,indexSecond) in item.fabrics" :key="indexSecond">
|
v-for="(itemSecond,indexSecond) in item.fabric" :key="indexSecond">
|
||||||
{{itemSecond.name}}<br>{{item.craft}} {{itemSecond.belongTo}}
|
{{itemSecond.name}}<br>{{item.craft}} {{itemSecond.belongTo}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-item">
|
<view class="grid-item">
|
||||||
<view class="grid-container1">
|
<view class="grid-container1">
|
||||||
<view :class="indexSecond===(item.fabrics.length-1)?'grid-item2':'grid-item1'"
|
<view :class="indexSecond===(item.fabric.length-1)?'grid-item2':'grid-item1'"
|
||||||
v-for="(itemSecond,indexSecond) in item.fabrics" :key="indexSecond">
|
v-for="(itemSecond,indexSecond) in item.fabric" :key="indexSecond">
|
||||||
{{itemSecond.quantity}}
|
{{itemSecond.quantity}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-item" @click="gotoLink(item)">
|
<view class="grid-item" @click="gotoLink(item)">
|
||||||
<van-button :type="statusColor">{{ztShow(item.status)}}</van-button>
|
<van-button :type="item.statusColor">{{item.status}}</van-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</van-list>
|
</van-list>
|
||||||
|
@ -1,201 +1,33 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less">
|
onLoad((option : any) => {
|
||||||
|
form.value = JSON.parse(option.item)
|
||||||
</style>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { formatDate } from '../../utils/date';
|
|
||||||
import { getAction } from '../../common/http';
|
|
||||||
import { showToast } from 'vant';
|
|
||||||
|
|
||||||
const showDialog = ref(false)
|
|
||||||
const formList = ref([] as any[])
|
|
||||||
onMounted(() => {
|
|
||||||
getAction('/fabric/craft/info').then((res : any) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
formList.value = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
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 }] }]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const onClickLeft = () => {
|
const onClickLeft = () => {
|
||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
|
|
||||||
//弹窗提交
|
const form = ref({} as any)
|
||||||
const confirmSecond = () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
const onSubmit = () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const form = ref({ processes: [{}] } as any)
|
|
||||||
const showPicker = ref(false)
|
|
||||||
const typeData = ref()
|
|
||||||
const popuList = ref([] as any[])
|
|
||||||
const show = ref(false)
|
|
||||||
const pickerList = ref([])//面料数据
|
|
||||||
const pickerContainerList = ref([])
|
|
||||||
const showPickerList = ref(false)
|
|
||||||
const searchValue = ref('')//查询的值
|
|
||||||
const searchIndex = ref(0)//查询到的数组
|
|
||||||
const mlList = ref([])
|
|
||||||
//选择框事件
|
|
||||||
const choosePic = (type : any) => {
|
|
||||||
showPicker.value = true
|
|
||||||
typeData.value = type
|
|
||||||
}
|
|
||||||
//选择框确认
|
|
||||||
const pickerConfirm = (val : any) => {
|
|
||||||
if (typeData.value === 'level') {
|
|
||||||
} else {
|
|
||||||
form.value[typeData.value] = val.selectedValues[0]
|
|
||||||
}
|
|
||||||
showPickerCancel()
|
|
||||||
}
|
|
||||||
//取消
|
|
||||||
const showPickerCancel = () => {
|
|
||||||
showPicker.value = false
|
|
||||||
}
|
|
||||||
//弹窗开启事件
|
|
||||||
const handleOpen = () => {
|
|
||||||
if (typeData.value === 'supplier') {
|
|
||||||
popuList.value = []
|
|
||||||
} else if (typeData.value === 'level') {
|
|
||||||
popuList.value = []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const chooseDate = () => {
|
|
||||||
show.value = true
|
|
||||||
}
|
|
||||||
//日期选择
|
|
||||||
const onConfirmDate = (val : any) => {
|
|
||||||
form.value.createTime = formatDate(val)
|
|
||||||
show.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
//选择面料
|
|
||||||
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.fabricName = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
|
||||||
pickerCancel()
|
|
||||||
}
|
|
||||||
</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-form @submit="onSubmit">
|
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<van-field v-model="form.createTime" name="做单日期" label="做单日期" colon class="bor" label-width="5em"
|
<van-field v-model="form.id" name="需求单号" label="需求单号" colon label-width="5em" readonly />
|
||||||
readonly :rules="[{ required: true, message: '请填写' }]" @click="chooseDate()" />
|
<van-field v-model="form.makeTime" name="做单日期" label="做单日期" colon class="bor" label-width="5em"
|
||||||
<van-field v-model="form.supplier" name="订单归属" label="订单归属" colon label-width="5em"
|
readonly />
|
||||||
:rules="[{ required: true, message: '请填写' }]" />
|
<van-field v-model="form.makeUser" name="做单人" label="做单人" colon label-width="5em" readonly />
|
||||||
<van-field v-model="form.fabricName" name="颜色色号" label="颜色色号" colon
|
<van-field v-model="form.color" name="颜色色号" label="颜色色号" colon readonly label-width="5em" />
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" />
|
<van-field v-model="form.craft" name="工艺" label="工艺" colon readonly label-width="5em" class="bor" />
|
||||||
<van-field v-model="form.fabricName" name="工艺" label="工艺" colon
|
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
|
||||||
@click="choosePic('')" />
|
|
||||||
<view class="a-b">
|
<view class="a-b">
|
||||||
<van-button type="primary" @click="showDialog=true">面料添加</van-button>
|
<van-button type="primary">面料添加</van-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-container">
|
<view class="grid-container">
|
||||||
<view class="grid-item">面料名称</view>
|
<view class="grid-item">面料名称</view>
|
||||||
@ -204,88 +36,19 @@
|
|||||||
<view class="grid-item">谁定</view>
|
<view class="grid-item">谁定</view>
|
||||||
<view class="grid-item">操作</view>
|
<view class="grid-item">操作</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-container" v-for="(item,index) in form.processes" :key=index>
|
<view class="grid-container" v-for="(item,index) in form.fabric" :key="index">
|
||||||
<view class="grid-item">{{item.ml}}</view>
|
<view class="grid-item">{{item.name}}</view>
|
||||||
<view class="grid-item">匹数</view>
|
<view class="grid-item">
|
||||||
<view class="grid-item">库存</view>
|
<van-field v-model="item.quantity" class="bor" type="number" />
|
||||||
<view class="grid-item">谁定</view>
|
|
||||||
<view class="grid-item">操作</view>
|
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="form.fabricName" name="备注" label="备注" colon label-width="5em" />
|
<view class="grid-item">{{item.storageQuantity}}</view>
|
||||||
</van-cell-group>
|
<view class="grid-item">{{item.belongTo}}</view>
|
||||||
<view style="margin: 16px;">
|
<view class="grid-item" style="color: red;" @click="form.fabric.splice(index,1)">删除</view>
|
||||||
<van-button round block type="primary" native-type="submit">
|
|
||||||
提交
|
|
||||||
</van-button>
|
|
||||||
</view>
|
|
||||||
</van-form>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<van-dialog v-model:show="showDialog">
|
|
||||||
<view>
|
|
||||||
<van-cell-group inset>
|
|
||||||
<view v-for="(item,index) in form.processes" :key="index">
|
|
||||||
<view class="a-c">
|
|
||||||
<van-icon name="add" color="red" size="25" v-if="index===0" @click="form.processes.push({})" />
|
|
||||||
<van-icon name="clear" color="red" size="25" v-if="index!=0"
|
|
||||||
@click="form.processes.splice(index,1)" />
|
|
||||||
<van-field v-model="form.ml" name="面料名称" label="面料名称" colon readonly label-width="5em"
|
|
||||||
@click="selectChoose" class="bor"/>
|
|
||||||
</view>
|
|
||||||
<van-field v-model="item.ml" name="需求匹数" label="需求匹数" type="number" colon label-width="6.5em" />
|
|
||||||
<van-field v-model="item.ml" name="库存匹数" label="库存匹数" colon label-width="6.5em" readonly/>
|
|
||||||
<van-field v-model="form.ml" name="谁定" label="谁定" colon readonly label-width="6.5em" @click="choosePic" class="bor" />
|
|
||||||
</view>
|
</view>
|
||||||
|
<van-field v-model="form.comment" name="备注" label="备注" colon label-width="5em" readonly/>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</view>
|
</view>
|
||||||
<template #footer>
|
|
||||||
<view class="footer-button">
|
|
||||||
<van-button plain size="small" native-type="button" style="width: 25vw;" @click="showDialog=false">
|
|
||||||
取消
|
|
||||||
</van-button>
|
|
||||||
<van-button size="small" type="success" native-type="submit" style="width: 25vw;"
|
|
||||||
@click="confirmSecond">
|
|
||||||
确认
|
|
||||||
</van-button>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
</van-dialog>
|
|
||||||
|
|
||||||
|
|
||||||
<van-calendar v-model:show="show" @confirm="onConfirmDate" :min-date="new Date(2010, 0, 1)"
|
|
||||||
:max-date="new Date(2050, 0, 31)" />
|
|
||||||
|
|
||||||
<!--选择框-->
|
|
||||||
<van-popup v-model:show="showPicker" round position="bottom" @open="handleOpen">
|
|
||||||
<van-picker show-toolbar :columns="popuList" @confirm="pickerConfirm" @cancel="showPickerCancel"
|
|
||||||
ref="pickerRef" />
|
|
||||||
</van-popup>
|
|
||||||
|
|
||||||
<!-- 面料选择框-->
|
|
||||||
<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>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -305,11 +68,12 @@
|
|||||||
|
|
||||||
.grid-container {
|
.grid-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr;
|
grid-template-columns: 2fr 1fr 1fr 2fr 1fr;
|
||||||
|
|
||||||
.grid-item {
|
.grid-item {
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
|
||||||
::v-deep .van-cell {
|
::v-deep .van-cell {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
key: 'info',
|
key: 'info',
|
||||||
success(res) {
|
success(res) {
|
||||||
let data = JSON.parse(res.data)
|
let data = JSON.parse(res.data)
|
||||||
form.value.createUser = data.userName
|
form.value.makeUser = data.userName
|
||||||
},
|
},
|
||||||
fail: (err : any) => {
|
fail: (err : any) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@ -59,20 +59,20 @@
|
|||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
|
|
||||||
const addFabrics = () => {
|
const addfabric = () => {
|
||||||
showDialog.value = true
|
showDialog.value = true
|
||||||
fabrics.value = JSON.parse(JSON.stringify(form.value.fabrics))
|
fabric.value = JSON.parse(JSON.stringify(form.value.fabric))
|
||||||
}
|
}
|
||||||
|
|
||||||
//弹窗提交
|
//弹窗提交
|
||||||
const confirmSecond = () => {
|
const confirmSecond = () => {
|
||||||
showDialog.value = false
|
showDialog.value = false
|
||||||
form.value.fabrics = JSON.parse(JSON.stringify(fabrics.value))
|
form.value.fabric = JSON.parse(JSON.stringify(fabric.value))
|
||||||
}
|
}
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
let set=new Set()
|
let set=new Set()
|
||||||
let tj=true
|
let tj=true
|
||||||
form.value.fabrics.forEach((l:any)=>{
|
form.value.fabric.forEach((l:any)=>{
|
||||||
if(!l.name){
|
if(!l.name){
|
||||||
tj=false
|
tj=false
|
||||||
}else{
|
}else{
|
||||||
@ -86,7 +86,7 @@
|
|||||||
})
|
})
|
||||||
if(!tj) return showToast('请填写完整信息!')
|
if(!tj) return showToast('请填写完整信息!')
|
||||||
if([...set].length>1) return showToast('相同门幅才可以提交!')
|
if([...set].length>1) return showToast('相同门幅才可以提交!')
|
||||||
postAction('/order/internal',form.value).then((res:any)=>{
|
postAction('/interOrder',form.value).then((res:any)=>{
|
||||||
if(res.code===200){
|
if(res.code===200){
|
||||||
showToast('提交成功!')
|
showToast('提交成功!')
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
@ -94,8 +94,8 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const form = ref({ orderTime: formatDate(new Date()), fabrics: [{ belongTo: '门店' }], craft: '染色' } as any)
|
const form = ref({ makeTime: formatDate(new Date()), fabric: [{ belongTo: '门店' }], craft: '染色' } as any)
|
||||||
const fabrics = ref([{ belongTo: '门店' }] as any[])
|
const fabric = ref([{ belongTo: '门店' }] as any[])
|
||||||
const showPicker = ref(false)
|
const showPicker = ref(false)
|
||||||
const typeData = ref()
|
const typeData = ref()
|
||||||
const popuList = ref([] as any[])
|
const popuList = ref([] as any[])
|
||||||
@ -203,7 +203,7 @@
|
|||||||
}, 800)
|
}, 800)
|
||||||
}
|
}
|
||||||
const onConfirm = (val : any) => {
|
const onConfirm = (val : any) => {
|
||||||
fabrics.value[typeData.value].name = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
fabric.value[typeData.value].name = val.selectedValues[2] + '/' + val.selectedValues[0] + val.selectedValues[1]
|
||||||
pickerCancel()
|
pickerCancel()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -214,9 +214,9 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<van-form @submit="onSubmit">
|
<van-form @submit="onSubmit">
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<van-field v-model="form.orderTime" name="做单日期" label="做单日期" colon class="bor" label-width="5em"
|
<van-field v-model="form.makeTime" 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="form.createUser" name="做单人" label="做单人" colon label-width="5em"
|
<van-field v-model="form.makeUser" name="做单人" label="做单人" colon label-width="5em"
|
||||||
:rules="[{ required: true, message: '请填写' }]" />
|
:rules="[{ required: true, message: '请填写' }]" />
|
||||||
<van-field v-model="form.color" name="颜色色号" label="颜色色号" colon class="bor" readonly
|
<van-field v-model="form.color" name="颜色色号" label="颜色色号" colon class="bor" readonly
|
||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" @click="choosePic('color')" />
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" @click="choosePic('color')" />
|
||||||
@ -224,7 +224,7 @@
|
|||||||
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
:rules="[{ required: true, message: '请填写' }]" label-width="5em" readonly class="bor"
|
||||||
@click="choosePic('craft')" />
|
@click="choosePic('craft')" />
|
||||||
<view class="a-b">
|
<view class="a-b">
|
||||||
<van-button type="primary" @click="addFabrics">面料添加</van-button>
|
<van-button type="primary" @click="addfabric">面料添加</van-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-container">
|
<view class="grid-container">
|
||||||
<view class="grid-item">面料名称</view>
|
<view class="grid-item">面料名称</view>
|
||||||
@ -233,12 +233,12 @@
|
|||||||
<view class="grid-item">谁定</view>
|
<view class="grid-item">谁定</view>
|
||||||
<view class="grid-item">操作</view>
|
<view class="grid-item">操作</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-container" v-for="(item,index) in form.fabrics" :key="index">
|
<view class="grid-container" v-for="(item,index) in form.fabric" :key="index">
|
||||||
<view class="grid-item">{{item.name}}</view>
|
<view class="grid-item">{{item.name}}</view>
|
||||||
<view class="grid-item">{{item.quantity}}</view>
|
<view class="grid-item">{{item.quantity}}</view>
|
||||||
<view class="grid-item">{{item.storageQuantity}}</view>
|
<view class="grid-item">{{item.storageQuantity}}</view>
|
||||||
<view class="grid-item">{{item.belongTo}}</view>
|
<view class="grid-item">{{item.belongTo}}</view>
|
||||||
<view class="grid-item" style="color: red;" @click="form.fabrics.splice(index,1)">删除</view>
|
<view class="grid-item" style="color: red;" @click="form.fabric.splice(index,1)">删除</view>
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="form.comment" name="备注" label="备注" colon label-width="5em" />
|
<van-field v-model="form.comment" name="备注" label="备注" colon label-width="5em" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
@ -254,18 +254,18 @@
|
|||||||
<van-dialog v-model:show="showDialog">
|
<van-dialog v-model:show="showDialog">
|
||||||
<view>
|
<view>
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<view v-for="(item,index) in fabrics" :key="index">
|
<view v-for="(item,index) in fabric" :key="index">
|
||||||
<view class="a-c">
|
<view class="a-c">
|
||||||
<van-icon name="add" color="red" size="25" v-if="index===0"
|
<van-icon name="add" color="red" size="25" v-if="index===0"
|
||||||
@click="fabrics.push({belongTo:'门店'})" />
|
@click="fabric.push({belongTo:'门店'})" />
|
||||||
<van-icon name="clear" color="red" size="25" v-if="index!=0" @click="fabrics.splice(index,1)" />
|
<van-icon name="clear" color="red" size="25" v-if="index!=0" @click="fabric.splice(index,1)" />
|
||||||
<van-field v-model="item.name" name="面料名称" label="面料名称" colon readonly label-width="5em"
|
<van-field v-model="item.name" name="面料名称" label="面料名称" colon readonly label-width="5em"
|
||||||
@click="selectChoose(index)" class="bor" />
|
@click="selectChoose(index)" class="bor" />
|
||||||
</view>
|
</view>
|
||||||
<van-field v-model="item.quantity" name="需求匹数" label="需求匹数" type="number" colon
|
<van-field v-model="item.quantity" name="需求匹数" label="需求匹数" type="number" colon
|
||||||
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" />
|
||||||
</view>
|
</view>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
Loading…
Reference in New Issue
Block a user