Commit 74559363 authored by 张锡奇's avatar 张锡奇

upload

parent 3172affb
......@@ -61,6 +61,7 @@
"html-webpack-plugin": "^2.30.1",
"jest": "^22.0.4",
"jest-serializer-vue": "^0.3.0",
"lrz": "^4.9.40",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
......
......@@ -38,7 +38,7 @@ export default {
*/
uuid() {
var s = [];
var hexDigits = "0123456789abcdef";
var hexDigits = "0123456789ABCDEF";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
......@@ -54,12 +54,15 @@ export default {
* @param option 参考csdn: https://blog.csdn.net/qq_27626333/article/details/81463139
*/
ossUploadFile(option) {
const tempFile = option.tempFile
const file = option.file
const self = this
return new Promise((resolve, reject) => {
const extensionName = file.name.substr(file.name.indexOf('.')) // 文件扩展名
const fileName = `${option.sProjectNo}/${self.uuid()+extensionName}`
const fileName = `${option.iProjectId}${option.sProjectNo}/${(option.uuid || self.uuid())}.jpg`
console.log(option.uuid)
// 执行上传
self.createOssClient(option.bucket).then(client => {
// 异步上传,返回数据
......@@ -69,7 +72,7 @@ export default {
})
// 上传处理
// 分片上传文件
client.multipartUpload(fileName, file, {
client.multipartUpload(fileName, tempFile, {
headers:{
'Content-Type': 'image/jpg'
},
......@@ -80,7 +83,6 @@ export default {
// option.onProgress(e)
}
}).then((val) => {
console.info(val,fileName)
if (val.res.statusCode === 200) {
console.log('seccess')
// option.onSuccess(val)
......
......@@ -12,7 +12,7 @@ function urlFun(name){
/**
* 默认公司
*/
// default:`http://192.168.4.25:5001`,
// default:`http://192.168.4.44:5001`,
// default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
// default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
default:`https://weixin.huansi.net/apiproxy/huansi/Tip`,
......
......@@ -59,6 +59,38 @@ export default {
fixed:true,
fixedLeftWidth:'0px'
},
{
width:'80px',
name:'加工进度',
align:'center',
color:'#2d8cf0',
fixed:true,
fixedLeftWidth:'100px',
field:'look',
render: (h,params) => {
return h('span',{
style: {
'text-decoration':'underline',
'color':'#2d8cf0'
},
on:{
'click':()=>{
if(params.row.sStatus == "生产新增"){
this.$vux.confirm.show({
title:"提示",
content:'该订单无跟踪信息!',
showCancelButton:false,
})
return false;
}
wx.miniProgram.navigateTo({
url:`/sub/pages/orderTracking/index?formPage=process&sStatus=${params.row.sStatus}&begin_date=${this.search.dBeginDate}&end_date=${this.search.dEndDate}&sContractNo=${params.row.sContractNo}`
})
}
}
},'查看')
}
},
{
width:'100px',
name:'加工商',
......@@ -134,7 +166,7 @@ export default {
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 120px)',
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'1200px'
width:'1280px'
},
status:[],
row:{},
......
......@@ -16,7 +16,7 @@
>td{
padding-bottom:18px;
>div{
height: 45px;
height: 70px;
background: #fff;
padding: 6px 0;
display: flex;
......@@ -45,7 +45,7 @@
<table cellspacing="0" v-if="list.length>0">
<tr>
<td></td>
<td>米数</td>
<td>数量</td>
<td>匹数</td>
<td>金额</td>
</tr>
......@@ -58,9 +58,12 @@
<span style="width:100%;">
{{Number(v.M_nQty||0).toLocaleString()}}(M)
</span>
<span>
<span style="width:100%;">
{{Number(v.YD_nQty||0).toLocaleString()}}(YD)
</span>
<span style="width:100%;">
{{Number(v.KG_nQty||0).toLocaleString()}}(KG)
</span>
</div>
</td>
<td>
......
This diff is collapsed.
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 to comment