1、档案尺寸字段调整
2、设备数据增加默认名称传递 3、出库的时间字段格式化
This commit is contained in:
parent
34443c9722
commit
bcad32a89e
14
artSystem.js
14
artSystem.js
@ -213,9 +213,6 @@ class ArtSystem {
|
||||
editTask.addParam('_author', params.author);
|
||||
editTask.addParam('_create_period', params.createPeriod);
|
||||
editTask.addParam('_actual_number', params.actualNumber);
|
||||
editTask.addParam('_length', params.length);
|
||||
editTask.addParam('_width', params.width);
|
||||
editTask.addParam('_height', params.height);
|
||||
if (params.texture) {
|
||||
editTask.addParam('_texture', params.texture.dict_code);
|
||||
}
|
||||
@ -233,7 +230,14 @@ class ArtSystem {
|
||||
editTask.addParam('_original_registration_number', params.originalRegistrationNumber);
|
||||
editTask.addParam('_remark', params.remarks);
|
||||
editTask.addParam('_images', params.images);
|
||||
editTask.addParam('_size', params.size);
|
||||
if (params.size && params.size.length > 0) {
|
||||
editTask.addParam(
|
||||
'_size',
|
||||
params.size.map((item) => {
|
||||
return item.toParams();
|
||||
}),
|
||||
);
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
editTask
|
||||
.execute()
|
||||
@ -731,7 +735,7 @@ class ArtSystem {
|
||||
let editTask = new EditTask(artApi.laboratoryInsert);
|
||||
editTask.addParam('_name', params.name);
|
||||
editTask.addParam('_geometry', params.geometry);
|
||||
editTask.addParam("_geometry_position", params.geometryPosition);
|
||||
editTask.addParam('_geometry_position', params.geometryPosition);
|
||||
editTask.addParam('_description', params.description);
|
||||
return new Promise((resolve, reject) => {
|
||||
editTask
|
||||
|
@ -6,6 +6,7 @@ import ArtRepairFile from './artRepairFile';
|
||||
import ConditionReport from './conditionReport';
|
||||
import ArtCategory from './artCategory';
|
||||
import { formatterMillisecond } from './utils/date';
|
||||
import ArtSystem from './artSystem';
|
||||
|
||||
class CellsysArt {
|
||||
constructor(params = {}) {
|
||||
@ -14,7 +15,7 @@ class CellsysArt {
|
||||
this.recordNumber = params.record_number;
|
||||
this.artworkName = params.artwork_name;
|
||||
this.author = params.author;
|
||||
this.createPeriod = params.create_period || '未知';
|
||||
this.createPeriod = params.create_period;
|
||||
this.actualNumber = params.actual_number || 1;
|
||||
this.textureId = params.texture_id; //材质id
|
||||
this.textureName = params.texture_name; //材质名称
|
||||
@ -48,7 +49,12 @@ class CellsysArt {
|
||||
}
|
||||
this.materialIds = params.material_ids; //材料Id数组
|
||||
this.geometry = params.geometry; //当前位置
|
||||
this.size = params.size || [];
|
||||
this.size = [];
|
||||
if (params.size && params.size.length > 0) {
|
||||
this.size = params.size.map((item) => {
|
||||
return new ArtSize(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
get oldNameFormat() {
|
||||
//带书名号
|
||||
@ -109,15 +115,22 @@ class CellsysArt {
|
||||
editTask.addParam('_oldname', params.oldName);
|
||||
editTask.addParam('_author', params.author);
|
||||
editTask.addParam('_create_period', params.createPeriod);
|
||||
editTask.addParam('_length', params.length);
|
||||
editTask.addParam('_width', params.width);
|
||||
editTask.addParam('_height', params.height);
|
||||
|
||||
if (params.texture) {
|
||||
editTask.addParam('_texture', params.texture.dict_code);
|
||||
}
|
||||
editTask.addParam('_original_registration_number', params.originalRegistrationNumber);
|
||||
editTask.addParam('_remark', params.remarks);
|
||||
editTask.addParam('_images', params.images);
|
||||
if (params.size && params.size.length > 0) {
|
||||
editTask.addParam(
|
||||
'_size',
|
||||
params.size.map((item) => {
|
||||
return item.toParams();
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
editTask
|
||||
.execute()
|
||||
@ -221,15 +234,43 @@ class CellsysArt {
|
||||
});
|
||||
return artCategory.queryDisease();
|
||||
}
|
||||
|
||||
//获取艺术品关联的材料数据
|
||||
queryMaterials(params = {}) {
|
||||
let { filter, pageInfo } = params;
|
||||
if (!filter) {
|
||||
filter = [];
|
||||
}
|
||||
filter.push({
|
||||
name: 'equipment_id',
|
||||
operator: '=',
|
||||
value: this.id,
|
||||
});
|
||||
return ArtSystem.queryMaterials({ filter, pageInfo });
|
||||
}
|
||||
}
|
||||
|
||||
class ArtSize {
|
||||
constructor(params = {}) {
|
||||
let { name, width, length, height } = params;
|
||||
let { name, width, length, height, leftTopRightBottom, leftBottomRightTop } = params;
|
||||
this.name = name;
|
||||
this.length = length;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.leftTopRightBottom = leftTopRightBottom;
|
||||
this.leftBottomRightTop = leftBottomRightTop;
|
||||
}
|
||||
|
||||
//转化成接口保存所需要的格式
|
||||
toParams() {
|
||||
return {
|
||||
name: this.name,
|
||||
length: parseFloat(Number(this.length).toFixed(2)),
|
||||
width: parseFloat(Number(this.width).toFixed(2)),
|
||||
height: parseFloat(Number(this.height).toFixed(2)),
|
||||
leftTopRightBottom: parseFloat(Number(this.leftTopRightBottom).toFixed(2)),
|
||||
leftBottomRightTop: parseFloat(Number(this.leftBottomRightTop).toFixed(2)),
|
||||
};
|
||||
}
|
||||
}
|
||||
export { ArtSize };
|
||||
|
@ -171,6 +171,7 @@ export default {
|
||||
emits: ['close', 'update'],
|
||||
components: { GeocoderComponent, tagSelect, MaterialCard, ImagesUpload },
|
||||
props: {
|
||||
defaultName: String,
|
||||
currentEquipment: Object, //cellsysArt的Equipment对象
|
||||
currentEquData: Object,
|
||||
mode: 'create', //create和details,目前还没有编辑模式
|
||||
@ -260,6 +261,9 @@ export default {
|
||||
this.getEquipmentDataDetail(id);
|
||||
}
|
||||
}
|
||||
if (this.defaultName) {
|
||||
this.form.name = this.defaultName;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//查询设备信息
|
||||
|
15
outbound.js
15
outbound.js
@ -4,7 +4,8 @@ import ArtworkEquipmentType from './equipmentType';
|
||||
import ArtRepairLog from './artRepairLog';
|
||||
import outBoundReview from './outBoundReview';
|
||||
import OutBoundReview from './outBoundReview';
|
||||
import ArtImage from "./artImage";
|
||||
import ArtImage from './artImage';
|
||||
import { formatterMillisecond } from './utils/date';
|
||||
|
||||
class Outbound {
|
||||
constructor(params = {}) {
|
||||
@ -16,9 +17,9 @@ class Outbound {
|
||||
this.recipient = params.recipient; //签收人
|
||||
this.recipientSignatureimage = params.recipient_signature_image; //签收人签名图片
|
||||
this.reason = params.reason; //出库原因
|
||||
if(params.images){
|
||||
this.images = params.images.map(url=>{
|
||||
return new ArtImage(url)
|
||||
if (params.images) {
|
||||
this.images = params.images.map((url) => {
|
||||
return new ArtImage(url);
|
||||
});
|
||||
}
|
||||
// this.images = params.images; //附件图片
|
||||
@ -83,6 +84,12 @@ class Outbound {
|
||||
this.reviewerId = params.reviewer_id;
|
||||
this.reviewerSignatureimage = params.reviewer_signature_image;
|
||||
}
|
||||
get createTimeFormat() {
|
||||
return formatterMillisecond(this.createTime, 'YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
get outboundTimeFormat() {
|
||||
return formatterMillisecond(this.outboundTime, 'YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
static createWarehouseOut(params = {}) {
|
||||
let editTask = new EditTask(artApi.wareHouseOutboundInsert);
|
||||
editTask.addParam('_artwork_record_id', params.artworkRecordId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user