后台添加自定义表单展示、推送、编辑自定义表单
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
45a991a6f8
commit
7c7b977ab7
@ -27,14 +27,14 @@ class Wpfw_EweiShopV2Model {
|
|||||||
}
|
}
|
||||||
$wpset = pdo_fetch("select * from " . tablename('ewei_shop_good_wpfw') . ' where deleted=0 and goods_id=:goods_id and uniacid=:uniacid Limit 1', array(':goods_id' => $goods_id, ':uniacid' => $_W['uniacid']));
|
$wpset = pdo_fetch("select * from " . tablename('ewei_shop_good_wpfw') . ' where deleted=0 and goods_id=:goods_id and uniacid=:uniacid Limit 1', array(':goods_id' => $goods_id, ':uniacid' => $_W['uniacid']));
|
||||||
if(empty($wpset)){
|
if(empty($wpset)){
|
||||||
return array('wpfw_url'=>$sysset['default_url'],'wpfw_api_key'=>$sysset['api_key']);
|
return array('open_wpfw'=>1,'wpfw_url'=>$sysset['default_url'],'wpfw_api_key'=>$sysset['api_key']);
|
||||||
}else{
|
}else{
|
||||||
|
return array('open_wpfw'=>1,'wpfw_url'=>$wpset['url'],'wpfw_api_key'=>$wpset['api_key']);
|
||||||
if($wpset['wpfw_type'] == 0){
|
if($wpset['wpfw_type'] == 0){
|
||||||
return array('wpfw_url'=>'','wpfw_api_key'=>'');
|
return array('open_wpfw'=>0,'wpfw_url'=>'','wpfw_api_key'=>'');
|
||||||
}else{
|
}else{
|
||||||
return array('wpfw_url'=>$wpset['url'],'wpfw_api_key'=>$wpset['api_key']);
|
return array('open_wpfw'=>$wpset['wpfw_type'],'wpfw_url'=>$wpset['url'],'wpfw_api_key'=>$wpset['api_key']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function good_set_wpset($goods_id,$url,$api_key)
|
public function good_set_wpset($goods_id,$url,$api_key)
|
||||||
@ -73,7 +73,7 @@ class Wpfw_EweiShopV2Model {
|
|||||||
//所有请求参数按照字母先后顺序排
|
//所有请求参数按照字母先后顺序排
|
||||||
ksort($params);
|
ksort($params);
|
||||||
//定义字符串开始所包括的字符串
|
//定义字符串开始所包括的字符串
|
||||||
$stringToBeSigned = $apiKey.'&';
|
$stringToBeSigned = $apiKey;
|
||||||
//把所有参数名和参数值串在一起
|
//把所有参数名和参数值串在一起
|
||||||
foreach ($params as $k => $v)
|
foreach ($params as $k => $v)
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ class Wpfw_EweiShopV2Model {
|
|||||||
//使用MD5进行加密,再转化成大写
|
//使用MD5进行加密,再转化成大写
|
||||||
$sign = strtoupper(md5($stringToBeSigned));
|
$sign = strtoupper(md5($stringToBeSigned));
|
||||||
$params['sign'] = $sign;
|
$params['sign'] = $sign;
|
||||||
var_dump($stringToBeSigned);
|
//var_dump($stringToBeSigned);
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
public function order_post($order_id = null, $order_sn = null)
|
public function order_post($order_id = null, $order_sn = null)
|
||||||
@ -91,25 +91,54 @@ class Wpfw_EweiShopV2Model {
|
|||||||
global $_W;
|
global $_W;
|
||||||
$order_info = $this->get_order_info($order_id,$order_sn);
|
$order_info = $this->get_order_info($order_id,$order_sn);
|
||||||
if($order_info['error'] != 0){
|
if($order_info['error'] != 0){
|
||||||
return array('msg' => "参数错误,未找到订单!", 'error' => 552001);
|
return array('msg' => "参数错误,未找到订单!", 'error' => 552001, 'status' => 552001);
|
||||||
}
|
}
|
||||||
//保存推送结果
|
//保存推送结果
|
||||||
$data = array();
|
$data = array();
|
||||||
//todo:订单的商品
|
//todo:订单的商品
|
||||||
$goods = $order_info['order']['goods'];
|
$goods = $order_info['order']['goods'];
|
||||||
if(empty($goods)){
|
if(empty($goods)){
|
||||||
return array('msg' => "参数错误,未找到订单下的商品!", 'error' => 552001);
|
return array('msg' => "参数错误,未找到订单下的商品!", 'error' => 552001, 'status' => 552001);
|
||||||
}
|
}
|
||||||
|
$set = [];
|
||||||
foreach($goods as $item){
|
foreach($goods as $item){
|
||||||
$data['id'] = $item['id'];
|
$gset = $this->good_get_wpset($item['id']);
|
||||||
$set = $this->good_get_wpset($item['id']);
|
if(empty($set['wpfw_url']) && $gset['open_wpfw'] > 0 && empty($set['wpfw_url'])){
|
||||||
$data['wpfw'] = $set;
|
$set = $gset;
|
||||||
if(!empty($set['wpfw_url'])){
|
}
|
||||||
|
}
|
||||||
|
if(empty($set['wpfw_url']) || $set['open_wpfw'] == 0){
|
||||||
|
return array('msg' => "订单的推送url为空或不支持推送!", 'error' => 552001, 'status' => 552001);
|
||||||
|
}
|
||||||
$info = json_encode($order_info['order']);
|
$info = json_encode($order_info['order']);
|
||||||
$res = ihttp_post($set['wpfw_url'],$this->generateSign(array('order'=>$info),$set['wpfw_api_key']));
|
$to_data = $this->generateSign(array('order'=>$info),$set['wpfw_api_key']);
|
||||||
var_dump($res);
|
$request = ihttp_post($set['wpfw_url'],$to_data);
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($request['errno'])){
|
||||||
|
return array('status' => $request['errno'], 'message' => '推送失败 (errno:'.$request['errno'].' message: ' . $request['message'] . ')');
|
||||||
}
|
}
|
||||||
|
$result = json_decode($request['content'], true);
|
||||||
|
if ($request['code'] != 200) {
|
||||||
|
$result['message'] = $request['headers']['X-Ca-Error-Message'];
|
||||||
|
$result['message'] = $request['message'];
|
||||||
|
return array('status' => 0, 'message' => '推送失败(错误信息: ' . $result['message'] . ')');
|
||||||
|
}else{
|
||||||
|
return array('status' => 1, 'message' => '推送成功');
|
||||||
}
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
public function all_poste_status()
|
||||||
|
{
|
||||||
|
$all_poste_status = array(
|
||||||
|
//'-1' => array('css' => 'default', 'name' => '已关闭'),
|
||||||
|
'0' => array('css' => 'danger', 'name' => '未推送'),
|
||||||
|
'1' => array('css' => 'success', 'name' => '检查成功'),
|
||||||
|
'2' => array('css' => 'warning', 'name' => '检查失败'),
|
||||||
|
'3' => array('css' => 'info', 'name' => '进行中'),
|
||||||
|
'4' => array('css' => 'success', 'name' => '已完成')
|
||||||
|
);
|
||||||
|
return $all_poste_status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取商品详情
|
* 获取商品详情
|
||||||
|
@ -128,8 +128,6 @@ class Detail_EweiShopV2Page extends WebPage {
|
|||||||
|
|
||||||
$r['optionname'] = $this->option_title($r['specs']);
|
$r['optionname'] = $this->option_title($r['specs']);
|
||||||
|
|
||||||
// $option_title = pdo_fetch('SELECT title FROM'.tablename('ewei_shop_goods_spec_item').' WHERE uniacid = '.intval($_W['uniacid']).' AND id = '.intval($r['specs']));
|
|
||||||
// $r['optionname'] = $option_title['title'];
|
|
||||||
}
|
}
|
||||||
if(empty($r['gtitle'])!=true){
|
if(empty($r['gtitle'])!=true){
|
||||||
$r['title']=$r['gtitle'];
|
$r['title']=$r['gtitle'];
|
||||||
@ -234,10 +232,14 @@ class Detail_EweiShopV2Page extends WebPage {
|
|||||||
|
|
||||||
$order_fields = false;
|
$order_fields = false;
|
||||||
$order_data = false;
|
$order_data = false;
|
||||||
|
$g_diyformfields = '';
|
||||||
|
$g_diyformdata = '';
|
||||||
if (p('diyform')) {
|
if (p('diyform')) {
|
||||||
$diyform_set = p('diyform')->getSet();
|
$diyform_set = p('diyform')->getSet();
|
||||||
foreach ($goods as $g) {
|
foreach ($goods as $g) {
|
||||||
if (!empty($g['diyformdata'])) {
|
if (!empty($g['diyformdata'])) {
|
||||||
|
$g_diyformfields = $g['diyformfields'];
|
||||||
|
$g_diyformdata = $g['diyformdata'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,6 +251,10 @@ class Detail_EweiShopV2Page extends WebPage {
|
|||||||
$order_data = iunserializer($item['diyformdata']);
|
$order_data = iunserializer($item['diyformdata']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!empty($g_diyformfields) && !empty($g_diyformdata) && empty($order_data)){
|
||||||
|
$order_fields = iunserializer($g_diyformfields);
|
||||||
|
$order_data = iunserializer($g_diyformdata);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (com('verify')) {
|
if (com('verify')) {
|
||||||
$verifyinfo = iunserializer($item['verifyinfo']);
|
$verifyinfo = iunserializer($item['verifyinfo']);
|
||||||
|
@ -119,15 +119,6 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
if ($searchfield == 'ordersn') {
|
if ($searchfield == 'ordersn') {
|
||||||
$condition .= " AND locate(:keyword,o.ordersn)>0";
|
$condition .= " AND locate(:keyword,o.ordersn)>0";
|
||||||
} else if ($searchfield == 'member') {
|
} else if ($searchfield == 'member') {
|
||||||
// if(empty($_GPC['isprecise']))
|
|
||||||
// {
|
|
||||||
// $condition .= " AND (locate(:keyword,m.realname)>0 or locate(:keyword,m.mobile)>0 or locate(:keyword,m.nickname)>0)";
|
|
||||||
// }else
|
|
||||||
// {
|
|
||||||
// $condition .= " AND (m.realname=:keyword or m.mobile=:keyword or m.nickname=:keyword)";
|
|
||||||
// }
|
|
||||||
// $priceCondition .= " AND (nickname LIKE '%".$_GPC['keyword']."%' OR realname LIKE '%".$_GPC['keyword']."%' OR mobile LIKE '%".$_GPC['keyword']."%') ";
|
|
||||||
// $memberCondition = " AND (nickname LIKE '%".$_GPC['keyword']."%' OR realname LIKE '%".$_GPC['keyword']."%' OR mobile LIKE '%".$_GPC['keyword']."%') ";
|
|
||||||
} elseif ($searchfield == "member_group") {
|
} elseif ($searchfield == "member_group") {
|
||||||
$group = pdo_fetchall("select id from " . tablename("ewei_shop_member_group") . " where uniacid = :uniacid AND groupname like :group_name", array(":uniacid" => $_W["uniacid"], ":group_name" => "%" . $_GPC["keyword"] . "%"));
|
$group = pdo_fetchall("select id from " . tablename("ewei_shop_member_group") . " where uniacid = :uniacid AND groupname like :group_name", array(":uniacid" => $_W["uniacid"], ":group_name" => "%" . $_GPC["keyword"] . "%"));
|
||||||
if (!empty($group)) {
|
if (!empty($group)) {
|
||||||
@ -163,7 +154,7 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
} else if ($searchfield == 'expresssn') {
|
} else if ($searchfield == 'expresssn') {
|
||||||
$condition .= " AND locate(:keyword,o.expresssn)>0";
|
$condition .= " AND locate(:keyword,o.expresssn)>0";
|
||||||
} else if ($searchfield == 'saler') {
|
} else if ($searchfield == 'saler') {
|
||||||
// $condition .= " AND (locate(:keyword,m.realname)>0 or locate(:keyword,m.mobile)>0 or locate(:keyword,m.nickname)>0 or locate(:keyword,s.salername)>0 )";
|
|
||||||
if(p('merch')){
|
if(p('merch')){
|
||||||
$condition .= " AND (locate(:keyword,sm.realname)>0 or locate(:keyword,sm.mobile)>0 or locate(:keyword,sm.nickname)>0 or locate(:keyword,s.salername)>0 or locate(:keyword,ms.salername)>0 )";
|
$condition .= " AND (locate(:keyword,sm.realname)>0 or locate(:keyword,sm.mobile)>0 or locate(:keyword,sm.nickname)>0 or locate(:keyword,s.salername)>0 or locate(:keyword,ms.salername)>0 )";
|
||||||
}else{
|
}else{
|
||||||
@ -451,6 +442,7 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
'2' => array('css' => 'warning', 'name' => '待收货'),
|
'2' => array('css' => 'warning', 'name' => '待收货'),
|
||||||
'3' => array('css' => 'success', 'name' => '已完成')
|
'3' => array('css' => 'success', 'name' => '已完成')
|
||||||
);
|
);
|
||||||
|
$postestatus = m('wpfw')->all_poste_status();
|
||||||
$is_merch = array();
|
$is_merch = array();
|
||||||
|
|
||||||
$is_merchname = 0;
|
$is_merchname = 0;
|
||||||
@ -613,6 +605,7 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
$goods = '';
|
$goods = '';
|
||||||
$is_singlerefund=false;//是否正在维权
|
$is_singlerefund=false;//是否正在维权
|
||||||
$is_singlerefund_success = false;
|
$is_singlerefund_success = false;
|
||||||
|
$wpfw=[];//todo:网培服务
|
||||||
foreach ($order_goods as &$og) {
|
foreach ($order_goods as &$og) {
|
||||||
if(!$is_singlerefund && ($og['single_refundstate']==1 ||$og['single_refundstate']==2)){
|
if(!$is_singlerefund && ($og['single_refundstate']==1 ||$og['single_refundstate']==2)){
|
||||||
$is_singlerefund=true;//存在维权申请,需要处理后再发货
|
$is_singlerefund=true;//存在维权申请,需要处理后再发货
|
||||||
@ -631,7 +624,11 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
$og['thumb'] = $thumb;
|
$og['thumb'] = $thumb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$wpfwset = m('wpfw')->good_get_wpset($og['id']);
|
||||||
|
if(empty($wpfw['wpfw_url'])){
|
||||||
|
$wpfw = $wpfwset;
|
||||||
|
}
|
||||||
|
$value['wpfwset'] = $wpfw;
|
||||||
//读取规格的成本价
|
//读取规格的成本价
|
||||||
if (!empty($og['option_costprice'])) {
|
if (!empty($og['option_costprice'])) {
|
||||||
$og['costprice'] = $og['option_costprice'];
|
$og['costprice'] = $og['option_costprice'];
|
||||||
@ -701,13 +698,11 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
|
|
||||||
$dflag = 1;
|
$dflag = 1;
|
||||||
foreach ($diyformdata_array as $da) {
|
foreach ($diyformdata_array as $da) {
|
||||||
|
|
||||||
if (!empty($diy_title_data)) {
|
if (!empty($diy_title_data)) {
|
||||||
if(array_key_exists($da['key'], $diy_title_data)) {
|
if(array_key_exists($da['key'], $diy_title_data)) {
|
||||||
$dflag = 0;
|
$dflag = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($dflag == 1) {
|
if ($dflag == 1) {
|
||||||
$diy_title_data[$da['key']] = $da['name'];
|
$diy_title_data[$da['key']] = $da['name'];
|
||||||
}
|
}
|
||||||
@ -717,6 +712,11 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
}
|
}
|
||||||
/*零宽度字符​问题导致写入文本异常*/
|
/*零宽度字符​问题导致写入文本异常*/
|
||||||
$og['goods_diyformdata'] = str_replace("\xE2\x80\x8B", "", $diyformdata);
|
$og['goods_diyformdata'] = str_replace("\xE2\x80\x8B", "", $diyformdata);
|
||||||
|
$og['goods_diyformdata_array'] = $diyformdata_array;
|
||||||
|
if(empty($value['goods_diyformdata_array'])){
|
||||||
|
$value['goods_diyformdata_array'] = $diyformdata_array;
|
||||||
|
}
|
||||||
|
//var_dump($diyformdata_array);
|
||||||
}
|
}
|
||||||
if(empty($og['gtitle'])!=true){
|
if(empty($og['gtitle'])!=true){
|
||||||
$og['title']=$og['gtitle'];
|
$og['title']=$og['gtitle'];
|
||||||
@ -733,6 +733,7 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
$value['commission3'] = $commission3;
|
$value['commission3'] = $commission3;
|
||||||
}
|
}
|
||||||
$value['goods'] = set_medias($order_goods, 'thumb');
|
$value['goods'] = set_medias($order_goods, 'thumb');
|
||||||
|
|
||||||
$value['goods_str'] = $goods;
|
$value['goods_str'] = $goods;
|
||||||
|
|
||||||
if (!empty($agentid) && $level > 0) {
|
if (!empty($agentid) && $level > 0) {
|
||||||
@ -1067,20 +1068,6 @@ class List_EweiShopV2Page extends WebPage {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$temp_verify_orderids[] = $orderid;
|
$temp_verify_orderids[] = $orderid;
|
||||||
// 否则去表里查
|
|
||||||
// $sql = 'select s.storename,sa.salername,sa.id,m.nickname from ' . tablename('ewei_shop_verifygoods_log') . ' vgl
|
|
||||||
// left join ' . tablename('ewei_shop_verifygoods') . ' vg on vg.id = vgl.verifygoodsid
|
|
||||||
// left join ' . tablename('ewei_shop_store') . ' s on s.id = vgl.storeid
|
|
||||||
// left join ' . tablename('ewei_shop_saler') . ' sa on sa.id = vgl.salerid
|
|
||||||
// left join ' . tablename('ewei_shop_order_goods') . ' og on vg.ordergoodsid = og.id
|
|
||||||
// left join ' . tablename('ewei_shop_member') . ' m on m.openid = sa.openid
|
|
||||||
// where og.orderid='.$orderid.' ORDER BY vgl.verifydate DESC ';
|
|
||||||
//
|
|
||||||
// $res = pdo_fetchall($sql);
|
|
||||||
// foreach ($res as $k => $v) {
|
|
||||||
// $row['salerinfo'] .= "[" . $v['id'] . "]" . $v['salername'] . "(".$v['nickname'].")";
|
|
||||||
// $row['storeinfo'] .= '[' .$v['storename'] .']';
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
* http://www.we7shop.cn
|
* http://www.we7shop.cn
|
||||||
* TEL: 4000097827/18661772381/15865546761
|
* TEL: 4000097827/18661772381/15865546761
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use function Qiniu\json_decode;
|
||||||
|
|
||||||
if (!defined('IN_IA')) {
|
if (!defined('IN_IA')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
@ -36,7 +39,7 @@ class Op_EweiShopV2Page extends WebPage {
|
|||||||
$this->message('未找到订单!', '', 'error');
|
$this->message('未找到订单!', '', 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
$order_goods = pdo_fetchall('select single_refundstate from ' . tablename('ewei_shop_order_goods'). ' where orderid=:orderid and uniacid=:uniacid', array(':uniacid' => $_W['uniacid'], ':orderid' => $item['id']));
|
$order_goods = pdo_fetchall('select id,single_refundstate,diyformfields,diyformdata from ' . tablename('ewei_shop_order_goods'). ' where orderid=:orderid and uniacid=:uniacid', array(':uniacid' => $_W['uniacid'], ':orderid' => $item['id']));
|
||||||
|
|
||||||
$is_singlerefund=false;//是否正在维权
|
$is_singlerefund=false;//是否正在维权
|
||||||
foreach ($order_goods as $og){
|
foreach ($order_goods as $og){
|
||||||
@ -46,7 +49,7 @@ class Op_EweiShopV2Page extends WebPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return array('id' => $id, 'item' => $item,'is_singlerefund'=>$is_singlerefund);
|
return array('id' => $id, 'item' => $item,'is_singlerefund'=>$is_singlerefund,'order_goods'=>$order_goods[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeprice() {
|
function changeprice() {
|
||||||
@ -918,7 +921,43 @@ class Op_EweiShopV2Page extends WebPage {
|
|||||||
}
|
}
|
||||||
include $this->template();
|
include $this->template();
|
||||||
}
|
}
|
||||||
|
function poste() {
|
||||||
|
global $_W, $_GPC;
|
||||||
|
$opdata = $this->opData();
|
||||||
|
extract($opdata);
|
||||||
|
|
||||||
|
$res = m('wpfw')->order_post($id);
|
||||||
|
//var_dump($res);
|
||||||
|
//show_json(1);
|
||||||
|
die(json_encode($res));
|
||||||
|
//die(json_decode($ret));
|
||||||
|
}
|
||||||
|
function diyformdata() {
|
||||||
|
global $_W, $_GPC;
|
||||||
|
$opdata = $this->opData();
|
||||||
|
extract($opdata);
|
||||||
|
|
||||||
|
$diyformdata_array=[];
|
||||||
|
if (p('diyform') && !empty($order_goods['diyformfields']) && !empty($order_goods['diyformdata'])) {
|
||||||
|
$f_data = p('diyform')->getDiyformData(iunserializer($order_goods['diyformdata']), iunserializer($order_goods['diyformfields']), $this->member);
|
||||||
|
}
|
||||||
|
//自定义
|
||||||
|
$diyformid = 0;
|
||||||
|
$fields = iunserializer($order_goods['diyformfields']);
|
||||||
|
//$field_data_name = 'gdiy';
|
||||||
|
if ($_W['ispost']) {
|
||||||
|
$formdata = p('diyform')->getPostDatas($fields);
|
||||||
|
if (is_error($formdata)) {
|
||||||
|
show_json(0, $formdata['message']);
|
||||||
|
}
|
||||||
|
$diydata['diyformfields'] = iserializer($fields);
|
||||||
|
$diydata['diyformdata'] = iserializer($formdata);
|
||||||
|
pdo_update('ewei_shop_order_goods', $diydata, array('id' => $order_goods['id']));
|
||||||
|
//pdo_debug();
|
||||||
|
show_json(1);
|
||||||
|
}
|
||||||
|
include $this->template();
|
||||||
|
}
|
||||||
function changeexpress() {
|
function changeexpress() {
|
||||||
global $_W, $_GPC;
|
global $_W, $_GPC;
|
||||||
$opdata = $this->opData();
|
$opdata = $this->opData();
|
||||||
|
@ -381,6 +381,7 @@ class Index_EweiShopV2Page extends AppMobilePage
|
|||||||
$trade['freightText'] = '含运费';
|
$trade['freightText'] = '含运费';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$wpfwset = m("common")->getSysset("wpfwset");
|
||||||
//秒杀风格色
|
//秒杀风格色
|
||||||
$seckill_color='';
|
$seckill_color='';
|
||||||
if($order['seckilldiscountprice']>0){
|
if($order['seckilldiscountprice']>0){
|
||||||
@ -507,6 +508,12 @@ class Index_EweiShopV2Page extends AppMobilePage
|
|||||||
if($g['type']==1 && $entity = true){
|
if($g['type']==1 && $entity = true){
|
||||||
$entity = true;
|
$entity = true;
|
||||||
}
|
}
|
||||||
|
if($wpfwset['open_wpfw'] == 1){
|
||||||
|
$g_wp = m('wpfw')->good_get_wpset($g['id']);
|
||||||
|
if($g_wp['open_wpfw'] > 0){
|
||||||
|
$wpfwset = $g_wp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$diyform_flag = 0;
|
$diyform_flag = 0;
|
||||||
@ -1089,6 +1096,7 @@ class Index_EweiShopV2Page extends AppMobilePage
|
|||||||
$result['use_membercard'] = $use_membercard;
|
$result['use_membercard'] = $use_membercard;
|
||||||
$result['membercard_info'] = $membercard_info;
|
$result['membercard_info'] = $membercard_info;
|
||||||
|
|
||||||
|
$result['wpfwset'] = $wpfwset;
|
||||||
return app_json($result);
|
return app_json($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,62 @@ class Pay_EweiShopV2Page extends AppMobilePage
|
|||||||
} else if ($order['status'] >= 1) {
|
} else if ($order['status'] >= 1) {
|
||||||
return app_error(AppError::$OrderAlreadyPay);
|
return app_error(AppError::$OrderAlreadyPay);
|
||||||
}
|
}
|
||||||
|
//todo:小程序支付时处理自定义表单
|
||||||
|
$wpfwset = m("common")->getSysset("wpfwset");
|
||||||
|
$param = array(':orderid'=>$order['id'],':uniacid'=>$_W['uniacid']);
|
||||||
|
$goods = pdo_fetchall("select g.id from " . tablename('ewei_shop_order_goods') . " og "." left join " . tablename('ewei_shop_goods') . " g on g.id=og.goodsid " . " where og.orderid=:orderid and og.uniacid=:uniacid ", $param);
|
||||||
|
if (!empty($goods)) {
|
||||||
|
foreach ($goods as $g) {
|
||||||
|
if($wpfwset['open_wpfw'] == 1){
|
||||||
|
$g_wp = m('wpfw')->good_get_wpset($g['id']);
|
||||||
|
if($g_wp['open_wpfw'] > 0){
|
||||||
|
$wpfwset = $g_wp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$order_fields = false;
|
||||||
|
$order_data = false;
|
||||||
|
$g_diyformfields = '';
|
||||||
|
$g_diyformdata = '';
|
||||||
|
if (p('diyform')) {
|
||||||
|
$diyformfields = "";
|
||||||
|
$showdiyform = false;
|
||||||
|
if (p('diyform')) {
|
||||||
|
$diyformfields = ",o.diyformfields,o.diyformdata";
|
||||||
|
}
|
||||||
|
$goods = pdo_fetchall("SELECT o.fullbackid,g.*{$diyformfields} FROM " . tablename ('ewei_shop_order_goods') .
|
||||||
|
" o left join " . tablename('ewei_shop_goods') . " g on o.goodsid=g.id "
|
||||||
|
. " WHERE o.orderid=:orderid and o.uniacid=:uniacid", array(':orderid' => $order['id'], ':uniacid' => $_W['uniacid']));
|
||||||
|
$diyform_set = p('diyform')->getSet();
|
||||||
|
foreach ($goods as $g) {
|
||||||
|
if (!empty($g['diyformdata'])) {
|
||||||
|
$g_diyformfields = $g['diyformfields'];
|
||||||
|
$g_diyformdata = $g['diyformdata'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//订单统一模板
|
||||||
|
if (!empty($order['diyformid'])) {
|
||||||
|
$orderdiyformid = $order['diyformid'];
|
||||||
|
if (!empty($orderdiyformid)) {
|
||||||
|
$order_fields = iunserializer($order['diyformfields']);
|
||||||
|
$order_data = iunserializer($order['diyformdata']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!empty($g_diyformfields) && !empty($g_diyformdata) && empty($order_data)){
|
||||||
|
$order_fields = iunserializer($g_diyformfields);
|
||||||
|
$order_data = iunserializer($g_diyformdata);
|
||||||
|
}
|
||||||
|
if(!empty($order_fields)){
|
||||||
|
foreach ($order_fields as $key => $item) {
|
||||||
|
$order_fields[$key]['diy_type']=$key;
|
||||||
|
if($item['data_type']==5 && !empty($order_data[$key]) && is_array($order_data[$key])){
|
||||||
|
$order_data[$key] = set_medias($order_data[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$log = pdo_fetch("SELECT * FROM " . tablename("core_paylog") . " WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid limit 1", array(":uniacid" => $uniacid, ":module" => EWEI_SHOP_V2_MODULE_NAME, ":tid" => $order["ordersn"]));
|
$log = pdo_fetch("SELECT * FROM " . tablename("core_paylog") . " WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid limit 1", array(":uniacid" => $uniacid, ":module" => EWEI_SHOP_V2_MODULE_NAME, ":tid" => $order["ordersn"]));
|
||||||
if (empty($log)) {
|
if (empty($log)) {
|
||||||
$log = pdo_fetch("SELECT * FROM " . tablename("core_paylog") . " WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid limit 1", array(":uniacid" => $uniacid, ":module" => EWEI_SHOP_V2_MODULE_NAME, ":tid" => $order["ordersn"] . "_wxapp"));
|
$log = pdo_fetch("SELECT * FROM " . tablename("core_paylog") . " WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid limit 1", array(":uniacid" => $uniacid, ":module" => EWEI_SHOP_V2_MODULE_NAME, ":tid" => $order["ordersn"] . "_wxapp"));
|
||||||
@ -173,7 +229,15 @@ class Pay_EweiShopV2Page extends AppMobilePage
|
|||||||
'ordersn' => $order['ordersn'],
|
'ordersn' => $order['ordersn'],
|
||||||
'price' => $order['price'],
|
'price' => $order['price'],
|
||||||
'title' => $set['shop']['name'] . "订单",
|
'title' => $set['shop']['name'] . "订单",
|
||||||
|
'diydata' => $order_data,
|
||||||
|
'diyfields' => $order_fields,
|
||||||
),
|
),
|
||||||
|
'diyform' => array(
|
||||||
|
'fields'=>$order_fields,
|
||||||
|
'diyformfields'=>$order_fields,
|
||||||
|
'diyformdata'=>$order_data,
|
||||||
|
),
|
||||||
|
'wpfw'=>$wpfwset,
|
||||||
'credit' => $credit,
|
'credit' => $credit,
|
||||||
'wechat' => $wechat,
|
'wechat' => $wechat,
|
||||||
'alipay' => $alipay,
|
'alipay' => $alipay,
|
||||||
|
@ -593,6 +593,9 @@ class DiyformModel extends PluginModel
|
|||||||
} else {
|
} else {
|
||||||
if ($value['data_type'] == 3) {
|
if ($value['data_type'] == 3) {
|
||||||
if (is_array($_GPC[$field_data_name . $key])) {
|
if (is_array($_GPC[$field_data_name . $key])) {
|
||||||
|
if(!$tp_value){
|
||||||
|
$tp_value = [];
|
||||||
|
}
|
||||||
foreach ($_GPC[$field_data_name . $key] as $k1 => $v1) {
|
foreach ($_GPC[$field_data_name . $key] as $k1 => $v1) {
|
||||||
$tp_value[] = trim($v1);
|
$tp_value[] = trim($v1);
|
||||||
}
|
}
|
||||||
|
111
plugin/diyform/template/web_v3/diyform_inputfix.html
Normal file
111
plugin/diyform/template/web_v3/diyform_inputfix.html
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
|
||||||
|
<script type="text/javascript" src="../addons/{EWEI_SHOP_V2_MODULE_NAME}/static/js/dist/area/cascade.js"></script>
|
||||||
|
|
||||||
|
{php $field_data_name = empty($field_data_name)?'field_data':$field_data_name}
|
||||||
|
{php $i=0;}
|
||||||
|
{loop $fields $k1 $v1}
|
||||||
|
<div class="form-group">
|
||||||
|
{if $v1['data_type'] == 13}
|
||||||
|
<label class="col-sm-10 control-label" style="text-align: center;">{$v1['tp_name']}</label>
|
||||||
|
|
||||||
|
{else}
|
||||||
|
<label class="col-sm-2 control-label {if $v1['tp_must'] == 1}must{/if}">{$v1['tp_name']}</label>
|
||||||
|
<div class="col-sm-9 col-xs-12">
|
||||||
|
|
||||||
|
{if $v1['data_type'] == 0}
|
||||||
|
<input type="text" class='form-control'
|
||||||
|
name='{$field_data_name}{php echo $i}'
|
||||||
|
placeholder="{if !empty($v1['placeholder'])}{$v1['placeholder']}{else}请输入{$v1['tp_name']}{/if}"
|
||||||
|
value="{php echo $f_data[$k1]}"
|
||||||
|
{if $v1['tp_must'] == 1}data-rule-required='true'{/if}
|
||||||
|
/>
|
||||||
|
{elseif $v1['data_type']==1}
|
||||||
|
|
||||||
|
<textarea class="form-control" id='{$field_data_name}{php echo $i}' name='{$field_data_name}{php echo $i}'
|
||||||
|
placeholder="{if !empty($v1['placeholder'])}{$v1['placeholder']}{else}请输入{$v1['tp_name']}{/if}"
|
||||||
|
{if $v1['tp_must'] == 1}data-rule-required='true'{/if}
|
||||||
|
>{php echo $f_data[$k1]}</textarea>
|
||||||
|
|
||||||
|
{elseif $v1['data_type']==2}
|
||||||
|
|
||||||
|
<select id='{$field_data_name}{php echo $i}' name='{$field_data_name}{php echo $i}' class="form-control" {if $v1['tp_must'] == 1}data-rule-required='true'{/if}>
|
||||||
|
<option value=''>请选择{$v1['tp_name']}</option>
|
||||||
|
{loop $v1['tp_text'] $k2 $v2}
|
||||||
|
<option value="{php echo $v2}" {if $f_data[$k1] == $v2}selected{/if}>{php echo $v2}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
{elseif $v1['data_type']==3}
|
||||||
|
{loop $v1['tp_text'] $k2 $v2}
|
||||||
|
<label class="checkbox-inline">
|
||||||
|
<input type="checkbox" name='{$field_data_name}{php echo $i}[]' {if is_array($f_data[$k1]) && in_array($v2, $f_data[$k1])}checked{/if} value="{php echo $v2}"/> {php echo $v2}
|
||||||
|
</label>
|
||||||
|
{/loop}
|
||||||
|
{elseif $v1['data_type']==5}
|
||||||
|
{if $_W['plugin']=='merch' && !empty($_W['merchid'])}
|
||||||
|
{php echo tpl_form_field_multi_image2($field_data_name.$i, $f_data[$k1],array('dest_dir'=>'merch/'.$_W['merchid']))}
|
||||||
|
{else}
|
||||||
|
{php echo tpl_form_field_multi_image2($field_data_name.$i, $f_data[$k1])}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{elseif $v1['data_type']==6}
|
||||||
|
<input type="tel" class='form-control' id='{$field_data_name}{php echo $i}' name='{$field_data_name}{php echo $i}' placeholder="请输入{$v1['tp_name']}"
|
||||||
|
maxlength="18" value="{php echo $f_data[$k1]}"
|
||||||
|
{if $v1['tp_must'] == 1}data-rule-required='true'{/if}
|
||||||
|
/>
|
||||||
|
{elseif $v1['data_type']==7}
|
||||||
|
{php echo tpl_form_field_date($field_data_name.$i,$f_data[$k1])}
|
||||||
|
|
||||||
|
{elseif $v1['data_type']==8}
|
||||||
|
{php echo tpl_form_field_eweishop_daterange($field_data_name.$i,array('starttime'=>$f_data[$k1][0],'endtime'=>$f_data[$k1][1]))}
|
||||||
|
{else if $v1['data_type'] == 9}
|
||||||
|
|
||||||
|
<span>{php echo $f_data[$k1]['province']!='请选择省份'?$f_data[$k1]['province']:''}-{php echo $f_data[$k1]['city']!='请选择城市'?$f_data[$k1]['city']:''}{if !empty($f_data[$k1]['area'])}-{php echo $f_data[$k1]['area']}{/if}</span>
|
||||||
|
<br/><br/>
|
||||||
|
<select id="sel-provance{$i}" name='{$field_data_name}_province{$i}' onchange="selectCity('{$i}');" class="form-control" style='width:150px;display: inline-block' >
|
||||||
|
<option value="" selected="true">请选择省份</option>
|
||||||
|
</select>
|
||||||
|
<select id="sel-city{$i}" name='{$field_data_name}_city{$i}' onchange="selectcounty(0,0,'{$i}')" class="form-control" style='width:150px;display: inline-block' >
|
||||||
|
<option value="" selected="true">请选择城市</option>
|
||||||
|
</select>
|
||||||
|
<select id="sel-area{$i}" name='{$field_data_name}_area{$i}' class="form-control" style='width:150px;display: inline-block;' >
|
||||||
|
<option value="" selected="true">请选择</option>
|
||||||
|
</select>
|
||||||
|
<script language='javascript'>
|
||||||
|
cascdeInit("{php echo $new_area}","0","{php echo isset($f_data[$k1]['province'])?$f_data[$k1]['province']:''}","{php echo isset($f_data[$k1]['city'])?$f_data[$k1]['city']:''}","{php echo isset($f_data[$k1]['area'])?$f_data[$k1]['area']:''}","",'{$i}');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{elseif $v1['data_type']==11}
|
||||||
|
<input type="text" class='form-control'
|
||||||
|
name='{$field_data_name}{php echo $i}'
|
||||||
|
placeholder="{if !empty($v1['placeholder'])}{$v1['placeholder']}{else}请输入{$v1['tp_name']}{/if}"
|
||||||
|
value="{php echo $f_data[$k1]}"
|
||||||
|
style="width: 130px;"
|
||||||
|
{if $v1['tp_must'] == 1}data-rule-required='true'{/if}
|
||||||
|
/>
|
||||||
|
{elseif $v1['data_type']==12}
|
||||||
|
<input type="text" class='form-control'
|
||||||
|
name='{$field_data_name}{php echo $i}[]'
|
||||||
|
value="{php echo $f_data[$k1][0]}"
|
||||||
|
style="width: 130px;display: inline-block;"
|
||||||
|
{if $v1['tp_must'] == 1}data-rule-required='true'{/if}
|
||||||
|
/>
|
||||||
|
<input type="text" class='form-control'
|
||||||
|
name='{$field_data_name}{php echo $i}[]'
|
||||||
|
value="{php echo $f_data[$k1][1]}"
|
||||||
|
style="width: 130px;display: inline-block;"
|
||||||
|
{if $v1['tp_must'] == 1}data-rule-required='true'{/if}
|
||||||
|
/>
|
||||||
|
{elseif $v1['data_type']==14}
|
||||||
|
{loop $v1['tp_text'] $k2 $v2}
|
||||||
|
<label class="checkbox-inline">
|
||||||
|
<input type="radio" name='{$field_data_name}{php echo $i}[]' {if trim($v2)==trim($f_data[$k1])}checked{/if} value="{php echo $v2}"/> {php echo $v2}
|
||||||
|
</label>
|
||||||
|
{/loop}
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{php $i++}
|
||||||
|
{/loop}
|
71
plugin/diyform/template/web_v3/diyformwp.html
Normal file
71
plugin/diyform/template/web_v3/diyformwp.html
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
{if $value['data_type'] == 0 || $value['data_type'] == 1 || $value['data_type'] == 2 || $value['data_type'] == 6}
|
||||||
|
|
||||||
|
{if !empty($datas[$key])}
|
||||||
|
{php echo str_replace("\n","|",$datas[$key])}
|
||||||
|
{else}
|
||||||
|
未填写
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
{else if $value['data_type'] == 3}
|
||||||
|
{if !empty($datas[$key])}
|
||||||
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
{php echo $v1.'|'}
|
||||||
|
{/loop}
|
||||||
|
{else}
|
||||||
|
未填写
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{else if $value['data_type'] == 5}
|
||||||
|
{if !empty($datas[$key])}
|
||||||
|
{if empty($show_style)}
|
||||||
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
<a target="_blank" href="{php echo tomedia($v1)}"><img style='width:40px;padding:1px;border:1px solid #ccc' src="{php echo tomedia($v1)}"></a>
|
||||||
|
{/loop}
|
||||||
|
{else if $show_style==1}
|
||||||
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
<a target="_blank" href="{php echo tomedia($v1)}"><img style='width:40px;padding:1px;border:1px solid #ccc' src="{php echo tomedia($v1)}"></a><br>
|
||||||
|
{/loop}
|
||||||
|
{else if $show_style==2}
|
||||||
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
<a target='_blank' href='{php echo tomedia($v1)}'><img style='width:40px;;padding:1px;border:1px solid #ccc' src='{php echo tomedia($v1)}'></a>
|
||||||
|
{php break;}
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
<a data-toggle='popover' data-html='true' data-placement='right'
|
||||||
|
data-content="<table style='width:100%;'>
|
||||||
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
<tr>
|
||||||
|
<td style='border:none;text-align:right;padding:5px;'>
|
||||||
|
<a target='_blank' href='{php echo tomedia($v1)}'><img style='width:100px;;padding:1px;border:1px solid #ccc' src='{php echo tomedia($v1)}'></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
|
</table>
|
||||||
|
">查看全部</a>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{else if ($value['data_type'] == 7 || $value['data_type'] == 11 || $value['data_type'] == 14)}
|
||||||
|
|
||||||
|
{php echo !empty($datas[$key])?$datas[$key]:'未填写'}
|
||||||
|
|
||||||
|
{else if ($value['data_type'] == 8 || $value['data_type'] == 12)}
|
||||||
|
|
||||||
|
{if !empty($datas[$key]) && !empty($datas[$key][0]) && !empty($datas[$key][1])}
|
||||||
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
{php echo $v1}
|
||||||
|
{/loop}
|
||||||
|
{else}
|
||||||
|
未填写
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{else if $value['data_type'] == 9}
|
||||||
|
{php echo $datas[$key]['province']!='请选择省份'&&$datas[$key]['province']!=''?$datas[$key]['province']:'未填写'}-{php echo $datas[$key]['city']!='请选择城市'&&$datas[$key]['city']!=''?$datas[$key]['city']:'未填写'}{if !empty($datas[$key]['area'])}-{php echo $datas[$key]['area']}{/if}
|
||||||
|
{else if $value['data_type'] == 10}
|
||||||
|
{php echo $datas[$key]['name1']}
|
||||||
|
|
|
||||||
|
{php echo $datas[$key]['name2']}
|
||||||
|
{/if}
|
||||||
|
|
@ -6,9 +6,14 @@
|
|||||||
<td valign='top' {if $data_type==13}colspan="3"{/if}>
|
<td valign='top' {if $data_type==13}colspan="3"{/if}>
|
||||||
|
|
||||||
{ifp 'diyform.temp.edit|diyform.add'}
|
{ifp 'diyform.temp.edit|diyform.add'}
|
||||||
|
{if $data_type==13}
|
||||||
|
<input type="hidden" value="{php echo $data_type}" class="form-control" name="tp_type[{php echo $kw}]" />
|
||||||
|
<input type="text" value="{if $flag=1 && $data_type==6}身份证{else}{php echo $v1['tp_name']}{/if}" class="form-control tp_name" name="tp_name[{php echo $kw}]" maxlength="900" placeholder='字段名' />
|
||||||
|
{else}
|
||||||
<input type="hidden" value="{php echo $data_type}" class="form-control" name="tp_type[{php echo $kw}]" />
|
<input type="hidden" value="{php echo $data_type}" class="form-control" name="tp_type[{php echo $kw}]" />
|
||||||
|
|
||||||
<input type="text" value="{if $flag=1 && $data_type==6}身份证{else}{php echo $v1['tp_name']}{/if}" class="form-control tp_name" name="tp_name[{php echo $kw}]" maxlength="10" placeholder='字段名' />
|
<input type="text" value="{if $flag=1 && $data_type==6}身份证{else}{php echo $v1['tp_name']}{/if}" class="form-control tp_name" name="tp_name[{php echo $kw}]" maxlength="10" placeholder='字段名' />
|
||||||
|
{/if}
|
||||||
|
|
||||||
{else}
|
{else}
|
||||||
{if $flag=1 && $data_type==6}身份证{else}{php echo $v1['tp_name']}{/if}
|
{if $flag=1 && $data_type==6}身份证{else}{php echo $v1['tp_name']}{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -14,16 +14,19 @@ CREATE TABLE `ims_ewei_shop_good_wpfw` (
|
|||||||
PRIMARY KEY (`id`,`goods_id`) USING BTREE
|
PRIMARY KEY (`id`,`goods_id`) USING BTREE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
pdo_run($sql);
|
pdo_run($sql);
|
||||||
// if(!pdo_fieldexists("ewei_message_mass_sign", "id")) {
|
|
||||||
// pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
|
if(!pdo_fieldexists("ewei_shop_order", "poste")) {
|
||||||
// }
|
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `poste` tinyint(1) NOT NULL DEFAULT '0';");
|
||||||
|
}
|
||||||
|
|
||||||
header('content-type:application/json');
|
header('content-type:application/json');
|
||||||
global $_GPC;
|
global $_GPC;
|
||||||
if($_GPC['sql_key']!='wanshangliaoliao'){
|
if($_GPC['sql_key']!='wanshangliaoliao'){
|
||||||
echo json_encode(array('error' => 1, 'message' => 'sql key出错!'));
|
echo json_encode(array('error' => 1, 'message' => 'sql key出错!'),JSON_UNESCAPED_UNICODE);
|
||||||
die;
|
die;
|
||||||
}else{
|
}else{
|
||||||
echo json_encode(array('error' => 0, 'message' => '数据库更新完成!'));
|
echo json_encode(array('error' => 0, 'message' => '数据库更新完成!'),JSON_UNESCAPED_UNICODE);
|
||||||
}
|
}
|
@ -544,11 +544,12 @@
|
|||||||
<span class="text-default">{php echo str_replace("\n","<br/>", $item['virtual_str'])}</span>
|
<span class="text-default">{php echo str_replace("\n","<br/>", $item['virtual_str'])}</span>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
{if !empty($user['carrier_realname']) }
|
||||||
<li class="text">
|
<li class="text">
|
||||||
<span class="col-sm">联系人:</span>
|
<span class="col-sm">联系人:</span>
|
||||||
<span class="text-default">{$user['carrier_realname']}, {$user['carrier_mobile']}</span>
|
<span class="text-default">{$user['carrier_realname']}, {$user['carrier_mobile']}</span>
|
||||||
</li>
|
</li>
|
||||||
|
{/if}
|
||||||
{else if !$isonlyverifygoods}
|
{else if !$isonlyverifygoods}
|
||||||
<li class="text">
|
<li class="text">
|
||||||
<span class="col-sm">自提码:</span>
|
<span class="col-sm">自提码:</span>
|
||||||
@ -595,32 +596,66 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{if !empty($order_data)}
|
{if !empty($order_data)}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12 order-container-footer">
|
<div class="col-md-12 order-container-footer">
|
||||||
<span class="text" style="width: 85px;display: block"> 统一下单信息:</span>
|
<!-- <span class="text" style="width: 85px;display: block"> 统一下单信息:</span> -->
|
||||||
{php $datas = $order_data}
|
{php $datas = $order_data}
|
||||||
{php $ii = 0;}
|
{php $ii = 0;}
|
||||||
<div style="flex: 1;">
|
<ul>
|
||||||
<table style="width: 100%;">
|
<li class="text">
|
||||||
|
<span class="text" style="display: block"> 下单信息:</span>
|
||||||
|
</li>
|
||||||
{loop $order_fields $key $value}
|
{loop $order_fields $key $value}
|
||||||
|
<!-- {if $value['data_type'] == 13}
|
||||||
<tr {if $ii>1}class="diymore2" style="display:none;"{/if}>
|
<li {if $ii>1}class="text diymore2" style="display:none;"{/if}>
|
||||||
<td style='width:60px'>{php echo $value['tp_name']}:</td>
|
<span class="text" style="display: block">{php echo $value['tp_name']}:</span>
|
||||||
<td style="white-space: normal;">
|
</li>
|
||||||
{template 'diyform/diyform'}
|
{else}
|
||||||
|
<li {if $ii>1}class="text diymore2" style="display:none;"{/if}>
|
||||||
</td>
|
<span class="col-sm">{php echo $value['tp_name']}:</span>
|
||||||
</tr>
|
<span class="text-default">{template 'diyform/diyformwp'}</span>
|
||||||
|
</li>
|
||||||
{if $ii==2}
|
{/if}
|
||||||
<tr class="diymore22">
|
{if $value['data_type'] == 5}
|
||||||
<td colspan="2"><a href="javascript:void(0);" style="padding-right: 100px;" id="showdiymore2">查看完整信息</a></td>
|
{php echo $value['tp_name']}:###
|
||||||
</tr>
|
{loop $datas[$key] $k1 $v1}
|
||||||
|
{php echo tomedia($v1)}###
|
||||||
|
{/loop}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
-->
|
||||||
|
{if $value['data_type'] == 13}
|
||||||
|
<li class="text">
|
||||||
|
<span class="text" style="display: block">{php echo $value['tp_name']}:</span>
|
||||||
|
</li>
|
||||||
|
{else}
|
||||||
|
<li class="text">
|
||||||
|
<span class="col-sm">{php echo $value['tp_name']}:</span>
|
||||||
|
<span class="text-default">{template 'diyform/diyformwp'}</span>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
{php $ii++;}
|
{php $ii++;}
|
||||||
{/loop}
|
{/loop}
|
||||||
</table>
|
<li class="diymore22">
|
||||||
</div>
|
<span class="col-sm" style="display: block">
|
||||||
|
<span id="copydiy_data" style="display: none">
|
||||||
|
{loop $order_fields $key $value}
|
||||||
|
{if $value['data_type'] != 13 && $value['data_type'] != 5}
|
||||||
|
{php echo $value['tp_name']}:{template 'diyform/diyformwp'}###
|
||||||
|
{/if}
|
||||||
|
{/loop}
|
||||||
|
</span>
|
||||||
|
<a href="javascript:;" class="btn btn-warning btn-xs" id="copydiy" data-cid="copydiy_data" title="点击复制详情">复制信息</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@ -1218,6 +1253,18 @@
|
|||||||
$(".diymore2").show();
|
$(".diymore2").show();
|
||||||
$(".diymore22").hide();
|
$(".diymore22").hide();
|
||||||
});
|
});
|
||||||
|
myrequire(["clipboard"], function(t) {
|
||||||
|
new t("#copydiy",{
|
||||||
|
text: function(t) {
|
||||||
|
var cid = $(t).data("cid");
|
||||||
|
var mt = $('#'+cid).html().replace(/\s+/g,"");
|
||||||
|
return mt.replace(/###/g, "\n");
|
||||||
|
}
|
||||||
|
}).on("success", function(t) {
|
||||||
|
tip.msgbox.suc("复制成功")
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function showDiyInfo(obj){
|
function showDiyInfo(obj){
|
||||||
|
@ -238,6 +238,14 @@
|
|||||||
<input type="hidden" name="headsid" value="{$_GPC['headsid']}" />
|
<input type="hidden" name="headsid" value="{$_GPC['headsid']}" />
|
||||||
<div class="page-toolbar">
|
<div class="page-toolbar">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
<span class="input-group-select">
|
||||||
|
<select name="postestatus" class="form-control" style="width:100px;padding:0 5px;">
|
||||||
|
<option value="" {if $_GPC['postestatus']==''}selected{/if}>推送状态</option>
|
||||||
|
{loop $postestatus $key $type}
|
||||||
|
<option value="{$key}" {if $_GPC['postestatus'] == "$key"} selected="selected" {/if}>{$type['name']}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</span>
|
||||||
<span class="input-group-select">
|
<span class="input-group-select">
|
||||||
<select name="paytype" class="form-control" style="width:100px;padding:0 5px;">
|
<select name="paytype" class="form-control" style="width:100px;padding:0 5px;">
|
||||||
<option value="" {if $_GPC['paytype']==''}selected{/if}>支付方式</option>
|
<option value="" {if $_GPC['paytype']==''}selected{/if}>支付方式</option>
|
||||||
@ -340,6 +348,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style='text-align:right;font-size:12px;' class='aops'>
|
<div style='text-align:right;font-size:12px;' class='aops'>
|
||||||
{if $item['merchid'] == 0}
|
{if $item['merchid'] == 0}
|
||||||
|
{if $item['wpfwset']['open_wpfw'] >0}
|
||||||
|
<a class='op' id="poste" data-href="{php echo webUrl('order/op/poste', array('id' => $item['id']))}" data-id="{$item['id']}">
|
||||||
|
<i class="icow icow-kaishi1" style="color: #df5254;display: inline-block;vertical-align: middle" title="推送过去"></i>
|
||||||
|
推送
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if !empty($item['goods_diyformdata_array'])}
|
||||||
|
<button type="button" class="op" data-toggle="ajaxModal" href="{php echo webUrl('order/op/diyformdata', array('id' => $item['id']))}">
|
||||||
|
<i class="icow icow-qiyong1" style="color: #999;display: inline-block;vertical-align: middle" title="自定义表单"></i>
|
||||||
|
表单
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{ifp 'order.op.remarksaler'}
|
{ifp 'order.op.remarksaler'}
|
||||||
<a class='op' data-toggle="ajaxModal" href="{php echo webUrl('order/op/remarksaler', array('id' => $item['id']))}" >
|
<a class='op' data-toggle="ajaxModal" href="{php echo webUrl('order/op/remarksaler', array('id' => $item['id']))}" >
|
||||||
{if !empty($item['remarksaler'])}
|
{if !empty($item['remarksaler'])}
|
||||||
@ -474,6 +496,7 @@
|
|||||||
{/loop}
|
{/loop}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{if empty($item['goods_diyformdata_array'])}
|
||||||
<div class="list-inner saler columnFlex" style='text-align: center;' >
|
<div class="list-inner saler columnFlex" style='text-align: center;' >
|
||||||
<div class="">
|
<div class="">
|
||||||
{ifp 'member.list.edit'}
|
{ifp 'member.list.edit'}
|
||||||
@ -484,6 +507,29 @@
|
|||||||
{$item['addressdata']['realname']}<br/>{$item['addressdata']['mobile']}
|
{$item['addressdata']['realname']}<br/>{$item['addressdata']['mobile']}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{else}
|
||||||
|
<div class="list-inner saler columnFlex" style='text-align: center;' >
|
||||||
|
<div class="" data-toggle='popover' data-html='true' data-placement='right' data-trigger="hover" data-content="<table style='width:100%;'>
|
||||||
|
{loop $item['goods_diyformdata_array'] $diy}
|
||||||
|
<tr>
|
||||||
|
<td style='border:none;text-align:right;' {if empty($diy['value'])} colspan='2'{/if}>{$diy['name']}:</td>
|
||||||
|
{if !empty($diy['value'])}<td style='border:none;text-align:right;'>{$diy['value']}</td>{/if}
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
</table>">
|
||||||
|
<div style='text-align:center'>
|
||||||
|
{ifp 'member.list.edit'}
|
||||||
|
<a href="{php echo webUrl('member/list/detail',array('id'=>$item['mid']))}"> {$item['nickname']}</a>
|
||||||
|
{else}
|
||||||
|
{$item['nickname']}
|
||||||
|
{/if}
|
||||||
|
{$item['addressdata']['realname']}<br/>{$item['addressdata']['mobile']}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="list-inner paystyle columnFlex" style='text-align:center;' >
|
<div class="list-inner paystyle columnFlex" style='text-align:center;' >
|
||||||
<div class="">
|
<div class="">
|
||||||
<!-- 已支付 -->
|
<!-- 已支付 -->
|
||||||
@ -524,8 +570,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="columnFlex" style="flex: 1;">
|
<div class="columnFlex" style="flex: 1;">
|
||||||
<div class="list-inner" data-toggle='popover' data-html='true' data-placement='right' data-trigger="hover"
|
<div class="list-inner" data-toggle='popover' data-html='true' data-placement='right' data-trigger="hover" data-content="<table style='width:100%;'>
|
||||||
data-content="<table style='width:100%;'>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='border:none;text-align:right;'>商品小计:</td>
|
<td style='border:none;text-align:right;'>商品小计:</td>
|
||||||
<td style='border:none;text-align:right;;'>¥{php echo number_format( $item['goodsprice'] ,2)}</td>
|
<td style='border:none;text-align:right;;'>¥{php echo number_format( $item['goodsprice'] ,2)}</td>
|
||||||
@ -619,7 +664,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
"> <div style='text-align:center'>
|
">
|
||||||
|
<div style='text-align:center'>
|
||||||
¥{php echo number_format($item['price'],2)}
|
¥{php echo number_format($item['price'],2)}
|
||||||
{if $item['dispatchprice']>0}
|
{if $item['dispatchprice']>0}
|
||||||
<br/>(含运费:¥{php echo number_format( $item['dispatchprice'],2)})
|
<br/>(含运费:¥{php echo number_format( $item['dispatchprice'],2)})
|
||||||
@ -814,6 +860,33 @@
|
|||||||
console.log('取消')
|
console.log('取消')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$(document).on('click','#poste',function () {
|
||||||
|
var that = $(this);
|
||||||
|
tip.confirm('确认推送订单信息到E语言吗\n', function () {
|
||||||
|
$.ajax({
|
||||||
|
url:that.data('href'),
|
||||||
|
method:'POST',
|
||||||
|
data:{},
|
||||||
|
success:function (successCallback) {
|
||||||
|
successCallback = JSON.parse(successCallback);
|
||||||
|
if (successCallback.status === 1)
|
||||||
|
{
|
||||||
|
tip.alert('操作成功',function () {
|
||||||
|
window.location.reload()
|
||||||
|
});
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
tip.alert(successCallback.message,function () {
|
||||||
|
window.location.reload()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}, function (errnoError) {
|
||||||
|
console.log('取消')
|
||||||
|
});
|
||||||
|
});
|
||||||
// });
|
// });
|
||||||
</script>
|
</script>
|
||||||
{template '_footer'}
|
{template '_footer'}
|
||||||
|
20
template/web_v3/order/op/diyformdata.html
Normal file
20
template/web_v3/order/op/diyformdata.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<form class="form-horizontal form-validate" action="{php echo webUrl('order/op/diyformdata')}" method="post" enctype="multipart/form-data">
|
||||||
|
<input type='hidden' name='id' value='{$id}' />
|
||||||
|
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button data-dismiss="modal" class="close" type="button">×</button>
|
||||||
|
<h4 class="modal-title">自定义表单信息</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
{template 'diyform/diyform_inputfix'}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-primary" type="submit">提交</button>
|
||||||
|
<button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user