维修开单表格列太多问题

This commit is contained in:
xiaofajia 2024-11-21 15:50:54 +08:00
parent 406ab65a4f
commit 784f706932
2 changed files with 40 additions and 36 deletions

View File

@ -10,7 +10,7 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" :label="getLabelName" width="200" prop="goods"> <el-table-column align="center" :label="getLabelName" width="180" prop="goods">
<div class="item" slot-scope="scope"> <div class="item" slot-scope="scope">
<ProjectChoose v-if="itemType === 'project'" @input-blur="save(scope.row)" class="item__input" <ProjectChoose v-if="itemType === 'project'" @input-blur="save(scope.row)" class="item__input"
@selected="getPart" :select-width="'15rem'"/> @selected="getPart" :select-width="'15rem'"/>
@ -29,76 +29,76 @@
<!-- <span class="item__txt">{{ get }}</span>--> <!-- <span class="item__txt">{{ get }}</span>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column align="center" label="规格" width="180" prop="model"/> <el-table-column align="center" label="规格" width="100" prop="model"/>
<el-table-column align="center" label="编码" width="180" prop="code"/> <el-table-column align="center" label="编码" width="100" prop="code"/>
<el-table-column align="center" label="数量" width="180" prop="count"> <el-table-column align="center" label="数量" width="80" prop="count">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count"/> <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count"/>
<span class="item__txt">{{ scope.row.count }}</span> <span class="item__txt">{{ scope.row.count }}</span>
</div> </div>
</el-table-column> </el-table-column>
<el-table-column align="center" label="单位" width="180" prop="unit"> <el-table-column align="center" label="单位" width="80" prop="unit">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.REPAIR_UNIT" v-model="scope.row.unit"/> <dict-tag :type="DICT_TYPE.REPAIR_UNIT" v-model="scope.row.unit"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!exportColumn.includes('price')" align="center" label="单价" width="180" prop="price"> <el-table-column v-if="!exportColumn.includes('price')" align="center" label="单价" width="100" prop="price">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.price"/> <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.price"/>
<span class="item__txt">{{ scope.row.price }}</span> <span class="item__txt">{{ scope.row.price }}</span>
</div> </div>
</el-table-column> </el-table-column>
<el-table-column v-if="!exportColumn.includes('discount')" align="center" label="折扣" width="180" prop="discount"> <el-table-column v-if="!exportColumn.includes('discount')" align="center" label="折扣" width="80" prop="discount">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<!-- <el-input :min="0" :max="1" @blur="save(scope.row)" class="item__input" v-model="scope.row.discount"/>--> <!-- <el-input :min="0" :max="1" @blur="save(scope.row)" class="item__input" v-model="scope.row.discount"/>-->
<DiscountInput @input-blur="save(scope.row)" class="item__input" v-model="scope.row.discount" /> <DiscountInput @input-blur="save(scope.row)" class="item__input" v-model="scope.row.discount" />
<span class="item__txt">{{ scope.row.discount }}</span> <span class="item__txt">{{ scope.row.discount }}</span>
</div> </div>
</el-table-column> </el-table-column>
<el-table-column v-if="!exportColumn.includes('totalPrice')" align="center" label="金额" width="180" prop="totalPrice"> <el-table-column v-if="!exportColumn.includes('totalPrice')" align="center" label="金额" width="80" prop="totalPrice">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.totalPrice"/> <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.totalPrice"/>
<span class="item__txt">{{ scope.row.totalPrice }}</span> <span class="item__txt">{{ scope.row.totalPrice }}</span>
</div> </div>
</el-table-column> </el-table-column>
<el-table-column v-if="!exportColumn.includes('repair')" align="center" label="施工人员" width="180" prop="repair"> <el-table-column v-if="!exportColumn.includes('repair')" align="center" label="施工人员" width="100" prop="repair">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<WorkerChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.repair" <WorkerChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.repair"
:select-width="'15rem'"/> :select-width="'15rem'"/>
<span class="item__txt">{{ scope.row.repair ? getRepairName(scope.row.repair) : scope.row.repair }}</span> <span class="item__txt">{{ scope.row.repair ? getRepairName(scope.row.repair) : scope.row.repair }}</span>
</div> </div>
</el-table-column> </el-table-column>
<el-table-column v-if="!exportColumn.includes('sale')" align="center" label="服务顾问" width="180" prop="sale"> <el-table-column v-if="!exportColumn.includes('sale')" align="center" label="服务顾问" width="100" prop="sale">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<StaffChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.sale" <StaffChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.sale"
:select-width="'15rem'" :is-get="scope.row.id"/> :select-width="'15rem'" :is-get="scope.row.id"/>
<span class="item__txt">{{ scope.row.sale ? scope.row.sale.name : scope.row.sale }}</span> <span class="item__txt">{{ scope.row.sale ? scope.row.sale.name : scope.row.sale }}</span>
</div> </div>
</el-table-column> </el-table-column>
<el-table-column v-if="!exportColumn.includes('type')" align="center" label="类型" width="180" prop="type"> <!-- <el-table-column v-if="!exportColumn.includes('type')" align="center" label="类型" width="180" prop="type">-->
<div v-if="scope.row.id" class="item" slot-scope="scope"> <!-- <div v-if="scope.row.id" class="item" slot-scope="scope">-->
<ServerChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.type"/> <!-- <ServerChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.type"/>-->
<span class="item__txt">{{ scope.row.type }}</span> <!-- <span class="item__txt">{{ scope.row.type }}</span>-->
</div> <!-- </div>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column v-if="!exportColumn.includes('accountType')" align="center" label="账类" width="180" prop="accountType"> <!-- <el-table-column v-if="!exportColumn.includes('accountType')" align="center" label="账类" width="180" prop="accountType">-->
<div v-if="scope.row.id" class="item" slot-scope="scope"> <!-- <div v-if="scope.row.id" class="item" slot-scope="scope">-->
<el-select v-model="scope.row.accountType" class="item__input" @blur="save(scope.row)"> <!-- <el-select v-model="scope.row.accountType" class="item__input" @blur="save(scope.row)">-->
<el-option v-for="item in getDict(DICT_TYPE.REPAIR_PAY_TYPE)" :key="item.value" :label="item.label" <!-- <el-option v-for="item in getDict(DICT_TYPE.REPAIR_PAY_TYPE)" :key="item.value" :label="item.label"-->
:value="item.value"/> <!-- :value="item.value"/>-->
</el-select> <!-- </el-select>-->
<dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_PAY_TYPE" v-model="scope.row.accountType"/> <!-- <dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_PAY_TYPE" v-model="scope.row.accountType"/>-->
</div> <!-- </div>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column v-if="!exportColumn.includes('itemStatus')" align="center" label="状态" width="180" prop="itemStatus"> <!-- <el-table-column v-if="!exportColumn.includes('itemStatus')" align="center" label="状态" width="180" prop="itemStatus">-->
<div v-if="scope.row.id" class="item" slot-scope="scope"> <!-- <div v-if="scope.row.id" class="item" slot-scope="scope">-->
<el-select v-model="scope.row.itemStatus" class="item__input" @blur="save(scope.row)"> <!-- <el-select v-model="scope.row.itemStatus" class="item__input" @blur="save(scope.row)">-->
<el-option v-for="item in getDict(DICT_TYPE.REPAIR_ITEM_STATUS)" :key="item.value" :label="item.label" <!-- <el-option v-for="item in getDict(DICT_TYPE.REPAIR_ITEM_STATUS)" :key="item.value" :label="item.label"-->
:value="item.value"/> <!-- :value="item.value"/>-->
</el-select> <!-- </el-select>-->
<dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_ITEM_STATUS" v-model="scope.row.itemStatus"/> <!-- <dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_ITEM_STATUS" v-model="scope.row.itemStatus"/>-->
</div> <!-- </div>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column align="center" label="备注" width="180" prop="remark"> <el-table-column align="center" label="备注" width="180" prop="remark">
<div v-if="scope.row.id" class="item" slot-scope="scope"> <div v-if="scope.row.id" class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark"/> <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark"/>

View File

@ -225,11 +225,14 @@
<el-button size="small" v-if="formData.ticketType === '02'" @click="formData.ticketType = '01'">B单</el-button> <el-button size="small" v-if="formData.ticketType === '02'" @click="formData.ticketType = '01'">B单</el-button>
</el-col> </el-col>
</el-row> </el-row>
<span style="font-size: 16px">维修项目</span>
<TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable" <TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable"
:coupon-list="couponList" @changeCoupon="changeCoupon"/> :coupon-list="couponList" @changeCoupon="changeCoupon"/>
<span style="font-size: 16px; margin:1rem 0" v-if="createTicketType">维修配件</span>
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData" <TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData"
:coupon-list="couponList" @changeCoupon="changeCoupon" :coupon-list="couponList" @changeCoupon="changeCoupon"
ref="partTable"/> ref="partTable"/>
<span style="font-size: 16px" v-if="createTicketType">其他</span>
<TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData" <TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData"
:coupon-list="couponList" @changeCoupon="changeCoupon" :coupon-list="couponList" @changeCoupon="changeCoupon"
ref="otherTable"/> ref="otherTable"/>
@ -272,8 +275,9 @@
</el-descriptions> </el-descriptions>
</el-col> </el-col>
<el-col v-else :span="8" style="margin-top:1rem;display: flex;justify-content: right"> <el-col v-else :span="8" style="margin-top:1rem;display: flex;justify-content: right">
<el-button type="danger">结算</el-button> <el-button type="success" @click="handleSave" :disabled="isEnable">完成</el-button>
<el-button type="warning" @click="handlePendingSave">挂单</el-button> <!-- <el-button type="danger">结算</el-button>-->
<!-- <el-button type="warning" @click="handlePendingSave">挂单</el-button>-->
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="createTicketType" :gutter="2"> <el-row v-if="createTicketType" :gutter="2">