内部备注必填并支持快捷标签,置换结算可带入当日加权料价
This commit is contained in:
1 parent
6fe7504e52
commit
ac9073471d
30 files changed
+194
-72
No files matched your search
@@ -19,7 +19,7 @@ function ordinaryLine(extra={}){return {name:'足金999',unit:'g',quantity:'2.00
|
||||
test('计数只读catalog配置,改名不改范围;正整数与工费pieces独立,旧值保持未知',()=>{
|
||||
const h=harness();assert.equal(h.run(`pocketCountsEnabled('${PAIR}')`),true);assert.equal(h.run(`pocketCountsEnabled('耳钉')`),false);
|
||||
const html=h.run(`lineHTML({name:'足金999',unit:'g',pocket:'${PAIR}',quantity:'2',stockCount:3,pieces:9})`);assert.match(html,/name="stockCount" value="3"/);assert.match(html,/name="pieces" value="9"/);assert.match(html,/出库数量(对)/);
|
||||
h.context.__draft={customer:'合成客户',salesperson:'合成麦麦',date:D,fee_items:[],discount:'0',lines:[ordinaryLine()]};assert.doesNotThrow(()=>h.run('validateIssueDraft(__draft)'));
|
||||
h.context.__draft={customer:'合成客户',internal_note:'测试内部备注',salesperson:'合成麦麦',date:D,fee_items:[],discount:'0',lines:[ordinaryLine()]};assert.doesNotThrow(()=>h.run('validateIssueDraft(__draft)'));
|
||||
for(const value of ['',0,-1,'1.5','1e2','1000000001']){h.context.__draft.lines[0].stockCount=value;assert.throws(()=>h.run('validateIssueDraft(__draft)'),/出库数量(对).*整数/);}
|
||||
h.context.__draft.lines[0].stockCount=null;h.run(`orderEditEntry={originalInputs:{lines:[{pocket:'${PAIR}',quantity:'2.000',stockCount:null}]}};`);h.nodes.set('#order-form',{dataset:{orderEdit:'true'}});assert.doesNotThrow(()=>h.run('validateIssueDraft(__draft)'));assert.equal(h.run('__draft.lines[0].stockCount'),null);
|
||||
h.context.__draft.lines[0].quantity='3';assert.throws(()=>h.run('validateIssueDraft(__draft)'),/出库数量(对)/);
|
||||
|
||||
Reference in new issue
Block a user