2778 - Allow edit order number
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
5bd7e4a67f
commit
2c9fd45958
|
@ -11,25 +11,37 @@ module.exports = Self => {
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The document id',
|
description: 'The document id',
|
||||||
http: {source: 'path'}
|
http: {source: 'path'}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
arg: 'warehouseId',
|
arg: 'warehouseId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The warehouse id'
|
description: 'The warehouse id'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
arg: 'companyId',
|
arg: 'companyId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The company id'
|
description: 'The company id'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
arg: 'dmsTypeId',
|
arg: 'dmsTypeId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The dms type id'
|
description: 'The dms type id'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
arg: 'reference',
|
arg: 'reference',
|
||||||
type: 'String'
|
type: 'String'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
arg: 'description',
|
arg: 'description',
|
||||||
type: 'String'
|
type: 'String'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
|
arg: 'hasFile',
|
||||||
|
type: 'Boolean',
|
||||||
|
description: 'True if has an attached file',
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
{
|
||||||
arg: 'hasFileAttached',
|
arg: 'hasFileAttached',
|
||||||
type: 'Boolean',
|
type: 'Boolean',
|
||||||
description: 'True if has an attached file'
|
description: 'True if has an attached file'
|
||||||
|
@ -70,7 +82,8 @@ module.exports = Self => {
|
||||||
companyFk: args.companyId,
|
companyFk: args.companyId,
|
||||||
warehouseFk: args.warehouseId,
|
warehouseFk: args.warehouseId,
|
||||||
reference: args.reference,
|
reference: args.reference,
|
||||||
description: args.description
|
description: args.description,
|
||||||
|
hasFile: args.hasFile
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
if (args.hasFileAttached)
|
if (args.hasFileAttached)
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"hardCopyNumber": {
|
"hardCopyNumber": {
|
||||||
"type": "Number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"hasFile": {
|
"hasFile": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
|
|
@ -28,7 +28,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
const account = await Self.app.models.Account.findById(userId);
|
const account = await Self.app.models.Account.findById(userId);
|
||||||
const stmt = new ParameterizedSQL(
|
const stmt = new ParameterizedSQL(
|
||||||
`SELECT d.id dmsFk, d.reference, d.description, d.file, d.created
|
`SELECT d.id dmsFk, d.reference, d.description, d.file, d.created, d.hardCopyNumber, d.hasFile
|
||||||
FROM workerDocument wd
|
FROM workerDocument wd
|
||||||
JOIN dms d ON d.id = wd.document
|
JOIN dms d ON d.id = wd.document
|
||||||
JOIN dmsType dt ON dt.id = d.dmsTypeFk
|
JOIN dmsType dt ON dt.id = d.dmsTypeFk
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
</vn-input-file>
|
</vn-input-file>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<vn-check disabled="true"
|
<vn-check disabled="watcher.orgData.hasFile"
|
||||||
label="Generate identifier for original file"
|
label="Generate identifier for original file"
|
||||||
ng-model="$ctrl.dms.hasFile">
|
ng-model="$ctrl.dms.hasFile">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th field="dmsFk" shrink>Id</vn-th>
|
<vn-th field="dmsFk" shrink>Id</vn-th>
|
||||||
|
<vn-th field="hardCopyNumber" shrink number>Order</vn-th>
|
||||||
<vn-th field="reference" shrink>Reference</vn-th>
|
<vn-th field="reference" shrink>Reference</vn-th>
|
||||||
<vn-th expand>Description</vn-th>
|
<vn-th expand>Description</vn-th>
|
||||||
<vn-th field="hasFile" shrink>Original</vn-th>
|
<vn-th field="hasFile" shrink>Original</vn-th>
|
||||||
|
@ -28,6 +29,12 @@
|
||||||
<vn-tbody>
|
<vn-tbody>
|
||||||
<vn-tr ng-repeat="document in $ctrl.workerDms">
|
<vn-tr ng-repeat="document in $ctrl.workerDms">
|
||||||
<vn-td number shrink>{{::document.dmsFk}}</vn-td>
|
<vn-td number shrink>{{::document.dmsFk}}</vn-td>
|
||||||
|
<vn-td shrink number>
|
||||||
|
<span class="chip" title="{{::document.hardCopyNumber}}"
|
||||||
|
ng-class="{'message': document.hardCopyNumber}">
|
||||||
|
{{::document.hardCopyNumber}}
|
||||||
|
</span>
|
||||||
|
</vn-td>
|
||||||
<vn-td expand>
|
<vn-td expand>
|
||||||
<span title="{{::document.reference}}">
|
<span title="{{::document.reference}}">
|
||||||
{{::document.reference}}
|
{{::document.reference}}
|
||||||
|
@ -40,7 +47,7 @@
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td shrink>
|
<vn-td shrink>
|
||||||
<vn-check
|
<vn-check
|
||||||
ng-model="document.dms.hasFile"
|
ng-model="document.hasFile"
|
||||||
disabled="true">
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
|
|
|
@ -6,42 +6,6 @@ class Controller extends Component {
|
||||||
constructor($element, $, vnFile) {
|
constructor($element, $, vnFile) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
this.vnFile = vnFile;
|
this.vnFile = vnFile;
|
||||||
this.filter = {
|
|
||||||
include: {
|
|
||||||
relation: 'dms',
|
|
||||||
scope: {
|
|
||||||
fields: [
|
|
||||||
'dmsTypeFk',
|
|
||||||
'reference',
|
|
||||||
'hardCopyNumber',
|
|
||||||
'workerFk',
|
|
||||||
'description',
|
|
||||||
'hasFile',
|
|
||||||
'file',
|
|
||||||
'created',
|
|
||||||
],
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'dmsType',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
relation: 'worker',
|
|
||||||
scope: {
|
|
||||||
fields: ['userFk'],
|
|
||||||
include: {
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['nickname']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteDms(index) {
|
deleteDms(index) {
|
||||||
|
|
Loading…
Reference in New Issue