优化
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
输入.workprocedure_id TYPEAS s_string
|
输入.workprocedure_id TYPEAS s_string
|
||||||
输入.is_produceuse TYPEAS s_string
|
输入.is_produceuse TYPEAS s_string
|
||||||
输入.devicerecord_id TYPEAS s_string
|
输入.devicerecord_id TYPEAS s_string
|
||||||
|
输入.device_level TYPEAS s_string
|
||||||
输入.classIds TYPEAS f_string
|
输入.classIds TYPEAS f_string
|
||||||
输入.deptIds TYPEAS f_string
|
输入.deptIds TYPEAS f_string
|
||||||
|
|
||||||
@@ -72,6 +73,9 @@
|
|||||||
OPTION 输入.status <> ""
|
OPTION 输入.status <> ""
|
||||||
equipmentfile.status = 输入.status
|
equipmentfile.status = 输入.status
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.device_level <> ""
|
||||||
|
equipmentfile.device_level = 输入.device_level
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.use_deptid <> ""
|
OPTION 输入.use_deptid <> ""
|
||||||
equipmentfile.use_deptid in 输入.deptIds
|
equipmentfile.use_deptid in 输入.deptIds
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
Binary file not shown.
@@ -126,6 +126,21 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="设备等级" prop="device_level">
|
||||||
|
<el-select
|
||||||
|
v-model="form.device_level"
|
||||||
|
placeholder="设备等级"
|
||||||
|
style="width: 210px"
|
||||||
|
class="filter-item"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.device_level"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="内部自编号" prop="extend_code">
|
<el-form-item label="内部自编号" prop="extend_code">
|
||||||
<label slot="label">内部自编号:</label>
|
<label slot="label">内部自编号:</label>
|
||||||
<el-input v-model="form.extend_code" clearable style="width: 210px" />
|
<el-input v-model="form.extend_code" clearable style="width: 210px" />
|
||||||
@@ -283,6 +298,7 @@ const defaultForm = {
|
|||||||
setting_place: '',
|
setting_place: '',
|
||||||
device_bom_id: '',
|
device_bom_id: '',
|
||||||
theory_beat: '',
|
theory_beat: '',
|
||||||
|
device_level: '',
|
||||||
oraginal_value: '',
|
oraginal_value: '',
|
||||||
net_amount: '',
|
net_amount: '',
|
||||||
remark: ''
|
remark: ''
|
||||||
@@ -297,7 +313,7 @@ export default {
|
|||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dicts: ['device_type', 'workorder_type', 'is_produceuse', 'device_status'],
|
dicts: ['device_type', 'workorder_type', 'is_produceuse', 'device_status', 'device_level'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
|||||||
@@ -111,6 +111,22 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="设备等级" prop="device_level">
|
||||||
|
<el-select
|
||||||
|
v-model="form.device_level"
|
||||||
|
placeholder="设备等级"
|
||||||
|
style="width: 210px"
|
||||||
|
disabled
|
||||||
|
class="filter-item"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.device_level"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="内部自编号" prop="extend_code">
|
<el-form-item label="内部自编号" prop="extend_code">
|
||||||
<label slot="label">内部自编号:</label>
|
<label slot="label">内部自编号:</label>
|
||||||
<el-input v-model="form.extend_code" disabled style="width: 210px" />
|
<el-input v-model="form.extend_code" disabled style="width: 210px" />
|
||||||
@@ -233,7 +249,7 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dicts: ['device_type', 'workorder_type', 'is_produceuse', 'device_status'],
|
dicts: ['device_type', 'workorder_type', 'is_produceuse', 'device_status', 'device_level'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
|||||||
@@ -66,18 +66,6 @@
|
|||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="启用日期">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.createTime"
|
|
||||||
type="daterange"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
@input="onInput()"
|
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
|
||||||
@change="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属工序">
|
<el-form-item label="所属工序">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.workprocedure_id"
|
v-model="query.workprocedure_id"
|
||||||
@@ -129,6 +117,35 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="设备等级">
|
||||||
|
<el-select
|
||||||
|
v-model="query.device_level"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="设备等级"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.device_level"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="启用日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
|
@input="onInput()"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -195,6 +212,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:data="crud.data"
|
:data="crud.data"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
:cell-style="cellstyle"
|
||||||
:highlight-current-row="true"
|
:highlight-current-row="true"
|
||||||
@selection-change="mySelectionChange"
|
@selection-change="mySelectionChange"
|
||||||
>
|
>
|
||||||
@@ -219,30 +237,31 @@
|
|||||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.device_code }}</el-link>
|
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.device_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="device_name" min-width="150" label="设备名称"/>
|
<el-table-column prop="device_name" min-width="150" label="设备名称" />
|
||||||
<el-table-column prop="extend_code" min-width="100" label="内部自编号"/>
|
<el-table-column prop="extend_code" min-width="100" label="内部自编号" />
|
||||||
<el-table-column prop="device_model" min-width="130" label="设备型号"/>
|
<el-table-column prop="device_model" min-width="130" label="设备型号" />
|
||||||
<el-table-column prop="device_spec" min-width="130" label="设备规格"/>
|
<el-table-column prop="device_spec" min-width="130" label="设备规格" />
|
||||||
|
<el-table-column prop="device_level" min-width="70" label="设备等级" :formatter="device_levelFormat" />
|
||||||
<el-table-column prop="material_type_name" min-width="150" label="设备类别" />
|
<el-table-column prop="material_type_name" min-width="150" label="设备类别" />
|
||||||
<el-table-column :formatter="is_produceuseFormat" min-width="70" prop="is_produceuse" label="生产用途" />
|
<el-table-column :formatter="is_produceuseFormat" min-width="70" prop="is_produceuse" label="生产用途" />
|
||||||
<el-table-column :formatter="stateFormat" min-width="70" prop="status" label="设备状态" />
|
<el-table-column :formatter="stateFormat" min-width="70" prop="status" label="设备状态" />
|
||||||
<el-table-column prop="beginuse_date" min-width="90" label="启用日期"/>
|
<el-table-column prop="beginuse_date" min-width="90" label="启用日期" />
|
||||||
<el-table-column prop="use_deptname" min-width="130" label="使用部门"/>
|
<el-table-column prop="use_deptname" min-width="130" label="使用部门" />
|
||||||
<el-table-column prop="use_groupname" min-width="130" label="使用班组"/>
|
<el-table-column prop="use_groupname" min-width="130" label="使用班组" />
|
||||||
<el-table-column prop="supplier_name" min-width="180" label="供应商" show-overflow-tooltip/>
|
<el-table-column prop="supplier_name" min-width="180" label="供应商" show-overflow-tooltip />
|
||||||
<el-table-column prop="manufacturer" min-width="180" label="制造商" show-overflow-tooltip/>
|
<el-table-column prop="manufacturer" min-width="180" label="制造商" show-overflow-tooltip />
|
||||||
<el-table-column prop="country_manufactur" min-width="90" label="制造国别"/>
|
<el-table-column prop="country_manufactur" min-width="90" label="制造国别" />
|
||||||
<el-table-column prop="leavefactory_date" min-width="80" label="出厂日期" show-overflow-tooltip/>
|
<el-table-column prop="leavefactory_date" min-width="80" label="出厂日期" show-overflow-tooltip />
|
||||||
<el-table-column prop="leavefactory_number" min-width="130" label="出厂编号" show-overflow-tooltip/>
|
<el-table-column prop="leavefactory_number" min-width="130" label="出厂编号" show-overflow-tooltip />
|
||||||
<el-table-column prop="drawing_number" min-width="130" label="图号" show-overflow-tooltip/>
|
<el-table-column prop="drawing_number" min-width="130" label="图号" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_type" min-width="70" label="设备属性" :formatter="device_typeFormat" show-overflow-tooltip/>
|
<el-table-column prop="device_type" min-width="70" label="设备属性" :formatter="device_typeFormat" show-overflow-tooltip />
|
||||||
<el-table-column prop="workprocedure_id" min-width="70" label="工序" :formatter="seriesFormat2" show-overflow-tooltip/>
|
<el-table-column prop="workprocedure_id" min-width="70" label="工序" :formatter="seriesFormat2" show-overflow-tooltip />
|
||||||
<el-table-column prop="assets_code" min-width="100" label="资产编码" show-overflow-tooltip/>
|
<el-table-column prop="assets_code" min-width="100" label="资产编码" show-overflow-tooltip />
|
||||||
<el-table-column prop="assets_name" min-width="150" label="资产名称" show-overflow-tooltip/>
|
<el-table-column prop="assets_name" min-width="150" label="资产名称" show-overflow-tooltip />
|
||||||
<el-table-column prop="create_name" min-width="90" label="生成人" show-overflow-tooltip/>
|
<el-table-column prop="create_name" min-width="90" label="生成人" show-overflow-tooltip />
|
||||||
<el-table-column prop="create_time" min-width="140" label="生成时间" show-overflow-tooltip/>
|
<el-table-column prop="create_time" min-width="140" label="生成时间" show-overflow-tooltip />
|
||||||
<el-table-column prop="update_optname" min-width="90" label="修改人" show-overflow-tooltip/>
|
<el-table-column prop="update_optname" min-width="90" label="修改人" show-overflow-tooltip />
|
||||||
<el-table-column prop="update_time" min-width="140" label="修改时间" show-overflow-tooltip/>
|
<el-table-column prop="update_time" min-width="140" label="修改时间" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -275,7 +294,7 @@ import { download } from '@/api/data'
|
|||||||
import { downloadFile } from '@/utils'
|
import { downloadFile } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'equipmentfile',
|
name: 'Equipmentfile',
|
||||||
components: { Treeselect, ChangeDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
components: { Treeselect, ChangeDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '设备档案', idField: 'devicerecord_id', url: 'api/equipmentfile', crudMethod: { ...equipmentfile },
|
return CRUD({ title: '设备档案', idField: 'devicerecord_id', url: 'api/equipmentfile', crudMethod: { ...equipmentfile },
|
||||||
@@ -290,7 +309,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['workorder_status', 'workorder_type', 'product_series', 'device_type', 'is_produceuse', 'device_status'],
|
dicts: ['device_level', 'workorder_status', 'workorder_type', 'product_series', 'device_type', 'is_produceuse', 'device_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
@@ -421,10 +440,13 @@ export default {
|
|||||||
this.open_flag = true
|
this.open_flag = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.handleCurrentChange()
|
this.handleCurrentChange()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
device_levelFormat(row) {
|
||||||
|
return this.dict.label.device_level[row.device_level]
|
||||||
|
},
|
||||||
stateFormat(row) {
|
stateFormat(row) {
|
||||||
return this.dict.label.device_status[row.status]
|
return this.dict.label.device_status[row.status]
|
||||||
},
|
},
|
||||||
@@ -449,18 +471,18 @@ export default {
|
|||||||
},
|
},
|
||||||
submit(status) {
|
submit(status) {
|
||||||
this.checkrows = this.$refs.table.selection
|
this.checkrows = this.$refs.table.selection
|
||||||
if(this.checkrows.length === 0 ){
|
if (this.checkrows.length === 0) {
|
||||||
this.crud.notify('请勾选需要操作的记录!')
|
this.crud.notify('请勾选需要操作的记录!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
equipmentfile.submit({ 'status': status, rows: this.checkrows}).then(res => {
|
equipmentfile.submit({ 'status': status, rows: this.checkrows }).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.querytable()
|
this.querytable()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openWork(row) {
|
openWork(row) {
|
||||||
this.checkrows = this.$refs.table.selection
|
this.checkrows = this.$refs.table.selection
|
||||||
if(this.checkrows.length === 0 ){
|
if (this.checkrows.length === 0) {
|
||||||
this.crud.notify('请勾选一条需要操作的记录!')
|
this.crud.notify('请勾选一条需要操作的记录!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -480,6 +502,22 @@ export default {
|
|||||||
crud.downloadLoading = false
|
crud.downloadLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
cellstyle({ row, column, rowIndex, columnIndex }) {
|
||||||
|
const stylejson = {}
|
||||||
|
if (column.label === '设备等级') {
|
||||||
|
if (row.device_level === 'A') {
|
||||||
|
stylejson.background = 'red'
|
||||||
|
stylejson.color = 'white'
|
||||||
|
} else if (row.device_level === 'B') {
|
||||||
|
stylejson.background = 'blue'
|
||||||
|
stylejson.color = 'white'
|
||||||
|
} else if (row.device_level === 'C') {
|
||||||
|
stylejson.background = 'green'
|
||||||
|
stylejson.color = 'white'
|
||||||
|
}
|
||||||
|
return stylejson
|
||||||
|
}
|
||||||
|
},
|
||||||
printCard() {
|
printCard() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
if (_selectData.length > 1 || _selectData.length === 0) {
|
if (_selectData.length > 1 || _selectData.length === 0) {
|
||||||
@@ -578,7 +616,6 @@ export default {
|
|||||||
|
|
||||||
color: "#CCCFD6";
|
color: "#CCCFD6";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__input {
|
.vue-treeselect--has-value .vue-treeselect__input {
|
||||||
|
|||||||
@@ -259,6 +259,7 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
size="mini"
|
size="mini"
|
||||||
show-summary
|
show-summary
|
||||||
|
:summary-method="getSummaries"
|
||||||
border
|
border
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
@@ -534,6 +535,29 @@ export default {
|
|||||||
this.form.accept_pcsn = res.accept_pcsn
|
this.form.accept_pcsn = res.accept_pcsn
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getSummaries(param) {
|
||||||
|
const { columns, data } = param
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const values = data.map(item => Number(item[column.property]))
|
||||||
|
if (column.property === 'formula_qty') {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
sums[index]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
},
|
||||||
autoCalculation() {
|
autoCalculation() {
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true
|
||||||
crudacceptformula.autoCalculation(this.form).then(res => {
|
crudacceptformula.autoCalculation(this.form).then(res => {
|
||||||
|
|||||||
@@ -228,6 +228,8 @@
|
|||||||
:data="tableData"
|
:data="tableData"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
show-summary
|
||||||
|
:summary-method="getSummaries"
|
||||||
border
|
border
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
@@ -362,6 +364,29 @@ export default {
|
|||||||
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty / 100.0
|
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty / 100.0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getSummaries(param) {
|
||||||
|
const { columns, data } = param
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const values = data.map(item => Number(item[column.property]))
|
||||||
|
if (column.property === 'formula_qty') {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
sums[index]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
this.form = {}
|
this.form = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user