|
@@ -6,127 +6,84 @@
|
|
|
<el-input v-model="queryParams.formCode" placeholder="请输入单据号" style="width: 144px" clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="表单日期:" prop="startTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.startTime"
|
|
|
- type="date"
|
|
|
- style="width: 144px"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- placeholder="选择起始日期"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-date-picker v-model="queryParams.startTime" type="date" style="width: 144px" value-format="YYYY-MM-DD"
|
|
|
+ placeholder="选择起始日期" clearable />
|
|
|
<span style="margin: 0 4px">~</span>
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.endTime"
|
|
|
- type="date"
|
|
|
- style="width: 144px"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- placeholder="选择结束日期"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-date-picker v-model="queryParams.endTime" type="date" style="width: 144px" value-format="YYYY-MM-DD"
|
|
|
+ placeholder="选择结束日期" clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="批次号:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入关键字"
|
|
|
- v-model.trim="queryParams.lotCode"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 130px"
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入关键字" v-model.trim="queryParams.lotCode" @keydown.enter.prevent clearable
|
|
|
+ style="width: 130px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="产品描述:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入关键字"
|
|
|
- v-model.trim="queryParams.productDescription"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 130px"
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入关键字" v-model.trim="queryParams.productDescription" @keydown.enter.prevent clearable
|
|
|
+ style="width: 130px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="箱号:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入箱号"
|
|
|
- v-model.trim="queryParams.newCarrierName"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 130px"
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入箱号" v-model.trim="queryParams.newCarrierName" @keydown.enter.prevent clearable
|
|
|
+ style="width: 130px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="报工状态:" prop="status">
|
|
|
- <el-select v-model="queryParams.status" clearable placeholder="请选择报工状态" style="width: 145px">
|
|
|
- <el-option v-for="dict in is_report" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="收回状态:" prop="returnStatus">
|
|
|
- <el-select v-model="queryParams.returnStatus" clearable placeholder="请选择收回状态" style="width: 145px">
|
|
|
- <el-option v-for="dict in is_return" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <el-select v-model="queryParams.status" clearable placeholder="请选择报工状态" style="width: 145px">
|
|
|
+ <el-option v-for="dict in is_report" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="收回状态:" prop="returnStatus">
|
|
|
+ <el-select v-model="queryParams.returnStatus" clearable placeholder="请选择收回状态" style="width: 145px">
|
|
|
+ <el-option v-for="dict in is_return" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item style="margin-left: 0">
|
|
|
<el-button type="info" icon="Search" @click="getList">搜索 </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table
|
|
|
- ref="dataTable"
|
|
|
- :data="dataList"
|
|
|
- :span-method="rowSpanMethod"
|
|
|
- v-loading="loading"
|
|
|
- highlight-current-row
|
|
|
- border
|
|
|
- height="100%"
|
|
|
- >
|
|
|
+ <el-table ref="dataTable" :data="dataList" :span-method="rowSpanMethod" v-loading="loading"
|
|
|
+ highlight-current-row border height="100%">
|
|
|
<el-table-column label="外协单号" align="center" prop="formCode" width="120" />
|
|
|
<el-table-column label="外协日期" align="center" prop="formDate" width="120" />
|
|
|
<el-table-column label="批次号" align="center" prop="lotCode" width="120" />
|
|
|
<el-table-column label="产品描述" align="center" prop="productDescription" />
|
|
|
- <el-table-column label="箱号" align="center" prop="newCarrierName" />
|
|
|
- <el-table-column label="收回状态" align="center" prop="returnStatus" width="80" >
|
|
|
+ <el-table-column label="箱号" align="center" prop="newCarrierName">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="scope.row.isFirstProcess === 0">{{ scope.row.newCarrierName }}</div>
|
|
|
+ <el-button v-else link type="primary" @click="handleChoiceCarrier(scope.row)">{{ scope.row.newCarrierName
|
|
|
+ == '' ? '请选择载具' : scope.row.newCarrierName }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="收回状态" align="center" prop="returnStatus" width="80">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="is_return" :value="scope.row.returnStatus" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="外协数量" align="center" prop="productNum" width="80" />
|
|
|
<el-table-column label="工序名称" align="center" prop="processAlias" width="80" />
|
|
|
- <el-table-column label="报工状态" align="center" prop="status" width="80" >
|
|
|
+ <el-table-column label="报工状态" align="center" prop="status" width="80">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="is_report" :value="scope.row.status" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="投产数" align="center" prop="productionNum" width="120">
|
|
|
<template #default="scope">
|
|
|
- <el-input-number
|
|
|
- v-if="scope.row.editStatus"
|
|
|
- v-model="scope.row.productionNum"
|
|
|
- :min="1"
|
|
|
- controls-position="right"
|
|
|
- style="width: 100%"
|
|
|
- />
|
|
|
+ <el-input-number v-if="scope.row.editStatus" v-model="scope.row.productionNum" :min="1"
|
|
|
+ controls-position="right" style="width: 100%" />
|
|
|
<span v-else>{{ scope.row.productionNum }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="合格数" align="center" prop="qualifiedNum" width="120">
|
|
|
<template #default="scope">
|
|
|
- <el-input-number
|
|
|
- v-if="scope.row.editStatus"
|
|
|
- v-model="scope.row.qualifiedNum"
|
|
|
- :min="0"
|
|
|
- controls-position="right"
|
|
|
- style="width: 100%"
|
|
|
- @change="handleChangeloss(scope.row)"
|
|
|
- />
|
|
|
+ <el-input-number v-if="scope.row.editStatus" v-model="scope.row.qualifiedNum" :min="0"
|
|
|
+ controls-position="right" style="width: 100%" @change="handleChangeloss(scope.row)" />
|
|
|
<span v-else>{{ scope.row.qualifiedNum }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="料损率(%)" align="center" prop="loss" width="120">
|
|
|
<template #default="scope">
|
|
|
- <el-tooltip
|
|
|
- effect="dark"
|
|
|
- content="超出料损上限后文字变红"
|
|
|
- placement="top-start"
|
|
|
- >
|
|
|
- <span v-if="scope.row.loss > scope.row.lossLimit" style="color: red">{{ scope.row.loss }}</span>
|
|
|
- <span v-else>{{ scope.row.loss }}</span>
|
|
|
+ <el-tooltip effect="dark" content="超出料损上限后文字变红" placement="top-start">
|
|
|
+ <span v-if="scope.row.loss > scope.row.lossLimit" style="color: red">{{ scope.row.loss }}</span>
|
|
|
+ <span v-else>{{ scope.row.loss }}</span>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -136,25 +93,23 @@
|
|
|
<el-button type="success" icon="Finished" circle @click="handleSaveRow(scope.row)" />
|
|
|
<el-button type="danger" icon="Close" circle @click="handleCancelRow(scope.row)" />
|
|
|
</template>
|
|
|
- <el-button v-else type="primary" :disabled="scope.row.returnReceiptDetails.length > 0" icon="Bell" @click="handleStartReport(scope.row)">报工</el-button>
|
|
|
+ <el-button v-else type="primary" :disabled="scope.row.returnReceiptDetails.length > 0" icon="Bell"
|
|
|
+ @click="handleStartReport(scope.row)">报工</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- v-model:page="queryParams.pageNum"
|
|
|
- v-model:limit="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
- />
|
|
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
+ <carrier-choice-dialog ref="carrierChoiceDialogRef" @handleSaveSuccess="carrierChoiceSumbit()" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { listProcess,editOutsourcedOrderDetailProcess,getLastProcessQualifitedNum } from '@/api/business/outsourcedOrderDetailProcess.js'
|
|
|
+import { listProcess, editOutsourcedOrderDetailProcess, getLastProcessQualifitedNum } from '@/api/business/outsourcedOrderDetailProcess.js'
|
|
|
+import CarrierChoiceDialog from '../dialog/CarrierChoiceDialog.vue';
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
/** 字典数组区 */
|
|
|
const { is_report } = proxy.useDict('is_report')
|
|
@@ -165,6 +120,7 @@ const dataTable = ref(null)
|
|
|
const spanProps = ref([])
|
|
|
const loading = ref(false)
|
|
|
const total = ref(0)
|
|
|
+const carrierChoiceDialogRef = ref(null)
|
|
|
// 用于计算合并行的计数器
|
|
|
const spanArr = ref([])
|
|
|
/** 查询对象 */
|
|
@@ -174,19 +130,19 @@ const queryParams = ref({
|
|
|
formEndDate: null,
|
|
|
lotCode: '',
|
|
|
productDescription: '',
|
|
|
- status:'0',
|
|
|
- returnStatus:'0',
|
|
|
+ status: '0',
|
|
|
+ returnStatus: '0',
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
})
|
|
|
|
|
|
/*********************** 工段相关事件 ****************************/
|
|
|
-const getTime =()=>{
|
|
|
+const getTime = () => {
|
|
|
getNowDate();
|
|
|
- getPassDate();
|
|
|
- getList()
|
|
|
+ getPassDate();
|
|
|
+ getList()
|
|
|
}
|
|
|
-const getList = () => {
|
|
|
+const getList = () => {
|
|
|
loading.value = true
|
|
|
listProcess(queryParams.value).then((res) => {
|
|
|
dataList.value = res.rows
|
|
@@ -197,99 +153,99 @@ const getList = () => {
|
|
|
// getSpanArr(dataList.value, 'formDate')
|
|
|
// getSpanArr(dataList.value, 'lotCode')
|
|
|
// getSpanArr(dataList.value, 'productDescription')
|
|
|
- spanProps.value = ['formCode', 'formDate','lotCode','productDescription'];
|
|
|
+ spanProps.value = ['formCode', 'formDate', 'lotCode', 'productDescription'];
|
|
|
spanPropGroup(dataList.value)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
//获取当前时间
|
|
|
function getNowDate() {
|
|
|
- var nowDate = new Date();
|
|
|
- var date = {
|
|
|
- year: nowDate.getFullYear(),
|
|
|
- month: nowDate.getMonth() + 1,
|
|
|
- day: nowDate.getDate(),
|
|
|
- };
|
|
|
- const dayDate =
|
|
|
- date.year +
|
|
|
- "-" +
|
|
|
- (date.month >= 10 ? date.month : "0" + date.month) +
|
|
|
- "-" +
|
|
|
- (date.day >= 10 ? date.day : "0" + date.day);
|
|
|
- console.log(dayDate);
|
|
|
- queryParams.value.endTime = dayDate;
|
|
|
+ var nowDate = new Date();
|
|
|
+ var date = {
|
|
|
+ year: nowDate.getFullYear(),
|
|
|
+ month: nowDate.getMonth() + 1,
|
|
|
+ day: nowDate.getDate(),
|
|
|
+ };
|
|
|
+ const dayDate =
|
|
|
+ date.year +
|
|
|
+ "-" +
|
|
|
+ (date.month >= 10 ? date.month : "0" + date.month) +
|
|
|
+ "-" +
|
|
|
+ (date.day >= 10 ? date.day : "0" + date.day);
|
|
|
+ console.log(dayDate);
|
|
|
+ queryParams.value.endTime = dayDate;
|
|
|
}
|
|
|
//获取30天前时间
|
|
|
function getPassDate() {
|
|
|
- var myDate = new Date();
|
|
|
- myDate.setDate(myDate.getDate() - 29);
|
|
|
- var dateTemp;
|
|
|
- var day;
|
|
|
- for (var i = 0; i < 30; i++) {
|
|
|
- if (myDate.getDate() < 10) {
|
|
|
- day = "0" + myDate.getDate().toString();
|
|
|
- } else {
|
|
|
- day = myDate.getDate().toString();
|
|
|
- }
|
|
|
- }
|
|
|
- var month = myDate.getMonth() + 1;
|
|
|
- dateTemp =
|
|
|
- myDate.getFullYear() +
|
|
|
- "-" +
|
|
|
- (month < 10 ? "0" + month : "" + month) +
|
|
|
- "-" +
|
|
|
- day;
|
|
|
- queryParams.value.startTime = dateTemp;
|
|
|
+ var myDate = new Date();
|
|
|
+ myDate.setDate(myDate.getDate() - 29);
|
|
|
+ var dateTemp;
|
|
|
+ var day;
|
|
|
+ for (var i = 0; i < 30; i++) {
|
|
|
+ if (myDate.getDate() < 10) {
|
|
|
+ day = "0" + myDate.getDate().toString();
|
|
|
+ } else {
|
|
|
+ day = myDate.getDate().toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var month = myDate.getMonth() + 1;
|
|
|
+ dateTemp =
|
|
|
+ myDate.getFullYear() +
|
|
|
+ "-" +
|
|
|
+ (month < 10 ? "0" + month : "" + month) +
|
|
|
+ "-" +
|
|
|
+ day;
|
|
|
+ queryParams.value.startTime = dateTemp;
|
|
|
}
|
|
|
//计算损耗率
|
|
|
const handleChangeloss = (row) => {
|
|
|
- let percent = (row.productionNum - row.qualifiedNum)/row.productionNum * 100;
|
|
|
- row.loss = Math.ceil(percent * 100) / 100;
|
|
|
+ let percent = (row.productionNum - row.qualifiedNum) / row.productionNum * 100;
|
|
|
+ row.loss = Math.ceil(percent * 100) / 100;
|
|
|
}
|
|
|
//报工确认
|
|
|
const handleSaveRow = (row) => {
|
|
|
var flag = true
|
|
|
- if(row.qualifiedNum == 0) {
|
|
|
+ if (row.qualifiedNum == 0) {
|
|
|
flag = false
|
|
|
proxy.$modal
|
|
|
- .confirm("合格数为0是否确定保存")
|
|
|
- .then(() =>{
|
|
|
- let percent = (row.productionNum - row.qualifiedNum)/row.productionNum * 100;
|
|
|
- row.loss = Math.ceil(percent * 100) / 100;
|
|
|
- editOutsourcedOrderDetailProcess(row).then((res) => {
|
|
|
- if(res.code == 200) {
|
|
|
- row.editStatus = false
|
|
|
- proxy.$modal.msgSuccess('报工成功')
|
|
|
- getList()
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ .confirm("合格数为0是否确定保存")
|
|
|
+ .then(() => {
|
|
|
+ let percent = (row.productionNum - row.qualifiedNum) / row.productionNum * 100;
|
|
|
+ row.loss = Math.ceil(percent * 100) / 100;
|
|
|
+ editOutsourcedOrderDetailProcess(row).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ row.editStatus = false
|
|
|
+ proxy.$modal.msgSuccess('报工成功')
|
|
|
+ getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
- if(row.productionNum>row.productNum) {
|
|
|
+ if (row.productionNum > row.productNum) {
|
|
|
flag = false
|
|
|
proxy.$modal.msgError('投产数不能大于外协数量')
|
|
|
}
|
|
|
- if(row.productionNum < row.qualifiedNum) {
|
|
|
+ if (row.productionNum < row.qualifiedNum) {
|
|
|
flag = false
|
|
|
proxy.$modal.msgError('合格数不能大于投产数')
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
var tempList = dataList.value.filter(item => {
|
|
|
- return item.detailId ==row.detailId
|
|
|
+ return item.detailId == row.detailId
|
|
|
})
|
|
|
var index = tempList.indexOf(row)
|
|
|
- if(index>0 && row.productionNum > tempList[index-1].qualifiedNum) {
|
|
|
- flag = false
|
|
|
- proxy.$modal.msgError('投产数不能大于上一道序合格数')
|
|
|
+ if (index > 0 && row.productionNum > tempList[index - 1].qualifiedNum) {
|
|
|
+ flag = false
|
|
|
+ proxy.$modal.msgError('投产数不能大于上一道序合格数')
|
|
|
}
|
|
|
}
|
|
|
- if(flag) {
|
|
|
+ if (flag) {
|
|
|
editOutsourcedOrderDetailProcess(row).then((res) => {
|
|
|
- if(res.code == 200) {
|
|
|
- row.editStatus = false
|
|
|
- proxy.$modal.msgSuccess('报工成功')
|
|
|
- getList()
|
|
|
- }
|
|
|
- })
|
|
|
+ if (res.code == 200) {
|
|
|
+ row.editStatus = false
|
|
|
+ proxy.$modal.msgSuccess('报工成功')
|
|
|
+ getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
const handleCancelRow = (row) => {
|
|
@@ -314,15 +270,15 @@ const handleStartReport = (row) => {
|
|
|
// if(!row.productionNum) {
|
|
|
// row.productionNum = row.productNum
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
//获得上一道序报工的合格数
|
|
|
- getLastProcessQualifitedNum(row).then(res =>{
|
|
|
- if(res.code == 200) {
|
|
|
+ getLastProcessQualifitedNum(row).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
row.editStatus = true
|
|
|
row.productionNum = res.data
|
|
|
- if(row.status == 0){
|
|
|
- row.qualifiedNum = res.data
|
|
|
+ if (row.status == 0) {
|
|
|
+ row.qualifiedNum = res.data
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -330,52 +286,62 @@ const handleStartReport = (row) => {
|
|
|
let rowSpansMap = new Map(); //存需要开始合并的行号,向下合并多少行
|
|
|
|
|
|
const spanPropGroup = (data) => {
|
|
|
- let oldRow = null; //需要合并的行
|
|
|
- rowSpansMap = new Map(); //重置Map
|
|
|
- oldRow = data[0]; //默认第0行为需要合并的行
|
|
|
- rowSpansMap.set(0, 1); //第0行,向下合并一行(其实就是自己单独一行)
|
|
|
- let spanRow = 0; //记录需要开始合并的行号
|
|
|
- for (let i = 1; i < data.length; i++) {
|
|
|
- const item = data[i];
|
|
|
- let isSame = true;
|
|
|
- //遍历需要判断的属性判断对应值是否全部相等
|
|
|
- for (let j = 0; j < spanProps.value.length; j++) {
|
|
|
- const prop = spanProps.value[j];
|
|
|
- //只要有一个属性值不相等则记录新的需要合并的行号
|
|
|
- if (item[prop] != oldRow[prop]) {
|
|
|
- oldRow = item;
|
|
|
- rowSpansMap.set(i, 1);
|
|
|
- spanRow = i;
|
|
|
- isSame = false;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- //如果所有属性值相同则所需要合并的行数+1
|
|
|
- if (isSame) {
|
|
|
- let span = rowSpansMap.get(spanRow);
|
|
|
- rowSpansMap.set(spanRow, span + 1);
|
|
|
- }
|
|
|
- }
|
|
|
+ let oldRow = null; //需要合并的行
|
|
|
+ rowSpansMap = new Map(); //重置Map
|
|
|
+ oldRow = data[0]; //默认第0行为需要合并的行
|
|
|
+ rowSpansMap.set(0, 1); //第0行,向下合并一行(其实就是自己单独一行)
|
|
|
+ let spanRow = 0; //记录需要开始合并的行号
|
|
|
+ for (let i = 1; i < data.length; i++) {
|
|
|
+ const item = data[i];
|
|
|
+ let isSame = true;
|
|
|
+ //遍历需要判断的属性判断对应值是否全部相等
|
|
|
+ for (let j = 0; j < spanProps.value.length; j++) {
|
|
|
+ const prop = spanProps.value[j];
|
|
|
+ //只要有一个属性值不相等则记录新的需要合并的行号
|
|
|
+ if (item[prop] != oldRow[prop]) {
|
|
|
+ oldRow = item;
|
|
|
+ rowSpansMap.set(i, 1);
|
|
|
+ spanRow = i;
|
|
|
+ isSame = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //如果所有属性值相同则所需要合并的行数+1
|
|
|
+ if (isSame) {
|
|
|
+ let span = rowSpansMap.get(spanRow);
|
|
|
+ rowSpansMap.set(spanRow, span + 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
-
|
|
|
-const rowSpanMethod =({ row, column, rowIndex, columnIndex }) => {
|
|
|
- //采样值5-9列所对应的行不需要合并
|
|
|
- if (columnIndex != 11 && columnIndex != 7 && columnIndex != 8 && columnIndex != 9 && columnIndex != 10&& columnIndex != 12 ) {
|
|
|
- //根据当前行号从map中获取开始合并的行根据当前行号从map中获取开始合并的行号,向下合并多少行
|
|
|
- const span = rowSpansMap.get(rowIndex);
|
|
|
- if (span != null) {
|
|
|
- return {
|
|
|
- rowspan: span, //向下合并span行
|
|
|
- colspan: 1,
|
|
|
- };
|
|
|
- } else {
|
|
|
- return {
|
|
|
- rowspan: 0,
|
|
|
- colspan: 0,
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+const rowSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
+ //采样值5-9列所对应的行不需要合并
|
|
|
+ if (columnIndex != 11 && columnIndex != 7 && columnIndex != 8 && columnIndex != 9 && columnIndex != 10 && columnIndex != 12) {
|
|
|
+ //根据当前行号从map中获取开始合并的行根据当前行号从map中获取开始合并的行号,向下合并多少行
|
|
|
+ const span = rowSpansMap.get(rowIndex);
|
|
|
+ if (span != null) {
|
|
|
+ return {
|
|
|
+ rowspan: span, //向下合并span行
|
|
|
+ colspan: 1,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ rowspan: 0,
|
|
|
+ colspan: 0,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
+
|
|
|
+const handleChoiceCarrier = (row) => {
|
|
|
+ // 弹出选择载具对话框
|
|
|
+ carrierChoiceDialogRef.value.open(row)
|
|
|
+}
|
|
|
+
|
|
|
+const carrierChoiceSumbit = (result) => {
|
|
|
+ getList()
|
|
|
+}
|
|
|
+
|
|
|
// const rowSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
// if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2 || columnIndex === 3 || columnIndex === 4) {
|
|
|
// const _row = spanArr.value[rowIndex]
|