|
@@ -0,0 +1,217 @@
|
|
|
+
|
|
|
+export default {
|
|
|
+ computed: {
|
|
|
+ formItems() {
|
|
|
+ return [{
|
|
|
+ md: 24,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '基本信息',
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return (
|
|
|
+ <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '13%' }} contentStyle={{ width: '37%' }}>
|
|
|
+ <el-descriptions-item label="所属商户">
|
|
|
+ {formData.companyWechatName}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="申请单号">
|
|
|
+ {formData.orderId}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="项目名称">
|
|
|
+ {formData.rpProjectRepairName}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="工单单号">
|
|
|
+ {formData.workerOrderId}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="负责人">
|
|
|
+ {formData.userName}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="联系电话">
|
|
|
+ {formData.userMobile}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="项目地址">
|
|
|
+ {formData.pgOrderBase.address}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="创单人">
|
|
|
+ {formData.pgOrderBase.createName}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="创单人电话">
|
|
|
+ {formData.pgOrderBase.createMobile}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="创单时间">
|
|
|
+ {formData.pgOrderBase.createTime}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="工单类型">
|
|
|
+ {formData.orderSmallTypeText}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="网点名称">
|
|
|
+ {formData.websitName}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="申请人">
|
|
|
+ {formData.workerName}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="联系电话">
|
|
|
+ {formData.workerMobile}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="申请时间">
|
|
|
+ {formData.createTime}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="包含全部费用">
|
|
|
+ {({ YES: "是", NO: "否" })[formData.isAllFee]}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ md: 24,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '费用明细',
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return (
|
|
|
+ <zj-table
|
|
|
+ columns={[{
|
|
|
+ columnAttributes: {
|
|
|
+ label: '费用名称',
|
|
|
+ prop: 'goodsName',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '费用类型',
|
|
|
+ prop: 'chargeType',
|
|
|
+ },
|
|
|
+ render: (h, { row, column, index }) => {
|
|
|
+ return (
|
|
|
+ <div style="padding-left:10px">
|
|
|
+ {({ ACC: "配件物料", SERV: "服务" })[row.chargeType]}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '单价',
|
|
|
+ prop: 'goodsAmount',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '数量',
|
|
|
+ prop: 'num',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '费用金额',
|
|
|
+ prop: 'totalAmount',
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]}
|
|
|
+ table-data={formData.rpMaterialOrderItems}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ md: 8,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '配件费用合计',
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return <span>{[0, 0, 0, ...formData.rpMaterialOrderItems.filter(item => item.chargeType == "ACC").map(item => item.totalAmount)].reduce(function (prev, curr, idx, arr) {
|
|
|
+ return prev + curr;
|
|
|
+ }).toFixed(2)}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ md: 8,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '服务费用合计',
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return <span>{[0, 0, 0, ...formData.rpMaterialOrderItems.filter(item => item.chargeType == "SERV").map(item => item.totalAmount)].reduce(function (prev, curr, idx, arr) {
|
|
|
+ return prev + curr;
|
|
|
+ }).toFixed(2)}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ md: 8,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '总金额',
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return <span>{[0, 0, 0, ...formData.rpMaterialOrderItems.map(item => item.totalAmount)].reduce(function (prev, curr, idx, arr) {
|
|
|
+ return prev + curr;
|
|
|
+ }).toFixed(2)}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'el-input',
|
|
|
+ md: 24,
|
|
|
+ attributes: { disabled: true, type: "textarea", placeholder: '' },
|
|
|
+ formItemAttributes: { label: '申请备注', prop: 'remark' },
|
|
|
+ }, {
|
|
|
+ md: 24,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '交易记录',
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return (
|
|
|
+ <zj-table
|
|
|
+ columns={[{
|
|
|
+ columnAttributes: {
|
|
|
+ label: 'id',
|
|
|
+ prop: 'orderId',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '交易类型',
|
|
|
+ prop: 'goodsType',
|
|
|
+ },
|
|
|
+ render: (h, { row }) => {
|
|
|
+ return <div>
|
|
|
+ {({ M: "辅材", P: "配件" })[row.goodsType]}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '交易金额',
|
|
|
+ prop: 'totalAmount',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '交易状态',
|
|
|
+ prop: 'payStatus',
|
|
|
+ },
|
|
|
+ render: (h, { row }) => {
|
|
|
+ return <div>
|
|
|
+ {({ CANCEL: "取消", WAIT: "待支付", PAID: "已支付" })[row.payStatus]}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '交易时间',
|
|
|
+ prop: 'payTime',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '创建时间',
|
|
|
+ prop: 'createTime',
|
|
|
+ }
|
|
|
+ }]}
|
|
|
+ table-data={[formData]}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|