添加订单

$scope.save= function () {
 var ii=$scope.add_id;
 var spm=$scope.add_gname;
 var yhm=$scope.add_uname;
 var dh=$scope.add_tel;
 var jg=$scope.add_price;
 var cs=$scope.add_city;
 if(cs==null||cs==""){
 $scope.e=1;
 }else{
 $scope.e=0;
 }
 if(spm==null||spm==""){
 $scope.a=true;
 }else{
 $scope.a=false;
 }
 if(ii==null||ii==""){
 $scope.ff=true;
 }else{
 $scope.ff=false;
 }
 if (yhm==null||yhm=="") {
 $scope.b=true;
 } else{
 $scope.b=false;
 }
 if (dh==null||dh=="") {
 $scope.c=true;
 } else{
 $scope.c=false;
 }
 if ( jg==null||jg=="") {
 $scope.d=true;
 } else{
 $scope.d=false;
 }
 if(ii==null||ii==""||spm==null||spm==""||yhm==null||yhm==""||dh==null||dh==""||jg==null||jg==""||cs==null||cs==""){
 }else{
 var va = {
 ck:false,
 id:$scope.add_id,
 gname:$scope.add_gname,
 uname:$scope.add_uname,
 tel:$scope.add_tel,
 price:$scope.add_price,
 city:$scope.add_city,
 regdate:new Date(),
 state:'未发货'
 };
 $scope.message.push(va);
 $scope.fa=false;
 }
  
 }





<!--这是添加的隐藏-->
  
 <div ng-show="f" id="add">
 <h3>新增订单</h3>
 <table>
 <tr>
 <td>商品</td>
 <td>
 <input ng-model="add_id" type="text" placeholder="输入id号" />
 <span ng-show="ff">id号不能为空</span>
 </td>
 </tr>
 <tr>
 <td>商品</td>
 <td>
 <input ng-model="add_gname" type="text" placeholder="输入商品名" />
 <span ng-show="a">商品名不能为空</span>
 </td>
 </tr>
 <tr>
 <td>用户名</td>
 <td>
 <input ng-model="add_uname" type="text" placeholder="输入用户名" />
 <span ng-show="b">用户名不能为空</span>
 </td>
 </tr>
 <tr>
 <td>手机号</td>
 <td>
 <input ng-model="add_tel" ng-model="add_uname" type="text" placeholder="输入手机号" />
 <span ng-show="c">手机号不能为空</span>
 </td>
 </tr>
 <tr>
 <td>价格</td>
 <td><input ng-model="add_price" type="text" placeholder="输入价格" />
 <span ng-show="d">价格不能为空</span>
 </td>
 </tr>
 <tr>
 <td>城市</td>
 <td>
 <select ng-model="add_city">
 <option value="">请输入城市</option>
 <option>北京</option>
 <option>上海</option>
 <option>天津</option>
 <option>广州</option>
 <option>河北</option>
 <option>河南</option>
 <option>山东</option>
 </select><span ng-show="e">城市不能为空</span>
 </td>
  
 </tr>
 <tr>
 <td>
 <button ng-click="save()" style="background-color: aquamarine;">保存</button>
 </td>
 </tr>
 </table>
 </div>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值