Commit c96b6779 authored by yaya's avatar yaya

feat: 优化建议寄售价弹窗

parent 5a3f18ff
<template>
<el-dialog
v-if="identifyValueDialogShow"
:visible.sync="identifyValueDialogShow"
:before-close="handleCancelIdentifyDialog"
width="600px"
height="800px"
title="建议寄售价">
<el-form ref="identifyValue" :model="identifyValueForm" :rules="identifyValueRules">
<el-form-item label="建议寄售价" label-width="120px" prop="valuation">
<el-input v-model="identifyValueForm.valuation" style="width: 400px" maxlength="10" placeholder="请输入建议寄售价金额" ><template slot="append"></template></el-input>
</el-form-item>
<el-form-item label="理由" label-width="120px" prop="remark">
<el-input
v-model="identifyValueForm.remark"
:autosize="{ minRows: 8, maxRows: 8}"
maxlength="100"
type="textarea"
show-word-limit
placeholder="请输入理由(最多不超过100个字)"
style="width: 400px" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelIdentifyDialog">取 消</el-button>
<el-button type="primary" @click="handleIdentifyValue">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { identifyImage } from '@/api/business/consign'
export default {
name: 'IdentifyValueDialog',
props: {
identifyValueDialogShow: {
type: Boolean,
default: false
},
saleId: {
type: String,
default: ''
}
},
data() {
return {
// 实物估价
identifyValueForm: {
valuation: '',
remark: ''
},
identifyValueRules: {
valuation: [
{ required: true, message: '估价金额不能为空', trigger: 'blur' }
],
remark: [
{ required: true, message: '原因不能为空', trigger: 'blur' }
]
}
}
},
methods: {
handleCancelIdentifyDialog() {
this.$emit('cancelIdentifyDialog')
},
/**
* 实物评估
*/
handleIdentifyValue() {
const params = { ...this.identifyValueForm, saleId: this.saleId }
this.$refs.identifyValue.validate((valid) => {
if (valid) {
identifyImage(params)
.then(response => {
this.itemContent = {}
this.identifyValueForm = {}
this.$notify.success({
message: '操作成功'
})
this.$emit('refreshList')
this.$emit('cancelIdentifyDialog')
})
.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>
......@@ -17,13 +17,13 @@
v-if="systemState === 8"
type="primary"
size="mini"
@click="identifyValueDialogShow=true">实物估
@click="identifyValueDialogShow=true">建议寄售
</el-button>
<el-button
v-if="systemState === 10"
type="primary"
size="mini"
@click="finishDialogShow = true">完成寄售
@click="finishDialogShow = true">货品售出
</el-button>
<el-button
v-if="systemState < 20"
......@@ -105,40 +105,18 @@
<el-button type="primary" @click="handleImageValue"> </el-button>
</div>
</el-dialog>
<el-dialog
<IdentifyValueDialog
v-if="identifyValueDialogShow"
:visible.sync="identifyValueDialogShow"
width="600px"
height="800px"
title="实物估价">
<el-form ref="identifyValue" :model="identifyValueForm" :rules="identifyValueRules">
<el-form-item label="估价" label-width="60px" prop="valuation">
<el-input v-model="identifyValueForm.valuation" style="width: 400px" maxlength="10" placeholder="请输入估价金额">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="理由" label-width="60px" prop="remark">
<el-input
v-model="identifyValueForm.remark"
:autosize="{ minRows: 8, maxRows: 8}"
maxlength="100"
type="textarea"
show-word-limit
placeholder="请输入理由(最多不超过100个字)"
style="width: 400px" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelIdentifyDialog"> </el-button>
<el-button type="primary" @click="handleIdentifyValue"> </el-button>
</div>
</el-dialog>
:identify-value-dialog-show="identifyValueDialogShow"
:sale-id="saleId"
@cancelIdentifyDialog="identifyValueDialogShow = false"
@refreshList="handleGetDetail"/>
<el-dialog
v-if="finishDialogShow"
:visible.sync="finishDialogShow"
width="600px"
height="800px"
title="完成寄售">
title="货品售出">
<el-form ref="finish" :model="finishForm" :rules="finishRules">
<el-form-item label="成交金额" label-width="80px" prop="dealPrice">
<el-input v-model="finishForm.dealPrice" style="width: 400px" maxlength="10" type="number" placeholder="请输入成交金额">
......@@ -196,14 +174,15 @@
</template>
<script>
import { findDetail, imgValuate, identifyImage, finishValue, cancelValue } from '@/api/business/consign'
import { findDetail, imgValuate, finishValue, cancelValue } from '@/api/business/consign'
import { MessageBox } from 'element-ui'
import CheckLargeImageDialog from '../goods/components/CheckLargeImageDialog'
import CheckVideoDialog from '../goods/components/CheckVideoDialog'
import IdentifyValueDialog from './components/IdentifyValueDialog'
export default {
name: 'ConsignDetail',
components: { CheckVideoDialog, CheckLargeImageDialog },
components: { IdentifyValueDialog, CheckVideoDialog, CheckLargeImageDialog },
data() {
return {
saleId: '',
......@@ -226,21 +205,9 @@ export default {
},
// 实物估价
identifyValueForm: {
valuation: '',
remark: ''
},
identifyValueDialogShow: false,
identifyValueRules: {
valuation: [
{ required: true, message: '估价金额不能为空', trigger: 'blur' }
],
remark: [
{ required: true, message: '原因不能为空', trigger: 'blur' }
]
},
// 完成寄售
// 货品售出
finishForm: {
dealPrice: '',
remark: ''
......@@ -375,42 +342,10 @@ export default {
this.imageValueDialogShow = false
this.imageValueForm = {}
},
// 取消实物评估
handleCancelIdentifyDialog() {
this.identifyValueDialogShow = false
this.identifyValueForm = {}
},
// 取消完成寄售
handleCancelFinishDialog() {
this.finishDialogShow = false
},
/**
* 实物评估
*/
handleIdentifyValue() {
if (this.saleId) {
const params = { ...this.identifyValueForm, saleId: this.saleId }
this.$refs.identifyValue.validate((valid) => {
if (valid) {
identifyImage(params)
.then(response => {
this.identifyValueDialogShow = false
this.identifyValueForm = {}
this.$notify.success({
message: '实物评估成功'
})
this.handleGetDetail()
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
})
}
},
/**
* 完成寄售
*/
......
......@@ -36,6 +36,14 @@
</el-table-column>
<el-table-column align="center" label="状态" prop="systemStateName" />
<el-table-column v-if="listQuery.systemState === '1' || listQuery.systemState === '8'" align="center" label="等待用户确认" prop="cancelType" >
<template slot-scope="scope">
<img v-if="scope.row.itemImg" :src="scope.row.itemImg" width="60px" height="60px">
</template>
</el-table-column>
<el-table-column v-if="listQuery.systemState === '6'" align="center" label="物流公司" prop="cancelType" />
<el-table-column v-if="listQuery.systemState === '6'" align="center" label="快递单号" prop="remark" />
<el-table-column v-if="listQuery.systemState === '30'" align="center" label="取消类型" prop="cancelType" />
<el-table-column v-if="listQuery.systemState === '30'" align="center" label="取消原因" prop="remark" />
<el-table-column align="center" label="下单时间" prop="saleTime" />
......@@ -54,19 +62,33 @@
@click="handleImageValueDialogShow(scope.row)">图文评估
</el-button>
<el-button
v-if="scope.row.systemState === 8"
v-if="scope.row.systemState === 6"
type="primary"
size="mini"
@click="handleIdentifyValueDialogShow(scope.row)">实物估价
@click="handleConfirmReceive(scope.row)">货品签收
</el-button>
<div v-if="scope.row.systemState === 8" style="margin: 0 12px">
<el-button
:disabled="scope.row.isHasPrice"
type="primary"
size="mini"
@click="handleIdentifyValueDialogShow(scope.row)">建议寄售价
</el-button>
</div>
<el-button
v-if="scope.row.systemState === 10"
type="primary"
size="mini"
@click="handleFinishDialogShow(scope.row)">完成寄售
@click="handleFinishDialogShow(scope.row)">货品售出
</el-button>
<el-button
v-if="scope.row.systemState === 16"
type="primary"
size="mini"
@click="handleFinishDialogShow(scope.row)">向用户结款
</el-button>
<el-button
v-if="scope.row.systemState < 20"
v-if="scope.row.systemState < 16"
type="danger"
size="mini"
@click="handleCancelDialogShow(scope.row)">取消寄售
......@@ -108,38 +130,20 @@
<el-button type="primary" @click="handleImageValue">确 定</el-button>
</div>
</el-dialog>
<el-dialog
<!--建议寄售价-->
<IdentifyValueDialog
v-if="identifyValueDialogShow"
:visible.sync="identifyValueDialogShow"
width="600px"
height="800px"
title="实物估价">
<el-form ref="identifyValue" :model="identifyValueForm" :rules="identifyValueRules">
<el-form-item label="估价" label-width="60px" prop="valuation">
<el-input v-model="identifyValueForm.valuation" style="width: 400px" maxlength="10" placeholder="请输入估价金额" ><template slot="append"></template></el-input>
</el-form-item>
<el-form-item label="理由" label-width="60px" prop="remark">
<el-input
v-model="identifyValueForm.remark"
:autosize="{ minRows: 8, maxRows: 8}"
maxlength="100"
type="textarea"
show-word-limit
placeholder="请输入理由(最多不超过100个字)"
style="width: 400px" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelIdentifyDialog">取 消</el-button>
<el-button type="primary" @click="handleIdentifyValue">确 定</el-button>
</div>
</el-dialog>
:sale-id="currentSaleId"
:identify-value-dialog-show="identifyValueDialogShow"
@cancelIdentifyDialog="identifyValueDialogShow = false"
@refreshList="getList"
/>
<el-dialog
v-if="finishDialogShow"
:visible.sync="finishDialogShow"
width="600px"
height="800px"
title="完成寄售">
title="货品售出">
<el-form ref="finish" :model="finishForm" :rules="finishRules">
<el-form-item label="成交金额" label-width="80px" prop="dealPrice">
<el-input v-model="finishForm.dealPrice" style="width: 400px" maxlength="10" type="number" placeholder="请输入成交金额" ><template slot="append"></template></el-input>
......@@ -190,10 +194,12 @@ import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { findConsignList, imgValuate, identifyImage, finishValue, cancelValue } from '@/api/business/consign'
import { MessageBox } from 'element-ui'
import IdentifyValueDialog from './components/IdentifyValueDialog'
export default {
name: 'ConsignList',
components: {
IdentifyValueDialog,
Pagination,
Line2Hidden
},
......@@ -201,14 +207,23 @@ export default {
return {
tabList: [
{
label: '图文估价',
label: '图文估价',
name: '1'
}, {
label: '待用户寄出',
name: '3'
}, {
label: '待收货',
name: '6'
}, {
label: '实物鉴定',
name: '8'
}, {
label: '寄售中',
name: '10'
}, {
label: '待结款',
name: '16'
}, {
label: '已完成',
name: '20'
......@@ -239,23 +254,11 @@ export default {
{ required: true, message: '原因不能为空', trigger: 'blur' }
]
},
// 实物估价
identifyValueForm: {
valuation: '',
remark: ''
},
// 建议寄售价
identifyValueDialogShow: false,
identifyValueRules: {
valuation: [
{ required: true, message: '估价金额不能为空', trigger: 'blur' }
],
remark: [
{ required: true, message: '原因不能为空', trigger: 'blur' }
]
},
currentSaleId: '',
// 完成寄售
// 货品售出
finishForm: {
dealPrice: '',
remark: ''
......@@ -332,6 +335,28 @@ export default {
this.imageValueDialogShow = true
this.itemContent = item
},
/**
* 货品签收
*/
handleConfirmReceive(item) {
const params = { saleId: item.saleId }
imgValuate(params)
.then(response => {
this.itemContent = {}
this.imageValueDialogShow = false
this.imageValueForm = {}
this.$notify.success({
message: '图文估价成功'
})
this.getList()
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
},
/**
* 图文评估
*/
......@@ -383,6 +408,7 @@ export default {
*/
handleIdentifyValueDialogShow(item) {
this.identifyValueDialogShow = true
this.currentSaleId = item.saleId
this.itemContent = item
},
/**
......@@ -414,14 +440,21 @@ export default {
}
},
/**
* 完成寄售
* 货品售出
*/
handleFinishDialogShow(item) {
this.finishDialogShow = true
this.itemContent = item
},
/**
* 完成寄售
* 待用户结款
*/
handleFinishSettlementDialogShow(item) {
this.finishDialogShow = true
this.itemContent = item
},
/**
* 货品售出
*/
handleFinishValue() {
if (this.itemContent) {
......@@ -488,6 +521,10 @@ export default {
</script>
<style scoped>
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 0 20px 20px;
}
......
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