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',
|
||||
description: 'The document id',
|
||||
http: {source: 'path'}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
arg: 'warehouseId',
|
||||
type: 'Number',
|
||||
description: 'The warehouse id'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
arg: 'companyId',
|
||||
type: 'Number',
|
||||
description: 'The company id'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
arg: 'dmsTypeId',
|
||||
type: 'Number',
|
||||
description: 'The dms type id'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
arg: 'reference',
|
||||
type: 'String'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
arg: 'description',
|
||||
type: 'String'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
arg: 'hasFile',
|
||||
type: 'Boolean',
|
||||
description: 'True if has an attached file',
|
||||
required: true
|
||||
},
|
||||
{
|
||||
arg: 'hasFileAttached',
|
||||
type: 'Boolean',
|
||||
description: 'True if has an attached file'
|
||||
|
@ -70,7 +82,8 @@ module.exports = Self => {
|
|||
companyFk: args.companyId,
|
||||
warehouseFk: args.warehouseId,
|
||||
reference: args.reference,
|
||||
description: args.description
|
||||
description: args.description,
|
||||
hasFile: args.hasFile
|
||||
}, myOptions);
|
||||
|
||||
if (args.hasFileAttached)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"hardCopyNumber": {
|
||||
"type": "Number"
|
||||
"type": "number"
|
||||
},
|
||||
"hasFile": {
|
||||
"type": "boolean"
|
||||
|
|
|
@ -28,7 +28,7 @@ module.exports = Self => {
|
|||
|
||||
const account = await Self.app.models.Account.findById(userId);
|
||||
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
|
||||
JOIN dms d ON d.id = wd.document
|
||||
JOIN dmsType dt ON dt.id = d.dmsTypeFk
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</vn-input-file>
|
||||
</vn-horizontal>
|
||||
<vn-vertical>
|
||||
<vn-check disabled="true"
|
||||
<vn-check disabled="watcher.orgData.hasFile"
|
||||
label="Generate identifier for original file"
|
||||
ng-model="$ctrl.dms.hasFile">
|
||||
</vn-check>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<vn-thead>
|
||||
<vn-tr>
|
||||
<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 expand>Description</vn-th>
|
||||
<vn-th field="hasFile" shrink>Original</vn-th>
|
||||
|
@ -28,6 +29,12 @@
|
|||
<vn-tbody>
|
||||
<vn-tr ng-repeat="document in $ctrl.workerDms">
|
||||
<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>
|
||||
<span title="{{::document.reference}}">
|
||||
{{::document.reference}}
|
||||
|
@ -40,7 +47,7 @@
|
|||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-check
|
||||
ng-model="document.dms.hasFile"
|
||||
ng-model="document.hasFile"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
</vn-td>
|
||||
|
|
|
@ -6,42 +6,6 @@ class Controller extends Component {
|
|||
constructor($element, $, vnFile) {
|
||||
super($element, $);
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue