|
|
|
@ -3,12 +3,12 @@ |
|
|
|
<!-- 条件查询 --> |
|
|
|
<el-form :inline="true" label-position="top" :model="searchData"> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 100px"> |
|
|
|
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 100px"> |
|
|
|
<el-option |
|
|
|
v-for="i in userBuList" |
|
|
|
:key="i.buNo" |
|
|
|
:label="i.buDesc" |
|
|
|
:value="i.buNo"> |
|
|
|
:value="i.buDesc"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
@ -78,123 +78,79 @@ |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<!-- 新增和修改对话框 --> |
|
|
|
<el-dialog :title="modalTitle" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="600px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" ref="modalForm" style="margin-left: 7px;"> |
|
|
|
<!-- 第一行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="BU" prop="buNo"> |
|
|
|
<el-select v-model="modalData.buNo" placeholder="请选择" :disabled="modalDisableFlag" style="width: 100%"> |
|
|
|
<el-dialog :title="modalTitle" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="487px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="BU" prop="bu" :rules="rules.bu"> |
|
|
|
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 150px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in userBuList" |
|
|
|
:key = "i.buNo" |
|
|
|
:label = "i.sitename" |
|
|
|
:value = "i.buNo"> |
|
|
|
<span style="float: left">{{ i.sitename }}</span> |
|
|
|
<span style="float: right; color: #8492a6; font-size: 11px">{{ i.buDesc }}</span> |
|
|
|
<span style="float: left;width: 100px">{{ i.sitename }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px"> |
|
|
|
{{ i.buDesc }} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="标签条码" prop="carrierNo"> |
|
|
|
<el-input v-model="modalData.carrierNo" :disabled="modalDisableFlag" style="width: 100%"></el-input> |
|
|
|
<el-input v-model="modalData.carrierNo" :disabled="modalDisableFlag" style="width: 150px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 第二行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="状态" prop="status"> |
|
|
|
<el-select v-model="modalData.status" placeholder="请选择" style="width: 120px"> |
|
|
|
<el-option label="空闲" value="空闲"></el-option> |
|
|
|
<el-option label="占用" value="占用"></el-option> |
|
|
|
<el-option label="维修" value="维修"></el-option> |
|
|
|
<el-option label="报废" value="报废"></el-option> |
|
|
|
<el-option label="外借" value="外借"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px"> |
|
|
|
<el-form-item label="载具类型编码" prop="carrierTypeCode"> |
|
|
|
<el-input v-model="modalData.carrierTypeCode" style="width: 100%"></el-input> |
|
|
|
<el-input v-model="modalData.carrierTypeCode" style="width: 150px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label="载具类型名称" prop="carrierTypeName"> |
|
|
|
<el-input v-model="modalData.carrierTypeName" style="width: 100%"></el-input> |
|
|
|
<el-input v-model="modalData.carrierTypeName" style="width: 285px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 第三行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px"> |
|
|
|
<el-form-item label="固定资产编号"> |
|
|
|
<el-input v-model="modalData.assetNo" style="width: 100%"></el-input> |
|
|
|
<el-input v-model="modalData.assetNo" style="width: 150px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="规格描述"> |
|
|
|
<el-input v-model="modalData.specification" style="width: 100%"></el-input> |
|
|
|
<el-input v-model="modalData.specification" style="width: 285px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 第四行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="尺寸(长×宽×高mm)"> |
|
|
|
<el-input v-model="modalData.dimensions" style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="最大承重(kg)"> |
|
|
|
<el-input-number v-model="modalData.maxWeight" :controls="false" :precision="2" style="width: 100%"></el-input-number> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px"> |
|
|
|
<el-form-item label="采购日期"> |
|
|
|
<el-date-picker v-model="modalData.purchaseDate" type="date" value-format="yyyy-MM-dd" style="width: 150px"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 第五行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="预期使用次数"> |
|
|
|
<el-input-number v-model="modalData.expectedLifeCycles" :controls="false" :precision="0" style="width: 100%"></el-input-number> |
|
|
|
<el-form-item label="当前位置"> |
|
|
|
<el-input v-model="modalData.currentLocation" style="width: 285px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="预期使用寿命(天)"> |
|
|
|
<el-input-number v-model="modalData.expectedLifeDays" :controls="false" :precision="0" style="width: 100%"></el-input-number> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px"> |
|
|
|
<el-form-item label="尺寸"> |
|
|
|
<el-input v-model="modalData.dimensions" style="width: 100px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 第六行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="状态" prop="status"> |
|
|
|
<el-select v-model="modalData.status" placeholder="请选择" style="width: 100%"> |
|
|
|
<el-option label="空闲" :value="1"></el-option> |
|
|
|
<el-option label="占用" :value="2"></el-option> |
|
|
|
<el-option label="维修" :value="3"></el-option> |
|
|
|
<el-option label="报废" :value="4"></el-option> |
|
|
|
<el-option label="外借" :value="5"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-form-item label="最大承重"> |
|
|
|
<el-input-number v-model="modalData.maxWeight" :controls="false" style="width: 100px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="当前位置"> |
|
|
|
<el-input v-model="modalData.currentLocation" style="width: 100%"></el-input> |
|
|
|
<el-form-item label="预期使用次数"> |
|
|
|
<el-input-number v-model="modalData.expectedLifeCycles" :controls="false" style="width: 100px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 第七行 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="采购日期"> |
|
|
|
<el-date-picker v-model="modalData.purchaseDate" type="date" value-format="yyyy-MM-dd" style="width: 100%"></el-date-picker> |
|
|
|
<el-form-item label="预期使用寿命"> |
|
|
|
<el-input-number v-model="modalData.expectedLifeDays" :controls="false" style="width: 100px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input v-model="modalData.remark" style="width: 100%"></el-input> |
|
|
|
<el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none' show-word-limit style="width: 450px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center"> |
|
|
|
<el-footer style="height:35px;margin-top: 55px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
@ -216,9 +172,8 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
buNo: '', |
|
|
|
buDesc: '', |
|
|
|
carrierNo: '', |
|
|
|
carrierTypeName: '', |
|
|
|
status: '', |
|
|
|
@ -235,7 +190,8 @@ export default { |
|
|
|
modalDisableFlag: false, |
|
|
|
modalTitle: '新增固定载具', |
|
|
|
modalData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
bu: '', |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
carrierNo: '', |
|
|
|
carrierTypeCode: '', |
|
|
|
@ -246,7 +202,7 @@ export default { |
|
|
|
maxWeight: null, |
|
|
|
expectedLifeCycles: null, |
|
|
|
expectedLifeDays: null, |
|
|
|
status: 1, |
|
|
|
status: '', |
|
|
|
currentLocation: '', |
|
|
|
purchaseDate: '', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
@ -255,7 +211,7 @@ export default { |
|
|
|
}, |
|
|
|
userBuList: [], |
|
|
|
rules: { |
|
|
|
buNo: [{ |
|
|
|
bu: [{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
@ -308,21 +264,9 @@ export default { |
|
|
|
this.dataListLoading = true |
|
|
|
this.searchData.page = this.pageIndex |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
|
|
|
|
fixedCarrierSearch(this.searchData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.dataList = data.page.list.map(item => { |
|
|
|
// 状态描述转换 |
|
|
|
const statusMap = { |
|
|
|
1: '空闲', |
|
|
|
2: '占用', |
|
|
|
3: '维修', |
|
|
|
4: '报废', |
|
|
|
5: '外借' |
|
|
|
} |
|
|
|
item.statusDesc = statusMap[item.status] || '' |
|
|
|
return item |
|
|
|
}) |
|
|
|
this.dataList = data.page.list |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
} else { |
|
|
|
this.dataList = [] |
|
|
|
@ -353,7 +297,8 @@ export default { |
|
|
|
this.modalFlag = true |
|
|
|
this.modalDisableFlag = false |
|
|
|
this.modalData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
bu: this.userBuList[0].buNo, |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
carrierNo: '', |
|
|
|
carrierTypeCode: '', |
|
|
|
@ -364,7 +309,7 @@ export default { |
|
|
|
maxWeight: null, |
|
|
|
expectedLifeCycles: null, |
|
|
|
expectedLifeDays: null, |
|
|
|
status: 1, |
|
|
|
status: '空闲', |
|
|
|
currentLocation: '', |
|
|
|
purchaseDate: '', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
@ -383,6 +328,7 @@ export default { |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.modalData = { |
|
|
|
...row, |
|
|
|
bu: row.site + '_' + row.buNo, |
|
|
|
flag: 'update' |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
|