7 changed files with 795 additions and 12 deletions
-
5src/api/pad.js
-
1src/router/index.js
-
8src/store/modules/user.js
-
4src/views/main.vue
-
771src/views/modules/pad/padCODelNotify.vue
-
13src/views/modules/pad/padPartAttribute.vue
-
5src/views/modules/print/print_package_label.js
@ -0,0 +1,771 @@ |
|||
<template> |
|||
<div class="mod-config pad" style="padding: 10px"> |
|||
<el-form ref="searchDataForm" label-position="top" :model="searchData" label-width="80px"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="7"> |
|||
<el-row> |
|||
<el-col :span="11"> |
|||
<el-form-item label="通知单日期"> |
|||
<el-date-picker |
|||
style="width: 100%" |
|||
:editable="false" |
|||
v-model="searchData.startDate" |
|||
value-format="yyyy-MM-dd" |
|||
type="date"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label=" " style="text-align: center"> |
|||
--> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="11"> |
|||
<el-form-item label=" "> |
|||
<el-date-picker |
|||
style="width: 100%" |
|||
:editable="false" |
|||
v-model="searchData.endDate" |
|||
value-format="yyyy-MM-dd" |
|||
type="date"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item label="客户编号"> |
|||
<el-input v-model="searchData.customerId" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item label="通知单单号"> |
|||
<el-input v-model="searchData.delNotifyNo" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item label="工厂编号" prop="site"> |
|||
<el-select filterable v-model="searchData.site" default-first-option style="width: 100%"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="1-沪声" value="1"></el-option> |
|||
<el-option label="2-赫艾" value="2"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item :label="' '"> |
|||
<el-button type="primary" style="height: 20px;font-size: 14px;line-height: 10px" @click="searchDelHeaderList">查 询</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div v-loading="delNotifyHeaderTableLoading"> |
|||
<el-table |
|||
:height="300" |
|||
:data="delNotifyHeaderList" |
|||
border stripe |
|||
@row-click="rowClickDelNotifyHeaderTable" |
|||
style="margin-top: 10px;"> |
|||
<el-table-column |
|||
prop="delNotifyNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="130" |
|||
label="通知单号"/> |
|||
<el-table-column |
|||
prop="notifyDate" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="要求发货日期"/> |
|||
<el-table-column |
|||
prop="customerId" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="客户编码"/> |
|||
<el-table-column |
|||
prop="customerName" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="客户名称"/> |
|||
<el-table-column |
|||
prop="billAirwayNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="运单号"/> |
|||
<el-table-column |
|||
prop="forwarderId" |
|||
header-align="center" |
|||
align="left" |
|||
width="80" |
|||
label="货代"/> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="left" |
|||
show-overflow-tooltip |
|||
min-width="120" |
|||
label="备注"/> |
|||
<el-table-column |
|||
prop="notifyDate" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="通知单日期"/> |
|||
<el-table-column |
|||
prop="receiver" |
|||
header-align="center" |
|||
align="left" |
|||
width="100" |
|||
label="经手人"/> |
|||
<el-table-column |
|||
prop="delAddId" |
|||
header-align="center" |
|||
align="left" |
|||
show-overflow-tooltip |
|||
width="120" |
|||
label="送货地址"/> |
|||
<el-table-column |
|||
prop="creditFlag" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="退货标记"/> |
|||
<el-table-column |
|||
prop="site" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="工厂编码"/> |
|||
<el-table-column |
|||
prop="shipFlag" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="是否发货"/> |
|||
<el-table-column |
|||
prop="shipResult" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="发货状态信息"/> |
|||
<el-table-column |
|||
prop="realShipDate" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="实际发货日期"/> |
|||
</el-table> |
|||
<div style=" font-size: 18px;"> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="no" |
|||
:page-sizes="[50, 100, 500, 1000]" |
|||
:page-size="size" |
|||
:total="total" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</div> |
|||
|
|||
<el-table :data="delNotifyDetailList" |
|||
height="300" |
|||
border stripe |
|||
style="margin-top: 10px;"> |
|||
<el-table-column label="操作" width="150px" header-align="center" fixed align="center"> |
|||
<template slot-scope="{row,$index}"> |
|||
<el-link style="cursor: pointer" @click="checkoutDelNotifyDetailBtn(row,1)">属性</el-link> |
|||
<el-link style="cursor: pointer" @click="checkoutDelNotifyDetailBtn(row,2)">图片</el-link> |
|||
<el-link style="cursor: pointer" v-if="row.approveFlag === 'N'" @click="checkoutDelNotifyDetailBtn(row,3)">检验</el-link> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="delNotifyItemNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150px" |
|||
label="通知单号序号"> |
|||
<template slot-scope="{row,$index}"> |
|||
{{getSignNumber(row.delNotifyItemNo)}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="partNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="产品编码"/> |
|||
<el-table-column |
|||
prop="partDescription" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
show-overflow-tooltip |
|||
label="产品名称规格"/> |
|||
<el-table-column |
|||
prop="approveResultFlag" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
show-overflow-tooltip |
|||
label="出货检验结果"> |
|||
<template slot-scope="{row,$index}"> |
|||
<span v-if="row.approveResultFlag === 'Y'">合格</span> |
|||
<span v-else-if="row.approveResultFlag === 'N'">不合格</span> |
|||
<span v-else>待检验</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="notifyQty" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="通知单数量"/> |
|||
<el-table-column |
|||
prop="shipQty" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="发货数量"/> |
|||
<el-table-column |
|||
prop="umid" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="销售计量单位"/> |
|||
<el-table-column |
|||
prop="orderNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="销售订单号"/> |
|||
<el-table-column |
|||
prop="itemNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="订单序号"/> |
|||
<el-table-column |
|||
prop="customerPONo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="客户采购订单号"/> |
|||
<el-table-column |
|||
prop="orderType" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="订单类型"/> |
|||
<el-table-column |
|||
prop="custPartNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="客户产品编号"/> |
|||
<el-table-column |
|||
prop="intSales" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="内部销售"/> |
|||
<el-table-column |
|||
prop="extSales" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="外部销售"/> |
|||
<el-table-column |
|||
prop="subOrderType" |
|||
header-align="center" |
|||
align="left" |
|||
width="180" |
|||
label="零部件订单类型"/> |
|||
<el-table-column |
|||
prop="techInfo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="技术注意事项"/> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="left" |
|||
show-overflow-tooltip |
|||
width="180" |
|||
label="备注"/> |
|||
</el-table> |
|||
</div> |
|||
|
|||
<!--检验弹框--> |
|||
<el-dialog |
|||
title="出货检验" |
|||
:visible.sync="checkoutDelNotifyDetailDialogVisible" |
|||
width="40%"> |
|||
<el-form :model="delNotifyDetail" label-position="top" label-width="120"> |
|||
<el-row :gutter="30"> |
|||
<el-col :span="10"> |
|||
<el-form-item label="通知单号"> |
|||
<el-input disabled v-model="delNotifyDetail.delNotifyNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="工厂编号" prop="site"> |
|||
<el-select filterable disabled v-model="delNotifyDetail.site" readonly style="width: 100%"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="1-沪声" value="1"></el-option> |
|||
<el-option label="2-赫艾" value="2"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="产品编码"> |
|||
<el-input disabled v-model="delNotifyDetail.partNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="工厂编号"> |
|||
<el-input disabled v-model="delNotifyDetail.partDescription" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="通知单数量"> |
|||
<el-input disabled v-model="delNotifyDetail.notifyQty" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="发货数量"> |
|||
<el-input disabled v-model="delNotifyDetail.shipQty" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="销售订单"> |
|||
<el-input disabled v-model="delNotifyDetail.delNotifyNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="客户采购订单"> |
|||
<el-input disabled v-model="delNotifyDetail.customerPONo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="内部销售"> |
|||
<el-input disabled v-model="delNotifyDetail.intSales" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="外部销售"> |
|||
<el-input disabled v-model="delNotifyDetail.extSales" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer" style="text-align: center"> |
|||
<el-button type="primary" @click="updateDelNotifyDetailBtn('Y')">合 格</el-button> |
|||
<el-button @click="updateDelNotifyDetailBtn('N')">不 合 格</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
|
|||
|
|||
<el-dialog |
|||
title="产品图片" |
|||
:visible.sync="checkoutDelNotifyDetailPartPhotoDialogVisible" |
|||
@close="closeDelNotifyDetailPartPhotoDialogVisible" |
|||
width="60%"> |
|||
<el-container> |
|||
<el-aside width="40%"> |
|||
<el-form label-position="top"> |
|||
<el-row> |
|||
<el-col :span="10"> |
|||
<el-form-item :label="'工厂编号:'"> |
|||
<el-input v-model="delNotifyDetail.site" readonly ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10" :offset="2"> |
|||
<el-form-item :label="'产品编码:'" > |
|||
<el-input v-model="delNotifyDetail.partNo" readonly ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item :label="'产品名称/规格型号:'" > |
|||
<el-input v-model="delNotifyDetail.partDescription" readonly ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item :label="fileTitle?fileTitle:' '"> |
|||
<el-input v-model="fileName" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="lastPicture()" style="width:100%" type="primary">上一张</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6" :offset="2"> |
|||
<el-form-item :label="' '"> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6" :offset="2"> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="nextPicture()" style="width: 100%" type="primary">下一张</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</el-aside> |
|||
<el-main style="height: 300px"> |
|||
<img style="max-width: 100%;max-height: 100%;vertical-align:middle;" :src="photoUrl"> |
|||
</el-main> |
|||
</el-container> |
|||
<span slot="footer" class="dialog-footer" style="text-align: center"> |
|||
<el-button type="primary" @click="checkoutDelNotifyDetailPartPhotoDialogVisible = false">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
|
|||
|
|||
<el-dialog |
|||
title="产品属性" |
|||
:visible.sync="checkoutDelNotifyDetailPartPropertyDialogVisible" |
|||
width="70%"> |
|||
<el-form :model="delNotifyDetail" label-position="top"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="4"> |
|||
<el-form-item :label="'工厂编号:'"> |
|||
<el-input v-model="delNotifyDetail.site" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item :label="'产品编码:'"> |
|||
<el-input v-model="delNotifyDetail.partNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item :label="'产品名称/规格型号:'"> |
|||
<el-input v-model="delNotifyDetail.partDescription" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-tabs v-model="activeTable" style="margin-top: 10px;" type="border-card"> |
|||
<el-tab-pane label="属性" name="tab1"> |
|||
<el-form style="margin-top: 10px;padding-left: 20px" label-position="top"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="4"> |
|||
<el-form-item :label="'序号:'"> |
|||
<el-input v-model="subCodeSeqNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item :label="'描述:'"> |
|||
<el-input v-model="subCodeDesc" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="lastData()" type="primary" style="height: 20px;line-height: 12px;font-size: 12px">上一条</el-button> |
|||
<el-button @click="nextData()" type="primary" style="height: 20px;line-height: 12px;font-size: 12px">下一条</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<el-table |
|||
:height="300" |
|||
:data="partSubPropertiesList" |
|||
border stripe |
|||
style="width: 100%;margin-top: 20px"> |
|||
<el-table-column |
|||
prop="propertiesItemNo" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="属性编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="itemDesc" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="属性描述"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="textValue" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="文本值"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="numValue" |
|||
header-align="center" |
|||
align="right" |
|||
min-width="60" |
|||
label="数字值"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="valueType" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="属性类型"> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-tab-pane> |
|||
<el-tab-pane label="产品结构"> |
|||
1 |
|||
</el-tab-pane> |
|||
<el-tab-pane label="工艺路线"> |
|||
1 |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
<span slot="footer" class="dialog-footer" style="text-align: center;margin-top: 10px"> |
|||
<el-button type="primary" @click="checkoutDelNotifyDetailPartPropertyDialogVisible = false">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchDelHeaderList, |
|||
searchDelNotifyDetail, |
|||
updateDelNotifyDetail, |
|||
getPhotoAddressData, |
|||
getPartSubPropertiesValueData, |
|||
getPartSubPropertiesValueHeaderData, |
|||
} from '@/api/pad.js' |
|||
import dayjs from "dayjs"; |
|||
import {Decimal} from "decimal.js"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
// 搜索表单对象 |
|||
searchData:{ |
|||
site:"", |
|||
startDate:dayjs().format("YYYY-MM-DD"), |
|||
endDate:dayjs().format("YYYY-MM-DD"), |
|||
customerId:undefined, |
|||
delNotifyNo:undefined, |
|||
no:1, |
|||
size:50, |
|||
total:0, |
|||
}, |
|||
// 主表对象 |
|||
delNotifyHeader:{ |
|||
|
|||
}, |
|||
// 子表对象 |
|||
delNotifyDetail:{ |
|||
|
|||
}, |
|||
// 主表 |
|||
delNotifyHeaderList:[], |
|||
// 子表 |
|||
delNotifyDetailList:[], |
|||
// 产品属性集合 |
|||
partSubPropertiesList:[], |
|||
// 图片集合 |
|||
photoDatas:[], |
|||
no:1, |
|||
size:50, |
|||
total:0, |
|||
delNotifyHeaderTableLoading:false,// 搜索状态 |
|||
checkoutDelNotifyDetailDialogVisible:false,//检验弹框开关 |
|||
checkoutDelNotifyDetailPartPhotoDialogVisible:false,//产品图片弹框 |
|||
checkoutDelNotifyDetailPartPropertyDialogVisible:false,//产品属性弹框 |
|||
photoUrl:"",//图片地址 |
|||
fileTitle:"",//文件标题 |
|||
fileName:"",//文件名称 |
|||
num:1,//图片下标 |
|||
|
|||
activeTable:"tab1",//第一个tab |
|||
subCodeSeqNo:"",//序号 |
|||
subCodeDesc:"",//描述 |
|||
} |
|||
}, |
|||
methods: { |
|||
searchDelHeaderList(){ |
|||
let params = JSON.parse(JSON.stringify(this.searchData)) |
|||
params.no = this.no; |
|||
params.size = this.size; |
|||
this.delNotifyHeaderList = []; |
|||
this.delNotifyDetailList = []; |
|||
this.delNotifyHeaderTableLoading = true; |
|||
searchDelHeaderList(params).then(({data})=>{ |
|||
this.delNotifyHeaderTableLoading = false; |
|||
if (data && data.code === 0){ |
|||
this.delNotifyHeaderList = data.data.records; |
|||
this.total = data.data.total; |
|||
this.delNotifyDetailList = data.data.records[0].delNotifyDetailVoList |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.delNotifyHeaderTableLoading = false; |
|||
}) |
|||
}, |
|||
// 分页 |
|||
sizeChangeHandle(val){ |
|||
this.size = val; |
|||
this.no = 1; |
|||
this.searchDelHeaderList(); |
|||
}, |
|||
currentChangeHandle(val){ |
|||
this.no = val; |
|||
this.searchDelHeaderList(); |
|||
}, |
|||
getSignNumber(number){ |
|||
return new Decimal(number).toSignificantDigits().toNumber() |
|||
}, |
|||
rowClickDelNotifyHeaderTable(row){ |
|||
// 缓存对象 |
|||
this.delNotifyHeader = row |
|||
this.delNotifyDetailList = this.delNotifyHeader.delNotifyDetailVoList; |
|||
}, |
|||
searchDelNotifyDetail(){ |
|||
let params={ |
|||
site :this.delNotifyHeader.site, |
|||
delNotifyNo:this.delNotifyHeader.delNotifyNo, |
|||
} |
|||
searchDelNotifyDetail(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.delNotifyDetailList = data.data; |
|||
let value = this.delNotifyHeaderList.find(item=>{ |
|||
return item.delNotifyNo === this.delNotifyHeader.delNotifyNo && item.site === this.delNotifyHeader.site |
|||
}) |
|||
value.delNotifyDetailList = data.data; |
|||
} |
|||
}) |
|||
}, |
|||
updateDelNotifyDetailBtn(status){ |
|||
this.delNotifyDetail.approveResultFlag = status; |
|||
console.log(this.$store.state.user) |
|||
this.delNotifyDetail.approvedBy = this.$store.state.user.name; |
|||
this.updateDelNotifyDetail(); |
|||
}, |
|||
updateDelNotifyDetail(){ |
|||
updateDelNotifyDetail(this.delNotifyDetail).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.searchDelHeaderList(); |
|||
this.checkoutDelNotifyDetailDialogVisible = false; |
|||
this.$message.success(data.msg) |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.$message.error("网络异常") |
|||
}) |
|||
}, |
|||
checkoutDelNotifyDetailBtn(row,i){ |
|||
this.delNotifyDetail = JSON.parse(JSON.stringify(row)); |
|||
switch (i){ |
|||
case 1: |
|||
// this.checkoutDelNotifyDetailPartPropertyDialogVisible = true; |
|||
this.searchData.no = this.no; |
|||
this.searchData.size = this.size; |
|||
this.searchData.total = this.total; |
|||
localStorage.setItem("searchData",JSON.stringify(this.searchData)) |
|||
localStorage.setItem("partData",JSON.stringify(row)) |
|||
localStorage.setItem("delNotifyHeaderList",JSON.stringify(this.delNotifyHeaderList)); |
|||
localStorage.setItem("delNotifyDetailList",JSON.stringify(this.delNotifyDetailList)); |
|||
this.$router.push('/padPartAttribute'); |
|||
break |
|||
case 2: |
|||
this.getPhoto(); |
|||
break |
|||
case 3: |
|||
this.checkoutDelNotifyDetailDialogVisible = true; |
|||
break |
|||
default: |
|||
this.$message.error("选择有误") |
|||
break |
|||
} |
|||
}, |
|||
getPhoto(){ |
|||
let params = { |
|||
site:this.delNotifyDetail.site, |
|||
partNo:this.delNotifyDetail.partNo, |
|||
} |
|||
getPhotoAddressData(params).then(({data}) => { |
|||
this.checkoutDelNotifyDetailPartPhotoDialogVisible = true; |
|||
this.photoDatas = data.rows; |
|||
if(this.photoDatas.length===0){ |
|||
this.fileTitle="文件名 ("+0+"/"+0+")"; |
|||
setTimeout(() => { |
|||
this.$alert('该物料没有上传图片!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
}, 500); |
|||
return false; |
|||
} |
|||
this.fileName=this.photoDatas[this.num-1].attaFileNameDb; |
|||
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; |
|||
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb; |
|||
}) |
|||
}, |
|||
nextPicture(){ |
|||
if(this.photoDatas.length===0){ |
|||
this.fileTitle="文件名 ("+0+"/"+0+")"; |
|||
this.$alert('该物料没有上传图片!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false; |
|||
} |
|||
if(this.num===this.photoDatas.length){ |
|||
this.num=1; |
|||
}else{ |
|||
this.num=this.num+1; |
|||
} |
|||
this.fileName=this.photoDatas[this.num-1].attaFileNameDb; |
|||
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; |
|||
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb; |
|||
}, |
|||
lastPicture(){ |
|||
if(this.photoDatas.length===0){ |
|||
this.fileTitle="文件名 ("+0+"/"+0+")"; |
|||
this.$alert('该物料没有上传图片!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false; |
|||
} |
|||
if(this.num===1){ |
|||
this.num=this.photoDatas.length; |
|||
}else{ |
|||
this.num=this.num-1; |
|||
} |
|||
this.fileName=this.photoDatas[this.num-1].attaFileNameDb; |
|||
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; |
|||
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb; |
|||
}, |
|||
closeDelNotifyDetailPartPhotoDialogVisible(){ |
|||
this.num = 1; |
|||
}, |
|||
}, |
|||
created() { |
|||
let item = localStorage.getItem("searchData"); |
|||
if (item){ |
|||
this.searchData = JSON.parse(item); |
|||
this.no = this.searchData.no; |
|||
this.size = this.searchData.size; |
|||
this.total = this.searchData.total; |
|||
this.delNotifyHeaderList = JSON.parse(localStorage.getItem("delNotifyHeaderList")); |
|||
this.delNotifyDetailList = JSON.parse(localStorage.getItem("delNotifyDetailList")); |
|||
localStorage.removeItem("searchData"); |
|||
localStorage.removeItem("delNotifyHeaderList"); |
|||
localStorage.removeItem("delNotifyDetailList"); |
|||
}else { |
|||
this.searchDelHeaderList(); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.el-select-dropdown__item{ |
|||
font-size: 18px; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue