日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

casio dt-930 条码采集器 盘点软件源程序

發(fā)布時(shí)間:2025/3/20 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 casio dt-930 条码采集器 盘点软件源程序 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

/***********************************************************/
/*?*/
/*?PROGRAM?:?(倉(cāng)庫(kù)盤點(diǎn)軟件)?*/
/*?SYSTEM?:?DT-930?VER1.00?*/
/*?FILENAME?:?APSMP.C?*/
/*?VERSION?:?2.00?*/
/*?AUTHOR?:?*/
/*?DATE?OF?GET?:?2000/07/10?*/
/*?DATE?OF?UPDATE?:?*/
/*?FUNCTION?:?*/
/*?HISTORY?:?*/
/*?*/
/***********************************************************/

#include?"stdio.h?"
#include?"string.h?"
#include?"stdlib.h?"
#include?"itron.h?"
#include?"casio.h?"
#include?"cmndef.h?"
#include?"bios1mac.h"
#include?"math.h"


void?main_menu(void);
void?pd_start(void);


static?long?zs;

/************************************/
/*?TASK?MAIN?PART?*/?
/************************************/

void?ap_start?(?void?)
{
zs=0;?
SysInit(0);?
main_menu();?
}


void?main_menu(void)
{
int?kind;

static?const?UB?*menu[]={
"?盤?點(diǎn)?系?統(tǒng)",
"?------------------?",
"?1.?開(kāi)始盤點(diǎn)",
"?2.?數(shù)據(jù)傳輸",
"?3.?刪除文件",
};

while(1)
{
cls();

Dsp_str(menu[0],1,0);
Dsp_str(menu[1],3,0);
Dsp_str(menu[2],5,0);
Dsp_str(menu[3],7,0);
Dsp_str(menu[4],9,0);

kind=getkey();
switch(kind)
{?case?'1':{
pd_start();
break;
}

case?'2':{
sendfile("pd4.txt");
break;?
}

case?'3':{
cls();
Dsp_str("您確實(shí)要?jiǎng)h除文件碼?",2,0);
Dsp_str("?7-刪除?其它-不刪除?",5,0);
kind=getkey();
if(kind=='7')
{
Dsp_str("再次確認(rèn)是否刪除文件",5,0);
Dsp_str("?3-刪除?其它-不刪除?",8,0);
kind=getkey();
if(kind=='3')?del_file("pd4.txt");
}
break;
}

}

}/*end?while*/

}/*main_menu*/


void?pd_start(void)
{
ER?kind,fs,ret,ercd;
UB?buff[19],barcode[19],bh[7],sl[9],temp[21],temp1[21];
UB?zsp[11],fsp[11];
int?i,j,k,flag;
W?ffff,fjlh,fjfj,eeee,nnnn;


if(Is_file("pd4.txt")==1)
{?
zs=0;?
creat_file("pd4.txt");
}


while(1)

{
cls();

Dsp_str("請(qǐng)您輸入:",1,0);
retu1:?Dsp_str("?編號(hào):[04?]",3,0);
Dsp_str("?數(shù)量:[?]",5,0);

memset(bh,0x00,sizeof(bh));
memset(sl,0x00,sizeof(sl));

lcd_csr_put(3,12);
lcd_csr_set((H)LCD_CSR_UNDER);?
key_clear();
ret=read_str(3,12,2,bh,6);
if(ret==E_KEY_CLR)?return;
space_str(bh,6);
bh[6]=0x00;?


lcd_csr_put(5,10);
lcd_csr_set((H)LCD_CSR_UNDER);?
key_clear();
ret=read_str(5,10,2,sl,8);
if(ret==E_KEY_CLR)?return;
if(strlen(sl)==0)?goto?retu1;
space_str(sl,8);
sl[8]=0x00;?

Dsp_str("確認(rèn)輸入正確嗎?",7,0);
Dsp_str("?0-錯(cuò)誤?ENT-正確?",9,0);

kind=getkey();
if(kind!=ENT)?
{?
cls();
Dsp_str("請(qǐng)重新輸入:",1,0);
goto?retu1;
}

memset(temp,0x00,sizeof(temp));
strcat(temp,"@");
strcat(temp,"0");
strcat(temp,"4");
strcat(temp,bh);
strcat(temp,"#");
strcat(temp,sl);
strcat(temp,"\xd\xa");
temp[20]=0x00;
dat_F_Write("pd4.txt",1,0,temp,20);

fs=0;


while(1)
{

if?(fs!=0?&&?fmod(fs,10)==0)
{
cls();
Dsp_str("?整箱掃描完畢?",1,0);?
Dsp_str("如出錯(cuò)請(qǐng)重掃描前一箱",3,0);
Dsp_str("應(yīng)掃數(shù)量:",5,0);
Dsp_str("本批數(shù)量:",7,0);
Dsp_str("總?數(shù)?量:",9,0);
sprintf(zsp,"%-10d",zs);
sprintf(fsp,"%-10d",fs);
Dsp_str(sl,5,10);
Dsp_str(fsp,7,10);
Dsp_str(zsp,9,10);?
WAIT?
}

if((atoi(sl)-fs)<=0)
{
cls();
Dsp_str("****本批掃描完畢****",2,0);?
Dsp_str("應(yīng)掃數(shù)量:",5,0);
Dsp_str("本批數(shù)量:",7,0);
Dsp_str("總?數(shù)?量:",9,0);
sprintf(zsp,"%-10d",zs);
sprintf(fsp,"%-10d",fs);
Dsp_str(sl,5,10);
Dsp_str(fsp,7,10);
Dsp_str(zsp,9,10);?
WAIT?
break;
}


memset(buff,0x00,sizeof(buff));
memset(barcode,0x00,sizeof(barcode));?

cls();
Dsp_str("請(qǐng)掃描條碼",1,0);
Dsp_str("[?]",3,0);?
Dsp_str("應(yīng)掃數(shù)量:",5,0);
Dsp_str("本批數(shù)量:",7,0);
Dsp_str("總?數(shù)?量:",9,0);
sprintf(zsp,"%-10d",zs);
sprintf(fsp,"%-10d",fs);
Dsp_str(sl,5,10);
Dsp_str(fsp,7,10);
Dsp_str(zsp,9,10);?


lcd_csr_put(3,1);
lcd_csr_set((H)LCD_CSR_UNDER);
memset(buff,0x00,sizeof(buff));

/******?讀入條碼?**************/?
key_clear();
ret=read_str(3,1,0,buff,18);
lcd_csr_set((H)LCD_CSR_OFF);
if(ret==E_KEY_CLR)?return;?/*按CLS?返回*/?
Dsp_str(buff,3,1);?
space_str(buff,18);?
buff[18]=0x00;

memset(barcode,0x00,sizeof(barcode));
memcpy(barcode,buff,18);

if(strcmp(buff,"?")==0)?continue;

memset(temp1,0x00,sizeof(temp1));

ercd=search("pd4.txt",0,20,0,18,barcode,temp1,&fjlh);?

if(ercd!=E_OK)
{

memset(temp,0x00,sizeof(temp));?
strcat(temp,barcode);
strcat(temp,"\xd\xa");
temp[20]=0x00;?
dat_F_Write("pd4.txt",1,0,temp,20);?
zs=zs+1;
fs=fs+1;

}








}/*end?while2*/


}/*end?while1*/


}/*?end?pd_start*/

?

=============================

關(guān)鍵字:casio dt930 程序開(kāi)發(fā) 編譯環(huán)境 開(kāi)發(fā)資料 開(kāi)發(fā)工具 編譯器


轉(zhuǎn)載于:https://www.cnblogs.com/walpff/archive/2008/11/07/1329028.html

總結(jié)

以上是生活随笔為你收集整理的casio dt-930 条码采集器 盘点软件源程序的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。