Commit e3ae33cd by LJM

add

parent a6e57d97
Showing with 11 additions and 4 deletions
......@@ -88,7 +88,7 @@
<view class="list">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="box row bothSide verCenter" v-for="(item,index) in erpOrderSn" :key="index">
<text class="t1">{{index+1}}:{{item}}</text>
<text class="t1">{{index+1}}:{{item.erp_order_sn}}</text>
<text class="select" @click="selecttErpOrderSn(index)">选中</text>
</view>
</scroll-view>
......@@ -346,7 +346,11 @@
* 选中对应的入仓号
*/
selecttErpOrderSn(index) {
this.form.erp_order_sn = this.erpOrderSn[index];
this.form.erp_order_sn = this.erpOrderSn[index].erp_order_sn;
this.index = this.array.indexOf(this.erpOrderSn[index].carrier);
if (this.index != -1) {
this.form.logistics_company = this.erpOrderSn[index].carrier;
}
this.$refs.popup.close();
},
inputChange() {
......
......@@ -61,8 +61,11 @@ const getPlatform = () => {
* 首字母转成大写
*/
const titleCase = (str) => {
str = str.toLowerCase().split(" ").map(function(val) { return val.replace(/( |^)[a-z]/g, function(L) { return L.toUpperCase(); }); }).join(" ");
return str;
// 如果字符串为空,则返回空字符串
if (!str) return '';
// 将字符串的第一个字母转成大写,其余字母保持不变
return str.charAt(0).toUpperCase() + str.slice(1);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment