实时盘点列表完成
parent
bc7ce6489e
commit
28af199b79
@ -0,0 +1,71 @@
|
|||||||
|
package com.rehome.zhdcoa.adapter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.rehome.zhdcoa.base.BaseViewBindingAdapter
|
||||||
|
import com.rehome.zhdcoa.bean.RealTimeKcpdHistoryItem
|
||||||
|
import com.rehome.zhdcoa.databinding.AdapterRealTimeKcpdHistoryBinding
|
||||||
|
|
||||||
|
class RealTimeKcpdHistoryAdapter(
|
||||||
|
var context: Context,
|
||||||
|
var data: MutableList<RealTimeKcpdHistoryItem>
|
||||||
|
) : BaseViewBindingAdapter<AdapterRealTimeKcpdHistoryBinding>(context) {
|
||||||
|
override fun getCount(): Int {
|
||||||
|
return data.count()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItem(position: Int): Any {
|
||||||
|
return data[position]
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemId(position: Int): Long {
|
||||||
|
return position.toLong()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getBinding(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
parent: ViewGroup?
|
||||||
|
) = AdapterRealTimeKcpdHistoryBinding.inflate(inflater, parent, false)
|
||||||
|
|
||||||
|
override fun handleData(position: Int, binding: AdapterRealTimeKcpdHistoryBinding) {
|
||||||
|
val item: RealTimeKcpdHistoryItem = data[position]
|
||||||
|
var index:Int = position+1
|
||||||
|
binding.tvXh.text = "$index"
|
||||||
|
binding.tvHjh.text = item.BINNUM
|
||||||
|
binding.tvWzbm.text = item.ITEMNUM
|
||||||
|
binding.tvMs.text = item.DESCRIPTION
|
||||||
|
binding.tvDw.text = item.ORDERUNIT
|
||||||
|
binding.tvZmsl.text = item.CURBAL.toString()
|
||||||
|
binding.tvPdsl.text = item.PDSL.toString()
|
||||||
|
binding.tvYksl.text = item.YKSL.toString()
|
||||||
|
binding.tvXgzy.text = item.IN6
|
||||||
|
binding.tvDj.text = item.LASTCOST
|
||||||
|
binding.tvZj.text = item.ZJ
|
||||||
|
binding.tvBz.text = item.BZ
|
||||||
|
|
||||||
|
val color: Int = if (item.BZ == "数量少") {
|
||||||
|
Color.BLUE
|
||||||
|
} else if (item.BZ == "数量多") {
|
||||||
|
Color.RED
|
||||||
|
} else if (item.BZ == "配件") {
|
||||||
|
Color.YELLOW
|
||||||
|
} else {
|
||||||
|
//正常
|
||||||
|
Color.GRAY
|
||||||
|
}
|
||||||
|
binding.tvXh.setTextColor(color)
|
||||||
|
binding.tvHjh.setTextColor(color)
|
||||||
|
binding.tvWzbm.setTextColor(color)
|
||||||
|
binding.tvMs.setTextColor(color)
|
||||||
|
binding.tvDw.setTextColor(color)
|
||||||
|
binding.tvZmsl.setTextColor(color)
|
||||||
|
binding.tvPdsl.setTextColor(color)
|
||||||
|
binding.tvYksl.setTextColor(color)
|
||||||
|
binding.tvXgzy.setTextColor(color)
|
||||||
|
binding.tvDj.setTextColor(color)
|
||||||
|
binding.tvZj.setTextColor(color)
|
||||||
|
binding.tvBz.setTextColor(color)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.rehome.zhdcoa.bean
|
||||||
|
|
||||||
|
data class RealTimeKcpdHistoryItem(
|
||||||
|
//物资编码
|
||||||
|
var ITEMNUM: String = "",
|
||||||
|
//货架号
|
||||||
|
var BINNUM: String = "",
|
||||||
|
//批次号
|
||||||
|
var LOTNUM: String = "",
|
||||||
|
//账面数量
|
||||||
|
var CURBAL: Int = 0,
|
||||||
|
//相关专业
|
||||||
|
var IN6: String = "",
|
||||||
|
//物资描述
|
||||||
|
var DESCRIPTION: String = "",
|
||||||
|
//单价
|
||||||
|
var LASTCOST: String = "",
|
||||||
|
//盘点数量
|
||||||
|
var PDSL: Int = 0,
|
||||||
|
//盈亏数量
|
||||||
|
var YKSL: Int = 0,
|
||||||
|
//盘点时间
|
||||||
|
var PDSJ: String = "",
|
||||||
|
//盘点人姓名
|
||||||
|
var PDRNAME: String = "",
|
||||||
|
//备注
|
||||||
|
var BZ: String = "",
|
||||||
|
//单位
|
||||||
|
var ORDERUNIT: String = "",
|
||||||
|
//货架专业属性
|
||||||
|
var STOCKTYPE: String? = null,
|
||||||
|
//总价
|
||||||
|
var ZJ: String = "",
|
||||||
|
)
|
||||||
@ -0,0 +1,289 @@
|
|||||||
|
package com.rehome.zhdcoa.ui.activity
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.ArrayAdapter
|
||||||
|
import androidx.activity.result.ActivityResultLauncher
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
|
import com.rehome.zhdcoa.App
|
||||||
|
import com.rehome.zhdcoa.Contans
|
||||||
|
import com.rehome.zhdcoa.R
|
||||||
|
import com.rehome.zhdcoa.adapter.RealTimeKcpdHistoryAdapter
|
||||||
|
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
|
||||||
|
import com.rehome.zhdcoa.bean.OneLevelShelvesBean
|
||||||
|
import com.rehome.zhdcoa.bean.RealTimeKcpdHistoryBean
|
||||||
|
import com.rehome.zhdcoa.bean.RealTimeKcpdHistoryItem
|
||||||
|
import com.rehome.zhdcoa.bean.TwoLevelShelvesBean
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityRealTimeKcpdHistoryBinding
|
||||||
|
import com.rehome.zhdcoa.utils.GsonUtils
|
||||||
|
import com.rehome.zhdcoa.utils.HttpListener
|
||||||
|
import com.rehome.zhdcoa.utils.NohttpUtils
|
||||||
|
import com.rehome.zhdcoa.utils.UiUtlis
|
||||||
|
import com.rehome.zhdcoa.weiget.DateTimePickDialog
|
||||||
|
import com.yolanda.nohttp.NoHttp
|
||||||
|
import com.yolanda.nohttp.RequestMethod
|
||||||
|
import com.yolanda.nohttp.rest.Response
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.function.Consumer
|
||||||
|
|
||||||
|
class RealTimeKcpdHistoryActivity : BaseActivityOaToolbarViewBinding<ActivityRealTimeKcpdHistoryBinding>() {
|
||||||
|
|
||||||
|
private var datas: MutableList<RealTimeKcpdHistoryItem> = mutableListOf()
|
||||||
|
|
||||||
|
var spinnerSonList: MutableList<TwoLevelShelvesBean.RowsBean> = mutableListOf()
|
||||||
|
|
||||||
|
private lateinit var adapter: RealTimeKcpdHistoryAdapter
|
||||||
|
private lateinit var manid: String
|
||||||
|
private lateinit var headView: View
|
||||||
|
|
||||||
|
private lateinit var launcherResultMHJ: ActivityResultLauncher<Intent>
|
||||||
|
private lateinit var launcherResultZHJ: ActivityResultLauncher<Intent>
|
||||||
|
|
||||||
|
override fun getViewBinding() = ActivityRealTimeKcpdHistoryBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
override fun getToolbar() = binding.toolbarView.toolbar
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
launcherResultMHJ = createActivityResultLauncherMHJ()
|
||||||
|
launcherResultZHJ = createActivityResultLauncherZHJ()
|
||||||
|
initToolbar("实时盘点记录数据", "") {
|
||||||
|
|
||||||
|
}
|
||||||
|
headView = View.inflate(context, R.layout.pdlb_item, null)
|
||||||
|
headView.findViewById<View>(R.id.head).visibility = View.VISIBLE
|
||||||
|
manid = App.getInstance().userInfo.manid
|
||||||
|
|
||||||
|
binding.btnItqz.setOnClickListener(View.OnClickListener {
|
||||||
|
binding.etXmh.setText("IT")
|
||||||
|
})
|
||||||
|
|
||||||
|
binding.btnQuery.setOnClickListener(View.OnClickListener {
|
||||||
|
getListData()
|
||||||
|
})
|
||||||
|
|
||||||
|
binding.tvSys.setOnClickListener(View.OnClickListener {
|
||||||
|
val intentMHJ = Intent(this, MipcaActivityCapture::class.java)
|
||||||
|
launcherResultMHJ.launch(intentMHJ)
|
||||||
|
})
|
||||||
|
binding.tvSyswz.setOnClickListener(View.OnClickListener {
|
||||||
|
val intentZHJ = Intent(this, MipcaActivityCapture::class.java)
|
||||||
|
launcherResultZHJ.launch(intentZHJ)
|
||||||
|
})
|
||||||
|
|
||||||
|
setAdapter()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
val calendar = Calendar.getInstance()
|
||||||
|
//设置为前3月
|
||||||
|
//calendar.add(Calendar.MONTH, -3)
|
||||||
|
// 将日期设置为该月的第一天
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
|
||||||
|
val calendarEndTime = Calendar.getInstance()
|
||||||
|
//设置为后3月
|
||||||
|
//calendarEndTime.add(Calendar.MONTH, +3)
|
||||||
|
// 将日期设置为该月的最后一天
|
||||||
|
calendarEndTime.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
calendarEndTime.add(Calendar.MONTH, 1);
|
||||||
|
calendarEndTime.add(Calendar.DATE, -1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
val df = SimpleDateFormat("yyyy-MM-dd")
|
||||||
|
binding.tvSt.text = df.format(calendar.time)
|
||||||
|
binding.tvEt.text = df.format(calendarEndTime.time)
|
||||||
|
binding.tvSt.setOnClickListener(View.OnClickListener {
|
||||||
|
val dialog = DateTimePickDialog(
|
||||||
|
context
|
||||||
|
) { outPutDate: String?, outPutDate1: String?, outPutDate2: String? ->
|
||||||
|
binding.tvSt.text = outPutDate1
|
||||||
|
getListData()
|
||||||
|
}
|
||||||
|
dialog.show()
|
||||||
|
})
|
||||||
|
binding.tvEt.setOnClickListener(View.OnClickListener {
|
||||||
|
val dialog = DateTimePickDialog(
|
||||||
|
context
|
||||||
|
) { outPutDate: String?, outPutDate1: String?, outPutDate2: String? ->
|
||||||
|
binding.tvEt.text = outPutDate1
|
||||||
|
getListData()
|
||||||
|
}
|
||||||
|
dialog.show()
|
||||||
|
})
|
||||||
|
getListData()
|
||||||
|
}
|
||||||
|
|
||||||
|
//创建一个ActivityResultLauncher
|
||||||
|
private fun createActivityResultLauncherMHJ(): ActivityResultLauncher<Intent> {
|
||||||
|
//kotlin写法
|
||||||
|
return registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
||||||
|
val resultIntent = it.data
|
||||||
|
val resultCode = it.resultCode
|
||||||
|
if (resultCode == RESULT_OK) {
|
||||||
|
val resultText = resultIntent?.getStringExtra("result") ?: ""
|
||||||
|
binding.etHgtm.setText(resultText)
|
||||||
|
if (!TextUtils.isEmpty(resultText)) {
|
||||||
|
getSpinnerParentData(resultText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//创建一个ActivityResultLauncher
|
||||||
|
private fun createActivityResultLauncherZHJ(): ActivityResultLauncher<Intent> {
|
||||||
|
//kotlin写法
|
||||||
|
return registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
||||||
|
val resultIntent = it.data
|
||||||
|
val resultCode = it.resultCode
|
||||||
|
if (resultCode == RESULT_OK) {
|
||||||
|
val resultText = resultIntent?.getStringExtra("result") ?: ""
|
||||||
|
binding.etXmh.setText(resultText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getListData() {
|
||||||
|
val url: String = Contans.IP + Contans.REAL_TIME_PD_HISTORY_LIST
|
||||||
|
val request = NoHttp.createStringRequest(url, RequestMethod.GET)
|
||||||
|
request.set("TIMES",binding.tvSt.text.toString().trim())
|
||||||
|
request.set("TIMEE",binding.tvEt.text.toString().trim())
|
||||||
|
if(!TextUtils.isEmpty(binding.etHgtm.text)){
|
||||||
|
request.set("BINNUM",binding.etHgtm.text.toString().trim())
|
||||||
|
}else{
|
||||||
|
request.set("BINNUM","")
|
||||||
|
}
|
||||||
|
if(binding.spinnerSon.selectedItem!=null){
|
||||||
|
if(!TextUtils.isEmpty(binding.spinnerSon.selectedItem.toString())){
|
||||||
|
request.set("UDBINNUM",binding.spinnerSon.selectedItem.toString())
|
||||||
|
}else{
|
||||||
|
request.set("UDBINNUM","")
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
request.set("UDBINNUM","")
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(binding.etXmh.text)){
|
||||||
|
request.set("ITEMNUM",binding.etXmh.text.toString().trim())
|
||||||
|
}else{
|
||||||
|
request.set("ITEMNUM","")
|
||||||
|
}
|
||||||
|
|
||||||
|
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String> {
|
||||||
|
override fun onSucceed(what: Int, response: Response<String>?) {
|
||||||
|
if(response!=null){
|
||||||
|
val result= response.get()
|
||||||
|
showLog(result)
|
||||||
|
val bean = GsonUtils.GsonToBean(result, RealTimeKcpdHistoryBean::class.java)
|
||||||
|
if(bean.flag){
|
||||||
|
datas.clear()
|
||||||
|
datas.addAll(bean.Datas)
|
||||||
|
adapter.notifyDataSetChanged()
|
||||||
|
showLog("size:"+bean.Datas.count())
|
||||||
|
}else{
|
||||||
|
datas.clear()
|
||||||
|
adapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailed(what: Int, response: Response<String>?) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}, true, true, "正在加载数据....")
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setAdapter() {
|
||||||
|
adapter = RealTimeKcpdHistoryAdapter(context, datas)
|
||||||
|
binding.lv.addHeaderView(headView, null, false)
|
||||||
|
binding.lv.adapter = adapter
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取母货架
|
||||||
|
private fun getSpinnerParentData(qccode: String) {
|
||||||
|
val url = Contans.IP + Contans.GET_SPINNER_PARENT_UDBIN_URL
|
||||||
|
val request = NoHttp.createStringRequest(url, RequestMethod.GET)
|
||||||
|
request.add("QCCODE", qccode)
|
||||||
|
NohttpUtils.getInstance()
|
||||||
|
.add<String>(this, 2, request, object : HttpListener<String?> {
|
||||||
|
|
||||||
|
override fun onSucceed(what: Int, response: Response<String?>?) {
|
||||||
|
if (what == 2) {
|
||||||
|
val result = response?.get()
|
||||||
|
showLog(result?:"")
|
||||||
|
val oneLevelShelvesBean = GsonUtils.GsonToBean(
|
||||||
|
result,
|
||||||
|
OneLevelShelvesBean::class.java
|
||||||
|
)
|
||||||
|
if (oneLevelShelvesBean != null) {
|
||||||
|
if (oneLevelShelvesBean.isFlag && oneLevelShelvesBean.datas != null && oneLevelShelvesBean.datas.size > 0) {
|
||||||
|
val BINNUM = oneLevelShelvesBean.datas[0].binnum
|
||||||
|
getSpinnerSonData(BINNUM)
|
||||||
|
} else {
|
||||||
|
showToast("查询不到子货架号,请确认母货架号是否正确")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailed(what: Int, response: Response<String?>?) {
|
||||||
|
showLog("错误" + what + "==" + response?.get())
|
||||||
|
}
|
||||||
|
}, true, true, UiUtlis.getString(context, R.string.loading))
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取子货架
|
||||||
|
private fun getSpinnerSonData(binnum: String) {
|
||||||
|
val url = Contans.IP + Contans.GET_SPINNER_SON_UDBIN_URL
|
||||||
|
val request = NoHttp.createStringRequest(url, RequestMethod.GET)
|
||||||
|
request.add("BINNUM", binnum)
|
||||||
|
NohttpUtils.getInstance()
|
||||||
|
.add<String>(this, 3, request, object : HttpListener<String?> {
|
||||||
|
|
||||||
|
override fun onSucceed(what: Int, response: Response<String?>?) {
|
||||||
|
if (what == 3) {
|
||||||
|
val result = response?.get()
|
||||||
|
showLog(result?:"")
|
||||||
|
val twoLevelShelvesBean = GsonUtils.GsonToBean(
|
||||||
|
result,
|
||||||
|
TwoLevelShelvesBean::class.java
|
||||||
|
)
|
||||||
|
if (twoLevelShelvesBean != null) {
|
||||||
|
if (twoLevelShelvesBean.isFlag && twoLevelShelvesBean.datas != null && twoLevelShelvesBean.datas.size > 0) {
|
||||||
|
spinnerSonList.clear()
|
||||||
|
spinnerSonList.addAll(twoLevelShelvesBean.datas)
|
||||||
|
|
||||||
|
// 在我们的这个位置的话创建我们的数组
|
||||||
|
//val arrayModel = mu<String>(spinnerSonList.size)
|
||||||
|
val listText = mutableListOf<String>()
|
||||||
|
for (item in spinnerSonList) {
|
||||||
|
listText.add(
|
||||||
|
item.text
|
||||||
|
)
|
||||||
|
}
|
||||||
|
//listText.toArray(arrayModel)
|
||||||
|
val arrayModel = listText.toTypedArray()
|
||||||
|
|
||||||
|
// 然后的话创建一个我们的一个数组适配器并且的话这个数组适配器使我们的字符串类型的
|
||||||
|
val adapter = ArrayAdapter<String?>(
|
||||||
|
context,
|
||||||
|
android.R.layout.simple_spinner_item,
|
||||||
|
arrayModel
|
||||||
|
)
|
||||||
|
// 设置我们的数组下拉时的选项的样式
|
||||||
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||||
|
binding.spinnerSon.adapter = adapter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailed(what: Int, response: Response<String?>?) {
|
||||||
|
showLog("错误" + what + "==" + response?.get())
|
||||||
|
}
|
||||||
|
}, true, true, UiUtlis.getString(context, R.string.loading))
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,176 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".ui.activity.RealTimeKcpdHistoryActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbarView"
|
||||||
|
layout="@layout/layout_base" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="30px">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_st"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5px"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:minHeight="50px"
|
||||||
|
android:text="点击选择开始时间"
|
||||||
|
android:textSize="24px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_et"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5px"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:minHeight="50px"
|
||||||
|
android:text="点击选择结束时间"
|
||||||
|
android:textSize="24px" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/px_10"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_hgtm"
|
||||||
|
style="@style/editTextThemePanDian"
|
||||||
|
android:enabled="false"
|
||||||
|
android:hint="母货架号" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sys"
|
||||||
|
style="@style/smallButtonTheme"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_marginRight="@dimen/px_20"
|
||||||
|
android:text="扫一扫" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="70px"
|
||||||
|
android:background="@drawable/bg_edittext"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="3dp"
|
||||||
|
android:text="子货架号:"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#aaaaaa"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/spinnerSon"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:spinnerMode="dropdown">
|
||||||
|
</Spinner>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/px_10"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_xmh"
|
||||||
|
style="@style/editTextThemePanDian"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:hint="物资编码" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_syswz"
|
||||||
|
style="@style/smallButtonTheme"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_marginRight="@dimen/px_20"
|
||||||
|
android:text="扫一扫" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_itqz"
|
||||||
|
style="@style/button"
|
||||||
|
android:layout_marginLeft="20px"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="IT前缀" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_query"
|
||||||
|
style="@style/button"
|
||||||
|
android:layout_marginLeft="20px"
|
||||||
|
android:layout_marginRight="20px"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="查询" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="15px">
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/lv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:divider="#00000000"
|
||||||
|
android:dividerHeight="0px"/>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -0,0 +1,189 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="100px"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/head"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#524658"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="96px">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_xh"
|
||||||
|
android:layout_width="100px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="序号" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hjh"
|
||||||
|
android:layout_width="160px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="货架号" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_wzbm"
|
||||||
|
android:layout_width="150px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="物资编码" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_ms"
|
||||||
|
android:layout_width="400px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="物资描述" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_dw"
|
||||||
|
android:layout_width="100px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="单位" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_zmsl"
|
||||||
|
android:layout_width="150px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="账面数量" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_pdsl"
|
||||||
|
android:layout_width="150px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="盘点数量" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_yksl"
|
||||||
|
android:layout_width="150px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="盈亏数量" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_xgzy"
|
||||||
|
android:layout_width="150px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="相关专业" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_dj"
|
||||||
|
android:layout_width="180px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="单价" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_zj"
|
||||||
|
android:layout_width="180px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="总价" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bz"
|
||||||
|
android:layout_width="120px"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5px"
|
||||||
|
android:text="备注" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#524658" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#524658" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
Loading…
Reference in New Issue