[update] 市场法规清单只能修改V和.中间的部分,清单详情页单条查看和多条合并查看排序字段作区分
This commit is contained in:
+13
@@ -585,6 +585,19 @@ export default {
|
|||||||
this.filters.manifestVersion = this.$route.query.manifestVersion
|
this.filters.manifestVersion = this.$route.query.manifestVersion
|
||||||
}
|
}
|
||||||
this.ids = this.$route.query.ids.split(',')
|
this.ids = this.$route.query.ids.split(',')
|
||||||
|
if (this.ids.length <= 1) {
|
||||||
|
// 只有一条数据按排序字段排序
|
||||||
|
this.isorter = {
|
||||||
|
column: 'orderNo',
|
||||||
|
order: 'asc'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 有多条可能会合并,用标准编号排序
|
||||||
|
this.isorter = {
|
||||||
|
column: 'standardNumber',
|
||||||
|
order: 'desc'
|
||||||
|
}
|
||||||
|
}
|
||||||
this.filters.manifestId = this.$route.query.ids
|
this.filters.manifestId = this.$route.query.ids
|
||||||
this.initData(this.$route.query.ids)
|
this.initData(this.$route.query.ids)
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
|||||||
+24
-7
@@ -16,10 +16,13 @@
|
|||||||
v-decorator.trim="[ 'manifestNo', validatorRules.manifestNo ]" />
|
v-decorator.trim="[ 'manifestNo', validatorRules.manifestNo ]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 清单版本 -->
|
<!-- 清单版本 -->
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketRegulationsList.listVersion')">
|
<a-form-item class="block-form-item" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketRegulationsList.listVersion')">
|
||||||
|
<span>V</span>
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listVersion')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listVersion')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
v-decorator.trim="[ 'manifestVersion', validatorRules.manifestVersion ]" />
|
@change="e => {e.target.value = (e.target.value.replace(/[^0-9-]/g, '')).trim()}"
|
||||||
|
v-decorator.trim="[ 'manifestVersionCenter', validatorRules.manifestVersionCenter ]" />
|
||||||
|
<span>.0</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
@@ -51,7 +54,7 @@ export default {
|
|||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 清单版本
|
// 清单版本
|
||||||
manifestVersion: {
|
manifestVersionCenter: {
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('pleaseEnter') + this.$t('standardRegulationLibrary.marketRegulationsList.listVersion')
|
message: this.$t('pleaseEnter') + this.$t('standardRegulationLibrary.marketRegulationsList.listVersion')
|
||||||
@@ -66,8 +69,10 @@ export default {
|
|||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
|
const manifestVersionLeft = (this.model.manifestVersion || '').split('.')[0]
|
||||||
|
this.model.manifestVersionCenter = manifestVersionLeft.substring(1)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model, 'manifestNo', 'manifestVersion'))
|
this.form.setFieldsValue(pick(this.model, 'manifestNo', 'manifestVersionCenter'))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
@@ -75,8 +80,9 @@ export default {
|
|||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const param = Object.assign({}, values)
|
const param = {}
|
||||||
param.id = this.model.id
|
param.id = this.model.id
|
||||||
|
param.manifestVersion = 'V' + values.manifestVersionCenter + '.0'
|
||||||
marketRegulationDetailEditVersion(param).then(res => {
|
marketRegulationDetailEditVersion(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
@@ -102,6 +108,17 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="less">
|
||||||
|
/deep/.block-form-item{
|
||||||
|
clear: both;
|
||||||
|
.ant-form-item-children {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
input {
|
||||||
|
flex: 1;
|
||||||
|
margin: 0 10px;
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user