/*
================================================================================
档案代号:pmj_file
档案名称:采购核价单身档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table pmj_file
(
pmj01       varchar2(16) NOT NULL,   /*核价单号                               */
pmj02       number(5) NOT NULL,      /*项次                                   */
pmj03       varchar2(40),            /*料件编号                               */
pmj031      varchar2(120),           /*品名                                   */
                                     /*品名  00/04/06 add                     */
pmj032      varchar2(120),           /*规格                                   */
pmj04       varchar2(40),            /*厂商料件                               */
pmj05       varchar2(4),             /*币别                                   */
pmj06       number(20,6),            /*原未税单价                             */
pmj07       number(20,6),            /*新未税单价                             */
pmj08       date,                    /*原核准日                               */
pmj09       date,                    /*新核准日                               */
pmj10       varchar2(6) NOT NULL,    /*作业编号                               */
pmj06t      number(20,6),            /*原含税单价                             */
pmj07t      number(20,6),            /*新含税单价                             */
pmj11       varchar2(10),            /*No Use                                 */
pmj12       varchar2(1) NOT NULL,    /*价格型态                               */
                                     /*1.采购  2. 委外                        */
pmj13       varchar2(10) NOT NULL    /*制程单元编号,为空代表此笔资            */
);

create unique index pmj_pk on pmj_file (pmj01,pmj02,pmj10,pmj12,pmj13);
alter table pmj_file add  constraint pmj_pk primary key  (pmj01,pmj02,pmj10,pmj12,pmj13) enable validate;
grant select on pmj_file to public;
grant index on pmj_file to public;
grant update on pmj_file to public;
grant delete on pmj_file to public;
grant insert on pmj_file to public;