|
@@ -5,8 +5,8 @@
|
|
|
:close-on-click-modal="false"
|
|
|
:visible.sync="visible"> -->
|
|
|
<div>
|
|
|
- <div class="my-title">查看</div>
|
|
|
- <div style="margin-left: 20px;margin-right: 20px">
|
|
|
+ <div class="my-title" v-if="!prodVisible">查看</div>
|
|
|
+ <div v-if="!prodVisible" style="margin-left: 20px;margin-right: 20px">
|
|
|
<!-- 工作流 -->
|
|
|
<div v-show="dataForm.workFlowBusinessExt">
|
|
|
<el-steps :active="dataForm.workFlowBusinessExt&&dataForm.workFlowBusinessExt.workFlowProcessStepList?dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2:0" align-center style="margin-bottom: 20px">
|
|
@@ -34,13 +34,12 @@
|
|
|
<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="合同编号">{{dataForm.contractCode}}</e-desc-item>
|
|
|
+ <e-desc-item label="交货日期">{{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>
|
|
|
+
|
|
|
<e-desc title="订单产品明细">
|
|
|
<el-table
|
|
|
:data="productDetails"
|
|
@@ -61,59 +60,56 @@
|
|
|
label="产品名称">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="cnt"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- width="80"
|
|
|
- label="数量">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="productNumber"
|
|
|
+ prop="prodCode"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="120"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="订单编号">
|
|
|
+ label="产品编号">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="price"
|
|
|
+ prop="state"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- label="含税单价">
|
|
|
+ :formatter="formatState"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="状态">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="amount"
|
|
|
+ prop="startTime"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- width="80"
|
|
|
- label="含税总价">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ (scope.row.cnt*scope.row.price).toFixed(2) }}</span>
|
|
|
- </template>
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="开始时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="rate"
|
|
|
+ prop="endTime"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- label="税率">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.rate?(Number(scope.row.rate * 100)).toFixed(0):''}}</span>%
|
|
|
- </template>
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="完成时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="notes"
|
|
|
+ fixed="right"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="120"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- label="备注">
|
|
|
- </el-table-column>
|
|
|
+ label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" v-if="isAuth('trace:search:prod:detail')" size="small" @click="prodDetailHandle(scope.row.id, scope.row.prodCode)">查看记录</el-button>
|
|
|
+ <!-- <el-button v-if="isAuth('order:ctl:deliver') && Number(scope.row.orderState) === 3" type="text" size="small" @click="deliverHandle(scope.row.orderId)">发货</el-button>-->
|
|
|
+ <!-- <el-button v-if="isAuth('order:ctl:arrived') && Number(scope.row.orderState) === 4 " type="text" size="small" @click="arrivedHandle(scope.row)">送达</el-button>-->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</e-desc>
|
|
|
</div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
+ <span class="dialog-footer">
|
|
|
<el-button @click="onChose">返回</el-button>
|
|
|
</span>
|
|
|
+
|
|
|
+ <!-- 弹窗, 新增 / 修改 -->
|
|
|
+ <product-detail v-if="prodVisible" ref="detail" @onChose="onChildClose"/>
|
|
|
</div>
|
|
|
<!-- </el-dialog> -->
|
|
|
</template>
|
|
@@ -122,30 +118,50 @@
|
|
|
import EDesc from '../common/e-desc'
|
|
|
import EDescItem from '../common/e-desc-item'
|
|
|
import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
- import { getOrderDetail } from '@/api/sale'
|
|
|
+ import { getOrderDetailById } from '@/api/trace'
|
|
|
import uploadComponent from '../common/upload-component'
|
|
|
import ApproveComponent from '../common/approve-component'
|
|
|
+ import ProductDetail from './product-detail'
|
|
|
export default {
|
|
|
name: 'order-detail',
|
|
|
components: {
|
|
|
- EDesc, EDescItem, uploadComponent, ApproveComponent
|
|
|
+ EDesc, EDescItem, uploadComponent, ApproveComponent, ProductDetail
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
visible: false,
|
|
|
isFlow: false,
|
|
|
+ prodVisible: false,
|
|
|
id: 0,
|
|
|
dataForm: {},
|
|
|
productDetails: [],
|
|
|
stepList: [],
|
|
|
logList: [],
|
|
|
- fileList: []
|
|
|
+ fileList: [],
|
|
|
+ // 状态:1:待排产,2:生产中,3:生产完成
|
|
|
+ optionsState: [
|
|
|
+ {
|
|
|
+ code: '1',
|
|
|
+ value: '待排产'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '2',
|
|
|
+ value: '生产中'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '3',
|
|
|
+ value: '生产完成'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
+ onChildClose () {
|
|
|
+ this.prodVisible = false
|
|
|
+ },
|
|
|
async init (id, businessType) {
|
|
|
this.visible = true
|
|
|
this.isFlow = !!(businessType && businessType !== '')
|
|
@@ -160,7 +176,7 @@
|
|
|
this.getDetails(businessType)
|
|
|
},
|
|
|
getDetails (businessType) {
|
|
|
- getOrderDetail(this.id).then(({data}) => {
|
|
|
+ getOrderDetailById(this.id).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
|
// 流程图展示
|
|
@@ -177,8 +193,8 @@
|
|
|
})
|
|
|
}
|
|
|
// 订单产品明细
|
|
|
- if (data.data.saleROrderProductList) {
|
|
|
- this.productDetails = data.data.saleROrderProductList
|
|
|
+ if (data.data.prodProductionList) {
|
|
|
+ this.productDetails = data.data.prodProductionList
|
|
|
}
|
|
|
// 初始化审批Form
|
|
|
this.showApproveForm(businessType, this.id)
|
|
@@ -197,6 +213,19 @@
|
|
|
approveFinished () {
|
|
|
this.onChose()
|
|
|
this.$emit('approveFinished')
|
|
|
+ },
|
|
|
+ // 格式化产品状态
|
|
|
+ formatState (row) {
|
|
|
+ if (!row.state) return ''
|
|
|
+ const item1 = this.optionsState.find((item) => item.code === row.state.toString())
|
|
|
+ return item1 ? item1.value : ''
|
|
|
+ },
|
|
|
+ // 查看产品记录
|
|
|
+ prodDetailHandle (productdId, prodCode) {
|
|
|
+ this.prodVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.detail.init(productdId, prodCode)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|