Commit a7c6b9cd by huangqy

111

parent 3ddfee3a
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
<div v-if="setFormData.rackStatus == 'F'"> <div v-if="setFormData.rackStatus == 'F'">
<el-form-item label="管理单位 :" prop="glOrgCode"> <el-form-item label="管理单位 :" prop="glOrgCode">
<el-select <!-- <el-select
v-model="setFormData.glOrgCode" v-model="setFormData.glOrgCode"
filterable filterable
clearable clearable
...@@ -453,6 +453,17 @@ ...@@ -453,6 +453,17 @@
:label="item.glOrgName" :label="item.glOrgName"
:value="item.glOrgCode"> :value="item.glOrgCode">
</el-option> </el-option>
</el-select> -->
<el-select
filterable
v-model="setFormData.glOrgCode"
placeholder="请选择管理单位"
style="width: 100%"
clearable
>
<el-option v-for="d in orgList" :key="d.orgCode" :label="d.orgName" :value="d.orgCode">
{{ d.orgName }}
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -848,11 +859,27 @@ export default { ...@@ -848,11 +859,27 @@ export default {
setAllShow (row) { setAllShow (row) {
this.title = '托盘设置' this.title = '托盘设置'
this.activeData = row this.activeData = row
row.prodDate = row.prodDate ? row.prodDate : this.parseTimes(new Date())
this.dialogVisible = true this.dialogVisible = true
this.editFlag = false this.editFlag = false
const obj = JSON.parse(JSON.stringify(row)) const obj = JSON.parse(JSON.stringify(row))
this.setFormData = obj this.setFormData = obj
}, },
parseTimes(time) {
if (time != '0001-01-01 00:00') {
var date = new Date(time)
var year = date.getFullYear()
/* 在日期格式中,月份是从0开始的,因此要加0
* 使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05
* */
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
// 拼接
return year + '-' + month + '-' + day
} else {
return ''
}
},
// 物资选择事件 // 物资选择事件
goodsChange (e) { goodsChange (e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论