|
@@ -369,14 +369,58 @@ function doAddYcrkNew(){
|
|
|
//未录入料品导出
|
|
//未录入料品导出
|
|
|
function wlrlpdc(){
|
|
function wlrlpdc(){
|
|
|
let dcd_no = $("input[name='dcd_no']").val();
|
|
let dcd_no = $("input[name='dcd_no']").val();
|
|
|
- alert(dcd_no)
|
|
|
|
|
|
|
+ $.post("/beihuogl/wlrlpdc", {dcd_no: dcd_no}, function(res){
|
|
|
|
|
+ if(res.success){
|
|
|
|
|
+ downloadexcel(res.data,dcd_no)
|
|
|
|
|
+ }else{
|
|
|
|
|
+ layx.confirm('提示',a.msg,null,{
|
|
|
|
|
+ buttons:[
|
|
|
|
|
+ {
|
|
|
|
|
+ label:'确定',
|
|
|
|
|
+ callback:function(id, button, event){
|
|
|
|
|
+ layx.destroy(id);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ],dialogIcon:'error',shadable:0.6
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },'json')
|
|
|
}
|
|
}
|
|
|
//重置料品信息
|
|
//重置料品信息
|
|
|
function czlpxx(){
|
|
function czlpxx(){
|
|
|
let dcd_no = $("input[name='dcd_no']").val();
|
|
let dcd_no = $("input[name='dcd_no']").val();
|
|
|
alert(dcd_no)
|
|
alert(dcd_no)
|
|
|
}
|
|
}
|
|
|
-</script>
|
|
|
|
|
|
|
|
|
|
|
|
+function downloadexcel(data,dcd_no){
|
|
|
|
|
+ let sheet = XLSX.utils.json_to_sheet(data)
|
|
|
|
|
+
|
|
|
|
|
+ sheet['!cols'] = [
|
|
|
|
|
+ //订单号
|
|
|
|
|
+ {
|
|
|
|
|
+ wch:15,
|
|
|
|
|
+ },
|
|
|
|
|
+ //订单编码
|
|
|
|
|
+ {
|
|
|
|
|
+ wch:80,
|
|
|
|
|
+ },
|
|
|
|
|
+ //店铺名称
|
|
|
|
|
+ {
|
|
|
|
|
+ wch:60,
|
|
|
|
|
+ },
|
|
|
|
|
+ //状态
|
|
|
|
|
+ {
|
|
|
|
|
+ wch:15,
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ let workbook = XLSX.utils.book_new();
|
|
|
|
|
+
|
|
|
|
|
+ XLSX.utils.book_append_sheet(workbook, sheet, "Sheet1");
|
|
|
|
|
+ XLSX.writeFile(workbook, dcd_no+"_料品未录入信息.xlsx");
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
|
|
|
|
|
+<script type="text/javascript" src="{$theme}js/excel/xlxswidth.js"></script>
|
|
|
{Template footer}
|
|
{Template footer}
|