|
@@ -25,7 +25,7 @@
|
|
|
{{ detailData.repairerVo.cameraSnCode }}
|
|
|
</DescriptionsItem>
|
|
|
<DescriptionsItem label="保修届满日期">
|
|
|
- {{ detailData.orderReceivingVo.warrantyExpirationDate }}
|
|
|
+ {{ detailData.repairerVo.warrantyDate }}
|
|
|
</DescriptionsItem>
|
|
|
<DescriptionsItem label="报修日期">
|
|
|
{{ detailData.repairerVo?.createTime }}
|
|
@@ -39,11 +39,11 @@
|
|
|
</DescriptionsItem>
|
|
|
<DescriptionsItem label="保修类型">
|
|
|
{{
|
|
|
- detailData.orderReceivingVo.warrantyType == 0
|
|
|
+ detailData.repairerVo.warrantyType == 0
|
|
|
? '保修期内'
|
|
|
- : detailData.orderReceivingVo.warrantyType == 1
|
|
|
- ? '保修期外'
|
|
|
- : '非保修项目'
|
|
|
+ : detailData.repairerVo.warrantyType == 1
|
|
|
+ ? '保内转保外'
|
|
|
+ : '保外维修'
|
|
|
}}
|
|
|
</DescriptionsItem>
|
|
|
<DescriptionsItem label="维修单号">
|
|
@@ -159,21 +159,14 @@
|
|
|
{{ detailData.customerAddress.getAddress }}
|
|
|
</DescriptionsItem>
|
|
|
</Descriptions>
|
|
|
- <!-- <Descriptions title="单据下载" :column="3">
|
|
|
- <DescriptionsItem label="维修记录" :span="3">
|
|
|
- <div class="link">
|
|
|
- <a v-for="(item,index) in ['www.baidusss.com','www.baidudd.com']" :key="index" :href="item" target="_blank">
|
|
|
- <span v-if="index !== 0">、</span>
|
|
|
- {{ item }}
|
|
|
- </a>
|
|
|
- </div>
|
|
|
+ <Descriptions title="单据下载" :column="3">
|
|
|
+ <DescriptionsItem label="报价单" :span="3">
|
|
|
+ <div class="link" @click="dowmFile(0)"> {{detailData.orderReceivingVo.repairId}}报价单.pdf</div>
|
|
|
</DescriptionsItem>
|
|
|
<DescriptionsItem label="维修工单" :span="3">
|
|
|
- <div class="link">
|
|
|
- <a :href="'www.baidudd.com'" target="_blank">2022101200001维修工单.pdf </a>
|
|
|
- </div>
|
|
|
+ <div class="link" @click="dowmFile(1)"> {{detailData.orderReceivingVo.repairId}}维修工单.pdf</div>
|
|
|
</DescriptionsItem>
|
|
|
- </Descriptions> -->
|
|
|
+ </Descriptions>
|
|
|
<Descriptions title="客户评价" :column="3" v-if="detailData.RepairComment">
|
|
|
<DescriptionsItem label="评价内容">
|
|
|
{{ detailData.RepairComment.comment }}
|
|
@@ -271,11 +264,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, ref, onMounted, reactive } from 'vue';
|
|
|
+import { defineComponent, ref, onMounted, reactive, h } from 'vue';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
-import { detail, process } from '/@/api/spares';
|
|
|
+import { detail, process, detailDownExport } from '/@/api/spares';
|
|
|
import { detailResult } from '/@/api/spares/model';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
// import recoveryModal from './recoveryModal.vue';//录单
|
|
@@ -318,7 +311,7 @@ export default defineComponent({
|
|
|
},
|
|
|
setup(props) {
|
|
|
const router = useRouter();
|
|
|
- const { createMessage } = useMessage();
|
|
|
+ const { createMessage, createConfirm } = useMessage();
|
|
|
const { t } = useI18n();
|
|
|
const permissionStore = usePermissionStore();
|
|
|
const { getCheckPerm } = permissionStore;
|
|
@@ -413,21 +406,32 @@ export default defineComponent({
|
|
|
total: 0,
|
|
|
};
|
|
|
dataSource = res.priceList.map((ele) => {
|
|
|
- let elePrice = countItem.total + parseFloat(ele.price) * ele.count
|
|
|
+ let price = ele.discount == 1?ele.priceDiscount:ele.price
|
|
|
+ let elePrice = countItem.total + parseFloat(price) * ele.count
|
|
|
countItem.total = elePrice;
|
|
|
return {
|
|
|
// ...ele,
|
|
|
count: ele.count,
|
|
|
name: ele.name,
|
|
|
- price: ele.price,
|
|
|
+ price: price,
|
|
|
id: ele.laborId,
|
|
|
- total: ele.price * ele.count,
|
|
|
+ total: (price * ele.count).toFixed(2),
|
|
|
};
|
|
|
});
|
|
|
priceTotal.value = countItem.total?.toFixed(2)
|
|
|
- countItem.total = priceTotal.value
|
|
|
+ countItem.total = res.repairerVo.warrantyType == 0?'0.00':priceTotal.value
|
|
|
+ let addItemList = [countItem]
|
|
|
+ if(res.repairerVo.warrantyType == 0){
|
|
|
+ addItemList.unshift({
|
|
|
+ id: 4,
|
|
|
+ price: null,
|
|
|
+ name: '保内维修',
|
|
|
+ count: '',
|
|
|
+ total: '-'+priceTotal.value,
|
|
|
+ })
|
|
|
+ }
|
|
|
if (countItem.total && res.priceList.length) {
|
|
|
- setTableData(cloneDeep([...dataSource, countItem]));
|
|
|
+ setTableData(cloneDeep([...dataSource, ...addItemList]));
|
|
|
}
|
|
|
}
|
|
|
function goBack() {
|
|
@@ -478,6 +482,25 @@ export default defineComponent({
|
|
|
function reload() {
|
|
|
getData();
|
|
|
}
|
|
|
+ function dowmFile(type){
|
|
|
+ let name = type==0?'报价单':'维修工单'
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: () => h('span', t('common.reminder')),
|
|
|
+ content: () => h('span', `是否导出${name}`),
|
|
|
+ onOk: async () => {
|
|
|
+ console.log('repairId')
|
|
|
+ let apiData = {
|
|
|
+ repairId:repairId.value || detailData.value.orderReceivingVo?.repairId,
|
|
|
+ name:repairId + name,
|
|
|
+ type,
|
|
|
+ }
|
|
|
+ console.log('apiData',apiData)
|
|
|
+ await detailDownExport(apiData);
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
const [registerParts, { openModal: openPartsModal }] = useModal();
|
|
|
const [registerReview, { openModal: openReviewModal }] = useModal();
|
|
|
const [registerRecovery, { openModal }] = useModal();
|
|
@@ -521,6 +544,7 @@ export default defineComponent({
|
|
|
butList,
|
|
|
dataSource,
|
|
|
stepList,
|
|
|
+ dowmFile,
|
|
|
t,
|
|
|
};
|
|
|
},
|
|
@@ -559,6 +583,10 @@ export default defineComponent({
|
|
|
margin: 20px;
|
|
|
}
|
|
|
}
|
|
|
+ .link{
|
|
|
+ color:cornflowerblue;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="less">
|