|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="detail-container">
|
|
<div class="detail-container">
|
|
- <el-page-header @back="goBack" :content="!edit ? '详情' : '编辑'"></el-page-header>
|
|
|
|
|
|
+ <el-page-header :content="!edit ? '详情' : '编辑'" @back="goBack" />
|
|
|
|
|
|
<div id="printMe">
|
|
<div id="printMe">
|
|
<div class="main-title">
|
|
<div class="main-title">
|
|
@@ -32,35 +32,53 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">仓库</div>
|
|
<div class="label">仓库</div>
|
|
- <div class="value">{{ detailData.correspondName }}</div>
|
|
|
|
|
|
+ <div class="value">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="detailData.correspondId"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ placeholder="请选择仓库"
|
|
|
|
+ size="mini"
|
|
|
|
+ filterable
|
|
|
|
+ clearable
|
|
|
|
+ :disabled="!edit"
|
|
|
|
+ @change="handleStorkChange"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, index) in warehouseList"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="16" class="item">
|
|
<el-col :span="16" class="item">
|
|
<div class="label">备注</div>
|
|
<div class="label">备注</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.remark" :readonly="!edit" placeholder="请输入备注"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.remark" :readonly="!edit" placeholder="请输入备注" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="item file" style="width: 100%; height: auto">
|
|
<el-col :span="24" class="item file" style="width: 100%; height: auto">
|
|
<div class="label" style="height: 140px">附件</div>
|
|
<div class="label" style="height: 140px">附件</div>
|
|
<div class="value" style="height: 140px">
|
|
<div class="value" style="height: 140px">
|
|
- <div class="file-list" v-if="edit">
|
|
|
|
|
|
+ <div v-if="edit" class="file-list">
|
|
<ImageUpload :file-list="fileList" multiple />
|
|
<ImageUpload :file-list="fileList" multiple />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="file-list" v-else>
|
|
|
|
- <div class="file-item" v-for="item in detailData.salesOrderPictures">
|
|
|
|
|
|
+ <div v-else class="file-list">
|
|
|
|
+ <div v-for="item in detailData.salesOrderPictures" :key="item.fileUrl" class="file-item">
|
|
<el-image
|
|
<el-image
|
|
v-if="checkFileType(item.fileUrl) == 'image'"
|
|
v-if="checkFileType(item.fileUrl) == 'image'"
|
|
class="img"
|
|
class="img"
|
|
fit="fill"
|
|
fit="fill"
|
|
:src="$imageUrl + item.fileUrl"
|
|
:src="$imageUrl + item.fileUrl"
|
|
:preview-src-list="[$imageUrl + item.fileUrl]"
|
|
:preview-src-list="[$imageUrl + item.fileUrl]"
|
|
- ></el-image>
|
|
|
|
|
|
+ />
|
|
<div v-else class="box2" @click="openLink(item.fileUrl)">
|
|
<div v-else class="box2" @click="openLink(item.fileUrl)">
|
|
- <img src="@/assets/common/word.png" v-if="checkFileType(item.fileUrl) == 'word'" />
|
|
|
|
- <img src="@/assets/common/excel.png" v-if="checkFileType(item.fileUrl) == 'excel'" />
|
|
|
|
- <img src="@/assets/common/ppt.png" v-if="checkFileType(item.fileUrl) == 'ppt'" />
|
|
|
|
- <img src="@/assets/common/pdf.png" v-if="checkFileType(item.fileUrl) == 'pdf'" />
|
|
|
|
|
|
+ <img v-if="checkFileType(item.fileUrl) == 'word'" src="@/assets/common/word.png">
|
|
|
|
+ <img v-if="checkFileType(item.fileUrl) == 'excel'" src="@/assets/common/excel.png">
|
|
|
|
+ <img v-if="checkFileType(item.fileUrl) == 'ppt'" src="@/assets/common/ppt.png">
|
|
|
|
+ <img v-if="checkFileType(item.fileUrl) == 'pdf'" src="@/assets/common/pdf.png">
|
|
<div class="name ellipsis-3">{{ item.fileName }}</div>
|
|
<div class="name ellipsis-3">{{ item.fileName }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -91,14 +109,14 @@
|
|
show-summary
|
|
show-summary
|
|
:summary-method="$getSummaries"
|
|
:summary-method="$getSummaries"
|
|
>
|
|
>
|
|
- <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" label="序号" type="index" width="50" />
|
|
<el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip>
|
|
<el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{
|
|
{{
|
|
scope.row.orderType === 'TRADE' ||
|
|
scope.row.orderType === 'TRADE' ||
|
|
- scope.row.orderType === 'HOME' ||
|
|
|
|
- scope.row.orderType === 'REQUISITION_TRADE' ||
|
|
|
|
- scope.row.orderType === 'REQUISITION_HOME'
|
|
|
|
|
|
+ scope.row.orderType === 'HOME' ||
|
|
|
|
+ scope.row.orderType === 'REQUISITION_TRADE' ||
|
|
|
|
+ scope.row.orderType === 'REQUISITION_HOME'
|
|
? scope.row.enginOrderNo
|
|
? scope.row.enginOrderNo
|
|
: scope.row.mainOrderId
|
|
: scope.row.mainOrderId
|
|
}}
|
|
}}
|
|
@@ -110,44 +128,44 @@
|
|
prop="materialCode"
|
|
prop="materialCode"
|
|
min-width="120"
|
|
min-width="120"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="产品编码"
|
|
label="产品编码"
|
|
prop="materialOldNumber"
|
|
prop="materialOldNumber"
|
|
min-width="120"
|
|
min-width="120"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="产品名称"
|
|
label="产品名称"
|
|
prop="materialName"
|
|
prop="materialName"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="规格型号"
|
|
label="规格型号"
|
|
prop="specification"
|
|
prop="specification"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="单位"
|
|
label="单位"
|
|
prop="unit"
|
|
prop="unit"
|
|
min-width="100"
|
|
min-width="100"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="edit">
|
|
<template v-if="edit">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ v-model="scope.row.refundableQty"
|
|
size="mini"
|
|
size="mini"
|
|
class="input"
|
|
class="input"
|
|
- v-model="scope.row.refundableQty"
|
|
|
|
placeholder="请输入数量"
|
|
placeholder="请输入数量"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
{{ scope.row.refundableQty }}
|
|
{{ scope.row.refundableQty }}
|
|
@@ -168,11 +186,11 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="edit">
|
|
<template v-if="edit">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ v-model="scope.row.headerRemark"
|
|
size="mini"
|
|
size="mini"
|
|
class="input"
|
|
class="input"
|
|
- v-model="scope.row.headerRemark"
|
|
|
|
placeholder="请输入表头备注"
|
|
placeholder="请输入表头备注"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
{{ scope.row.headerRemark }}
|
|
{{ scope.row.headerRemark }}
|
|
@@ -184,11 +202,11 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="edit">
|
|
<template v-if="edit">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ v-model="scope.row.invoiceRemark"
|
|
size="mini"
|
|
size="mini"
|
|
class="input"
|
|
class="input"
|
|
- v-model="scope.row.invoiceRemark"
|
|
|
|
placeholder="请输表体备注"
|
|
placeholder="请输表体备注"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
{{ scope.row.invoiceRemark }}
|
|
{{ scope.row.invoiceRemark }}
|
|
@@ -202,7 +220,7 @@
|
|
prop="k3ServiceName"
|
|
prop="k3ServiceName"
|
|
min-width="100"
|
|
min-width="100"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
align="left"
|
|
align="left"
|
|
@@ -210,7 +228,7 @@
|
|
prop="serviceName"
|
|
prop="serviceName"
|
|
min-width="100"
|
|
min-width="100"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
align="left"
|
|
align="left"
|
|
label="打印时间"
|
|
label="打印时间"
|
|
@@ -218,7 +236,7 @@
|
|
min-width="100"
|
|
min-width="100"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
sortable
|
|
sortable
|
|
- ></el-table-column>
|
|
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
align="left"
|
|
align="left"
|
|
label="打印状态"
|
|
label="打印状态"
|
|
@@ -265,7 +283,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div style="margin: 10px" v-if="edit">
|
|
|
|
|
|
+ <div v-if="edit" style="margin: 10px">
|
|
<el-button type="primary" @click="updateNum">保存</el-button>
|
|
<el-button type="primary" @click="updateNum">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -273,16 +291,15 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import print from 'vue-print-nb'
|
|
import print from 'vue-print-nb'
|
|
|
|
+import { getWarehouseList } from '@/api/supply/apply'
|
|
import { getDetail, updateNum } from '@/api/supply/sales'
|
|
import { getDetail, updateNum } from '@/api/supply/sales'
|
|
import { getFileUrl } from '@/api/common'
|
|
import { getFileUrl } from '@/api/common'
|
|
import fileUpload from '@/components/Common/file-upload.vue'
|
|
import fileUpload from '@/components/Common/file-upload.vue'
|
|
import ImageUpload from '@/components/Common/image-upload.vue'
|
|
import ImageUpload from '@/components/Common/image-upload.vue'
|
|
|
|
|
|
-
|
|
|
|
export default {
|
|
export default {
|
|
name: 'SalesDetail',
|
|
name: 'SalesDetail',
|
|
componentName: 'SalesDetail',
|
|
componentName: 'SalesDetail',
|
|
- props: ['listItem', 'edit'],
|
|
|
|
components: {
|
|
components: {
|
|
fileUpload,
|
|
fileUpload,
|
|
ImageUpload
|
|
ImageUpload
|
|
@@ -298,10 +315,11 @@ export default {
|
|
{ label: '审核通过', value: 'OK' }
|
|
{ label: '审核通过', value: 'OK' }
|
|
// { label: '审核驳回', value: 'FAIL' },,
|
|
// { label: '审核驳回', value: 'FAIL' },,
|
|
]
|
|
]
|
|
- let obj = statusList.find(o => o.value == val)
|
|
|
|
|
|
+ const obj = statusList.find(o => o.value == val)
|
|
return obj ? obj.label : ''
|
|
return obj ? obj.label : ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ props: ['listItem', 'edit'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
printObj: {
|
|
printObj: {
|
|
@@ -310,11 +328,13 @@ export default {
|
|
detailData: {},
|
|
detailData: {},
|
|
srcList: [],
|
|
srcList: [],
|
|
fileList: [],
|
|
fileList: [],
|
|
|
|
+ warehouseList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
created() {
|
|
created() {
|
|
this.getDetail()
|
|
this.getDetail()
|
|
|
|
+ this.getWarehouseList()
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -322,6 +342,22 @@ export default {
|
|
goBack() {
|
|
goBack() {
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
},
|
|
},
|
|
|
|
+ // 获取仓库列表
|
|
|
|
+ getWarehouseList() {
|
|
|
|
+ getWarehouseList({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.warehouseList = res.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleStorkChange(e) {
|
|
|
|
+ if (e) {
|
|
|
|
+ this.detailData.correspondName = this.warehouseList.find(k => k.id === e).name
|
|
|
|
+ } else {
|
|
|
|
+ this.detailData.correspondName = ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
updateNum() {
|
|
updateNum() {
|
|
this.detailData.saleOrderData.forEach(item => {
|
|
this.detailData.saleOrderData.forEach(item => {
|
|
item.remark = item.invoiceRemark
|
|
item.remark = item.invoiceRemark
|
|
@@ -329,17 +365,17 @@ export default {
|
|
})
|
|
})
|
|
const salesOrderPictures = []
|
|
const salesOrderPictures = []
|
|
if (this.fileList.length) {
|
|
if (this.fileList.length) {
|
|
- this.fileList.forEach(k => {
|
|
|
|
- salesOrderPictures.push({
|
|
|
|
- fileName: k.name,
|
|
|
|
- fileUrl: k.url,
|
|
|
|
- salesId: this.detailData.id
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ this.fileList.forEach(k => {
|
|
|
|
+ salesOrderPictures.push({
|
|
|
|
+ fileName: k.name,
|
|
|
|
+ fileUrl: k.url,
|
|
|
|
+ salesId: this.detailData.id
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
updateNum({
|
|
updateNum({
|
|
...this.detailData,
|
|
...this.detailData,
|
|
- salesOrderPictures:salesOrderPictures
|
|
|
|
|
|
+ salesOrderPictures: salesOrderPictures
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.$successMsg('修改成功')
|
|
this.$successMsg('修改成功')
|
|
this.goBack()
|
|
this.goBack()
|
|
@@ -381,17 +417,15 @@ export default {
|
|
item.sums2 = ['payAmount', 'price']
|
|
item.sums2 = ['payAmount', 'price']
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- console.log(res.data);
|
|
|
|
- res.data.salesOrderPictures.forEach(k=>{
|
|
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ res.data.salesOrderPictures.forEach(k => {
|
|
this.fileList.push({
|
|
this.fileList.push({
|
|
- hover: '',
|
|
|
|
- url:k.fileUrl,
|
|
|
|
- name:k.fileName,
|
|
|
|
- })
|
|
|
|
- this.srcList.push(this.$imageUrl+k.fileUrl)
|
|
|
|
-
|
|
|
|
|
|
+ hover: '',
|
|
|
|
+ url: k.fileUrl,
|
|
|
|
+ name: k.fileName
|
|
|
|
+ })
|
|
|
|
+ this.srcList.push(this.$imageUrl + k.fileUrl)
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
|
|
this.detailData = res.data
|
|
this.detailData = res.data
|
|
// this.srcList = [this.$imageUrl + this.detailData.fileUrl]
|
|
// this.srcList = [this.$imageUrl + this.detailData.fileUrl]
|