This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a PDA (Personal Digital Assistant) web application for LanBao MES (Manufacturing Execution System). It's built as an ASP.NET Web Forms application targeting .NET Framework 4.8, designed for mobile/PDA devices used in manufacturing environments.
The application handles various manufacturing operations including:
- Material receiving/shipping (收货/发货)
- Production reporting (生产报工)
- Quality control inspections (质量检验)
- Barcode scanning and printing with thermal printers
- Inventory management (在库分料, 库位变更)
- Purchase/sales operations (采购退货, 销售出库)
Mst.master at root - provides common layout, script references, and Vue.js initializationApp_Code/ (e.g., Utility.cs for HTTP requests and authentication)Web.config for compilation settings, Scripts/config.js for API endpoints and global Vue extensions/Scripts/vue.min.js)/scripts/vant/)Scripts/config.js as APIURL (default: http://192.168.0.51:8083/api/)APIURL_PC (default: http://192.168.0.51:8081/)loginGuid (user GUID) and loginAccount (username)Vue.prototype.AxiosHttp(method, url, params, isToken, isPC) for standardized API callsisToken: defaults to true, adds loginGuid as token headerisPC: 0 for PDA API, 1 for PC API/H5/ - Main application pages (.aspx files)
/H5/Js/ - Page-specific JavaScript/Vue.js files
/Scripts/ - Shared JavaScript libraries and config
/Images/ - Static assets and CSS
/App_Code/ - Server-side utility classes
/audio/ - Sound files for success/error feedback
GsPdaApp.sln in Visual Studio 2017 or laterWeb.config (<compilation debug="true" targetFramework="4.8">)Web.config - ASP.NET compilation settings, assembly referencesScripts/config.js - API base URLs (APIURL, APIURL_PC), global Vue.js extensions and prototypesMst.master - Master page template with common scripts (Vue, Vant, Axios, flexible.js)config.js?<%=123611131 %>) to force browser refresh.aspx (markup), .aspx.cs (code-behind), and .js (Vue.js logic)H5/BarCf.aspx + H5/BarCf.aspx.cs + H5/Js/BarCf.jsvm, mounted to #app element in Mst.masterthis.AxiosHttp(method, url, params, isToken, isPC) - never use Axios directlythis.CHECKLOGIN() in mounted() to verify sessionthis.GetLoginInfor() to retrieve loginGuid and loginAccount from cookiesthis.GoBack() which redirects to /H5/Default.aspx with user contextv-focus.noKeyboard directive to focus inputs without triggering mobile keyboard.replace(/[^\d.]/g, '') pattern for decimal inputsvar vm = new Vue({
el: '#app',
data: function() {
return {
isLoading: false,
userInfo: {
loginGuid: '',
loginAccount: '',
},
formData: {
barcode: "",
// other form fields
}
}
},
mounted() {
var that = this;
// Always authenticate first
this.userInfo = {
loginGuid: this.GetLoginInfor().loginGuid,
loginAccount: this.GetLoginInfor().loginAccount,
};
// Load initial data
},
methods: {
// Custom methods
}
});
// Standard API call - response format: { status: 0, message: "", data: { tbBillList: {} } }
that.isLoading = true;
that.AxiosHttp('post', 'endpoint/action', {
param1: value1,
param2: value2
}, false) // isToken=false for login, true for authenticated calls
.then(function(res) {
var json = res;
if (json.status == 0) { // Success - note: status is integer 0, not boolean
// Process data
var data = json.data.tbBillList;
that.$playSound('success');
that.$notify({ type: 'success', message: json.message });
} else {
that.$toast.fail(json.message);
that.$playSound('error');
}
that.isLoading = false;
})
.catch(function(error) {
that.isLoading = false;
that.$toast.fail("网络错误,请重试!");
console.log(error);
});
this.$playSound('success') (plays /audio/YES.wav)this.$playSound('error') (plays /audio/NO.wav)// Typical barcode input field with auto-focus
<van-field
ref="barcode"
v-model="formData.barcode"
label="物料条码"
v-focus.noKeyboard
@keyup.enter.native="getScan"
></van-field>
// After processing, refocus and clear
that.$refs.barcode.focus();
that.formData.barcode = null;
uni.webView.postMessage() to send print commands to native wrapper appVue.prototype.sendPrintMessage in Scripts/config.jstbBillList.printInfo)login/login (POST with userID and userPass)js.cookie libraryloginGuid - User GUID (used as API token)loginAccount - UsernameloginName - User display nameorgId, orgNo, orgName - Organization informationpasswd, rememberPwd - Optional password persistenceCHECKLOGIN() - Redirects to /UserLogin.aspx if not authenticatedGetLoginInfor() - Returns login object or redirects if invalidtoken: loginGuid when isToken=trueuser-scalable=no prevents zoom, optimized for industrial PDA devicesv-focus.noKeyboard directive focuses without triggering soft keyboard.replace(/[^\d.]/g, '') for numeric input sanitizationcomLoading component triggered by isLoading flagGoBack() preserves user context and tab index