|
@@ -34,12 +34,17 @@
|
|
|
<e-desc-item label="客户名称">{{dataForm.customerName}}</e-desc-item>
|
|
|
|
|
|
<e-desc-item label="业务员">{{dataForm.salesmanName}}</e-desc-item>
|
|
|
- <e-desc-item label="合同交期" span="2">{{dataForm.contactDate?dataForm.contactDate.substring(0,10):''}}</e-desc-item>
|
|
|
+ <e-desc-item label="合同交期" span="2">{{dataForm.deliveryDate?dataForm.deliveryDate.substring(0,10):''}}</e-desc-item>
|
|
|
|
|
|
<e-desc-item label="备注说明" span="3">{{dataForm.notes}}</e-desc-item>
|
|
|
</e-desc>
|
|
|
<e-desc title="合同扫描件">
|
|
|
- <upload-component :display="true" :display-title="false" :accept="'*'" :file-obj-list="fileList"/>
|
|
|
+ <e-desc-item v-if="dataForm.cusContractBookAttachList" label="附件" span="3">
|
|
|
+ <div v-for="(item, index) in dataForm.cusContractBookAttachList" style="display: inline">
|
|
|
+ <span v-if="index > 0">,</span>
|
|
|
+ <a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
+ </div>
|
|
|
+ </e-desc-item>
|
|
|
</e-desc>
|
|
|
<e-desc title="订单产品明细">
|
|
|
<el-table
|
|
@@ -73,7 +78,7 @@
|
|
|
align="center"
|
|
|
min-width="120"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="订单编号">
|
|
|
+ label="订单产品编号">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="price"
|
|
@@ -114,6 +119,8 @@
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="onChose">返回</el-button>
|
|
|
</span>
|
|
|
+ <!-- 文件预览 -->
|
|
|
+ <preview-component v-if="previewVisible" ref="preview"/>
|
|
|
</div>
|
|
|
<!-- </el-dialog> -->
|
|
|
</template>
|
|
@@ -125,21 +132,26 @@
|
|
|
import { getOrderDetail } from '@/api/sale'
|
|
|
import uploadComponent from '../common/upload-component'
|
|
|
import ApproveComponent from '../common/approve-component'
|
|
|
- export default {
|
|
|
+ import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
+export default {
|
|
|
name: 'order-detail',
|
|
|
components: {
|
|
|
- EDesc, EDescItem, uploadComponent, ApproveComponent
|
|
|
+ PreviewComponent,
|
|
|
+ EDesc,
|
|
|
+ EDescItem,
|
|
|
+ uploadComponent,
|
|
|
+ ApproveComponent
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
visible: false,
|
|
|
isFlow: false,
|
|
|
+ previewVisible: false,
|
|
|
id: 0,
|
|
|
dataForm: {},
|
|
|
productDetails: [],
|
|
|
stepList: [],
|
|
|
- logList: [],
|
|
|
- fileList: []
|
|
|
+ logList: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -156,7 +168,6 @@
|
|
|
this.productDetails = []
|
|
|
this.stepList = []
|
|
|
this.logList = []
|
|
|
- this.fileList = []
|
|
|
this.getDetails(businessType)
|
|
|
},
|
|
|
getDetails (businessType) {
|
|
@@ -166,16 +177,6 @@
|
|
|
// 流程图展示
|
|
|
dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList)
|
|
|
dealStepLogs(data.data.workFlowBusinessExt.processLogList, this.logList)
|
|
|
- // 附件
|
|
|
- if (data.data.attachList) {
|
|
|
- data.data.attachList.forEach((item) => {
|
|
|
- this.fileList.push({
|
|
|
- name: item.fileName,
|
|
|
- url: item.url,
|
|
|
- id: item.url
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
// 订单产品明细
|
|
|
if (data.data.saleROrderProductList) {
|
|
|
this.productDetails = data.data.saleROrderProductList
|
|
@@ -197,6 +198,13 @@
|
|
|
approveFinished () {
|
|
|
this.onChose()
|
|
|
this.$emit('approveFinished')
|
|
|
+ },
|
|
|
+ // 预览
|
|
|
+ previewFile (fileName, url) {
|
|
|
+ this.previewVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.preview.init(fileName, url)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|