Commit 6f5cf5dc by liuliufashi

update

parent ddaebeee
VUE_APP_MODE = 'dev' VUE_APP_MODE = 'dev'
NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js
VUE_APP_BASE_URL = '/iships/' VUE_APP_BASE_URL = '/iships/'
VUE_APP_MODE = 'http://47.102.211.197:8092' VUE_APP_MODE = 'http://43.142.42.187:8899'
VUE_APP_TEXT = '测试环境' VUE_APP_TEXT = '测试环境'
\ No newline at end of file
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<a-form-item :wrapper-col="{ offset: 1, span: 7 }" v-if="value == 1"> <a-form-item :wrapper-col="{ offset: 1, span: 7 }" v-if="value == 1">
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">划线价</div> <div style="margin-right:20px">划线价</div>
<a-input-number v-model:value="formState.markingprice" style="width: 200px" :min="0" :step="0.01" <a-input-number v-model:value="formState.markingprice" style="width: 200px" :min="0"
string-mode /> string-mode />
</div> </div>
</a-form-item> </a-form-item>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
:rules="[{ required: true, message: '请输入商品价格!' }]"> :rules="[{ required: true, message: '请输入商品价格!' }]">
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">售卖价</div> <div style="margin-right:20px">售卖价</div>
<a-input-number v-model:value="formState.price" style="width: 200px" :min="0" :step="0.01" <a-input-number v-model:value="formState.price" style="width: 200px" :min="0"
string-mode /> string-mode />
</div> </div>
</a-form-item> </a-form-item>
...@@ -342,11 +342,17 @@ const onBeforeUpload: UploadProps['beforeUpload'] = file => { ...@@ -342,11 +342,17 @@ const onBeforeUpload: UploadProps['beforeUpload'] = file => {
const onSubmit = () => { const onSubmit = () => {
validate() validate()
.then(async () => { .then(async () => {
const fromData:any = toRaw(formState)
const uid = getUid() const uid = getUid()
const prarms = { const prarms = {
...toRaw(formState), body: fromData.body,
remember: fromData.remember,
shortname: fromData.shortname,
subject: fromData.subject,
uid, uid,
parent: 1 parent: 1,
markingprice:fromData.markingprice*100,
price:fromData.markingprice*100
} }
const data: any = await onCreateGoods(JSON.stringify(prarms)) const data: any = await onCreateGoods(JSON.stringify(prarms))
if (data.state === 1) { if (data.state === 1) {
......
...@@ -81,14 +81,14 @@ ...@@ -81,14 +81,14 @@
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">划线价</div> <div style="margin-right:20px">划线价</div>
<a-input-number v-model:value="formState.markingprice" style="width: 200px" :min="0" <a-input-number v-model:value="formState.markingprice" style="width: 200px" :min="0"
:step="0.01" string-mode /> string-mode />
</div> </div>
</a-form-item> </a-form-item>
<a-form-item name="price" :wrapper-col="{ offset: 1, span: 7 }" v-if="value == 1" <a-form-item name="price" :wrapper-col="{ offset: 1, span: 7 }" v-if="value == 1"
:rules="[{ required: true, message: '请输入商品价格!' }]"> :rules="[{ required: true, message: '请输入商品价格!' }]">
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">售卖价</div> <div style="margin-right:20px">售卖价</div>
<a-input-number v-model:value="formState.price" style="width: 200px" :min="0" :step="0.01" <a-input-number v-model:value="formState.price" style="width: 200px" :min="0"
string-mode /> string-mode />
</div> </div>
</a-form-item> </a-form-item>
...@@ -305,11 +305,17 @@ const beforeUpload: UploadProps['beforeUpload'] = file => { ...@@ -305,11 +305,17 @@ const beforeUpload: UploadProps['beforeUpload'] = file => {
const onSubmit = () => { const onSubmit = () => {
validate() validate()
.then(async () => { .then(async () => {
const fromData:any = toRaw(formState)
const uid = getUid() const uid = getUid()
const prarms = { const prarms = {
...toRaw(formState), body: fromData.body,
remember: fromData.remember,
shortname: fromData.shortname,
subject: fromData.subject,
uid, uid,
parent: 0 parent: 1,
markingprice:fromData.markingprice*100,
price:fromData.markingprice*100
} }
const data: any = await onCreateGoods(JSON.stringify(prarms)) const data: any = await onCreateGoods(JSON.stringify(prarms))
if (data.state === 1) { if (data.state === 1) {
...@@ -318,6 +324,7 @@ const onSubmit = () => { ...@@ -318,6 +324,7 @@ const onSubmit = () => {
message.success(data.message) message.success(data.message)
emit('onBack') emit('onBack')
} }
}) })
.catch(err => { .catch(err => {
console.log('error', err); console.log('error', err);
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<a-form-item :wrapper-col="{ offset: 2, span: 7 }"> <a-form-item :wrapper-col="{ offset: 2, span: 7 }">
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">划线价</div> <div style="margin-right:20px">划线价</div>
<a-input-number style="width: 200px" :min="0" :step="0.01" string-mode <a-input-number style="width: 200px" :min="0" string-mode
v-model:value="modelRef.markingprice" /> v-model:value="modelRef.markingprice" />
</div> </div>
</a-form-item> </a-form-item>
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
:rules="[{ required: true, message: '请输入商品价格!' }]"> :rules="[{ required: true, message: '请输入商品价格!' }]">
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">售卖价</div> <div style="margin-right:20px">售卖价</div>
<a-input-number style="width: 200px" :min="0" :step="0.01" string-mode <a-input-number style="width: 200px" :min="0" string-mode
v-model:value="modelRef.price" /> v-model:value="modelRef.price" />
</div> </div>
</a-form-item> </a-form-item>
...@@ -271,8 +271,8 @@ const handleOk = async () => { ...@@ -271,8 +271,8 @@ const handleOk = async () => {
shortname: modelRef.value.shortname, shortname: modelRef.value.shortname,
picurl: fileList.value[0].url, picurl: fileList.value[0].url,
body: modelRef.value.body, body: modelRef.value.body,
price: modelRef.value.price, price: modelRef.value.price*100,
markingprice: modelRef.value.markingprice, markingprice: modelRef.value.markingprice*100,
status: modelRef.value.status, status: modelRef.value.status,
parent: modelRef.value.parent, parent: modelRef.value.parent,
free: modelRef.value.sellingmodel, free: modelRef.value.sellingmodel,
......
...@@ -176,8 +176,6 @@ const onSubmit = () => { ...@@ -176,8 +176,6 @@ const onSubmit = () => {
const starttime = (moment(toRaw(formState).starttime.$d).format('YYYY-MM-DD'))+(moment(startvalue.value.$d).format('THH:mm:[00][Z]')) const starttime = (moment(toRaw(formState).starttime.$d).format('YYYY-MM-DD'))+(moment(startvalue.value.$d).format('THH:mm:[00][Z]'))
const expireendtime = (moment(toRaw(formState).expireendtime.$d).format('YYYY-MM-DD'))+(moment(endvalue.value.$d).format('THH:mm:[00][Z]')) const expireendtime = (moment(toRaw(formState).expireendtime.$d).format('YYYY-MM-DD'))+(moment(endvalue.value.$d).format('THH:mm:[00][Z]'))
goodspayditch.value.map((item:any)=>{return item.goodsid = toRaw(formState).subject.value}) goodspayditch.value.map((item:any)=>{return item.goodsid = toRaw(formState).subject.value})
console.log(goodspayditch.value,'goodspayditch.value');
const prarms = { const prarms = {
subject:toRaw(formState).subject.label, subject:toRaw(formState).subject.label,
shortname:toRaw(formState).shortname, shortname:toRaw(formState).shortname,
...@@ -187,7 +185,7 @@ const onSubmit = () => { ...@@ -187,7 +185,7 @@ const onSubmit = () => {
starttime:starttime, starttime:starttime,
goodsid: toRaw(formState).subject.value, goodsid: toRaw(formState).subject.value,
goodspayditch:goodspayditch.value, goodspayditch:goodspayditch.value,
payment:formState.paymentmodel == '1'?price.value:priceSet.value, payment:formState.paymentmodel == '1'?price.value*100:priceSet.value*100,
uid, uid,
} }
const data:any = await onCreateGoodsPay(prarms) const data:any = await onCreateGoodsPay(prarms)
......
...@@ -215,8 +215,8 @@ const handleOk =async(e: MouseEvent) => { ...@@ -215,8 +215,8 @@ const handleOk =async(e: MouseEvent) => {
const params={ const params={
id: formState.value.id, id: formState.value.id,
goodsid: formState.value.goodspayditch[0].goodsid, goodsid: formState.value.goodspayditch[0].goodsid,
paymentmodel: formState.value.paymentmodel, paymentmodel: formState.value.paymentmodel*100,
payment: formState.value.payment, payment: formState.value.payment *100,
fullphone:formState.value.fullphone, fullphone:formState.value.fullphone,
expiremodel:formState.value.expiremodel, expiremodel:formState.value.expiremodel,
expireendtime:expireendtime, expireendtime:expireendtime,
......
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