Commit 472c2398 authored by yaya's avatar yaya

feat: 添加货品签收功能

parent 3c0304de
......@@ -42,3 +42,11 @@ export function findDetail(params) {
data: params
})
}
export function confirmReceive(params) {
return request({
url: '/consignSaleManage/confirmReceive',
method: 'post',
data: params
})
}
......@@ -14,6 +14,13 @@
size="mini"
@click="imageValueDialogShow = true">图文估价
</el-button>
<el-button
v-if="systemState === 6"
type="primary"
size="mini"
@click="handleConfirmReceive">货品签收
</el-button>
<el-button
v-if="systemState === 8"
type="primary"
......@@ -155,7 +162,7 @@
</template>
<script>
import { findDetail, imgValuate, finishValue, cancelValue } from '@/api/business/consign'
import { findDetail, confirmReceive, finishValue, cancelValue } from '@/api/business/consign'
import { MessageBox } from 'element-ui'
import CheckLargeImageDialog from '../goods/components/CheckLargeImageDialog'
import CheckVideoDialog from '../goods/components/CheckVideoDialog'
......@@ -286,31 +293,23 @@ export default {
})
},
/**
* 图文评估
* 货品签收
*/
handleImageValue() {
if (this.saleId) {
const params = { ...this.imageValueForm, saleId: this.saleId }
this.$refs.imageValue.validate((valid) => {
if (valid) {
imgValuate(params)
.then(response => {
this.imageValueDialogShow = false
this.imageValueForm = {}
this.$notify.success({
message: '图文估价成功'
})
this.handleGetDetail()
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
handleConfirmReceive(item) {
const params = { saleId: this.saleId }
confirmReceive(params)
.then(response => {
this.$notify.success({
message: '货品签收成功'
})
this.handleGetDetail()
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
},
// 取消完成寄售
handleCancelFinishDialog() {
......
......@@ -186,7 +186,7 @@
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { findConsignList, imgValuate, identifyImage, finishValue, cancelValue } from '@/api/business/consign'
import { findConsignList, confirmReceive, identifyImage, finishValue, cancelValue } from '@/api/business/consign'
import { MessageBox } from 'element-ui'
import IdentifyValueDialog from './components/IdentifyValueDialog'
import ImageValueDialog from './components/ImageValueDialog'
......@@ -292,6 +292,9 @@ export default {
},
handleClick(tab, event) {
this.listQuery.page = 1
if (this.listQuery.systemState !== '6') {
this.listQuery.waybill = ''
}
this.getList()
},
getList() {
......@@ -332,13 +335,10 @@ export default {
*/
handleConfirmReceive(item) {
const params = { saleId: item.saleId }
imgValuate(params)
confirmReceive(params)
.then(response => {
this.itemContent = {}
this.imageValueDialogShow = false
this.imageValueForm = {}
this.$notify.success({
message: '图文估价成功'
message: '货品签收成功'
})
this.getList()
})
......
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