Commit c7ee8ad7 by wuqian
parents b8d91a05 fe0fd3e2
......@@ -8,7 +8,6 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
CardWrapper: typeof import('./src/components/CardWrapper.vue')['default']
CommodityCard: typeof import('./src/components/commodityCard.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
......@@ -42,7 +41,6 @@ declare module 'vue' {
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload']
Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default']
......
......@@ -92,8 +92,8 @@ export function submitReviewPriceInfoApi(id: number, data: PriceForm) {
return axios.post<never, BaseRespData<never>>(
'supply/supplyTypesettingPrice/saveQuotedPrice',
{
typesettingId: id,
...data,
typesettingId: id,
},
)
}
......
......@@ -23,7 +23,11 @@
<img :src="c.imagePath" />
</div>
</div>
<div class="commodity-card-name-price flex flex-justify-space-between">
<slot name="time"></slot>
<div
v-if="cardItem.productName"
class="commodity-card-name-price flex flex-justify-space-between"
>
<slot name="productName"></slot>
<slot name="price"></slot>
</div>
......
......@@ -28,6 +28,9 @@ export interface TypesettingListData {
confirm?: boolean
personInChargeId?: number
personInChargeName?: string
createTime?: string
updateTime?: string
assignmentTime?: string
}
export interface SearchForm {
......
......@@ -23,7 +23,13 @@
</div>
<div class="right-content flex-1 flex-column overflow-hidden">
<div class="search-form">
<ElForm :model="searchForm" size="large" inline>
<ElForm
:model="searchForm"
size="large"
inline
@submit.prevent
@keyup.enter="search"
>
<!-- <ElFormItem label="创建时间" prop="rangeDate">
<ElDatePicker
v-model="searchForm.rangeDate"
......@@ -81,7 +87,7 @@
cardItem.productName
}}</span>
</template>
<template #price>
<template v-if="cardItem.retailPrice" #price>
<span class="price">
{{ cardItem.retailPrice ? '$' : ''
}}{{ cardItem.retailPrice }}
......@@ -94,6 +100,14 @@
</template>
</Icon>
<Icon
name="chakanxiangqing"
@click.stop="submitReview(cardItem, true)"
>
<template #title>
<title>查看详情</title>
</template>
</Icon>
<Icon
v-if="treeId === '201'"
name="querenshenhexunjia"
@click.stop="confirm(cardItem)"
......@@ -110,7 +124,15 @@
@click.stop="submitReview(cardItem)"
>
<template #title>
<title>提交审核</title>
<title>
{{
cardItem?.state === '301' || cardItem?.state === '501'
? '打版完成'
: cardItem?.state === '401'
? '修改'
: ''
}}
</title>
</template>
</Icon>
<Icon
......@@ -119,18 +141,21 @@
@click.stop="submitReview(cardItem)"
>
<template #title>
<title>报价</title>
<title>上传稿件</title>
</template>
</Icon>
<Icon
v-if="treeId === '701' || treeId === '901'"
name="chakanxiangqing"
@click.stop="submitReview(cardItem)"
>
<template #title>
<title>查看</title>
</template>
</Icon>
<template #time>
<div class="product-time">
<div class="create-time">
<span class="label">创建时间:</span>
<span class="value">{{ cardItem.createTime }}</span>
</div>
<div class="assign-time">
<span class="label">分派时间:</span>
<span class="value">{{ cardItem.assignmentTime }}</span>
</div>
</div>
</template>
</CardWrapper>
</div>
......@@ -161,7 +186,16 @@
<submitReviewModal
ref="submitReviewModelRef"
v-model="submitReviewVisible"
title="提交审核"
:detailable="detailable"
:title="
detailable
? '查看详情'
: row?.state === '301' || row?.state === '501'
? '打版完成'
: row?.state === '401'
? '修改'
: '上传稿件'
"
:row="row"
@refresh="onRefreshPage"
></submitReviewModal>
......@@ -201,12 +235,13 @@ import {
getStatusListApi,
getTypesettingDetail,
getTypesettingLogByIdApi,
rejectDataApi
rejectDataApi,
} from '@/api/typesetting'
import Icon from '@/components/Icon.vue'
import reviewModel from './reviewModel.vue'
import submitReviewModal from './submitReviewModal.vue'
import dayjs from 'dayjs'
import { showConfirm } from '@/utils/ui'
const treeData = ref<TreeData[]>([])
const treeRef = ref()
const treeId = ref('201')
......@@ -289,12 +324,14 @@ const confirm = async (data: TypesettingListData) => {
}
const submitReviewVisible = ref(false)
const submitReviewModelRef = ref()
const submitReview = async (data: TypesettingListData) => {
const detailable = ref(false)
const submitReview = async (data: TypesettingListData, isDetail = false) => {
detailable.value = isDetail
try {
submitReviewModelRef.value?.getExamineInfo(data)
if (data.state === '701' || data.state === '901') {
// if (data.state === '701' || data.state === '901') {
submitReviewModelRef.value?.getPriceDetail(data)
}
// }
const res = await getTypesettingDetail(data.id)
row.value = res.data
nextTick(() => {
......@@ -323,6 +360,15 @@ const reject = async () => {
if (!selection.value.length) {
return ElMessage.warning('请选择要驳回的数据')
}
try {
await showConfirm('确定驳回吗?', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消',
})
} catch {
return
}
const ids = selection.value.map((item) => item.id).join(',')
try {
const res = await rejectDataApi(ids)
......@@ -414,4 +460,13 @@ const reject = async () => {
.svg-icon {
margin-left: 5px;
}
.product-time {
margin-bottom: 10px;
.create-time,
.assign-time {
height: 26px;
line-height: 26px;
}
}
</style>
......@@ -114,6 +114,7 @@
/>
<div
v-if="
!detailable &&
lastVersion === version &&
(row?.state === '301' || row?.state === '401')
"
......@@ -128,8 +129,10 @@
</div>
</ElTabPane>
<ElTabPane
v-if="row?.state === '601' || row?.state === '701' || row?.state === '901'"
label="报价信息"
v-if="
row?.state === '601' || row?.state === '701' || row?.state === '901'
"
label="上传稿件"
name="second"
>
<div v-loading="loading" class="review-info">
......@@ -154,17 +157,19 @@
</div>
<div class="price-form">
<div class="modals-image-title">
<span>报价信息</span>
<span>上传稿件</span>
</div>
<ElForm ref="priceFormRef" :model="priceForm" label-width="100px">
<ElFormItem
label="工艺单"
label="稿件"
prop="craftImage"
:rules="[{ required: true, message: '请上传工艺单' }]"
:rules="[{ required: true, message: '请上传稿件' }]"
>
<UploadImage
v-model="priceForm.craftImage"
:disabled="row?.state === '701' || row?.state === '901'"
:disabled="
detailable || row?.state === '701' || row?.state === '901'
"
></UploadImage>
</ElFormItem>
<ElFormItem
......@@ -175,7 +180,9 @@
<ElInput
v-model="priceForm.bulkUnitPrice"
clearable
:disabled="row?.state === '701' || row?.state === '901'"
:disabled="
detailable || row?.state === '701' || row?.state === '901'
"
placeholder="大货单价"
></ElInput>
</ElFormItem>
......@@ -184,7 +191,9 @@
v-model="priceForm.testUnitPrice"
placeholder="测试单价"
clearable
:disabled="row?.state === '701' || row?.state === '901'"
:disabled="
detailable || row?.state === '701' || row?.state === '901'
"
></ElInput>
</ElFormItem>
<!-- <ElFormItem
......@@ -202,7 +211,9 @@
<ElInput
v-model="priceForm.priceNote"
type="textarea"
:disabled="row?.state === '701' || row?.state === '901'"
:disabled="
detailable || row?.state === '701' || row?.state === '901'
"
placeholder="备注"
></ElInput>
</ElFormItem>
......@@ -285,9 +296,9 @@
</ElTabPane>
<ElTabPane label="审核意见" name="four">
<div class="audit-opinion">
<template v-for="(item, index) in versionList" :key="index">
<div
v-for="(item, index) in versionList"
v-show="item.state == 3 || item.state == 2"
v-if="item.examineImages.length && item.opinion"
:key="index"
class="opinion_version"
>
......@@ -301,10 +312,11 @@
</p>
<p v-dompurify-html="item.opinion"></p>
</div>
</template>
</div>
</ElTabPane>
</ElTabs>
<template #footer>
<template v-if="!detailable" #footer>
<div class="dialog-footer">
<el-button size="large" @click="visible = false">取消</el-button>
<el-button
......@@ -376,6 +388,7 @@ const props = defineProps({
modelValue: Boolean,
title: String,
row: Object,
detailable: Boolean,
})
const emit = defineEmits(['update:modelValue', 'refresh'])
const visible = computed({
......@@ -388,7 +401,7 @@ const visible = computed({
})
watch(visible, (val) => {
if (val) {
if (props.row?.state === '601') {
if (props.row?.state === '601' && !props.detailable) {
activeName.value = 'second'
} else {
activeName.value = 'first'
......
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