hotFix: saveSign
This commit is contained in:
parent
bfbe8302b6
commit
578bcd3cce
|
@ -1,6 +1,6 @@
|
||||||
import './index';
|
import './index';
|
||||||
|
|
||||||
fdescribe('component vnRoleCard', () => {
|
describe('component vnRoleCard', () => {
|
||||||
let controller;
|
let controller;
|
||||||
let $httpBackend;
|
let $httpBackend;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import './index';
|
import './index';
|
||||||
|
|
||||||
fdescribe('component vnRoleDescriptor', () => {
|
describe('component vnRoleDescriptor', () => {
|
||||||
let controller;
|
let controller;
|
||||||
let $httpBackend;
|
let $httpBackend;
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,8 @@ module.exports = Self => {
|
||||||
|
|
||||||
async function createGestDoc(id) {
|
async function createGestDoc(id) {
|
||||||
const ticket = await models.Ticket.findById(id,
|
const ticket = await models.Ticket.findById(id,
|
||||||
{include: [
|
{
|
||||||
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'warehouse',
|
relation: 'warehouse',
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -125,7 +126,7 @@ module.exports = Self => {
|
||||||
if (await gestDocExists(ticketId))
|
if (await gestDocExists(ticketId))
|
||||||
throw new UserError('Ticket is already signed');
|
throw new UserError('Ticket is already signed');
|
||||||
|
|
||||||
if (location) setLocation(ticketId);
|
if (location) await setLocation(ticketId);
|
||||||
if (!gestDocCreated) await createGestDoc(ticketId);
|
if (!gestDocCreated) await createGestDoc(ticketId);
|
||||||
await models.TicketDms.create({ticketFk: ticketId, dmsFk: dms[0].id}, myOptions);
|
await models.TicketDms.create({ticketFk: ticketId, dmsFk: dms[0].id}, myOptions);
|
||||||
const ticket = await models.Ticket.findById(ticketId, null, myOptions);
|
const ticket = await models.Ticket.findById(ticketId, null, myOptions);
|
||||||
|
@ -135,7 +136,7 @@ module.exports = Self => {
|
||||||
where: {
|
where: {
|
||||||
code: 'DELIVERED'
|
code: 'DELIVERED'
|
||||||
}
|
}
|
||||||
}, options);
|
}, myOptions);
|
||||||
|
|
||||||
await models.Ticket.state(ctx, {
|
await models.Ticket.state(ctx, {
|
||||||
ticketFk: ticketId,
|
ticketFk: ticketId,
|
||||||
|
|
Loading…
Reference in New Issue