Commit cdecd627 authored by yaya's avatar yaya

feat: 添加官方估价功能

parent dbab99ed
...@@ -126,3 +126,10 @@ export function finishSettlement(data) { ...@@ -126,3 +126,10 @@ export function finishSettlement(data) {
data data
}) })
} }
export function updateOfficialEstimatedPrice(data) {
return request({
url: '/supplierItem/updateOfficialEstimatedPrice',
method: 'post',
data
})
}
<template>
<el-dialog
v-if="officialPriceDialogShow"
:visible.sync="officialPriceDialogShow"
:before-close="handleCancelLogisticDialog"
width="600px"
height="800px"
title="官方估价">
<el-form ref="imageValue" :model="logisticForm" :rules="logisticRules">
<el-form-item label="官方估价" label-width="100px" prop="officialEstimatedPrice">
<el-input
v-model="logisticForm.officialEstimatedPrice"
clearable
class="filter-item"
style="width: 240px;margin-right: 10px"
placeholder="请输入估价" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelLogisticDialog">取 消</el-button>
<el-button type="primary" @click="handleLogistic">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { updateOfficialEstimatedPrice } from '@/api/business/order'
export default {
name: 'EvaluatePriceDialog',
props: {
officialPriceDialogShow: {
type: Boolean,
default: false
},
itemId: {
type: String,
default: ''
}
},
data() {
return {
logisticForm: {
},
logisticRules: {
officialEstimatedPrice: [
{ required: true, message: '请输入官方估价', trigger: 'blur' }
]
}
}
},
created() {
this.getLogisticsList()
},
methods: {
handleCancelLogisticDialog() {
this.$emit('cancelDialog')
},
/**
* 实物评估
*/
handleLogistic() {
const params = { ...this.logisticForm, id: this.itemId }
this.$refs.imageValue.validate((valid) => {
if (valid) {
updateOfficialEstimatedPrice(params)
.then(response => {
this.$emit('refreshList')
this.$emit('cancelDialog')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
...@@ -89,6 +89,11 @@ ...@@ -89,6 +89,11 @@
<div class="user_self" @click="handleToSelf(scope.row)">{{ scope.row.creatorId }}</div> <div class="user_self" @click="handleToSelf(scope.row)">{{ scope.row.creatorId }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="官方估价" prop="officialEstimatedPrice">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.officialEstimatedPrice ? `¥ ${scope.row.officialEstimatedPrice}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" min-width="100px" prop="updateTime" label="更新时间" /> <el-table-column align="center" min-width="100px" prop="updateTime" label="更新时间" />
<el-table-column align="center" min-width="100px" prop="statusName" label="状态"> <el-table-column align="center" min-width="100px" prop="statusName" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -107,6 +112,11 @@ ...@@ -107,6 +112,11 @@
size="mini" size="mini"
@click="handleToDetail(scope.row)">详情 @click="handleToDetail(scope.row)">详情
</el-button> </el-button>
<el-button
type="primary"
size="mini"
@click="handleToEvaluate(scope.row)">官方估价
</el-button>
<el-button <el-button
v-if="scope.row.status === 0" v-if="scope.row.status === 0"
:disabled="scope.row.isTransformAuction" :disabled="scope.row.isTransformAuction"
...@@ -141,6 +151,12 @@ ...@@ -141,6 +151,12 @@
<ImagePreview <ImagePreview
v-if="isShowPreview" v-if="isShowPreview"
:imglist="imagesPreviewList" /> :imglist="imagesPreviewList" />
<EvaluatePriceDialog
:official-price-dialog-show="isShowEvaluatePriceDialog"
:item-id="currentItemId"
@cancelDialog="handleCancelEvaluateDialog"
@refreshList="getList"
/>
</div> </div>
</template> </template>
...@@ -150,10 +166,12 @@ import Line2Hidden from '@/components/line2Hidden' ...@@ -150,10 +166,12 @@ import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { getSaleList, updateOnSale, deleteSaleItem, irregularOff, collectorItemConvertToAuction, collectorItemConvertToGroupPurchase } from '@/api/business/sale' import { getSaleList, updateOnSale, deleteSaleItem, irregularOff, collectorItemConvertToAuction, collectorItemConvertToGroupPurchase } from '@/api/business/sale'
import { MessageBox } from 'element-ui' import { MessageBox } from 'element-ui'
import EvaluatePriceDialog from './components/EvaluatePriceDialog'
export default { export default {
name: 'SaleList', name: 'SaleList',
components: { components: {
EvaluatePriceDialog,
Pagination, Pagination,
Line2Hidden Line2Hidden
}, },
...@@ -182,16 +200,8 @@ export default { ...@@ -182,16 +200,8 @@ export default {
}, },
list: [], list: [],
total: 0, total: 0,
// 图文估价 isShowEvaluatePriceDialog: false,
imageValueDialogShow: false, currentItemId: '',
// 建议寄售价
identifyValueDialogShow: false,
// 货品售出
finishDialogShow: false,
// 寄售凭证
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
isShowPreview: false, isShowPreview: false,
currentSaleId: '', currentSaleId: '',
imagesPreviewList: [], imagesPreviewList: [],
...@@ -202,6 +212,10 @@ export default { ...@@ -202,6 +212,10 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
handleCancelEvaluateDialog() {
this.isShowEvaluatePriceDialog = false
this.currentItemId = ''
},
/** /**
* 设置不可选中 * 设置不可选中
*/ */
...@@ -353,6 +367,13 @@ export default { ...@@ -353,6 +367,13 @@ export default {
}) })
}) })
}, },
/**
* 官方估价
*/
handleToEvaluate(row) {
this.isShowEvaluatePriceDialog = true
this.currentItemId = row.id
},
/** /**
* 转拍卖 * 转拍卖
*/ */
......
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