Commit f61d4d5a authored by 仇晓婷's avatar 仇晓婷

文档管理编号生成

parent 69e36e7f
......@@ -3,7 +3,7 @@
<div class="mb10 pt5">
<Input
v-model.trim="searchValue"
placeholder="请输入库位名称"
placeholder="请输入分类名称"
clearable
style="width: 240px"
/>
......@@ -40,7 +40,7 @@ export default {
},
data() {
return {
searchValue: "", //搜索库位名称
searchValue: "", //搜索名称
treeData: [],
treeDataOld: [],
......
......@@ -10,9 +10,6 @@
v-if="li.dataType == 0"
v-model="entity[li.field]"
:disabled="li.field == 'code'"
:placeholder="
li.field == 'code' ? '保存后编号将自动生成' : ''
"
></Input>
<InputNumber
v-if="li.dataType == 1 || li.dataType == 2"
......@@ -232,7 +229,6 @@ export default {
data() {
return {
// modal: false,
imgName: "",
avatorPath: "",
fileds: [], //扩展属性
......@@ -241,6 +237,7 @@ export default {
status: 0,
categoryId: this.treeId,
img: "",
code: "",
// title: "",
// field: "",
// dataType: null,
......@@ -265,6 +262,7 @@ export default {
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
// code: [{ required: true, message: "必填", trigger: "blur" }],
},
parmsName: "app=material&eid=1&name=document",
parms: {
......@@ -285,8 +283,20 @@ export default {
this.initFiled();
this.parms.eid = this.$u.guid();
this.$refs.refmovieFile1.inputShow = false;
this.getSerialcode();
},
methods: {
// 生成临时编号code
getSerialcode() {
Api.serialcode({
code: "",
count: 0,
}).then((r) => {
if (r.result) {
this.entity.code = r.result[0];
}
});
},
imgUrl() {
window.open(this.avatorPath, "_blank");
},
......
......@@ -34,4 +34,10 @@ export default {
getcategorytemplate(params){ //获取分类的模板
return Api.get(`${material}/documenttemplate/getcategorytemplate`,params);
},
//批量生成序列号并返回
serialcode(params) {
return Api.post(`${systemUrl}/cache/generate_serialcode`, params);
},
}
\ No newline at end of file
......@@ -16,7 +16,7 @@
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入关键字引用的文档名称/文档名称"
placeholder="请输入文档名称/编号"
v-model="easySearch.keys.value"
/>
</FormItem>
......@@ -44,9 +44,11 @@
<div class="body-card">
<Row class="title-i">
<Col :span="12">
<Ellipsis :text="row.name" :length="12" tooltip />
<Ellipsis :text="row.name" :length="18" tooltip />
</Col>
<Col :span="12" class="btn-click">{{ row.code }}</Col>
<Col :span="12" class="btn-click">
<Ellipsis :text="row.code" :length="18" tooltip
/></Col>
</Row>
<Row class="row-down" :gutter="10">
<Col span="7">
......@@ -124,7 +126,7 @@ export default {
action: Api.index,
fullscreen: false,
easySearch: {
keys: { op: "refName,name", value: null },
keys: { op: "name,code", value: null },
categoryId: {
op: "In",
value: this.ids,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment