Commit f144e610 by wuqian

Merge remote-tracking branch 'origin/dev_arrange' into dev_track

parents 3209488d 7a7d4b5b
...@@ -3044,7 +3044,7 @@ ...@@ -3044,7 +3044,7 @@
:uploadList="uploadList" :uploadList="uploadList"
></uploadBox> ></uploadBox>
</template> </template>
<script setup lang="ts"> <script setup lang="tsx">
import LogisticsWaySelect from '../../logistics/components/LogisticsWaySelect.tsx' import LogisticsWaySelect from '../../logistics/components/LogisticsWaySelect.tsx'
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
// import { AnyObject } from '@/types/api/warehouse' // import { AnyObject } from '@/types/api/warehouse'
...@@ -3161,7 +3161,7 @@ import { ...@@ -3161,7 +3161,7 @@ import {
CircleCheckFilled, CircleCheckFilled,
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import { Column, ElFormItem, ElMessage } from 'element-plus' import { Column, ElFormItem, ElMessage } from 'element-plus'
import { computed, onMounted, ref, nextTick, reactive } from 'vue' import { computed, onMounted, ref, nextTick, reactive, render } from 'vue'
import FastProduction from './FastProduction.vue' import FastProduction from './FastProduction.vue'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
import PodMakeOrder from './PodMakeOrder.vue' import PodMakeOrder from './PodMakeOrder.vue'
...@@ -3671,6 +3671,36 @@ const handleReComposingDesign = async () => { ...@@ -3671,6 +3671,36 @@ const handleReComposingDesign = async () => {
typesettingRow.value = undefined typesettingRow.value = undefined
} }
} }
interface ProcessTypeData {
label: string
value:string
}
const processType = ref<ProcessTypeData[]>([
{
label: '烫画',
value: 'TH',
},
{
label: '直喷',
value: 'ZP',
},
{
label: '刺绣',
value: 'CX',
},
{
label: '雕刻',
value: 'DK',
},
{
label: '白胚',
value: 'BP',
},
{
label: '其他',
value: 'QT',
},
])
const tableColumns = computed(() => { const tableColumns = computed(() => {
let arr = [] let arr = []
if (status.value === 'BATCH_DOWNLOAD') { if (status.value === 'BATCH_DOWNLOAD') {
...@@ -3711,6 +3741,11 @@ const tableColumns = computed(() => { ...@@ -3711,6 +3741,11 @@ const tableColumns = computed(() => {
width: 150, width: 150,
prop: 'craftType', prop: 'craftType',
align: 'center', align: 'center',
render: (item:ProductList) => (
<div>
<span>{processType.value.find((e) => e.value === item.craftType)?.label}</span>
</div>
)
}, },
{ {
...@@ -6023,32 +6058,7 @@ const loadWarehouseList = async () => { ...@@ -6023,32 +6058,7 @@ const loadWarehouseList = async () => {
console.error(e) console.error(e)
} }
} }
const processType = ref([
{
label: '烫画',
value: 'TH',
},
{
label: '直喷',
value: 'ZP',
},
{
label: '刺绣',
value: 'CX',
},
{
label: '雕刻',
value: 'DK',
},
{
label: '白胚',
value: 'BP',
},
{
label: '其他',
value: 'QT',
},
])
// 获取工艺列表 // 获取工艺列表
const craftList = ref<IAllList[]>([]) const craftList = ref<IAllList[]>([])
......
...@@ -171,8 +171,12 @@ ...@@ -171,8 +171,12 @@
--el-switch-off-color: #f56c6c; --el-switch-off-color: #f56c6c;
" "
/> />
<div style="color: #606266; margin-left: 155px; margin-right: 10px">状态:</div> <div
style="color: #606266; margin-left: 155px; margin-right: 10px"
>
状态:
</div>
<el-switch <el-switch
v-model="editForm.status" v-model="editForm.status"
active-value="ACTIVE" active-value="ACTIVE"
...@@ -187,42 +191,69 @@ ...@@ -187,42 +191,69 @@
" "
/> />
</div> </div>
<div v-if="editForm.isAuto"> <div v-if="editForm.isAuto">
<el-row :gutter="40"> <el-row :gutter="40">
<el-col :span="380"> <el-col :span="380">
<el-form-item <el-form-item
label="排版类型:" label="排版类型:"
prop="type" prop="type"
label-width="100" label-width="100"
:rules="editForm.isAuto ? [ :rules="
{ required: true, message: '请选择排版类型', trigger: 'change' } editForm.isAuto
] : []" ? [
{
required: true,
message: '请选择排版类型',
trigger: 'change',
},
]
: []
"
> >
<el-radio-group v-model="editForm.type" :required="editForm.isAuto"> <el-radio-group
v-model="editForm.type"
:required="editForm.isAuto"
@change="() => {
if (editForm.thArrangeMax) {
editFormRef?.validateField('thArrangeMax')
}
}"
>
<el-radio label="tiff">tiff排版</el-radio> <el-radio label="tiff">tiff排版</el-radio>
<el-radio label="png">png排版</el-radio> <el-radio label="png">png排版</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="排版宽度:" label="排版宽度:"
prop="templateWidth" prop="templateWidth"
label-width="100" label-width="100"
:rules="editForm.isAuto ? [ :rules="
{ required: true, message: '请选择排版宽度', trigger: 'change' } editForm.isAuto
] : []" ? [
{
required: true,
message: '请选择排版宽度',
trigger: 'change',
},
]
: []
"
> >
<el-radio-group v-model="editForm.templateWidth" :required="editForm.isAuto"> <el-radio-group
v-model="editForm.templateWidth"
:required="editForm.isAuto"
>
<el-radio :value="42">40+2cm</el-radio> <el-radio :value="42">40+2cm</el-radio>
<el-radio :value="60">60cm</el-radio> <el-radio :value="60">60cm</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div style="color: #f56c6c; margin: 5px 0"> <div style="color: #f56c6c; margin: 5px 0">
<!-- 注:系统限制烫画工艺一个批次不超过50个生产单! --> <!-- 注:系统限制烫画工艺一个批次不超过50个生产单! -->
注:系统限制烫画工艺排TIFF类型一个批次生产单件数不超过40,排PNG类型一个批次生产单件数不超过100! 注:系统限制烫画工艺排TIFF类型一个批次生产单件数不超过40,排PNG类型一个批次生产单件数不超过100!
...@@ -232,18 +263,7 @@ ...@@ -232,18 +263,7 @@
label="烫画类工艺自动排单一个批次里生产单件数的最大值为:" label="烫画类工艺自动排单一个批次里生产单件数的最大值为:"
prop="thArrangeMax" prop="thArrangeMax"
label-width="380" label-width="380"
:rules="[ :rules="thArrangeMaxRules"
{
required: true,
message: '请输入数量',
trigger: ['blur'],
},
{
pattern: /^\d+$/,
message: '请输入整数',
trigger: ['blur', 'change'],
},
]"
> >
<el-input <el-input
v-model="editForm.thArrangeMax" v-model="editForm.thArrangeMax"
...@@ -300,9 +320,11 @@ import { ...@@ -300,9 +320,11 @@ import {
import { Plus, Minus } from '@element-plus/icons-vue' import { Plus, Minus } from '@element-plus/icons-vue'
import LogDialog from '.././components/dialog.tsx' import LogDialog from '.././components/dialog.tsx'
import CustomizeForm from '@/components/CustomizeForm.tsx'
import { Edit } from '@element-plus/icons-vue' import { Edit } from '@element-plus/icons-vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import type { FormInstance } from 'element-plus'
import { computed } from 'vue'
import type { FormItemRule } from 'element-plus'
const editForm = ref<BaseForm>({ isAuto: false, status: 'ACTIVE' }) const editForm = ref<BaseForm>({ isAuto: false, status: 'ACTIVE' })
const tableData = ref([]) const tableData = ref([])
...@@ -332,7 +354,7 @@ onMounted(() => { ...@@ -332,7 +354,7 @@ onMounted(() => {
const dialogVisible = ref(false) const dialogVisible = ref(false)
const editFormRef = ref<InstanceType<typeof CustomizeForm> | null>(null) const editFormRef = ref<FormInstance | null>(null)
const paramsList = ref(['craft_type']) const paramsList = ref(['craft_type'])
...@@ -344,6 +366,57 @@ const rulesList = ref([ ...@@ -344,6 +366,57 @@ const rulesList = ref([
]) ])
/** /**
* @description: 烫画类工艺自动排单最大值的校验规则
*/
const thArrangeMaxRules = computed(() => {
return [
{
required: true,
message: '请输入数量',
trigger: ['blur'],
},
{
pattern: /^\d+$/,
message: '请输入整数',
trigger: ['blur', 'change'],
},
{
validator: (
_rule: FormItemRule,
value: string | number | undefined,
callback: (error?: Error) => void
) => {
if (!value) {
callback()
return
}
const numValue = Number(value)
if (isNaN(numValue)) {
callback()
return
}
if (editForm.value.type === 'tiff') {
if (numValue > 40) {
callback(new Error('排版类型为TIFF时,最大值不能超过40'))
} else {
callback()
}
} else if (editForm.value.type === 'png') {
if (numValue > 100) {
callback(new Error('排版类型为PNG时,最大值不能超过100'))
} else {
callback()
}
} else {
callback()
}
},
trigger: ['blur', 'change'],
},
]
})
/**
* @description: 取消按钮 * @description: 取消按钮
*/ */
function cancelFn() { function cancelFn() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment