import utils from '@/common/utils.js';
export default {
	commitTask(scanCount,total){
		var isCommit=false;
		if(scanCount==0){
			isCommit = false;
			// this.openScanPopup();
			uni.showToast({
				title: "请先扫描"
			})
			return isCommit;
		}
		if (this.scanCount==total) {
			//提交
			isCommit =true;
			// uni.showToast({
			// 	title: "可以提交"
			// })
		
		} else {
			//判断是否可以部分提交,可以提交,提交数据,
			let receipt_isPartCommit = getApp().globalData.recepit_configList.filter(
				res => {
					if (res.name == 'receipt_isPartCommit') {
						return res;
					}
				});
			if (receipt_isPartCommit[0].value) {
				isCommit = true;
				uni.showToast({
					title: "可以部分提交"
				})
				//提交
			} else {
				isCommit = false;
		
			}
		}
		
		return isCommit;
	}
}